/* ==========================================================================
   Andaman International Clinic

   Light theme, built on the exact colours sampled from the official logo:
     navy   #044166  (the ANDAMAN wordmark)
     cobalt #3D54A4  (the outer ring)
     teal   #8AD2DD  (the inner arc — decorative only, too pale for text)
     red    #EA2729  (the cross)

   The dark theme is kept intact under [data-theme="dark"] on <html>, so the
   whole site can be flipped back by setting that one attribute.
   ========================================================================== */

/* ---------- Light tokens (default) ---------- */
:root {
  /* Canvas */
  --bg:         #FFFFFF;
  --bg-2:       #F6F9FB;
  --surface:    #F9FBFC;
  --surface-2:  #EEF4F6;
  --surface-3:  #DDE9ED;

  /* Lines */
  --line:       rgba(4, 65, 102, .11);
  --line-2:     rgba(4, 65, 102, .22);

  /* Text — every pair verified ≥4.5:1 on --bg */
  --text:       #102B3C;
  --text-2:     #435E6D;
  --text-3:     #667C88;

  /* Brand */
  --navy:       #044166;
  --cobalt:     #3D54A4;
  --teal:       #8AD2DD;
  --red:        #EA2729;   /* the mark's red — decorative */
  --red-cta:    #C81D22;   /* deepened so white button text clears AA */
  --wa:         #25D366;
  --wa-ink:     #052E16;

  /* Semantic roles */
  --accent:     var(--navy);   /* kickers, links, focus */
  --accent-2:   var(--navy);
  --on-solid:   #FFFFFF;
  --scrim:      rgba(255, 255, 255, .86);
  --tint:       rgba(4, 65, 102, .07);
  --tint-line:  rgba(4, 65, 102, .16);
  --ok:         #0F9D58;

  /* The dot field reads these, so theme and canvas never drift apart */
  --field-rest:   #A9C1DA;
  --field-active: #21447E;
  --field-blend:  normal;
  --field-alpha:  0.70;

  /* Spacing — 4px rhythm */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --r-sm: 7px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-th: "Noto Sans Thai", var(--font);

  --ease:    cubic-bezier(.16, 1, .3, 1);
  --t-fast:  160ms;
  --t-mid:   280ms;
  --t-slow:  620ms;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --bar-h: 0px;
  --header-h: 80px;
  --dock-h: 68px;

  --shadow-sm: 0 1px 2px rgba(8,43,62,.05), 0 5px 16px rgba(8,43,62,.05);
  --shadow-md: 0 14px 38px rgba(8,43,62,.10);

  --z-field: 0; --z-body: 10; --z-dock: 40; --z-header: 50; --z-nav: 60;
}

/* ---------- Dark theme (set data-theme="dark" on <html>) ---------- */
:root[data-theme="dark"] {
  --bg:         #04070C;
  --bg-2:       #070C15;
  --surface:    #0B1322;
  --surface-2:  #101B2E;
  --surface-3:  #16233A;

  --line:       rgba(255,255,255,.085);
  --line-2:     rgba(255,255,255,.16);

  --text:       #EDF3FA;
  --text-2:     #A9BACE;
  --text-3:     #7B8FA8;

  --red-cta:    #E8232A;
  --accent:     #8AD2DD;
  --accent-2:   #8AD2DD;
  --scrim:      rgba(4,7,12,.72);
  --tint:       rgba(138,210,221,.10);
  --tint-line:  rgba(138,210,221,.22);

  --field-rest:   #2B4C86;
  --field-active: #8FDCEA;
  --field-blend:  additive;
  --field-alpha:  0.46;

  --shadow-sm: none;
  --shadow-md: none;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="th"] body { font-family: var(--font-th); letter-spacing: 0; line-height: 1.8; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--navy); color: #fff; }

/* Slides in from above rather than parking at left:-9999px, which would
   otherwise stretch the document's scroll width. */
.skip {
  position: fixed; left: 0; top: 0; z-index: 999;
  padding: 12px 20px; background: var(--navy); color: #fff;
  font-size: .875rem; font-weight: 700; border-radius: 0 0 var(--r-sm) 0;
  transform: translateY(-110%);
  transition: transform var(--t-fast) var(--ease);
}
.skip:focus { transform: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0; font-weight: 700; line-height: 1.12;
  letter-spacing: -0.028em; text-wrap: balance;
  color: var(--text);
}
.display {
  font-size: clamp(2.65rem, 5.4vw, 4.9rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.045em;
}
h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; letter-spacing: -0.022em; }
p  { margin: 0 0 var(--s4); max-width: 68ch; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--text-2); line-height: 1.62; max-width: 60ch; }
.small { font-size: .875rem; }

.kicker {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s4);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
html[lang="th"] .kicker { letter-spacing: .08em; }

.num { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 800; letter-spacing: .18em; color: var(--text-3); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 8vw, 112px); position: relative; }
.section--tight { padding-block: clamp(52px, 6vw, 80px); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 72px); }
.grid { display: grid; gap: var(--s5); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ==========================================================================
   Status pulse and language switcher
   ========================================================================== */
.pulse {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--ok);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(15,157,88,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(15,157,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,157,88,0); }
}
.lang {
  display: inline-flex; align-items: center; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 2px; gap: 2px; background: var(--surface-2);
}
.lang button {
  padding: 4px 9px; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: var(--text-3); min-height: 28px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.lang button:hover { color: var(--navy); }
.lang button[aria-pressed="true"] {
  background: var(--bg); color: var(--navy);
  box-shadow: 0 1px 3px rgba(8,43,62,.09);
}
.nav-language { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-bottom: 1px solid var(--line);
  transition: border-color var(--t-mid) var(--ease), background var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 98%, transparent);
  box-shadow: var(--shadow-sm);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s5); }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 30px); }
.nav a {
  position: relative; font-size: .84rem; font-weight: 700;
  color: var(--text-2); padding-block: var(--s2);
  transition: color var(--t-fast) var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-mid) var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--navy); }

.header-actions { display: flex; align-items: center; gap: var(--s3); flex: none; }
.header-contact-group {
  display: inline-flex; align-items: center;
}
.header-contact {
  min-height: 34px; padding: 0 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--r-pill);
  color: var(--text-2); font-size: .76rem; font-weight: 750; white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.header-contact--call:hover { color: var(--navy); background: var(--bg); }
