/* ============================================
   Asia IVF Fertility Sciences — Stylesheet
   Brand system:
     Page background      -> plain white
     #ED7286 (light red)  -> pane fill: header/footer/nav/cards/buttons-default,
                             text on top of the pane is white
     #ED1931 (dark red)   -> the brand wordmark text, and the hover/rollover
                             color for interactive elements (buttons, links)
     ink (near-black)     -> body text on the white page background
     white                -> page bg + text on the pane + inner chip fill
   ============================================ */

:root {
  --color-page-bg: #FFFFFF; /* plain white page background */

  /* The two brand hex codes */
  --color-pane: #ED7286;  /* light red — header/footer/nav/cards/buttons */
  --color-brand: #ED1931; /* dark red — brand wordmark text ONLY */

  /* Neutrals */
  --ink: #2A1420;
  --ink-muted: rgba(42, 20, 32, 0.68);
  --ink-border: rgba(42, 20, 32, 0.16);
  --white: #FFFFFF;
  --white-muted: rgba(255, 255, 255, 0.82);
  --white-border: rgba(255, 255, 255, 0.5);

  /* Typography */
  --font-heading: 'Figtree', 'Noto Sans SC', -apple-system, sans-serif;
  --font-body: 'Noto Sans', 'Figtree', 'Noto Sans SC', -apple-system, sans-serif;

  /* Type scale */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;

  /* Spacing scale (8pt rhythm) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(42, 20, 32, 0.10);
  --shadow-md: 0 8px 24px rgba(42, 20, 32, 0.14);
  --shadow-lg: 0 16px 48px rgba(42, 20, 32, 0.18);
  --transition: 200ms ease;

  --container-w: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--color-page-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0; color: var(--ink); }
p { margin: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { padding: var(--space-7) 0; }
@media (max-width: 768px) {
  section { padding: var(--space-5) 0; }
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
  padding: 0.35em 1em;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-5);
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head p {
  margin-top: var(--space-2);
  color: var(--ink-muted);
  font-size: var(--fs-md);
}
@media (max-width: 768px) {
  .section-head h2 { font-size: var(--fs-xl); }
}

/* Sections that sit on the pane fill instead of the plain white page bg —
   their heading/stat text (direct pane children) needs to be white; content
   cards nested inside (white service/testimonial cards) keep their own ink text. */
.bg-surface, .services-band { background: var(--color-pane); }
.bg-surface .section-head h2, .services-band .section-head h2 { color: var(--white); }
.bg-surface .section-head p, .services-band .section-head p { color: var(--white-muted); }
.bg-surface .stats-bar .stat strong { color: var(--white); }
.bg-surface .stats-bar .stat span { color: var(--white-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-weight: 700;
  font-size: var(--fs-sm);
  padding: 0.9em 1.8em;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 44px;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

.btn-primary {
  background: var(--color-pane);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--color-brand); color: var(--white); box-shadow: var(--shadow-lg); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--ink);
}
.btn-white:hover { background: var(--color-brand); color: var(--white); }

.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--white);
  color: var(--ink);
  font-size: var(--fs-xs);
  border-bottom: 1px solid var(--ink-border);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.topbar-contacts { display: flex; gap: var(--space-3); flex-wrap: wrap; color: var(--ink); }
.topbar-contacts a { display: inline-flex; align-items: center; gap: 0.4em; transition: color var(--transition); }
.topbar-contacts a:hover { color: var(--color-brand); }
.topbar-contacts svg { width: 14px; height: 14px; }
.topbar-loc .loc-short { display: none; }

