/* ===================== RESET & BASE ===================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ===================== SVG ICONS ===================== */
svg.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: -0.2em;
}
svg.icon-xs { width: 14px; height: 14px; }
svg.icon-sm { width: 17px; height: 17px; }
svg.icon-lg { width: 28px; height: 28px; }
svg.icon-xl { width: 40px; height: 40px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  /* Robust sticky footer: body grows with content (min-height, NOT height:100%)
     so the flex column never shrinks the footer to fit a fixed height. */
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: -0.01em;
  line-height: 1.18;
}
h1 { font-weight: 600; }

/* Editorial type scale — Fraunces display. Serifs need far less negative
   tracking than the previous sans; weight tops out at the 700 face we ship. */
.text-display { font-family: var(--font-heading); font-optical-sizing: auto; font-size: clamp(2.75rem, 6vw, 4.6rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.06; }
.text-display-sm { font-family: var(--font-heading); font-optical-sizing: auto; font-size: clamp(2.2rem, 4.5vw, 3.35rem); font-weight: 600; letter-spacing: -0.012em; line-height: 1.1; }

a { color: var(--color-teal); text-decoration: none; }
a:hover { color: var(--color-teal-dark); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 2000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Accessible, on-brand keyboard focus ring for all interactive elements */
:focus-visible { outline: 3px solid var(--color-teal); outline-offset: 2px; border-radius: 4px; }
.section-navy a:focus-visible,
.section-navy .btn:focus-visible,
.site-footer a:focus-visible,
.cta-band .btn:focus-visible { outline-color: var(--color-gold); }

/* Honeypot spam-trap field — hidden from sighted users and screen readers,
   but visible to naive bots that auto-fill every input. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===================== SECTION HELPERS ===================== */
.section { padding: 5.5rem 0; }
.section-soft { background-color: var(--color-bg-soft); }
.section-muted { background-color: var(--color-bg-muted); }
.section-navy {
  background-color: var(--color-footer-cta);
  color: rgba(255, 255, 255, 0.85);
}
.section-navy h2, .section-navy h3, .section-navy h4 { color: #fff; }

/* ===================== CTA BAND (shared — used on multiple pages) ===================== */
.cta-band { padding: 5rem 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: 2.1rem; }
.cta-band p { color: rgba(255, 255, 255, 0.7); max-width: 560px; margin: 0.75rem auto 2rem; }
@media (max-width: 767px) {
  .cta-band { padding: 3.5rem 0; }
}

/* Keep multi-button CTA rows on one line on every phone/small-tablet width, matching the desktop layout */
@media (max-width: 767px) {
  .cta-band .d-flex.flex-wrap,
  .hero-actions,
  .cta-inline .d-flex.flex-wrap {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .cta-band .d-flex.flex-wrap .btn,
  .hero-actions .btn,
  .cta-inline .d-flex.flex-wrap .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.6rem 0.5rem;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
  }
  .cta-band .d-flex.flex-wrap .btn .icon,
  .hero-actions .btn .icon,
  .cta-inline .d-flex.flex-wrap .btn .icon {
    width: 14px;
    height: 14px;
    margin-right: 0.3rem;
  }
  .hero-actions .btn small { font-size: 0.6rem; }
}
@media (max-width: 380px) {
  .cta-band .d-flex.flex-wrap .btn,
  .hero-actions .btn,
  .cta-inline .d-flex.flex-wrap .btn {
    font-size: 0.66rem;
    padding: 0.55rem 0.35rem;
  }
}

/* Solid pill label — a real highlighted chip, not a thin decorative line */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--color-teal);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}
.section-navy .section-eyebrow { color: var(--color-navy); background-color: var(--color-gold); }

.section-title {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  margin-bottom: 0.85rem;
}
.section-subtitle { color: var(--color-text-muted); max-width: 640px; font-size: 1.05rem; }
.section-header-center { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.section-header-center.has-view-all,
.section-header.has-view-all { margin-bottom: 1.75rem; }

/* Thin divider with a "View All" pill anchored on it — homepage sections */
.section-header-line {
  position: relative;
  border-top: 1px solid var(--color-border);
  margin: 0 0 3rem;
}
.section-header-line .view-all-pill {
  position: absolute;
  top: 0; right: 0;
  transform: translateY(-50%);
}
.view-all-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #fff;
  border: 1.5px solid var(--color-border);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.view-all-pill .icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background-color: rgba(1, 168, 186, 0.12);
  color: var(--color-teal-dark);
  transition: var(--transition-smooth);
}
.view-all-pill:hover { border-color: var(--color-teal); }
.view-all-pill:hover .icon-chip { background-color: var(--color-teal); color: #fff; }
@media (max-width: 575px) {
  .section-header-line .view-all-pill span:not(.icon-chip) { display: none; }
  .section-header-line .view-all-pill { padding: 0.35rem; }
}

.nepali-text {
  font-family: 'Noto Sans Devanagari', var(--font-body), sans-serif;
  color: var(--color-text-muted);
}

/* ===================== BUTTONS ===================== */
.btn {
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.6rem;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
}
.btn:active { transform: scale(0.97); }

.btn-brand-primary {
  background-color: var(--color-cta);
  border-color: var(--color-cta);
  color: #fff;
}
.btn-brand-primary:hover {
  background-color: var(--color-cta-dark);
  border-color: var(--color-cta-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(18, 183, 106, 0.28);
}

.btn-brand-outline {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-brand-outline:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.btn-brand-outline-dark {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-navy);
}
.btn-brand-outline-dark:hover {
  background-color: var(--color-bg-soft);
  border-color: var(--color-teal);
  color: var(--color-navy);
}

.btn-whatsapp {
  background-color: var(--whatsapp-green);
  color: #fff;
  border-color: var(--whatsapp-green);
}
.btn-whatsapp:hover {
  background-color: #1ebe57;
  border-color: #1ebe57;
  color: #fff;
  transform: translateY(-2px);
}

.btn-lg-pill { padding: 0.9rem 2rem; font-size: 1rem; }

/* ===================== CARDS ===================== */
.brand-card {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(1, 168, 186, 0.35);
}

/* ===================== PAGE HEADER (inner pages) ===================== */
.page-header {
  background-color: var(--color-mint-bg);
  border-bottom: 1px solid var(--color-mint-border);
  padding: 8.5rem 0 3.5rem;
  color: var(--color-text);
  text-align: center;
}
.page-header h1 { color: var(--color-navy); font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
.page-header p { color: var(--color-text-muted); max-width: 640px; margin: 0.85rem auto 0; font-size: 1.08rem; }

/* ===================== SCROLL-REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: 0.1s; }
.reveal-delay-2.is-visible { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
}

/* ===================== FAQ ACCORDION (custom, no Bootstrap JS dependency) ===================== */
.faq-item {
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-question .faq-icon { color: var(--color-teal); transition: var(--transition-smooth); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 1.5rem;
  color: var(--color-text-muted);
}
.faq-item.open .faq-answer { padding-bottom: 1.25rem; }

/* ===================== TRUST PILLS / BADGES ===================== */
.trust-pill-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  box-shadow: var(--shadow-sm);
}
.trust-pill-icon { color: var(--color-teal); display: inline-flex; }
.section-navy .trust-pill { background-color: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.section-navy .trust-pill-icon { color: var(--color-gold); }

/* ===================== BREADCRUMBS ===================== */
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-teal-dark); }
.breadcrumbs .crumb-sep { margin: 0 0.5rem; opacity: 0.5; }

/* ===================== MEDICALLY REVIEWED BADGE ===================== */
.reviewed-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 100%;
  background-color: rgba(1, 168, 186, 0.08);
  color: var(--color-teal-dark);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}
.reviewed-badge .icon { flex-shrink: 0; margin-top: 0.1rem; }
.reviewed-badge strong { color: var(--color-navy); }

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ===================== GUIDE CARDS (shared — homepage patient-guides section) ===================== */
.photo-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.photo-bento-card {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.photo-bento-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-mint-border);
}
.photo-bento-photo {
  margin: -2rem -1.75rem 1.35rem;
  height: 190px;
  overflow: hidden;
  position: relative;
}
.photo-bento-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(33,36,72,0) 55%, rgba(33,36,72,0.28) 100%);
}
.photo-bento-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.photo-bento-card:hover .photo-bento-photo img { transform: scale(1.05); }
.photo-bento-card h3 { color: var(--color-navy); margin-bottom: 0.6rem; font-size: 1.05rem; }
.photo-bento-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photo-bento-btn.view-all-pill { justify-content: center; width: 100%; margin-top: auto; }

