/* ============================================================
   SMEAR PATHOLOGY — V3 POLISH CSS
   Parts:
    A. Design token overrides (lighter, clinical)
    B. Header visual refinement + lang-toggle fix
    C. Founder / Director section
    D. Devanagari / Marathi typography
    E. Section background rhythm (light base)
    F. Button & CTA refinement
    G. QA fixes (overflow, spacing, tap targets)
   ============================================================ */

/* ── A. TOKEN OVERRIDES ─────────────────────────────────────── */
:root {
  /* Lighter clinical palette overrides */
  --color-off-white: #f5f7f9;
  --color-light-gray: #eef1f3;
  --color-border: #e2e8ea;
  --color-section-alt: #f0f5f6;
  /* gentle teal-tinted white for alternate sections */

  /* Shadow refinement — softer, less teal-tinted */
  --shadow-header: 0 1px 0 var(--color-border), 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.07);

  /* Tighter header */
  --header-h: 68px;
}

/* ── B. HEADER VISUAL REFINEMENT ────────────────────────────── */
.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  box-shadow: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 200ms ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-header);
}

.header-inner {
  gap: 0.75rem;
}

/* Nav links — refined spacing */
.nav-link {
  padding: 0.4rem 0.7rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--color-text-mid);
  border-radius: 6px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-link:hover {
  background: var(--color-section-alt);
  color: var(--color-primary);
}

/* Header CTA buttons — more compact, clean */
.btn-icon {
  padding: 0.45rem 0.9rem;
  font-size: 0.83rem;
  border-radius: 8px;
  min-height: 38px;
}

/* ── B2. LANG TOGGLE FIX ─────────────────────────────────────
   Problem: .header-ctas is display:none on mobile so the toggle
   vanishes. On desktop the header is white so white-text toggle
   is invisible. Fix: override color to primary for light header,
   and expose toggle separately on mobile outside .header-ctas.
   ────────────────────────────────────────────────────────────── */
.lang-toggle {
  /* Override V2 white-text style — header is now white */
  color: var(--color-primary);
  border-color: var(--color-border);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 40px;
  min-height: 38px;
  padding: 0 0.5rem;
  border-radius: 6px;
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--color-section-alt);
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* Show the lang toggle on mobile OUTSIDE .header-ctas using
   a dedicated slot next to the hamburger */