.lang-switch { display: flex; gap: 0.25rem; }
.lang-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: transparent;
  border: none;
  color: var(--white-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 0.25em 0.5em;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.lang-switch .flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.lang-switch button.active, .lang-switch button:hover { color: var(--white); background: var(--color-pane); }
/* The topbar is now a white bar (was pink) — its language-switch text
   needs a dark muted color instead of the white-muted default used by
   the mobile-nav drawer's (still pink) language switch. */
.topbar-lang button { color: var(--ink-muted); }

/* PC/laptop topbar: slim single line, phone number and language switch
   grouped together on the right; email and location are dropped here
   (both still live in the footer/contact section). Mobile (below) keeps
   its own short-form layout untouched. */
@media (min-width: 641px) {
  .topbar .container {
    justify-content: flex-end;
    gap: var(--space-3);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
  .topbar-contacts a[href^="mailto"],
  .topbar-loc {
    display: none;
  }
  .topbar-lang {
    padding-left: var(--space-3);
    border-left: 1px solid var(--ink-border);
  }
}

/* Below ~640px the topbar drops the phone number and location entirely
   (feedback: they made the bar feel cluttered) and keeps just the
   language switch, which becomes a single pill that expands into a
   small dropdown on tap. */
@media (max-width: 640px) {
  .topbar .container { padding-top: 0.375rem; padding-bottom: 0.375rem; flex-wrap: nowrap; justify-content: flex-end; }
  .topbar-contacts { display: none; }

  .topbar-lang { position: relative; }
  .topbar-lang.expanded { z-index: 150; }
  .topbar-lang button:not(.active) { display: none; }
  .topbar-lang button.active {
    background: var(--color-pane);
    color: var(--white);
    border-radius: var(--radius-pill);
    padding: 0.3em 0.7em;
  }
  .topbar-lang button.active::after { content: '\25BE'; margin-left: 0.35em; font-size: 0.8em; }
  .topbar-lang.expanded button:not(.active) {
    display: flex;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--color-pane);
    padding: 0.35em 0.8em;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 10;
  }
  .topbar-lang.expanded button:not(.active) ~ button:not(.active) { top: calc(100% + 42px); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--ink-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  max-width: 1440px;
}

.logo { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.logo-mark { width: 42px; height: 42px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text .logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(0.8rem, 0.55rem + 0.9vw, 1.05rem);
  color: var(--color-pane);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-text .logo-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.main-nav { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.nav-links { display: flex; gap: 0.9rem; flex-wrap: nowrap; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  padding: 0.5em 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--color-brand); border-color: var(--color-brand); }

/* "About Us" dropdown in the desktop nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  background: none;
  border: none;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  padding: 0.5em 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}
.nav-dropdown-toggle .chev { width: 14px; height: 14px; transition: transform var(--transition); }
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown.current .nav-dropdown-toggle { color: var(--color-brand); border-color: var(--color-brand); }
.nav-dropdown-menu a.active { color: var(--color-brand); }
.nav-dropdown.open .nav-dropdown-toggle .chev { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.75rem;
  min-width: 180px;
  background: var(--color-pane);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  z-index: 50;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
/* The header-cta's icon dropdown sits at the far right edge of the
   header, so its menu opens leftward from the icon instead of the
   usual left-aligned menu (which would overflow off-screen). */
.icon-dropdown { position: relative; }
.icon-dropdown .nav-dropdown-menu { left: auto; right: 0; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.6em 0.8em;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.16); color: var(--color-brand); }

.header-cta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.header-cta .btn { padding: 0.75em 1.1em; }
.header-cta .btn-outline { border-color: var(--ink-border); color: var(--ink); }
.header-cta .btn-outline:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 2px solid var(--ink-border);
  border-radius: 50%;
  color: var(--ink);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.icon-btn:hover, .icon-btn.active { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }
.icon-btn svg { width: 20px; height: 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: rgba(42, 20, 32, 0.08); }
.nav-toggle svg { width: 26px; height: 26px; color: var(--ink); }

@media (max-width: 1439px) {
  .nav-links { display: none; }
  .header-cta .btn-text { display: none; }
  .nav-toggle { display: flex; }
}

/* Below ~640px the logo + "Book Consultation" button + hamburger no
   longer fit on one row and overflow the viewport (causing horizontal
   scroll and pushing the menu button off-screen) — drop the header CTA
   button since the mobile nav drawer already surfaces both CTAs. */
@media (max-width: 640px) {
  .site-header .container { gap: var(--space-2); padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .header-cta { gap: 0.5rem; }
  .header-cta .btn-primary { display: none; }
  .header-cta .icon-btn { display: none; }
  .logo { flex-shrink: 1; min-width: 0; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-text { min-width: 0; }
  .logo-text .logo-title { font-size: 0.92rem; line-height: 1.15; }
  .logo-text .logo-tag { font-size: 0.62rem; }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-pane);
  padding: var(--space-3);
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.mobile-nav .logo-title { color: var(--color-brand); }
.mobile-nav-close { width: 44px; height: 44px; background: rgba(255,255,255,0.18); border: none; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.mobile-nav-close svg { width: 22px; height: 22px; color: var(--white); }
.mobile-nav-links a {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--white);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--white-border);
}
.mobile-nav-links a.active, .mobile-nav-submenu a.active { color: var(--color-brand); }
.mobile-nav-group.current .mobile-nav-toggle-group { color: var(--color-brand); }

/* "About Us" expandable group in the mobile nav */
.mobile-nav-group { border-bottom: 1px solid var(--white-border); }
.mobile-nav-toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--white);
  padding: var(--space-2) 0;
}
.mobile-nav-toggle-group .chev { width: 18px; height: 18px; transition: transform var(--transition); }
.mobile-nav-group.open .mobile-nav-toggle-group .chev { transform: rotate(180deg); }
.mobile-nav-submenu {
  display: none;
  flex-direction: column;
  padding-bottom: var(--space-2);
}
.mobile-nav-group.open .mobile-nav-submenu { display: flex; }
.mobile-nav-submenu a {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--white-muted);
  padding: 0.6em 0 0.6em var(--space-3);
}

.mobile-nav .lang-switch { margin-top: var(--space-4); }
.mobile-nav .lang-switch button { color: var(--white-muted); }
.mobile-nav .lang-switch button.active { color: var(--white); background: var(--color-brand); }
.mobile-nav-cta { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.mobile-nav-cta .btn-outline { border-color: var(--white); color: var(--white); }
.mobile-nav-cta .btn-outline:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  background: var(--color-page-bg);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-6);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--color-pane);
  color: var(--white);
  font-weight: 700;
  font-size: var(--fs-xs);
  padding: 0.5em 1em;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}