.header-contact--wa { color: var(--navy); }
.header-contact--wa:hover { color: var(--navy); background: var(--bg); }
.header-contact--primary {
  min-height: 44px; width: auto; padding: 0 17px;
  border-radius: 12px;
  color: #fff; background: #0A2540;
  font-size: .82rem; font-weight: 700;
}
.header-contact--primary:hover { color: #fff; background: #123B66; }
.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text); }
.nav-backdrop { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: wait; opacity: .62; transform: none; }
.btn svg { flex: none; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #05537F; }
/* The two urgent actions carry their own colour: red for the phone, WhatsApp's
   own green for WhatsApp. White on the brand red #EA2729 measures 4.35:1 and
   fails AA, so the fill is the deepened #C81D22 (5.75:1). White on WhatsApp
   green fails far worse (2.1:1), so that button keeps the brand green and takes
   dark-green ink instead — 7.5:1 and still unmistakably WhatsApp. */
.btn-wa,
.btn-call { border-radius: 12px; }

.btn-call {
  background: var(--red-cta);
  border-color: var(--red-cta);
  color: #fff;
  box-shadow: 0 1px 2px rgba(140,18,22,.22), 0 6px 16px rgba(200,29,34,.24);
}
.btn-call:hover {
  background: #AF1519; border-color: #AF1519; color: #fff;
  box-shadow: 0 2px 5px rgba(140,18,22,.26), 0 11px 24px rgba(200,29,34,.30);
}
.btn-call:focus-visible { outline-color: var(--red-cta); }

.btn-wa {
  background: var(--wa);
  border-color: var(--wa);
  color: var(--wa-ink);
  box-shadow: 0 1px 2px rgba(6,90,45,.18), 0 6px 16px rgba(37,211,102,.28);
}
.btn-wa:hover {
  background: #1FBE5B; border-color: #1FBE5B; color: var(--wa-ink);
  box-shadow: 0 2px 5px rgba(6,90,45,.22), 0 11px 24px rgba(37,211,102,.34);
}
.btn-wa:focus-visible { outline-color: #0B8043; }

/* On the large hero pair the glyph sits in its own disc — small buttons and
   map popups stay plain so they do not get bulky. */
.btn-lg.btn-call > svg,
.btn-lg.btn-wa > svg {
  width: 30px; height: 30px; padding: 7px; border-radius: 50%;
}
.btn-lg.btn-call > svg { background: rgba(255,255,255,.20); }
.btn-lg.btn-wa   > svg { background: rgba(5,46,22,.14); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: var(--bg); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: var(--surface-2); }
.btn-sm { min-height: 40px; padding: 0 var(--s4); font-size: .82rem; }
.btn-lg { min-height: 54px; padding: 0 var(--s5); font-size: .92rem; }

.tlink { display: inline-flex; align-items: center; gap: var(--s2); font-size: .875rem; font-weight: 700; color: var(--accent); min-height: 44px; }
.tlink svg { transition: transform var(--t-mid) var(--ease); }
.tlink:hover svg { transform: translateX(5px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; display: flex;
  min-height: max(560px, calc(100svh - var(--bar-h) - var(--header-h)));
  padding-block: clamp(32px, 5vh, 56px) 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 16%, rgba(138,210,221,.18), transparent 28%),
    linear-gradient(180deg, #F7FAFB 0%, #FFFFFF 100%);
}
.hero::before {
  content: ""; position: absolute; width: 340px; height: 340px;
  right: -140px; top: -180px; border: 68px solid rgba(61,84,164,.055);
  border-radius: 50%; pointer-events: none;
}
#field {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none; opacity: .70;
}
#field canvas { display: block; width: 100% !important; height: 100% !important; }
.hero .container {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-shell {
  display: block;
}
.hero-inner { max-width: 820px; padding-bottom: var(--s5); }
.hero .display { margin-bottom: var(--s5); max-width: 16ch; font-size: clamp(2.65rem, 5vw, 4.35rem); }
.hero .lead { margin-bottom: var(--s6); font-size: clamp(1.05rem, 1.4vw, 1.24rem); max-width: 55ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s8); }
.hero .hero-cta { margin-bottom: 0; align-items: center; }
.hero-quick-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 18px; margin-top: 10px;
}
.hero-quick-link {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 42px; padding-inline: var(--s2);
  color: var(--navy); font-size: .9rem; font-weight: 750;
}
.hero-quick-link + .hero-quick-link { position: relative; }
.hero-quick-link + .hero-quick-link::before {
  content: ""; position: absolute; left: -11px; width: 1px; height: 18px;
  background: var(--line-2);
}
.hero-quick-link svg:last-child { transition: transform var(--t-fast) var(--ease); }
.hero-quick-link:hover svg:last-child { transform: translateX(4px); }

.proof-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  position: relative; z-index: 3;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: rgba(255,255,255,.94); box-shadow: 0 -8px 28px rgba(8,43,62,.06);
  overflow: hidden;
}
.proof-item {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: 18px var(--s5); border-left: 1px solid var(--line);
}
.proof-item:first-child { border-left: 0; }
.proof-item > svg { flex: none; margin-top: 2px; color: var(--navy); }
.proof-item b { display: block; font-size: .88rem; line-height: 1.35; color: var(--text); }
/* No line clamp here on purpose. -webkit-box blockifies to flow-root in current
   Chrome, so -webkit-line-clamp silently loses its ellipsis and the height cap
   chops the sentence mid-word. These lines are short enough in all four
   languages to wrap naturally instead. */
.proof-item small {
  display: block; margin-top: 4px;
  color: var(--text-3); font-size: .72rem; line-height: 1.45;
  text-wrap: pretty;
}

/* Desktop homepage: a centered first screen with one clear action group and a
   self-contained trust panel. The compact mobile layout remains independent. */
@media (min-width: 861px) {
  .home-hero {
    min-height: max(580px, calc(100svh - var(--bar-h) - var(--header-h)));
    padding-block: clamp(32px, 5vh, 48px);
  }
  .home-hero .container {
    justify-content: center;
    gap: clamp(26px, 3.5vh, 36px);
  }
  .home-hero .hero-inner {
    max-width: 900px;
    margin-inline: auto;
    padding-bottom: 0;
    text-align: center;
  }
  .home-hero .eyebrow {
    justify-content: center;
    margin-bottom: 18px;
  }
  .home-hero .display {
    max-width: 900px;
    margin: 0 auto 18px;
    font-size: clamp(2.85rem, 4.15vw, 4.15rem);
    line-height: 1.04;
  }
  .home-hero .lead {
    max-width: 58ch;
    margin: 0 auto 22px;
  }
  .home-hero .hero-cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    width: min(100%, 520px);
    margin-inline: auto;
    gap: 10px 12px;
  }
  .home-hero .hero-cta .btn { width: 100%; }
  .home-hero .hero-quick-links {
    width: min(100%, 620px);
    margin-inline: auto;
  }
  .home-hero .hero-quick-link {
    justify-content: center;
    min-height: 42px;
  }
  .home-hero .proof-strip {
    width: min(100%, 1040px);
    margin-inline: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 16px 40px rgba(8,43,62,.09);
  }
  .home-hero .proof-item {
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
  }
  .home-hero .proof-item > svg {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 9px;
    border-radius: 11px;
    background: var(--tint);
    box-sizing: border-box;
  }
  .home-hero .proof-item b { font-size: .82rem; }
  .home-hero .proof-item small { font-size: .7rem; }
}

.hero-media {
  position: relative; align-self: stretch; min-height: 530px; margin: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 18px 55px rgba(8,43,62,.14);
}
.hero-media picture,
.hero-media img { width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: 55% center; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(4,44,68,.15));
  pointer-events: none;
}
.hero-media-note {
  position: absolute; z-index: 2; left: var(--s5); right: var(--s5); bottom: var(--s5);
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4); border: 1px solid rgba(255,255,255,.65);
  border-radius: var(--r-md); background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.hero-media-note .reason-ico { margin: 0; }
.hero-media-note b { display: block; font-size: .9rem; }
.hero-media-note small { display: block; margin-top: 2px; color: var(--text-2); font-size: .76rem; line-height: 1.45; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s3);
  padding: 7px 16px 7px 12px;
  border: 1px solid rgba(15,157,88,.18); border-radius: var(--r-pill);
  background: rgba(15,157,88,.06);
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #17643E;
  margin-bottom: var(--s5);
}
html[lang="th"] .eyebrow { letter-spacing: .04em; }

/* Hairline dividers come from a border on each cell, not a 1px grid gap — the
   gap trick left the text with no inset, so it sat right on top of the rule. */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  position: relative; z-index: 3; margin-top: -1px;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--bg); box-shadow: 0 -8px 28px rgba(8,43,62,.06);
  overflow: hidden;
}
.stat { padding: var(--s5); border-left: 1px solid var(--line); }
/* First cell lines up with the headline above it */
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; color: var(--navy); }
.stat span { display: block; margin-top: 2px; font-size: .8rem; color: var(--text-3); line-height: 1.45; }

.scroll-cue {
  position: absolute; left: var(--gutter); bottom: var(--s6); z-index: var(--z-body);
  display: inline-flex; align-items: center; gap: var(--s3);
  font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-3);
}
.scroll-cue svg { animation: nudge 2.6s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); opacity:.5 } 50% { transform: translateY(6px); opacity:1 } }

/* ==========================================================================
   Story rows
   ========================================================================== */
