@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  
  --primary: #4B3A6F;
  --primary-hover: #5A437E;
  
  /* Legacy mapping for existing pages */
  --teal: #7FD3D4;
  --teal-light: #9CEBEB;
  --cyan: #7FD3D4;
  
  --royal-blue: #4169E1;
  --royal-blue-hover: #3154b3;
  
  --text-primary: #3A3A3A;
  --text-secondary: #4A4A4A;
  --text-light: #ffffff;
  
  --border: #eaeaea;
  --glow: 0 4px 15px rgba(0, 136, 204, 0.15);
  
  --radius: 0px;
  --radius-sm: 0px;
  
  --font-main: 'Open Sans', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── HEADER REDESIGN ── */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

.top-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.top-logo svg {
  width: 45px; height: 45px;
}
.top-logo-text {
  display: flex; flex-direction: column;
}
.top-logo-text .title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #333;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.top-logo-text .subtitle {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.top-info-blocks {
  display: flex;
  gap: 30px;
}
.info-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.info-icon {
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.info-text {
  display: flex; flex-direction: column;
}
.info-text strong {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: #333;
}
.info-text span {
  font-size: 0.8rem;
  color: #777;
}

/* Main Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.nav-links {
  display: flex; align-items: center; gap: 20px; list-style: none;
}
.nav-links li {
  position: relative;
}
.nav-links a {
  font-family: var(--font-heading);
  color: #333; text-decoration: none;
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase;
  padding: 20px 0;
  transition: color 0.2s;
  display: flex; align-items: center; gap: 4px;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

/* DROPDOWN MENU */
.nav-links li.has-dropdown {
  position: relative;
}
.nav-links .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 240px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border-top: 3px solid var(--primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 6px 6px;
}
.nav-links li.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-links .dropdown > a {
  padding: 14px 22px;
  color: #444;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  display: block;
}
.nav-links .dropdown > a:last-child {
  border-bottom: none;
}
.nav-links .dropdown > a:hover {
  background: #f8fbff;
  color: var(--primary);
  padding-left: 28px;
}

/* MEGA MENU */
.nav-links li.has-mega .mega-menu {
  width: 700px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  padding: 25px;
}
.nav-links li.has-mega:hover .mega-menu {
  transform: translateX(-50%) translateY(0);
}
.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.mega-item {
  display: flex;
  flex-direction: column;
  padding: 15px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
  border: 1px solid transparent;
}
.mega-item:hover {
  background: #f8fbff;
  border-color: #e6f2ff;
}
.mega-item strong {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 5px;
}
.mega-item span {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.social-icons {
  display: flex; gap: 10px;
}
.social-icons a {
  color: #555;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.social-icons a:hover {
  color: var(--primary);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: none; transition: all 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 2px solid #ccc;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 15px 35px; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* FANCY APPOINTMENT BUTTON */
.btn-fancy {
  background: linear-gradient(135deg, #0088cc, #00aaff);
  color: #fff !important;
  border-radius: 50px !important;
  padding: 12px 24px;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
  animation: pulse-fancy 2s infinite;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-fancy:hover {
  background: linear-gradient(135deg, #0077b3, #0088cc);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.6);
}
@keyframes pulse-fancy {
  0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 136, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); }
}

/* ── SLIDER ── */
.hero {
  padding: 0;
  position: relative;
  overflow: hidden;
  display: block;
}
.hero-slider {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 500px;
}
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 80px 10%;
}
.slide::before {
  content:''; position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0.98) 100%);
  z-index: -1;
}
.slide.active {
  opacity: 1;
  z-index: 2;
}
.hero-content {
  position: relative; z-index: 3; 
  max-width: 600px;
  text-align: right;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease 0.3s;
}
.slide.active .hero-content {
  opacity: 1;
  transform: translateY(0);
}
.hero-subtitle {
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  font-weight: 800; line-height: 1.1;
  color: #333;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem; color: #555;
  margin-bottom: 30px;
}

.slider-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #333; font-size: 1.2rem;
  cursor: pointer; transition: all 0.2s;
  z-index: 10;
}
.slider-arrow:hover { background: #fff; color: var(--primary); }
.slider-prev { left: 3%; }
.slider-next { right: 3%; }


/* ── SECTION ── */
.section { padding: 80px 5%; background: var(--bg-primary); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-tag {
  display: inline-block;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.9rem; font-weight: 700; text-transform: uppercase;
  margin-bottom: 10px;
}
.section h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem; font-weight: 800;
  color: #333;
  margin-bottom: 15px;
}
.section p.lead { font-size: 1.05rem; color: #666; max-width: 600px; margin: 0 auto; }

/* ── CARD ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: all .3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.06); }

/* ── TEST GRID ── */
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.test-card { cursor: pointer; }
.test-card h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: #333; margin-bottom: 8px; }
.test-card p  { font-size: 0.9rem; color: #666; margin-bottom: 16px; }
.test-price { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

.category-badge {
  display: inline-block; padding: 4px 10px; border-radius: 2px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 12px;
}
.badge-health { background: #e6f6ff; color: var(--primary); border: 1px solid #cceeff; }
.badge-sexual { background: #ffe6e6; color: #cc0000; border: 1px solid #ffcccc; }
.badge-urine  { background: #fff0e6; color: #d97706; border: 1px solid #ffe0cc; }
.badge-resp   { background: #e6e6ff; color: #4338ca; border: 1px solid #ccccff; }

/* ── SMART FINDER ── */
.finder-box {
  max-width: 800px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  padding: 50px; border-radius: 4px;
}
.finder-step { display: none; }
.finder-step.active { display: block; }
.finder-step h3 { font-family: var(--font-heading); font-size: 1.5rem; color: #333; margin-bottom: 10px; }
.finder-step p { color: #666; margin-bottom: 25px; }

.symptom-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.chip {
  padding: 8px 16px; border-radius: 2px; cursor: pointer;
  border: 1px solid #ddd; background: #fafafa;
  color: #555; font-size: 0.9rem; transition: all .2s;
}
.chip:hover, .chip.selected {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}

/* ── FEATURES ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.feature-icon {
  width: 60px; height: 60px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 1.8rem;
  background: #e6f6ff; color: var(--primary);
}
.feature-card h3 { font-family: var(--font-heading); font-size: 1.1rem; color: #333; margin-bottom: 10px; }
.feature-card p  { color: #666; }

/* ── FORM ── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; color: #444; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 15px;
  background: #fff; border: 1px solid #ccc;
  border-radius: 2px; color: #333; font-family: var(--font-main);
  transition: all .2s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 5px rgba(0,136,204,0.3); outline: none; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── AUTH ── */
.auth-container { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 60px 20px; background: #f4f7f6; }
.auth-box { width: 100%; max-width: 450px; background: #fff; border: 1px solid #eee; box-shadow: 0 10px 30px rgba(0,0,0,0.05); padding: 40px; border-radius: 4px; }
.auth-box h2 { font-family: var(--font-heading); font-size: 1.6rem; color: #333; margin-bottom: 8px; }
.auth-divider { text-align: center; position: relative; margin: 25px 0; }
.auth-divider::before { content:''; position:absolute; top:50%; left:0; right:0; height:1px; background: #eee; }
.auth-divider span { position: relative; background: #fff; padding: 0 10px; color: #888; font-size: 0.85rem; }
.auth-link { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ── ALERTS ── */
.alert { padding: 12px 15px; border-radius: 2px; margin-bottom: 20px; font-size: 0.9rem; border-left: 4px solid; }
.alert-success { background: #e6ffed; border-color: #28a745; color: #155724; }
.alert-error   { background: #ffe6e6; border-color: #dc3545; color: #721c24; }
.alert-info    { background: #e6f6ff; border-color: var(--primary); color: #004085; }

/* ── HOW IT WORKS ── */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px; }
.step-number {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 15px;
}
.step h3 { font-family: var(--font-heading); font-size: 1.1rem; color: #333; margin-bottom: 8px; }
.step p   { color: #666; }

/* ── CTA BANNER ── */
.cta-banner {
  background: var(--primary);
  color: #fff; padding: 60px 40px; text-align: center;
  border-radius: 4px;
}
.cta-banner h2 { color: #fff; -webkit-text-fill-color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); }
.cta-banner .btn-primary { background: #fff; color: var(--primary); }
.cta-banner .btn-primary:hover { background: #f0f0f0; }

/* ── PAGE HERO ── */
.page-hero {
  padding: 100px 5% 60px;
  background: #f4f7f6;
  text-align: center;
  border-bottom: 1px solid #eaeaea;
}
.page-hero h1 { font-family: var(--font-heading); font-size: 2.5rem; color: #333; margin-bottom: 15px; -webkit-text-fill-color: #333; }
.page-hero p { color: #666; font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ── UTILITIES ── */
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ── FOOTER ── */
.footer { background: #222; color: #ccc; padding: 60px 5% 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-family: var(--font-heading); font-size: 1rem; margin-bottom: 20px; text-transform: uppercase; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #aaa; text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; display: flex; justify-content: space-between; font-size: 0.85rem; }

/* ── RESPONSIVE ── */
.hamburger { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--primary); }

@media (max-width: 1100px) {
  .top-info-blocks { display: none; }
  .nav-actions .btn-fancy { display: none; }
  .hamburger { display: block; }
  
  .navbar { height: 70px; position: relative; }
  .top-header { padding: 10px 5%; justify-content: center; }
  
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 5%;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    display: none;
    border-top: 1px solid #f0f0f0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li { width: 100%; }
  .nav-links > li > a {
    padding: 15px 0;
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    justify-content: space-between;
  }
  .nav-links li.has-mega .mega-menu, .nav-links li.has-dropdown .dropdown {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    border-top: none;
    opacity: 1;
    visibility: visible;
    display: none;
    padding: 10px 0;
  }
  .nav-links li.has-dropdown.open-sub .dropdown, .nav-links li.has-mega.open-sub .mega-menu {
    display: flex;
  }
  .mega-grid { grid-template-columns: 1fr; }
  
  .hero-slider, .hero { min-height: 60vh; height: 60vh; }
  .slide { padding: 40px 5%; justify-content: center; text-align: center; }
  .hero-content { text-align: center; }
  .slide::before { background: rgba(255,255,255,0.85); }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .tests-grid, .features-grid, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .cta-banner { padding: 50px 20px; }
  .cta-banner h2 { font-size: 1.8rem; }
}

/* Make sure old styles mapped correctly */
.test-time, .test-sample { color: #666; background: #f0f0f0; }