.hero h1 {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.hero h1 .accent { color: var(--color-brand); }
.hero-sub {
  font-size: var(--fs-md);
  color: var(--ink-muted);
  max-width: 46ch;
  margin-bottom: var(--space-4);
}
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-5); }
.hero-stats { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: var(--fs-xl); font-weight: 800; color: var(--ink); }
.hero-stat span { font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 600; }

.hero-media { position: relative; }
.hero-media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1;
  border: 4px solid var(--color-pane);
}
.hero-media-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  background: var(--color-pane);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 260px;
}
.hero-badge .icon-circle { background: var(--white); color: var(--ink); }
.hero-badge strong { display: block; font-size: var(--fs-sm); color: var(--white); }
.hero-badge span { font-size: var(--fs-xs); color: var(--white-muted); }

.icon-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-pane);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-circle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: var(--fs-2xl); }
}
@media (max-width: 480px) {
  .hero-stats { gap: var(--space-3); }
}

/* ---------- Trust strip ---------- */
.trust-strip { padding: var(--space-4) 0; background: var(--color-page-bg); border-bottom: 1px solid var(--ink-border); }
.trust-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-align: center;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 0.5em; }
.trust-strip svg { width: 18px; height: 18px; color: var(--ink); }

/* ---------- Doctors ---------- */
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.doctor-card {
  background: var(--color-pane);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.doctor-photo {
  aspect-ratio: 4/4.5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-photo .initials {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.25rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.doctor-body { padding: var(--space-3); }
.doctor-body h3 { color: var(--white); font-size: var(--fs-md); margin-bottom: 0.2em; }
.doctor-role { color: var(--white); opacity: 0.9; font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--space-2); }
.doctor-meta { display: flex; flex-direction: column; gap: 0.4rem; font-size: var(--fs-xs); color: var(--white-muted); margin-bottom: var(--space-2); }
.doctor-meta span { display: flex; align-items: center; gap: 0.5em; }
.doctor-meta svg { width: 15px; height: 15px; color: var(--white); flex-shrink: 0; }
.doctor-body .article-link { color: var(--white); }
.doctor-body .article-link:hover { color: var(--color-brand); }

@media (max-width: 900px) {
  .doctor-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .doctor-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}

/* ---------- Hospitals / Clinics / Partners ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.info-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.info-card .icon-circle { margin: 0 auto var(--space-2); }
.info-card h3 { font-size: var(--fs-md); color: var(--ink); margin-bottom: 0.3em; }
.info-card p { font-size: var(--fs-sm); color: var(--ink-muted); }

.bg-surface .info-card { border: none; }

@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .info-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.service-card {
  background: var(--white);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card .icon-circle { background: var(--color-pane); color: var(--white); margin-bottom: var(--space-2); }
.service-card h3 { color: var(--ink); font-size: var(--fs-md); margin-bottom: 0.5em; }
.service-card p { color: var(--ink-muted); font-size: var(--fs-sm); }

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ---------- Treatment detail write-up (advisory content) ---------- */
.treatment-detail { max-width: 680px; margin: var(--space-4) auto 0; text-align: left; }
.treatment-detail h3 { font-size: var(--fs-md); color: var(--ink); margin-bottom: var(--space-2); }
.treatment-features { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: var(--space-4); }
.treatment-features li { display: flex; align-items: flex-start; gap: 0.6em; font-size: var(--fs-sm); color: var(--ink-muted); }
.treatment-features svg { width: 18px; height: 18px; color: var(--color-brand); flex-shrink: 0; margin-top: 0.15em; }
.treatment-closing { font-style: italic; color: var(--ink-muted); font-size: var(--fs-sm); }

/* ---------- Packages / Pricing ---------- */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  align-items: stretch;
}
.package-card {
  background: var(--color-pane);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  position: relative;
}
.package-card.featured {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.package-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 0.35em 1em;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.package-name { color: var(--white); font-size: var(--fs-md); font-weight: 700; margin-bottom: 0.25em; }
.package-desc { font-size: var(--fs-sm); color: var(--white-muted); margin-bottom: var(--space-3); }
.package-price { display: flex; align-items: baseline; gap: 0.3em; margin-bottom: var(--space-3); }
.package-price .currency { font-size: var(--fs-md); font-weight: 700; color: var(--white); }
.package-price .amount { font-size: var(--fs-2xl); font-weight: 800; color: var(--white); letter-spacing: -0.02em; }
.package-price .period { font-size: var(--fs-xs); color: var(--white-muted); }
.package-features { flex-grow: 1; display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: var(--space-4); }
.package-features li { display: flex; align-items: flex-start; gap: 0.6em; font-size: var(--fs-sm); color: var(--white); }
.package-features svg { width: 18px; height: 18px; color: var(--white); flex-shrink: 0; margin-top: 0.15em; }
.package-note { margin-top: var(--space-3); font-size: var(--fs-xs); color: var(--ink-muted); text-align: center; }

.package-card .btn-outline { border-color: var(--white); color: var(--white); }
.package-card .btn-outline:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }

@media (max-width: 900px) {
  .package-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .package-card.featured { transform: none; }
}

/* ---------- Testimonials ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  text-align: center;
}
.stats-bar .stat strong { display: block; font-size: var(--fs-2xl); font-weight: 800; color: var(--ink); }
.stats-bar .stat span { font-size: var(--fs-sm); color: var(--ink-muted); font-weight: 600; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.testimonial-stars { display: flex; gap: 0.2rem; color: var(--ink); margin-bottom: var(--space-2); }
.testimonial-stars svg { width: 16px; height: 16px; }
.testimonial-quote { font-size: var(--fs-sm); color: var(--ink); margin-bottom: var(--space-3); font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-pane); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--fs-sm); flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: var(--fs-sm); color: var(--ink); }
.testimonial-author span { font-size: var(--fs-xs); color: var(--ink-muted); }

@media (max-width: 900px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

/* ---------- Articles ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.article-card {
  background: var(--white);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.article-photo { aspect-ratio: 16/10; overflow: hidden; border-bottom: 3px solid var(--color-pane); }
.article-photo img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: var(--space-3); }
.article-tag { font-size: var(--fs-xs); font-weight: 700; color: var(--ink); opacity: 0.7; margin-bottom: 0.5em; display: block; }
.article-body h3 { color: var(--ink); font-size: var(--fs-md); margin-bottom: 0.5em; }
.article-body p { font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: var(--space-2); }
.article-link { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 0.3em; transition: color var(--transition); }
.article-link:hover { color: var(--color-brand); }
.article-link svg { width: 16px; height: 16px; transition: transform var(--transition); }
.article-card:hover .article-link svg { transform: translateX(3px); }

@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: none;
  border: none;
  padding: var(--space-3);
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--ink);
}
.faq-question .plus {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-pane); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-question .plus svg { width: 16px; height: 16px; }
.faq-item.open .faq-question .plus { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease, padding var(--transition);
  padding: 0 var(--space-3);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}
.faq-answer p { padding-bottom: var(--space-3); }
.faq-item.open .faq-answer { max-height: 400px; }

/* ---------- International strip ---------- */
.intl-strip {
  display: flex;
  gap: var(--space-3);
  background: var(--color-pane);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  align-items: center;
  margin-top: var(--space-5);
}
.intl-strip .icon-circle { width: 56px; height: 56px; background: var(--white); color: var(--ink); }
.intl-strip .icon-circle svg { width: 28px; height: 28px; }
.intl-strip h3 { color: var(--white); font-size: var(--fs-md); margin-bottom: 0.3em; }
.intl-strip p { font-size: var(--fs-sm); color: var(--white-muted); }
@media (max-width: 640px) {
  .intl-strip { flex-direction: column; text-align: center; }
}

/* ---------- Final CTA ---------- */
.cta-band {
  background: var(--color-pane);
  border-radius: var(--radius-lg);
  color: var(--white);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  margin: 0 var(--space-3);
}
.cta-band h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-2); color: var(--white); }
.cta-band p { font-size: var(--fs-md); color: var(--white-muted); max-width: 60ch; margin: 0 auto var(--space-4); }
.cta-actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }
.cta-actions .btn-outline { border-color: var(--white); color: var(--white); }
.cta-actions .btn-outline:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: var(--space-3); }
.contact-info-item { display: flex; gap: var(--space-2); align-items: flex-start; }
.contact-info-item h3 { font-size: var(--fs-md); margin-bottom: 0.2em; }
.contact-info-item p, .contact-info-item a { font-size: var(--fs-sm); color: var(--ink-muted); }
.contact-info-item a:hover { color: var(--color-brand); }
.map-frame { border-radius: var(--radius-md); overflow: hidden; margin-top: var(--space-2); border: 1px solid var(--ink-border); }
.map-frame iframe { width: 100%; height: 220px; border: 0; display: block; }