.story { border-top: 1px solid var(--line); }
.story-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 112px);
  border-bottom: 1px solid var(--line);
}
.story-row:nth-child(even) .story-media { order: -1; }
.story-text { max-width: 520px; }
.story-text .num { display: block; margin-bottom: var(--s4); }
.story-text h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--s4); }
.story-media {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}
.story-media img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  position: relative; display: flex; flex-direction: column;
  padding: var(--s6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--t-mid) var(--ease), background var(--t-mid) var(--ease),
              transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--bg); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: var(--s3); }
.card p { color: var(--text-2); font-size: .95rem; margin-bottom: var(--s5); }
.card .tlink { margin-top: auto; }
.card-icon {
  width: 46px; height: 46px; margin-bottom: var(--s5);
  display: grid; place-items: center; border-radius: var(--r-md);
  background: var(--tint); border: 1px solid var(--tint-line);
  color: var(--navy);
}
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Service cards: photo-led, whole card is one link ---- */
.svc-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease);
}
.svc-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.svc-card:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(4,65,102,.18); }

.svc-card-photo {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(120% 120% at 74% 14%, rgba(61,84,164,.18), transparent 58%),
    radial-gradient(90% 90% at 10% 90%, rgba(138,210,221,.24), transparent 60%),
    var(--surface-2);
}
.svc-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.svc-card:hover .svc-card-photo img { transform: scale(1.045); }
/* Sits over the photo, and carries the card on its own when there isn't one */
.svc-card-icon {
  position: absolute; left: var(--s4); bottom: var(--s4); z-index: 2;
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border: 1px solid var(--line-2); color: var(--navy);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.svc-card-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.svc-card-body h3 { margin-bottom: var(--s3); }
.svc-card-body p { color: var(--text-2); font-size: .93rem; margin-bottom: var(--s5); }
.svc-card-body .tlink { margin-top: auto; }
.svc-card .tlink svg { transition: transform var(--t-mid) var(--ease); }
.svc-card:hover .tlink svg { transform: translateX(5px); }

/* Branch cards */
/* The whole card opens the branch page. The title carries the real link and an
   ::after overlay stretches it across the card, so there is exactly one link in
   the accessibility tree — the Call / WhatsApp / Map chips sit above it and stay
   independently clickable. */
.branch {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.branch:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.branch[hidden] { display: none; }
.branch:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(4,65,102,.18); }

.card-link { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link svg {
  flex: none; color: var(--accent);
  opacity: 0; transform: translateX(-5px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.branch:hover .card-link svg,
.branch:focus-within .card-link svg { opacity: 1; transform: none; }
/* The overlay would otherwise swallow the direct-action chips */
.branch-actions { position: relative; z-index: 2; }
.badge-open { z-index: 3; }
/* Focus is drawn on the card, not the title text */
.card-link:focus-visible { outline: none; }
.branch-photo { aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.branch-photo > picture { position: absolute; inset: 0; z-index: 1; }
.branch-photo > picture img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.branch:hover .branch-photo > picture img { transform: scale(1.045); }
.branch-photo-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center; gap: var(--s4);
  padding: var(--s6); color: rgba(255,255,255,.78);
  background:
    radial-gradient(circle at 82% 12%, rgba(138,210,221,.24), transparent 32%),
    linear-gradient(145deg, #033653, #075A7B);
}
.branch-photo-fallback img { width: 54px; height: 54px; object-fit: contain; opacity: .96; }
.branch-photo-fallback span {
  max-width: 190px; font-size: .66rem; font-weight: 700;
  letter-spacing: .12em; line-height: 1.45; text-transform: uppercase;
}
.branch-photo-fallback b {
  display: block; margin-top: 4px;
  color: #fff; font-size: 1rem; letter-spacing: -.01em; text-transform: none;
}
.branch-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.branch-body h3 { margin-bottom: var(--s2); }
.branch-addr { font-size: .875rem; color: var(--text-3); margin-bottom: var(--s4); line-height: 1.5; }
.branch-directory-inline {
  margin-top: clamp(64px, 8vw, 104px);
  padding-top: clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--line);
}

/* Patong and Kata trade as Andaman Bodrum — the name on the building. */
.subbrand {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0 0 var(--s3);
  font-size: .78rem; line-height: 1.45; color: var(--text-3);
}
.subbrand svg { flex: none; margin-top: 2px; color: var(--accent); }
.subbrand b { color: var(--text-2); font-weight: 700; }

.signpost {
  display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap;
  margin-top: var(--s5); padding: var(--s4) var(--s5);
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt);
  border-radius: var(--r-md);
  max-width: 640px;
}
.signpost img { height: 46px; width: auto; flex: none; }
.signpost p { margin: 0; font-size: .875rem; color: var(--text-2); line-height: 1.5; }
.signpost b { color: var(--text); }
.branch-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; }

/* Location directory actions mirror the reference: three equal controls on
   one line, with Map kept secondary so urgent contact remains unmistakable. */
.location-branch-grid .branch-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.location-branch-grid .branch-actions .chip {
  width: 100%; min-height: 44px; padding-inline: 8px;
  justify-content: center;
  border-color: var(--navy); border-radius: 12px;
  background: var(--navy); color: #fff;
  font-size: .79rem; font-weight: 700; white-space: nowrap;
}
.location-branch-grid .branch-actions .chip:hover {
  border-color: #05537F; background: #05537F; color: #fff;
}
.location-branch-grid .branch-actions .branch-action--map {
  border-color: transparent;
  background: #E9F0F6; color: #123B66;
}
.location-branch-grid .branch-actions .branch-action--map:hover {
  border-color: transparent;
  background: #DDE8F1; color: #0A2540;
}

/* Placeholder surface behind an image that hasn't been supplied yet */
.branch-photo, .story-media {
  background:
    radial-gradient(120% 120% at 78% 12%, rgba(61,84,164,.16), transparent 58%),
    radial-gradient(90% 90% at 12% 92%, rgba(138,210,221,.22), transparent 60%),
    var(--surface-2);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 600; color: var(--text-2);
  background: var(--bg);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--navy); color: var(--navy); background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.badge-open {
  position: absolute; top: var(--s3); left: var(--s3); z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--scrim);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.badge-open.is-closed {
  background: rgba(255,255,255,.94);
  border-color: rgba(155,28,31,.24);
  color: #8B1D24;
}
.eyebrow.is-closed {
  color: #8B1D24;
  background: rgba(155,28,31,.07);
  border-color: rgba(155,28,31,.18);
}
.verify {
  display: table; margin-top: var(--s3);
  padding: 3px 9px; border-radius: var(--r-sm);
  background: rgba(200,29,34,.08); border: 1px solid rgba(200,29,34,.32);
  color: var(--red-cta); font-size: .68rem; font-weight: 700; letter-spacing: .05em;
}

/* ==========================================================================
   Service page components. These replaced rows of wrapping "chips", which
   ragged badly at every width and made the pages look broken.
   ========================================================================== */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
  font-size: .95rem; color: var(--text-2); line-height: 1.55;
}
.checklist li:last-child { border-bottom: 0; }
.tick {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--tint); color: var(--navy);
}

.prose p { color: var(--text-2); }
.prose p:last-of-type { margin-bottom: var(--s6); }

.note {
  display: flex; gap: var(--s4);
  padding: var(--s5); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt);
}
.note-ico { flex: none; color: var(--accent); margin-top: 2px; }
.note h3, .note-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 var(--s2); }
.note p { margin: 0; font-size: .92rem; color: var(--text-2); }

/* A visit really is a sequence, so it gets numbers */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  display: flex; gap: var(--s5); align-items: flex-start;
  padding-block: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps h3 { margin-bottom: var(--s2); }