@media (max-width: 991px) {
  .photo-bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .photo-bento { grid-template-columns: 1fr; }
}

/* ===================== GALLERY THUMB (shared — homepage gallery preview) ===================== */
.gallery-grid-item { margin-bottom: 0; }
.gallery-thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.gallery-thumb:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-thumb:hover img { transform: scale(1.08); }
.gallery-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 11, 26, 0) 40%, rgba(10, 11, 26, 0.82) 100%);
}
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

/* ===================== PATIENT REVIEWS (shared) ===================== */
.review-stars { display: inline-flex; gap: 2px; font-size: 1.05rem; line-height: 1; }
.review-stars .star { color: var(--color-border); }
.review-stars .star.is-filled { color: var(--color-gold); }
.review-rating-summary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-top: 0.5rem; color: var(--color-text-muted); font-size: 1.02rem;
}
.review-rating-summary strong { color: var(--color-navy); }
.review-rating-summary .review-stars { font-size: 1.25rem; }
.review-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.6rem 1.6rem 1.4rem; margin: 0;
  box-shadow: var(--shadow-sm);
}
.review-card blockquote { font-size: 1.02rem; line-height: 1.6; color: #43476b; margin: 0.9rem 0 1.1rem; }
.review-card figcaption { margin-top: auto; }
.review-author { display: block; font-family: var(--font-heading); font-weight: 600; color: var(--color-navy); }
.review-meta { display: block; font-size: 0.85rem; color: var(--color-text-muted); }
.review-source {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.35rem;
  font-size: 0.75rem; font-weight: 600; color: var(--color-teal-dark);
}
.review-source .icon { color: var(--color-teal); }

@media (max-width: 767px) {
  .section { padding: 3.5rem 0; }
  .section-title { font-size: 1.65rem; }
  .page-header h1 { font-size: 2rem; }
  /* Safety net: never allow a stray wide element to scroll the page sideways
     (the sticky sidebar is already static below 992px, so this is safe). */
  body { overflow-x: hidden; }
  .page-header { padding-left: 0.25rem; padding-right: 0.25rem; }
  .breadcrumbs { word-break: break-word; }
}