.contact-form {
  background: var(--color-pane);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.form-group { margin-bottom: var(--space-2); }
.form-group label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 0.4em; color: var(--white); }
.form-group .req { color: var(--color-brand); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-sm);
  padding: 0.8em 1em;
  font-family: inherit;
  font-size: var(--fs-sm);
  min-height: 44px;
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(42,20,32,0.15);
  outline: none;
}
.form-error { color: var(--color-brand); font-size: var(--fs-xs); margin-top: 0.3em; display: none; font-weight: 600; }
.form-group.invalid input, .form-group.invalid select, .form-group.invalid textarea { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand); }
.form-group.invalid .form-error { display: block; }
.form-note { font-size: var(--fs-xs); color: var(--white-muted); margin-top: var(--space-2); }
.form-success {
  display: none;
  align-items: center;
  gap: 0.6em;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-top: var(--space-2);
}
.form-success.show { display: flex; }
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Client KYC Form ---------- */
.kyc-hero, .page-hero { background: var(--color-pane); padding-top: var(--space-6); padding-bottom: var(--space-5); }
.kyc-hero .section-head h1, .page-hero .section-head h1 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; color: var(--white); margin: 0; }
.kyc-hero .section-tag, .page-hero .section-tag { background: var(--white); color: var(--color-brand); }
.kyc-hero-title-bm, .kyc-hero-title-zh { display: block; font-size: 0.6em; font-weight: 600; margin-top: 0.3em; }
.kyc-hero .section-head p, .page-hero .section-head p { margin-top: var(--space-2); color: var(--white-muted); font-size: var(--fs-md); }
@media (max-width: 768px) {
  .kyc-hero .section-head h1, .page-hero .section-head h1 { font-size: var(--fs-xl); }
}

