:root {
  --primary: #0f172a;
  --primary-light: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #f59e0b;
  --accent: #38bdf8;
  --dark: #020617;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Outfit', sans-serif;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:not(.btn-primary)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-light);
  transition: width 0.3s ease;
}

.nav-links a:not(.btn-primary):hover::after {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-hover) 100%);
  color: white !important;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 20px;
  overflow: hidden;
}

.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 6s ease-out;
  transform: scale(1.1);
}

.carousel-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.4));
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  z-index: 1;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.35rem;
  margin-bottom: 2.5rem;
  color: #e2e8f0;
  font-weight: 300;
  animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

.hero-content .btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  opacity: 0;
}

/* About Section */
.about {
  padding: 8rem 5%;
  background: white;
}

.about-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.lead-text {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--gray);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

/* Services Section */
.services {
  padding: 8rem 5%;
  background: var(--light);
}

.section-title {
  text-align: center;
  font-size: 2.75rem;
  margin-bottom: 4rem;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: -1px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.6);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-hover) 100%);
  z-index: -1;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px -15px rgba(37, 99, 235, 0.2);
}

.service-card:hover::before {
  height: 10px;
}

.service-icon {
  font-size: 3rem !important;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  display: inline-block;
  background: #eff6ff;
  padding: 1rem;
  border-radius: 16px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.service-card p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Features Box */
.features-box {
  max-width: 900px;
  margin: 6rem auto 0;
  background: white;
  padding: 4rem;
  border-radius: 24px;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
}

.features-box h3 {
  color: var(--primary);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.features-box p {
  color: var(--gray);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.features-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.features-list li {
  background: var(--light);
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid var(--gray-light);
}

.features-list li:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.features-list li .material-symbols-outlined {
  font-size: 1.25rem;
  color: var(--primary-light);
}

.features-list li:hover .material-symbols-outlined {
  color: white;
}

/* Terms Section */
.terms-section {
  background-color: var(--light);
  padding: 2rem 5%;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

.terms-container p {
  color: var(--gray);
  font-size: 0.9rem;
  max-width: 800px;
  margin: 0 auto;
}

.terms-container a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.terms-container a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: var(--primary);
  color: white;
  padding: 4rem 5%;
  text-align: center;
}

.footer-content h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-content p {
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.footer-content strong {
  color: white;
}

/* Tracking & Admin Pages */
.tracking-header {
  padding: 10rem 5% 5rem;
  background: var(--primary);
  color: white;
  text-align: center;
}

.tracking-results, .admin-container {
  padding: 4rem 5%;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 50vh;
}

/* MSC Tracking Style Redesign */
.msc-summary-card {
  display: flex;
  justify-content: space-between;
  background: white;
  border-radius: 12px;
  border: 2px solid var(--primary-light);
  padding: 0;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.msc-summary-item {
  padding: 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.msc-summary-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: #e2e8f0;
}

.msc-summary-item.highlight {
  background: #f1f5f9;
}

.msc-label {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0.5rem;
}

.msc-value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.msc-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.msc-table-header {
  display: grid;
  grid-template-columns: 150px 140px 1.2fr 1fr 1.5fr;
  background: #f1f5f9;
  padding: 1.5rem 2rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.msc-table-header > div {
  min-width: 0;
  overflow-wrap: break-word;
  padding-right: 1rem;
}

.msc-table-header div:first-child {
  padding-left: 2.5rem;
}

.msc-timeline {
  padding: 1rem 2rem 2rem 2rem;
}

.msc-timeline-row {
  display: grid;
  grid-template-columns: 150px 140px 1.2fr 1fr 1.5fr;
  padding: 1.5rem 0;
  position: relative;
}

.msc-timeline-row:not(:last-child) {
  border-bottom: 1px solid #f8fafc;
}

.msc-timeline-row::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dotted #94a3b8;
  z-index: 1;
}

.msc-timeline-row:first-child::before {
  top: 2rem;
  border-left-color: var(--primary-light);
}

.msc-timeline-row:last-child::before {
  bottom: calc(100% - 2rem);
}

.msc-node {
  position: absolute;
  left: 0;
  top: 1.7rem;
  width: 14px;
  height: 14px;
  background: white;
  border: 3px solid #94a3b8;
  border-radius: 50%;
  z-index: 2;
}

.msc-timeline-row:first-child .msc-node {
  border-color: var(--primary-light);
  background: var(--primary-light);
  width: 16px;
  height: 16px;
  left: -1px;
  top: 1.6rem;
}

.msc-timeline-col {
  padding-right: 1rem;
  min-width: 0;
  overflow-wrap: break-word;
}

.msc-timeline-col:nth-child(2) {
  padding-left: 2.5rem;
  color: var(--gray);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 1rem 0;
    gap: 1.5rem;
  }
  .nav-links.active {
    display: flex;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .about, .services, .tracking-header, .tracking-results, .admin-container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .features-box {
    padding: 2rem 1.5rem;
    margin-top: 4rem;
  }
  
  footer {
    padding: 3rem 1.5rem;
  }
  
  .input-group {
    flex-direction: column;
  }
  .input-group input, .input-group button {
    width: 100%;
  }

  .msc-summary-card {
    flex-direction: column;
  }
  .msc-summary-item:not(:last-child)::after {
    display: none;
  }
  .msc-table-header {
    display: none;
  }
  .msc-timeline-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .msc-timeline-col {
    padding-left: 2.5rem;
  }
  .msc-timeline-col:nth-child(2) {
    font-weight: bold;
    color: var(--primary);
  }
}

.admin-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  font-weight: 600;
  color: var(--gray);
}

/* Inputs */
.input-group {
  display: flex;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.input-group input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: 2px solid var(--gray-light);
  border-radius: 99px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
}

.input-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Animations */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