.steps p { margin: 0; color: var(--text-2); max-width: 62ch; }
.step-n {
  flex: none; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

.svc-branches { list-style: none; margin: var(--s5) 0 0; padding: 0; border-top: 1px solid var(--line); }
.svc-branches li { border-bottom: 1px solid var(--line); }
.svc-branches a {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  padding: var(--s3) 0; min-height: 44px;
  transition: color var(--t-fast) var(--ease);
}
.svc-branches a:hover { color: var(--navy); }
.svcb-name { font-size: .92rem; font-weight: 700; }
.svcb-area { font-size: .78rem; color: var(--text-3); text-align: right; }

/* ---- Branch page ---- */
.branch-street { font-size: .95rem; color: var(--text-3); max-width: 46ch; margin-bottom: 0; }

.factbar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
}
.fact { display: flex; gap: var(--s3); padding: var(--s5); border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; }
.fact-ico { flex: none; color: var(--accent); margin-top: 1px; }
.fact b { display: block; font-size: .92rem; margin-bottom: 3px; }
.fact span { display: block; font-size: .8rem; color: var(--text-3); line-height: 1.5; }

.note--warn { border-left-color: var(--red-cta); background: rgba(200,29,34,.045); margin-bottom: var(--s6); max-width: 780px; }
.note--warn .note-ico { color: var(--red-cta); }

.bsvc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bsvc li { border-bottom: 1px solid var(--line); }
.bsvc a {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) 0; min-height: 44px;
  transition: color var(--t-fast) var(--ease);
}
.bsvc a > svg:last-child { flex: none; margin-left: auto; color: var(--accent); opacity: 0; transform: translateX(-5px); transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease); }
.bsvc a:hover > svg:last-child { opacity: 1; transform: none; }
.bsvc-ico {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--r-md); background: var(--tint); border: 1px solid var(--tint-line); color: var(--navy);
}
.bsvc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bsvc-name { font-size: .95rem; font-weight: 700; }
.bsvc-desc { font-size: .8rem; color: var(--text-3); line-height: 1.45; }
.bsvc a:hover .bsvc-name { color: var(--navy); }