.kyc-form-section { background: var(--color-page-bg); }
.kyc-container { max-width: 840px; }
.auth-container { max-width: 440px; }
.auth-links { text-align: center; margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--ink-muted); }
.auth-links a { color: var(--color-brand); font-weight: 700; }
.auth-links + .auth-links { margin-top: var(--space-1); }
.nav-dropdown-menu .menu-divider { height: 1px; background: rgba(255, 255, 255, 0.25); margin: 0.4rem 0.4rem; }
.mobile-nav-cta .menu-divider { height: 1px; background: var(--white-border); margin: var(--space-2) 0; }

/* Spam honeypot: positioned off-screen (not display:none/visibility:hidden,
   which some bots detect and skip) so it's invisible and unreachable by
   keyboard/screen-reader for real visitors, but still gets auto-filled by
   naive form-filling bots. See new-client.html / new-donor.html / main.js. */
.kyc-hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Saved-draft notice for the KYC wizards — shown above the form when a
   local, unsubmitted draft from an earlier visit is restored. */
.draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: rgba(42, 20, 32, 0.05);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--ink);
}
.draft-banner-actions { display: flex; gap: var(--space-1); flex-shrink: 0; }
.draft-banner-actions .btn { padding: 8px 16px; font-size: var(--fs-sm); }