@media (max-width: 899px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .header-logo { margin-right: auto; }
  .header-nav { display: none; }
  .header-ctas {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
  }
  .header-ctas > a { display: none; }
  .header-ctas > a.btn-icon--cart { display: flex !important; }
  
  .lang-toggle {
    display: flex !important;
    margin-left: 0;
    min-width: 36px;
    min-height: 36px;
    font-size: 0.72rem;
  }
  .hamburger {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
}

/* Desktop: all three items (call, wa, lang) side by side */
@media (min-width: 900px) {
  .header-ctas {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .lang-toggle {
    display: flex;
  }
}

@media (min-width: 900px) and (max-width: 1099px) {
  .header-inner { gap: 0.3rem; }
  .nav-link { padding-inline: 0.38rem; font-size: 0.75rem; }
  .header-ctas { gap: 0.2rem; margin-left: 0.25rem; }
  .header-ctas .btn-icon { min-width: 38px; padding-inline: 0.55rem; }
  .header-ctas .btn-icon span { display: none; }
  .lang-toggle { min-width: 36px; padding-inline: 0.35rem; }
}

/* Lang toggle inside mobile drawer — style tweak */
.lang-toggle-mobile {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
}

.lang-toggle-mobile:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Override the @media (max-width:360px) hide rule from V2 —
   we now always show the toggle */
@media (max-width: 360px) {
  .lang-toggle {
    display: flex !important;
    font-size: 0.65rem;
    min-width: 32px;
  }
}

/* ── C. FOUNDER / DIRECTOR SECTION ─────────────────────────── */
.section-founder {
  background: var(--color-white);
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.founder-block {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 1000px;
  margin-inline: auto;
}

/* Photo */
.founder-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.founder-photo {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  background: var(--color-section-alt);
  display: block;
}

/* Initials circle placeholder — shown when photo is missing */
.founder-initials {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-section-alt);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary-light);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* Copy */
.founder-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.founder-name {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 0.1rem;
}

.founder-quals {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-light);
  letter-spacing: 0.04em;
}

.founder-role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.founder-bio {
  font-size: 1rem;
  color: var(--color-text-mid);
  line-height: 1.75;
  max-width: 560px;
}

/* Mobile: stack vertically */
@media (max-width: 639px) {
  .founder-block {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .founder-photo-wrap {
    align-items: center;
  }

  .founder-photo,
  .founder-initials {
    width: 190px;
    height: 190px;
    margin-inline: auto;
  }

  .founder-initials {
    font-size: 2rem;
  }

  .founder-bio {
    max-width: 100%;
  }
}

/* ── D. DEVANAGARI / MARATHI TYPOGRAPHY ─────────────────────── */
/* Devanagari script needs 1.8–2.0 line-height and slightly
   more letter-spacing to stay readable vs Latin's 1.5–1.65. */
:lang(mr) body,
html[lang="mr"] body {
  line-height: 1.85;
}

html[lang="mr"] .hero-headline,
html[lang="mr"] .section-title,
html[lang="mr"] .founder-name {
  line-height: 1.35;
}

html[lang="mr"] p,
html[lang="mr"] .founder-bio,
html[lang="mr"] .trust-badge__desc,
html[lang="mr"] .how-step__desc,
html[lang="mr"] .faq-answer p,
html[lang="mr"] .about-lead {
  line-height: 1.9;
}

html[lang="mr"] .faq-question__text,
html[lang="mr"] .nav-link,
html[lang="mr"] .mobile-nav__link {
  line-height: 1.5;
}

/* Ensure Devanagari renders via the system font stack if Google
   Fonts hasn't loaded Devanagari glyphs for Outfit/Inter */
html[lang="mr"] body {
  font-family: 'Noto Sans Devanagari', 'Inter', system-ui, sans-serif;
}

/* ── E. SECTION BACKGROUND RHYTHM ───────────────────────────── */
/* Alternate sections: white / very-light-gray / white
   so the page has visual breathing room without dark blocks.
   NOTE: Gallery keeps its original dark-teal background because
   all its internal colour rules (white text, translucent cards)
   are already designed for a dark surface. Changing it to white
   would require rewriting the whole gallery subsystem.
   Contact likewise keeps its existing light/white background.
   Only explicitly listed here are sections that CHANGE from main.css. */
.section-hero {
  background: var(--color-primary);
}
.section-hero::before,
.section-hero::after {
  display: none;
}

.hero-inner { grid-template-columns: minmax(0, 1fr); }
.hero-content { max-width: 700px; }

.section-about {
  background: var(--color-white);
}

.section-founder {
  background: var(--color-section-alt);
}

.section-tests {
  background: var(--color-white);
}

.section-how {
  background: var(--color-section-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Gallery: keep original dark-teal background — do NOT override */
/* .section-gallery { } — intentionally left unchanged from main.css */
.section-reviews {
  background: var(--color-section-alt);
}

/* FAQ: white */
.section-faq {
  background: var(--color-white);
}

/* Contact: keep original light/white background — do NOT override */
/* .section-contact { } — intentionally left unchanged from main.css */

/* Contact section on light bg — ensure heading + subtitle are dark */
.section-contact .section-eyebrow {
  color: var(--color-primary-light);
}

.section-contact .section-title {
  color: var(--color-primary);
}

.section-contact .section-subtitle {
  color: var(--color-text-mid);
}

/* Map directions button on light bg */
.map-directions-btn.btn--outline {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.map-directions-btn.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Trust strip in contact on light bg */
.section-contact .trust-strip--dark {
  color: var(--color-text-muted);
}

/* Map iframe border on light bg */
.section-contact .map-iframe-wrap {
  border-color: var(--color-border);
}


/* ── F. BUTTON & CTA REFINEMENT ─────────────────────────────── */
/* Remove heavy shadows; keep clean solid style */
.btn {
  box-shadow: none;
  letter-spacing: 0.01em;
}

.btn:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.btn--primary:hover {
  box-shadow: 0 4px 12px rgba(13, 59, 62, 0.2);
}

.btn--whatsapp:hover {
  box-shadow: 0 4px 12px rgba(37, 165, 106, 0.2);
}

/* Trust badges — ensure thin-line icon style */
.trust-badge__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.6;
}

/* Test card — clean, no heavy shadow */
.test-card {
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.test-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}

/* FAQ item — cleaner border */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

/* ── G. QA FIXES ─────────────────────────────────────────────── */

/* Prevent any horizontal overflow on mobile */
body {
  overflow-x: hidden;
}

.carousel-track {
  -webkit-overflow-scrolling: touch;
}

/* Hero headline — don't let newline break awkwardly on small phones */
.hero-headline {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* WhatsApp float button — ensure it doesn't overlap nav on small screens */
.whatsapp-float {
  bottom: 1.25rem;
  right: 1.25rem;
}

@media (max-width: 767px) {
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
  }
}

/* Contact grid — stack on tablet */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 767px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}


/* About grid gap reduction on mobile */
@media (max-width: 767px) {
  .about-grid {
    gap: var(--space-lg);
  }
}

/* Map iframe — visible height on mobile */
@media (max-width: 480px) {
  .map-iframe-wrap iframe {
    height: 220px;
  }
}

/* Noto Sans Devanagari — loaded async for Marathi mode */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

.footer-developer {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #bdbdbd;
}

.footer-developer a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.developer-name-highlight {
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding: 0 4px;
  filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.4));
  letter-spacing: 0.5px;
}

.footer-developer a:hover .developer-name-highlight {
  background: linear-gradient(135deg, #2dd4bf 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-developer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Footer Links */
.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 0;
}

.footer-links-col li {
  margin-bottom: 0;
}

.footer-links-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links-col a:hover {
  color: #e0e0e0;
  transform: translateX(4px);
}

.footer-links-col svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Quick contact */
.footer-quick-contact a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-quick-contact a:hover {
  color: #e0e0e0;
  transform: translateX(6px);
}

.footer-quick-contact svg {
  width: 22px;
  height: 22px;
  fill: #25A56A;
  flex-shrink: 0;
}
/* ── PHASE 3: HERO VIDEO ──────────────────────────────────── */
.section-hero {
  position: relative;
  overflow: hidden;
}
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-bg { display: none; }
}
.section-hero .container,
.section-hero .hero-inner {
  position: relative;
  z-index: 1;
}
.section-hero .hero-scroll-indicator {
  position: relative;
  z-index: 1;
}

/* ── PHASE 5: EMAIL CONTACT ICON ─────────────────────────── */
.contact-block__icon--email {
  color: var(--color-accent);
}

/* ── PHASE 6: MOBILE NAV OVERLAY ────────────────────────── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 98;
  transition: opacity 250ms ease;
  cursor: pointer;
}
.mobile-nav {
  inset: calc(var(--header-h) + 8px) 12px auto auto;
  width: min(86vw, 320px);
  max-width: calc(100vw - 24px);
  min-height: min(70vh, calc(100vh - var(--header-h) - 16px));
  max-height: min(80vh, calc(100vh - var(--header-h) - 16px));
  min-height: min(70dvh, calc(100dvh - var(--header-h) - 16px));
  max-height: min(80dvh, calc(100dvh - var(--header-h) - 16px));
  height: auto;
  padding: 10px 12px;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms ease;
}
.mobile-nav__link {
  min-height: 36px;
  padding: 0.25rem 0.75rem;
  font-size: 1rem;
}
.mobile-nav nav {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: space-between;
}
.mobile-nav__ctas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.mobile-nav__ctas .btn {
  min-height: 42px;
  padding: 0.5rem 0.35rem;
  font-size: 0.9rem;
  gap: 0.35rem;
}
.mobile-nav__ctas .lang-toggle-mobile {
  grid-column: 1 / -1;
  min-height: 36px;
  margin-top: 0;
}
.mobile-nav:not(.is-open) {
  pointer-events: none;
}

/* ── PHASE 7: VIEW MORE SYSTEM ───────────────────────────── */
.view-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
}
.view-more-count {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.view-more-btn {
  min-width: 160px;
}

/* ── DEVANAGARI FONT OVERRIDE ────────────────────────────── */
:lang(mr) {
  font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
}
:lang(mr) h1, :lang(mr) h2, :lang(mr) h3, :lang(mr) h4 {
  font-family: 'Noto Sans Devanagari', 'Outfit', sans-serif;
}