.feature-badge {
  position: absolute; left: var(--s5); bottom: var(--s5); z-index: 2;
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border: 1px solid var(--line-2); color: var(--navy);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.page-hero--split { padding-bottom: clamp(40px, 5vw, 72px); }
.page-hero--split .feature { margin-bottom: 0; }
.page-hero--split .crumbs { margin-top: 0; }
.page-hero--split .feature-text h1 {
  margin-bottom: clamp(20px, 2.4vw, 32px);
}

/* ==========================================================================
   Feature: a block of prose set against one photograph. Text leads, image
   supports — the reverse of a card grid, and it lets the copy actually breathe.
   ========================================================================== */
.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px); align-items: center;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.feature-text .lead { margin-bottom: var(--s5); }
.feature-text p:last-child { margin-bottom: 0; color: var(--text-2); }
.feature-media {
  margin: 0; position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background:
    radial-gradient(120% 120% at 78% 12%, rgba(61,84,164,.16), transparent 58%),
    radial-gradient(90% 90% at 12% 92%, rgba(138,210,221,.22), transparent 60%),
    var(--surface-2);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
/* Keep every part of the urgent-care scene visible, including on mobile. */
.feature-media.feature-media--urgent-cover { aspect-ratio: 4 / 3; }
.feature-media--urgent-cover img { object-fit: contain; }

/* Stats used away from the hero need the first cell inset like the others */
.stats--wide .stat:first-child { padding-left: var(--s5); }

/* ---- Mission / vision: two statements, given room ---- */
.creed { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.creed blockquote {
  margin: 0; padding-left: var(--s5);
  border-left: 2px solid var(--cobalt);
}
.creed-label {
  margin: 0 0 var(--s3);
  font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
}
html[lang="th"] .creed-label { letter-spacing: .08em; }
.creed-text {
  margin: 0; max-width: 30ch;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600; line-height: 1.34; letter-spacing: -.022em;
  color: var(--text);
}

.prose-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.prose-2 p { color: var(--text-2); }

/* ==========================================================================
   Split: a sticky column of framing on the left, the substance on the right.
   Used instead of a grid of identical boxes wherever the items are a list of
   points rather than a set of parallel choices.
   ========================================================================== */
.split {
  display: grid; grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(40px, 6vw, 104px);
  align-items: start;
}
.split-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.split-aside .lead { margin-bottom: var(--s5); }

.reasons { list-style: none; margin: 0; padding: 0; }
.reasons li {
  display: flex; gap: var(--s5);
  padding-block: clamp(24px, 3.4vw, 40px);
  border-top: 1px solid var(--line);
}
.reasons li:first-child { border-top: 0; padding-top: 0; }
.reasons h3 { margin-bottom: var(--s2); }
.reasons p { margin: 0; color: var(--text-2); font-size: .95rem; }
.reason-ico {
  flex: none; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: var(--r-md);
  background: var(--tint); border: 1px solid var(--tint-line); color: var(--navy);
}

/* ==========================================================================
   Clinic finder — the list is the feature, the map is the enhancement.
   Both halves have to look deliberate on their own, because on a bad
   connection the reader only ever gets the left one.
   ========================================================================== */
.findmap {
  position: relative; z-index: 0; isolation: isolate;
  display: grid; grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--bg);
  box-shadow: var(--shadow-md);
}
.findmap-tools {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  margin-bottom: var(--s4); padding: var(--s5);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
}
.findmap-tools b { display: block; font-size: .95rem; }
.findmap-tools span { display: block; color: var(--text-3); font-size: .8rem; line-height: 1.5; }
.findmap-tools .btn span { color: #fff; font-size: inherit; line-height: 1; }
.findmap-result {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  margin-bottom: var(--s4); padding: var(--s5);
  background: rgba(4,65,102,.055); border: 1px solid var(--tint-line); border-radius: var(--r-md);
}
.findmap-result[hidden] { display: none; }
.nearest-label {
  display: block; margin-bottom: 3px;
  color: var(--navy); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.findmap-result h3 { margin-bottom: 4px; }
.findmap-result p { margin: 0; color: var(--text-2); font-size: .82rem; }
.nearest-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.findmap-side {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
}
.findmap-count {
  margin: 0; padding: var(--s5) var(--s5) var(--s4);
  border-bottom: 1px solid var(--line);
  font-size: .82rem; color: var(--text-3);
}
.findmap-count b {
  display: inline-block; margin-right: 6px;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em;
  color: var(--navy); vertical-align: -3px;
}
.findmap-list {
  list-style: none; margin: 0; padding: 0;
  overflow-y: auto; flex: 1; min-height: 0;
}
.findmap-item {
  display: flex; align-items: stretch; gap: 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease);
}
.findmap-item:last-child { border-bottom: 0; }
.findmap-item:hover,
.findmap-item.is-active { background: var(--bg); }
.findmap-item.is-active { box-shadow: inset 3px 0 0 var(--navy); }

.findmap-link {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
  padding: var(--s4) var(--s5);
}
.findmap-name {
  display: flex; align-items: center; gap: 6px;
  font-size: .95rem; font-weight: 700; color: var(--text);
  transition: color var(--t-fast) var(--ease);
}
.findmap-item:hover .findmap-name { color: var(--navy); }
.findmap-area { font-size: .8rem; color: var(--text-3); line-height: 1.4; }
.findmap-brand { font-size: .72rem; color: var(--text-3); font-style: italic; }
.findmap-hours { font-size: .72rem; font-weight: 700; color: var(--navy); }
.findmap-hours.is-closed { color: #8B1D24; }
.findmap-item.is-closed .findmap-name { color: var(--text-3); }
.findmap-flag { color: var(--red-cta); font-size: .8rem; }

.findmap-locate {
  flex: none; width: 48px;
  display: grid; place-items: center;
  border-left: 1px solid var(--line);
  color: var(--text-3);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.findmap-locate:hover { color: var(--navy); background: var(--surface-2); }

.findmap-hint {
  margin: 0; padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--text-3);
}
/* Nothing to hint at until a map exists */
.findmap:not(.has-map) .findmap-hint { display: none; }

.findmap-canvas {
  position: relative; z-index: 0; isolation: isolate;
  min-height: 520px;
  background:
    radial-gradient(120% 120% at 78% 12%, rgba(61,84,164,.10), transparent 58%),
    radial-gradient(90% 90% at 12% 92%, rgba(138,210,221,.16), transparent 60%),
    var(--surface-2);
}
/* Map failed or was never loaded — the list becomes the whole component */
.findmap.no-map { grid-template-columns: 1fr; }
.findmap.no-map .findmap-side { border-right: 0; }

/* Locations contact panel: two clearly different actions, presented as one
   destination instead of repeating another full CTA immediately afterwards. */
.location-contact-section {
  background: linear-gradient(180deg, var(--bg), var(--surface-2));
}
.location-contact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: clamp(32px, 5vw, 72px);
  padding: clamp(30px, 4vw, 52px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(138,210,221,.2), transparent 38%),
    linear-gradient(135deg, #033653, #075A7B);
  box-shadow: var(--shadow-md);
}
.location-contact-copy h2 { color: #fff; margin-bottom: var(--s4); }
.location-contact-copy .kicker { color: #A7E5EC; }
.location-contact-copy .kicker::before { background: linear-gradient(90deg, #A7E5EC, transparent); }
.location-contact-copy .lead { color: rgba(255,255,255,.76); margin-bottom: 0; }
.location-contact-actions {
  display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: var(--s3);
}
.contact-action {
  min-height: 82px; padding: var(--s4);
  display: flex; align-items: center; gap: var(--s3);
  border: 1px solid transparent; border-radius: var(--r-md);
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.contact-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,.2);
}
.contact-action-icon {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
}
.contact-action small,
.contact-action strong { display: block; }
.contact-action small {
  margin-bottom: 4px; font-size: .7rem; font-weight: 750;
  letter-spacing: .04em;
}
.contact-action strong { font-size: 1rem; line-height: 1.2; }
.contact-action--call {
  color: #fff; background: var(--red-cta); border-color: transparent;
}
.contact-action--call:hover { background: #AF1519; }
.contact-action--call .contact-action-icon { color: #fff; background: rgba(255,255,255,.18); }
.contact-action--call small { color: rgba(255,255,255,.80); }

.contact-action--wa {
  color: var(--wa-ink); background: var(--wa); border-color: transparent;
}
.contact-action--wa:hover { background: #1FBE5B; }
.contact-action--wa .contact-action-icon { color: var(--wa-ink); background: rgba(5,46,22,.14); }
.contact-action--wa small { color: rgba(5,46,22,.72); }

.findmap.is-loading .findmap-canvas { position: relative; }
.findmap.is-loading .findmap-canvas::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { transform: translateX(-100%) } to { transform: translateX(100%) } }

/* ---- Leaflet overrides: make it look like the rest of the site ---- */
.findmap-canvas.leaflet-container { font: inherit; background: var(--surface-2); }
.findmap-canvas .leaflet-tile-pane,
.branchmap .leaflet-tile-pane {
  filter: grayscale(.82) saturate(.42) brightness(1.08) contrast(.84) sepia(.05);
}
.findmap-canvas .leaflet-control-attribution {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  font-size: .66rem; color: var(--text-3);
}
.findmap-canvas .leaflet-control-attribution a { color: var(--text-2); }
.findmap-canvas .leaflet-bar a {
  color: var(--text); border-bottom-color: var(--line);
  background: var(--bg); width: 32px; height: 32px; line-height: 32px;
}
.findmap-canvas .leaflet-bar a:hover { background: var(--surface-2); }

.mappin {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--navy) 18%, transparent);
  transition: transform var(--t-mid) var(--ease);
}
.mappin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--navy); border: 3px solid var(--bg);
  box-shadow: 0 1px 4px rgba(4,65,102,.45);
}
.mappin.is-provisional .mappin-dot { background: var(--red-cta); }
.mappin.is-closed { background: rgba(102,124,136,.18); }
.mappin.is-closed .mappin-dot { background: var(--text-3); box-shadow: none; }
.leaflet-marker-icon:hover .mappin,
.mappin.is-hot { transform: scale(1.32); }

/* ---- Branch page map: one clinic, always on ---- */
.branchmap {
  position: relative; z-index: 0; isolation: isolate;
  min-height: 380px; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  background:
    radial-gradient(120% 120% at 78% 12%, rgba(61,84,164,.10), transparent 58%),
    radial-gradient(90% 90% at 12% 92%, rgba(138,210,221,.16), transparent 60%),
    var(--surface-2);
}
.branchmap.leaflet-container { font: inherit; background: var(--surface-2); }
.branchmap.is-loading { position: relative; }
.branchmap.is-loading::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 1.4s linear infinite;
}
/* Tiles never arrived — collapse rather than leave a grey slab */
.branchmap.no-map { display: none; }
.branchmap .leaflet-control-attribution {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  font-size: .66rem; color: var(--text-3);
}
.branchmap .leaflet-control-attribution a { color: var(--text-2); }
.branchmap .leaflet-bar a {
  color: var(--text); border-bottom-color: var(--line);
  background: var(--bg); width: 32px; height: 32px; line-height: 32px;
}
.branchmap .leaflet-bar a:hover { background: var(--surface-2); }
/* The single pin is the whole point of the map, so it reads larger */
.mappin.is-single { width: 34px; height: 34px; }
.mappin.is-single .mappin-dot { width: 20px; height: 20px; border-width: 4px; }

.service-detail-photo {
  margin: var(--s6) 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.service-detail-photo picture,
.service-detail-photo img { display: block; width: 100%; }
.service-detail-photo img { aspect-ratio: 16 / 10; object-fit: cover; }
.service-detail-photo figcaption {
  padding: var(--s3) var(--s4);
  color: var(--text-3); font-size: .78rem; line-height: 1.5;
}

.mappop { min-width: 220px; }
.mappop h3 { font-size: 1.05rem; margin: 0 0 var(--s2); }
.mappop-open {
  display: flex; align-items: center; gap: 6px; margin: 0 0 var(--s2);
  font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
}
.mappop-open.is-closed { color: #8B1D24; }
.mappop-addr { margin: 0 0 var(--s3); font-size: .82rem; color: var(--text-2); line-height: 1.5; }
.mappop-brand { margin: 0 0 var(--s2); font-size: .74rem; color: var(--text-3); }
.mappop-note {
  margin: 0 0 var(--s3); padding: 7px 10px; border-radius: var(--r-sm);
  background: rgba(200,29,34,.07); border: 1px solid rgba(200,29,34,.26);
  font-size: .74rem; line-height: 1.45; color: var(--text-2);
}
.mappop-actions { display: flex; gap: 6px; margin-bottom: var(--s3); }
.mappop-actions .btn { flex: 1; padding: 0 var(--s3); }
.mappop-links { display: flex; gap: var(--s4); font-size: .8rem; font-weight: 700; }
.mappop-links a { color: var(--accent); }
.mappop-links a:hover { text-decoration: underline; }
/* Leaflet ships `.leaflet-container a { color:#0078A8 }`, which beats .btn on
   specificity and left the Call button's number unreadable on red. */
.leaflet-container .mappop a.btn-call,
.leaflet-container .mappop a.btn-wa { color: #fff; }
.leaflet-container .mappop a.btn { text-decoration: none; }
.leaflet-container .mappop-links a { color: var(--accent); }
.leaflet-popup-content { margin: var(--s4) var(--s5); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); box-shadow: var(--shadow-md); }

/* ==========================================================================
   Insurance
   ========================================================================== */
.insurers { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s3); }
.insurer {
  display: grid; place-items: center; min-height: 84px; padding: var(--s4);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: .8rem; font-weight: 700; color: var(--text-3); text-align: center; line-height: 1.3;
  transition: border-color var(--t-mid) var(--ease), color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.insurer:hover { border-color: var(--line-2); color: var(--text-2); box-shadow: var(--shadow-sm); }
/* Logos are desaturated at rest so ten different brand palettes don't fight
   each other or the navy — they come up to full colour on hover. */
.insurer img {
  max-height: 34px; width: auto; object-fit: contain;
  filter: grayscale(1); opacity: .72;
  transition: filter var(--t-mid) var(--ease), opacity var(--t-mid) var(--ease);
}
.insurer:hover img { filter: none; opacity: 1; }
/* Preserve the supplied marks; crop only Redion's generous blank margins. */
.insurer--redion img {
  width: 190px; max-width: 100%; height: 42px; max-height: 42px;
  object-fit: cover; object-position: center;
}
.insurer--ema-global img { width: 54px; height: 54px; max-height: 54px; }
.insurer--best-service-assistance img,
.insurer--falck img { max-width: 100%; height: auto; max-height: 40px; }
/* Name-only tiles match the optical weight of the logo tiles */
.insurer.is-text { font-size: .9rem; letter-spacing: -.01em; color: var(--text-2); }
.insurer.is-text:hover { color: var(--navy); }

/* The eleventh tile. The wall is a sample, not the whole list — this reads as
   part of the grid rather than a footnote, so nobody scans ten logos and
   concludes their own insurer isn't accepted. */
.insurer.is-more {
  border-style: dashed; border-color: var(--line-2);
  color: var(--navy); font-weight: 800; letter-spacing: -.01em;
  background: color-mix(in srgb, var(--navy) 4%, var(--bg));
}
.insurer.is-more:hover { border-style: solid; border-color: var(--navy); color: var(--navy); }
.insurers-note {
  margin-top: var(--s4); max-width: 68ch;
  color: var(--text-3); line-height: 1.65;
}

/* ==========================================================================
   Patient reviews
   ========================================================================== */
.reviews-shell { position: relative; }
.review-controls {
  display: flex; justify-content: flex-end; gap: var(--s2);
  margin: 0 0 var(--s4);
}
.review-nav {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--navy); background: var(--bg);
  border: 1px solid var(--line-2);
  font-size: 1.2rem; font-weight: 700;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.review-nav:hover:not(:disabled) {
  color: #fff; background: var(--navy); border-color: var(--navy);
  transform: translateY(-1px);
}
.review-nav:disabled { opacity: .35; cursor: default; }
.reviews-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--s5) * 2)) / 3);
  gap: var(--s5); overflow-x: auto; overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory; scroll-padding-inline: 1px;
  padding: 2px 2px var(--s4);
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.review-card {
  min-width: 0; overflow: hidden; scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid rgba(4,65,102,.12);
  border-radius: var(--r-lg); box-shadow: 0 8px 24px rgba(8,43,62,.06);
}
.review-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.review-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.review-content { display: flex; flex: 1; flex-direction: column; padding: var(--s5); }
.review-rating { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.stars { display: flex; gap: 3px; color: #E8A020; }
.review-source {
  padding: 4px 8px; border-radius: 999px;
  color: var(--text-3); background: var(--surface-2);
  font-size: .68rem; font-weight: 750; letter-spacing: .04em;
}
.review-card blockquote { margin: 0; }
.review-card blockquote p { color: var(--text); font-size: .94rem; line-height: 1.66; margin: 0 0 var(--s5); }
.review-author { display: flex; align-items: center; gap: var(--s3); margin-top: auto; padding-top: var(--s4); border-top: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--line-2);
  font-size: .78rem; font-weight: 800; color: var(--navy);
}
.review-author b { display: block; color: var(--text); font-size: .875rem; font-weight: 750; }
.review-author time { display: block; color: var(--text-3); font-size: .73rem; margin-top: 2px; }
.section-head--action {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s6);
}
.section-head--action > div { max-width: 720px; }
.section-head--action .btn { flex: none; margin-bottom: 3px; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.band {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, var(--surface-2) 0%, var(--bg-2) 55%, var(--surface) 100%);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.band::before {
  content: ""; position: absolute; inset: -40% -10% auto auto;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138,210,221,.30), transparent 66%);
  pointer-events: none;
}
.band .container { position: relative; z-index: 1; }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s7); flex-wrap: wrap; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: var(--s4); max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; font-weight: 700; color: var(--text-2); }
.field .req { color: var(--red-cta); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 12px var(--s4);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  width: 100%;
}
.field textarea { min-height: 116px; resize: vertical; line-height: 1.6; }
.form-errors {
  margin: 0 0 var(--s4); padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(200,29,34,.07); border: 1px solid rgba(200,29,34,.30);
  font-size: .875rem; font-weight: 600; color: var(--red-cta);
}
.field.has-error input, .field.has-error textarea, .field.has-error select {
  border-color: var(--red-cta);
  box-shadow: 0 0 0 3px rgba(200,29,34,.12);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(4,65,102,.14);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field .hint { font-size: .78rem; color: var(--text-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }

/* ==========================================================================
   Mobile contact dock
   ========================================================================== */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock);
  display: none; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -2px 18px rgba(4,65,102,.10);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--dock-h); padding: var(--s2) 4px;
  font-size: .66rem; font-weight: 700; color: var(--text-2);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.dock a:active { background: var(--surface-2); }