/* Multi-step wizard: one section visible at a time, with a progress
   bar and Back/Next controls, so the form doesn't read as one long
   overwhelming page. */
.kyc-progress { margin-bottom: var(--space-4); }
.kyc-progress-bar { height: 8px; background: var(--ink-border); border-radius: var(--radius-pill); overflow: hidden; }
.kyc-progress-fill { height: 100%; width: 10%; background: var(--color-pane); border-radius: var(--radius-pill); transition: width 300ms ease; }
.kyc-progress-label { text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-muted); margin-top: 0.6em; }

.kyc-step { display: none; }
.kyc-step.active { display: block; }

.kyc-step-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--ink-border);
}
.kyc-step-nav .kyc-prev { margin-right: auto; }
.kyc-step-nav .btn { min-width: 120px; white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 480px) {
  .kyc-step-nav .btn { min-width: 0; flex: 1; font-size: var(--fs-xs); padding: 0.7em 0.5em; }
}

.pdpa-notice {
  background: var(--color-page-bg);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.pdpa-notice p { font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: 0.75em; }
.pdpa-notice p:last-child { margin-bottom: 0; }
.kyc-legal-note { font-style: italic; opacity: 0.85; }

.kyc-section {
  background: var(--white);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}
.kyc-section h2 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--ink-border);
}
.kyc-section h2 .bm, .kyc-section h2 .zh { display: block; font-size: 0.8em; font-weight: 600; color: var(--ink-muted); margin-top: 0.2em; }
.kyc-section-sub { font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 600; margin: -0.5em 0 var(--space-2); }

.radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin-top: 0.5em; }
.radio-item, .checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  font-size: var(--fs-sm);
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  padding: 0.3em 0;
}
.radio-item input, .checkbox-item input {
  width: 18px;
  height: 18px;
  margin-top: 0.15em;
  flex-shrink: 0;
  accent-color: var(--color-brand);
}
.others-input { margin-top: var(--space-2); }

.consent-list { display: flex; flex-direction: column; gap: var(--space-3); }
.consent-item { display: flex; gap: 0.75em; align-items: flex-start; cursor: pointer; }
.consent-item input {
  width: 20px;
  height: 20px;
  margin-top: 0.2em;
  flex-shrink: 0;
  accent-color: var(--color-brand);
}
.consent-item p { font-size: var(--fs-sm); color: var(--ink); margin: 0; }
.consent-item p .bm, .consent-item p .zh { display: block; color: var(--ink-muted); margin-top: 0.3em; }

.kyc-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.kyc-container .form-group label { color: var(--ink); }
.kyc-container .form-note { color: var(--ink-muted); text-align: center; }
.kyc-container .form-success { border: 1px solid var(--ink-border); justify-content: center; text-align: center; }
.kyc-container .form-success svg { color: var(--color-brand); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.75em 1em;
  border-bottom: 1px solid var(--ink-border);
  white-space: nowrap;
}
.admin-table th {
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.admin-table td { color: var(--ink); }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Cookie Policy table ---------- */
.policy-table-wrap { overflow-x: auto; margin-bottom: var(--space-4); }
.policy-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.policy-table th, .policy-table td {
  text-align: left;
  padding: 0.85em 1em;
  border-bottom: 1px solid var(--ink-border);
  white-space: normal;
  vertical-align: top;
}
.policy-table th {
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.policy-table td { color: var(--ink); }
.policy-table td:first-child { font-family: monospace; font-size: var(--fs-xs); color: var(--color-brand); white-space: nowrap; }
.policy-table tbody tr:last-child td { border-bottom: none; }
.policy-section { max-width: 760px; margin: 0 auto var(--space-5); text-align: left; }
.policy-section h2 { font-size: var(--fs-lg); color: var(--ink); margin-bottom: var(--space-2); }
.policy-section p { color: var(--ink-muted); margin-bottom: var(--space-3); }
.policy-note { background: rgba(237, 114, 134, 0.08); border-left: 3px solid var(--color-pane); padding: var(--space-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--ink-muted); }
.kyc-container .kyc-error { color: var(--color-brand); }
.kyc-container .kyc-error a { color: var(--color-brand); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-pane); color: var(--white-muted); padding: var(--space-6) 0 var(--space-3); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.footer-brand .logo-title { color: var(--color-brand); }
.footer-brand .logo-tag { color: var(--white-muted); }
.footer-brand p { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--white-muted); max-width: 32ch; }
.footer-social { display: flex; gap: 0.6rem; margin-top: var(--space-3); }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.footer-social a:hover { background: var(--color-brand); color: var(--white); }
.footer-social svg { width: 18px; height: 18px; }

.footer-col h4 { color: var(--white); font-size: var(--fs-sm); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { font-size: var(--fs-sm); color: var(--white-muted); transition: color var(--transition); }
.footer-col a:hover { color: var(--color-brand); }
.footer-col .contact-line { display: flex; gap: 0.6em; align-items: flex-start; font-size: var(--fs-sm); color: var(--white-muted); }
.footer-col .contact-line svg { width: 16px; height: 16px; color: var(--white); flex-shrink: 0; margin-top: 0.2em; }

.footer-bottom {
  border-top: 1px solid var(--white-border);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--white-muted);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Floating WhatsApp ----------
   Kept as WhatsApp's own official green rather than the brand palette —
   users rely on that exact color to recognize the action at a glance.
   Say the word if you'd rather this matched the brand system strictly. */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; color: var(--white); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 90px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; color: var(--white); }

@media (max-width: 480px) {
  .whatsapp-float { width: 50px; height: 50px; bottom: 16px; right: 16px; }
  .back-to-top { width: 40px; height: 40px; bottom: 16px; right: 76px; }
}

/* ---------- House Call promo modal (shown once per session after login) ---------- */
.housecall-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 20, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: var(--space-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.housecall-modal-overlay.show { opacity: 1; pointer-events: auto; }
.housecall-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 90vw;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform var(--transition);
}
.housecall-modal-overlay.show .housecall-modal { transform: translateY(0); }
.housecall-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pink-tint, rgba(237, 25, 49, 0.1));
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-4) auto 0;
}
.housecall-modal-icon svg { width: 30px; height: 30px; }
.housecall-modal-body { padding: var(--space-3) var(--space-4) var(--space-4); }
.housecall-modal-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(42, 20, 32, 0.08);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 1;
}
.housecall-modal-close:hover { background: var(--color-brand); color: var(--white); }
.housecall-modal h2 { font-size: var(--fs-lg); color: var(--color-brand); margin: var(--space-2) 0 var(--space-2); }
.housecall-modal-body p { color: var(--ink-muted); font-size: var(--fs-sm); margin: 0 0 var(--space-4); }
.housecall-modal-actions { display: flex; flex-direction: column; gap: var(--space-2); }
.housecall-modal-actions .btn { white-space: normal; text-align: center; }
@media (max-width: 640px) {
  .housecall-modal { width: 88vw; }
}