.dock a.is-wa { color: #0B8043; }
.dock a.is-call { color: var(--red-cta); }
.dock svg { width: 21px; height: 21px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: var(--s9) var(--s6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s7); margin-bottom: var(--s8); }
.footer h4 { font-size: .74rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s4); }
html[lang="th"] .footer h4 { letter-spacing: .06em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.footer li a { font-size: .875rem; color: var(--text-2); transition: color var(--t-fast) var(--ease); min-height: 30px; display: inline-flex; align-items: center; }
.footer li a:hover { color: var(--accent); }
/* width:auto is load-bearing — without it the global max-width:100% stretches
   the logo to the column width while height stays pinned at 42px. */
.footer-brand img { height: 42px; width: auto; margin-bottom: var(--s4); }
.footer-brand p { font-size: .875rem; color: var(--text-3); max-width: 34ch; }
.footer-base {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5); flex-wrap: wrap;
  padding-top: var(--s5); border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--text-3);
}

/* ==========================================================================
   Interior page hero
   ========================================================================== */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 112px) clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.page-hero--compact {
  padding-block: clamp(36px, 5vw, 60px) clamp(30px, 4vw, 48px);
}
.page-hero--compact h1 {
  max-width: 19ch;
  font-size: clamp(2rem, 3.25vw, 2.8rem);
  margin-bottom: var(--s4);
}
.crumbs { font-size: .78rem; color: var(--text-3); margin-bottom: var(--s5); }
.crumbs a { transition: color var(--t-fast) var(--ease); }
.crumbs a:hover { color: var(--accent); }