/* ---------- Cookie consent bar (shown to every visitor until accepted/declined) ---------- */
.cookie-consent-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  background: var(--ink);
  color: var(--white-muted);
  padding: var(--space-3);
  transform: translateY(100%);
  transition: transform var(--transition);
}
.cookie-consent-bar.show { transform: translateY(0); }
.cookie-consent-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.cookie-consent-text { flex: 1 1 320px; font-size: var(--fs-xs); line-height: 1.5; margin: 0; }
.cookie-consent-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.cookie-consent-actions .btn { padding: 0.6em 1.2em; }
.cookie-consent-actions .btn-outline { border-color: var(--white-border); color: var(--white); }
.cookie-consent-actions .btn-outline:hover { background: var(--color-brand); border-color: var(--color-brand); color: var(--white); }
@media (max-width: 640px) {
  .cookie-consent-bar .container { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-consent-actions { justify-content: center; }
}

/* ---------- Member Portal ---------- */
.portal-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin: 0 0 var(--space-4); }
.portal-tab {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.55em 1.1em; border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink-border); background: var(--white);
  color: var(--ink); font-size: var(--fs-sm); font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.portal-tab svg { width: 16px; height: 16px; }
.portal-tab:hover { border-color: var(--color-pane); }
.portal-tab.active { background: var(--color-pane); border-color: var(--color-pane); color: var(--white); }

.portal-category-block { margin-bottom: var(--space-5); }
.portal-category-head { display: flex; align-items: center; gap: 0.6em; margin-bottom: var(--space-3); }
.portal-category-head .icon-circle { width: 40px; height: 40px; background: var(--color-pane); color: var(--white); }
.portal-category-head .icon-circle svg { width: 18px; height: 18px; }
.portal-category-head h2 { font-size: var(--fs-lg); color: var(--ink); }

.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.portal-card {
  background: var(--white); border: 1px solid var(--ink-border);
  border-radius: var(--radius-md); padding: var(--space-3);
  text-align: left; display: flex; flex-direction: column; gap: 0.6em;
  transition: var(--transition); cursor: pointer; text-decoration: none;
}
.portal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-pane); }
.portal-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5em; }
.portal-card .icon-circle { width: 38px; height: 38px; background: rgba(237, 114, 134, 0.14); color: var(--color-brand); flex-shrink: 0; }
.portal-card .icon-circle svg { width: 18px; height: 18px; }
.portal-tier-badge { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3em 0.7em; border-radius: var(--radius-pill); white-space: nowrap; }
.portal-tier-badge.free { background: rgba(42, 20, 32, 0.08); color: var(--ink-muted); }
.portal-tier-badge.premium { background: var(--color-brand); color: var(--white); }
.portal-card h3 { font-size: var(--fs-base); color: var(--ink); line-height: 1.35; }
.portal-card p { font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.5; }

@media (max-width: 900px) {
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .portal-grid { grid-template-columns: 1fr; }
}

/* Portal article detail page */
.portal-article-wrap { max-width: 720px; margin: 0 auto; }
.portal-article-back { display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-muted); text-decoration: none; margin-bottom: var(--space-3); }
.portal-article-back svg { width: 16px; height: 16px; }
.portal-article-back:hover { color: var(--color-brand); }
.portal-article-body { font-size: var(--fs-base); color: var(--ink); line-height: 1.75; }
.portal-article-body p { margin-bottom: var(--space-3); white-space: pre-line; }

/* Member Tools */
.portal-tools-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: var(--space-4); }
.portal-tool-item { background: var(--white); border: 1px solid var(--ink-border); border-radius: var(--radius-md); padding: var(--space-3); margin-bottom: var(--space-2); display: flex; align-items: center; gap: var(--space-2); }
.portal-tool-item input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--color-brand); }
.portal-tool-item .body { flex-grow: 1; }
.portal-tool-item .name { font-weight: 700; color: var(--ink); }
.portal-tool-item .meta { font-size: var(--fs-xs); color: var(--ink-muted); }
.portal-tool-item.done .name { text-decoration: line-through; color: var(--ink-muted); }
.portal-tool-remove { background: none; border: none; color: var(--ink-muted); cursor: pointer; padding: 0.4em; }
.portal-tool-remove:hover { color: var(--color-brand); }
.portal-tool-form { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); align-items: flex-end; }
.portal-tool-form .form-group { flex: 1 1 160px; }
.portal-timeline-item { display: flex; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--ink-border); }
.portal-timeline-date { font-weight: 800; color: var(--color-brand); min-width: 92px; flex-shrink: 0; }
.portal-empty-state { text-align: center; color: var(--ink-muted); font-size: var(--fs-sm); padding: var(--space-4) 0; }

/* ---------- Utility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.8em 1.2em;
  border-radius: 0 0 8px 0;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