.map-wrap {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.ph {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3; border-radius: var(--r-md);
  background: var(--surface); border: 1px dashed var(--line-2);
  color: var(--text-3); font-size: .78rem; text-align: center; padding: var(--s4);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ==========================================================================
   Professional clinic visual system
   ========================================================================== */
.section--soft {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.section--trust {
  color: rgba(255,255,255,.80);
  background:
    radial-gradient(circle at 5% 10%, rgba(138,210,221,.17), transparent 28%),
    linear-gradient(135deg, #033653, #064E72);
}
.section--trust h2,
.section--trust h3,
.section--trust .lead { color: #fff; }
.section--trust .kicker { color: #A7E5EC; }
.section--trust .kicker::before { background: linear-gradient(90deg, #A7E5EC, transparent); }
.section--trust .reasons li { border-color: rgba(255,255,255,.14); }
.section--trust .reasons p { color: rgba(255,255,255,.72); }
.section--trust .reason-ico {
  color: #B7EDF1; background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}
.section--trust .btn-ghost {
  color: #fff; background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.3);
}
.section--trust .btn-ghost:hover { color: var(--navy); background: #fff; border-color: #fff; }

.section-head { margin-bottom: clamp(34px, 4vw, 52px); }
.section-head h2 { margin-bottom: var(--s4); }

.svc-card,
.branch,
.card {
  background: var(--bg);
  border-color: rgba(4,65,102,.10);
  box-shadow: 0 1px 2px rgba(8,43,62,.03);
}
.svc-card:hover,
.branch:hover,
.card:hover {
  border-color: rgba(4,65,102,.22);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.svc-card-photo { aspect-ratio: 16 / 10; }
.svc-card-icon,
.feature-badge {
  border-radius: 10px; background: rgba(255,255,255,.94);
  box-shadow: 0 5px 16px rgba(8,43,62,.10);
}
.svc-card-body { padding: var(--s5) var(--s5) var(--s4); }
.svc-card-body h3 { font-size: 1.12rem; }
.svc-card-body p { color: var(--text-2); }

.findmap { border-color: rgba(4,65,102,.14); box-shadow: var(--shadow-md); }
.findmap-side { background: #F8FBFC; }
.findmap-item.is-active { box-shadow: inset 4px 0 0 var(--red-cta); }
.findmap-count b { color: var(--red-cta); }

.band {
  color: rgba(255,255,255,.78);
  background: linear-gradient(135deg, #033653, #075A7B);
  border-block: 0;
}
.band::before {
  inset: -70% -10% auto auto;
  background: radial-gradient(circle, rgba(138,210,221,.20), transparent 64%);
}
.band h2,
.band .lead { color: #fff; }
.band .btn-ghost {
  color: #fff; background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.32);
}
.band .btn-ghost:hover { color: var(--navy); background: #fff; border-color: #fff; }
.band .btn-wa {
  color: var(--navy); background: #fff; border-color: #fff;
}
.band .btn-wa:hover {
  color: var(--navy); background: #EAF3F7; border-color: #EAF3F7;
}

.footer {
  color: rgba(255,255,255,.74);
  background: #062F46; border-top: 0;
}
.footer h2,
.footer h4 {
  margin: 0 0 var(--s4); color: rgba(255,255,255,.55);
  font-size: .74rem; font-weight: 800; line-height: 1.4;
  letter-spacing: .18em; text-transform: uppercase;
}
.footer li a { color: rgba(255,255,255,.72); }
.footer li a:hover { color: #fff; }
.footer-brand img { opacity: .98; }
.footer-brand p,
.footer-base { color: rgba(255,255,255,.58); }
.footer-base { border-top-color: rgba(255,255,255,.13); }

.page-hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(138,210,221,.15), transparent 28%),
    linear-gradient(180deg, #F7FAFB, #FFFFFF);
}
.feature-media { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav { gap: 16px; }
  .header-language button { padding-inline: 7px; }
  .hero-shell { grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr); gap: var(--s7); }
  .hero-media { min-height: 490px; }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(3) { border-left: 0; }
  .proof-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .reviews-track { grid-auto-columns: calc((100% - var(--s5)) / 2); }
  .insurers { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .location-contact { grid-template-columns: 1fr; }
  .location-contact-actions { width: 100%; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }
  body { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); }

  /* backdrop-filter creates a containing block for fixed descendants in some
     browsers; disabling it here lets the menu and scrim span the viewport. */
  .header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav {
    position: fixed; inset: 0 0 0 auto; z-index: var(--z-nav);
    width: min(86vw, 360px);
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: calc(var(--header-h) + var(--s5)) var(--s5) calc(var(--s8) + env(safe-area-inset-bottom));
    background: var(--bg);
    box-shadow: -20px 0 55px rgba(3, 35, 51, .18);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform var(--t-mid) var(--ease), visibility var(--t-mid);
    overflow-y: auto;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { font-size: 1.14rem; font-weight: 750; padding: var(--s4) var(--s2); border-bottom: 1px solid var(--line); color: var(--text); }
  .nav a::after { display: none; }
  .nav-language {
    display: inline-flex;
    align-self: flex-start;
    margin-top: var(--s5);
  }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: calc(var(--z-nav) - 1);
    border: 0; background: rgba(3, 35, 51, .42);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--t-mid) var(--ease), visibility var(--t-mid) var(--ease);
  }
  .nav-open .nav-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
  .burger { display: inline-flex; position: relative; z-index: calc(var(--z-nav) + 1); background: var(--bg); }
  .header-contact-group { display: none; }
  .header-language { display: none; }

  .hero {
    min-height: max(590px, calc(100svh - var(--bar-h) - var(--header-h)));
    padding-block: clamp(28px, 4vh, 42px) 0;
  }
  .hero-shell { grid-template-columns: 1fr; gap: var(--s6); }
  .hero-inner { max-width: 720px; padding-bottom: 0; }
  .hero-media { min-height: 0; aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
  .hero-media img { object-position: center 42%; }
  .hero .hero-cta { margin-bottom: var(--s3); }
  .proof-strip { margin-top: var(--s6); border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats { margin-top: var(--s6); border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .stat { padding: var(--s5) var(--s4); border-top: 1px solid var(--line); }
  .stat:nth-child(2n+1) { border-left: 0; }
  .stat:nth-child(-n+2) { border-top: 0; }
  .scroll-cue { display: none; }

  .story-row { grid-template-columns: 1fr; gap: var(--s6); }
  .story-row:nth-child(even) .story-media { order: 0; }
  .story-media { aspect-ratio: 16 / 10; }

  .cards-2 { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; gap: var(--s7); }
  .factbar { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2n+1) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps li { gap: var(--s4); }
  .feature { grid-template-columns: 1fr; gap: var(--s6); }
  .feature-media { aspect-ratio: 16 / 10; }
  .creed, .prose-2 { grid-template-columns: 1fr; gap: var(--s6); }
  .stats--wide .stat:first-child { padding-left: 0; }

  .split { grid-template-columns: 1fr; gap: var(--s7); }
  .split-aside { position: static; }
  .reasons li { gap: var(--s4); }

  /* Map above the list on a phone: "where am I" first, then the names */
  .findmap { grid-template-columns: 1fr; }
  .findmap-side { border-right: 0; border-top: 1px solid var(--line); order: 2; }
  .findmap-canvas { order: 1; min-height: 340px; }
  .findmap-list { overflow-y: visible; }
  .findmap-tools,
  .findmap-result,
  .section-head--action { align-items: flex-start; flex-direction: column; }
  .field-row { grid-template-columns: 1fr; }
  .band-inner { flex-direction: column; align-items: flex-start; gap: var(--s5); }

  .dock { display: grid; }
  .footer { padding-bottom: var(--s7); }

  /* Homepage mobile: keep the first decision screen calm and concise. */
  .home-hero {
    min-height: auto;
    padding-block: var(--s5) 0;
  }
  .home-hero .hero-inner { padding-bottom: 0; }
  .home-hero .display {
    max-width: 17ch;
    margin-bottom: var(--s4);
    font-size: clamp(2.2rem, 10.6vw, 2.8rem);
    line-height: .98;
  }
  .home-hero .lead {
    margin-bottom: var(--s5);
    font-size: .96rem;
    line-height: 1.52;
  }
  .home-hero .hero-cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .home-hero .hero-cta .btn {
    width: 100%; min-height: 46px; padding-inline: 12px;
    font-size: .8rem;
  }
  .home-hero .hero-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px; gap: 4px 8px;
  }
  .home-hero .hero-quick-link {
    justify-content: center;
    min-height: 40px; padding-inline: 2px;
    font-size: .82rem;
  }
  .home-hero .hero-quick-link + .hero-quick-link::before { display: none; }
  .home-hero .proof-strip { margin-top: var(--s4); }

  /* On mobile the map remains useful, but its duplicate text list gives way
     to the complete visual branch grid below it. */
  .home-clinics .findmap-side { display: none; }
  .home-clinics .branch-directory-inline {
    display: block;
    margin-top: var(--s5);
    padding-top: var(--s5);
  }
  .home-clinics .branch-directory-inline > .section-head { display: none; }
}

@media (max-width: 640px) {
  .section-head--action { align-items: flex-start; flex-direction: column; }
  .review-controls { justify-content: flex-start; }
  .reviews-track { grid-auto-columns: min(88%, 360px); gap: var(--s4); }
  .review-content { padding: var(--s4); }
  .location-contact { padding: var(--s5); }
  .location-contact-actions { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .cards-3 { grid-template-columns: 1fr; }

  /* Both branch directories keep all eight clinics visible as a compact
     two-column, four-row grid on phones. Desktop layouts are untouched. */
  :is(.location-branch-grid, .home-branch-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch {
    min-width: 0;
    border-radius: 14px;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-photo { aspect-ratio: 4 / 3; }
  :is(.location-branch-grid, .home-branch-grid) .badge-open {
    top: 8px; left: 8px;
    max-width: calc(100% - 16px);
    padding: 4px 7px;
    gap: 4px;
    font-size: .55rem;
    line-height: 1.18;
    letter-spacing: .045em;
    text-align: center;
  }
  :is(.location-branch-grid, .home-branch-grid) .pulse { width: 6px; height: 6px; }
  :is(.location-branch-grid, .home-branch-grid) .branch-photo-fallback {
    gap: 7px;
    padding: 12px;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-photo-fallback img { width: 30px; height: 30px; }
  :is(.location-branch-grid, .home-branch-grid) .branch-photo-fallback span { display: none; }
  :is(.location-branch-grid, .home-branch-grid) .branch-body { padding: 12px; }
  :is(.location-branch-grid, .home-branch-grid) .branch-body h3 {
    min-height: 2.5em;
    margin-bottom: 6px;
    font-size: .92rem;
    line-height: 1.25;
  }
  :is(.location-branch-grid, .home-branch-grid) .card-link { align-items: flex-start; gap: 4px; }
  :is(.location-branch-grid, .home-branch-grid) .card-link svg { display: none; }
  :is(.location-branch-grid, .home-branch-grid) .subbrand { display: none; }
  :is(.location-branch-grid, .home-branch-grid) .branch-addr {
    min-height: 2.7em;
    margin-bottom: 10px;
    font-size: .7rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-action--map {
    grid-column: 1 / -1;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-actions .chip {
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    gap: 2px;
    padding: 5px 2px;
    border-color: var(--navy);
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-actions .branch-action--map {
    border-color: transparent;
    background: #E9F0F6;
    color: #123B66;
  }
  :is(.location-branch-grid, .home-branch-grid) .branch-actions .chip svg { width: 16px; height: 16px; }

  .proof-item small { display: none; }
  .proof-item { align-items: center; min-height: 68px; padding: var(--s3) var(--s4); }

  /* Six selected services in three compact rows instead of six tall cards. */
  .home-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .home-services-grid .svc-card { border-radius: var(--r-md); }
  .home-services-grid .svc-card-photo { aspect-ratio: 4 / 3; }
  .home-services-grid .svc-card-icon {
    left: 10px; bottom: 10px;
    width: 34px; height: 34px;
    border-radius: 10px;
  }
  .home-services-grid .svc-card-icon svg { width: 17px; height: 17px; }
  .home-services-grid .svc-card-body { padding: 12px; }
  .home-services-grid .svc-card-body h3 {
    margin: 0;
    font-size: .93rem;
    line-height: 1.25;
  }
  .home-services-grid .svc-card-body p,
  .home-services-grid .svc-card-body .tlink { display: none; }
  .home-services > .container > p { margin-top: var(--s5) !important; }
}

@media (max-width: 520px) {
  .hero { padding-top: var(--s5); }
  .hero .display { font-size: clamp(2.45rem, 12vw, 3.2rem); }
  .hero-media { aspect-ratio: 4 / 3; }
  .hero-media-note { left: var(--s3); right: var(--s3); bottom: var(--s3); padding: var(--s3); }
  .hero-media-note small { display: none; }
  .insurers { grid-template-columns: repeat(2, 1fr); }
  .factbar { grid-template-columns: 1fr; }
  .fact { border-left: 0; }
  .fact:nth-child(n+2) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-quick-link { width: 100%; padding-inline: 0; }
  .home-hero .hero-cta .btn { flex: initial; }
  .home-hero .hero-quick-link { padding-inline: 2px; }
  .home-hero .hero-call-number { display: none; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(odd) { border-left: 0; }
  .proof-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .findmap-tools .btn,
  .nearest-actions,
  .nearest-actions .btn { width: 100%; }
}

/* ==========================================================================
   Touch sizing — compact is fine for a mouse, not for a finger
   ========================================================================== */
@media (pointer: coarse) {
  .nav-language button { min-height: 44px; padding-inline: 15px; }
  .chip, .btn-sm { min-height: 44px; }
  .footer li a, .tlink { min-height: 44px; }
  .dock a { min-height: var(--dock-h); }
}

/* ==========================================================================
   Reduced motion & fallbacks
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .pulse { animation: none; }
}

.no-webgl .hero {
  background:
    radial-gradient(90% 70% at 78% 30%, rgba(61,84,164,.16), transparent 62%),
    radial-gradient(70% 60% at 20% 80%, rgba(138,210,221,.22), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

@media print {
  .dock, .nav, .burger, #field { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .branch { break-inside: avoid; }
}


/* ==========================================================================
   Contact — department inboxes
   ========================================================================== */
.email-card { display: flex; flex-direction: column; }
.email-card p { flex: 1; }
.email-card .email-addr {
  font-size: .82rem; font-weight: 700; letter-spacing: -.015em;
  overflow-wrap: normal; word-break: normal;
}
@media (max-width: 1080px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .cards-4 { grid-template-columns: 1fr; } }


/* ==========================================================================
   Closed-branch routing, emergency line and finder fallbacks
   ========================================================================== */
.closed-panel {
  margin-top: var(--s5);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red, #c8102e);
  border-radius: 14px;
  background: var(--surface-2, #f7f8fa);
}
.closed-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 1rem;
}
.closed-panel p { margin: 0 0 10px; }
.closed-panel a { color: inherit; }
.closed-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--s3);
}
.closed-panel-actions .btn { flex: 1 1 auto; min-height: 46px; }
.branch-action--redirect {
  grid-column: 1 / -1;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
.emergency-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--s4);
  padding: 10px var(--s4);
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  font-size: .86rem;
  text-align: center;
}
.emergency-strip a { color: inherit; text-decoration: underline; min-height: 44px;
  display: inline-flex; align-items: center; }
.footer-closed {
  display: block;
  font-size: .72rem;
  opacity: .62;
  letter-spacing: .02em;
}
.nearest-note { margin-top: 4px; font-size: .82rem; opacity: .8; }
.findmap-count-total { display: block; font-size: .82rem; opacity: .75; }
.nearest-fallback ul { list-style: none; margin: var(--s3) 0; padding: 0; }
.nearest-fallback li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.nearest-fallback li b { flex: 1 1 auto; }
.nearest-fallback li span { font-size: .82rem; opacity: .75; }
.nearest-fallback li .btn { min-height: 44px; }
.svcb-none .svcb-name { opacity: .8; }
.form-result {
  margin-top: var(--s4);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2, #f7f8fa);
  font-size: .92rem;
}
.form-result p { margin: 0; }
.form-result .btn { margin: 8px 8px 0 0; }

@media (max-width: 620px) {
  .closed-panel { padding: var(--s4); }
  .closed-panel-actions .btn { flex: 1 1 100%; }
}
