/* ==========================================================================
   Design system — calm, quietly premium, bilingual (AR-default RTL / EN LTR)
   All layout uses CSS logical properties so RTL mirrors automatically.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --ink:        #14282E;
  --teal:       #0F4C5C;
  --teal-deep:  #0A3843;
  --teal-soft:  #E8F0F1;
  --gold:       #C98A2B;
  --gold-ink:   #8A5A12;   /* darkened gold — AA-safe as text on ivory */
  --gold-soft:  #F5E9D6;
  --ivory:      #FBF8F2;
  --line:       #E4DDD1;
  --white:      #FFFFFF;

  /* Semantic (remapped in dark mode) */
  --bg:               var(--ivory);
  --surface:          var(--white);
  --surface-tint:     var(--teal-soft);
  --surface-warm:     var(--gold-soft);
  --text:             var(--ink);
  --text-muted:       #55686E;
  --border:           var(--line);
  --brand:            var(--teal);
  --brand-strong:     var(--teal-deep);
  --brand-contrast:   var(--white);
  --accent:           var(--gold);
  --accent-contrast:  var(--ink);
  --accent-text:      var(--gold-ink);

  /* Type */
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --font-en: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font: var(--font-ar);

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.16rem, 1.09rem + 0.34vw, 1.35rem);
  --step-2:  clamp(1.38rem, 1.25rem + 0.6vw, 1.72rem);
  --step-3:  clamp(1.62rem, 1.4rem + 1vw, 2.2rem);
  --step-4:  clamp(1.9rem, 1.5rem + 1.9vw, 2.95rem);

  /* Space */
  --sp-1: 0.375rem;
  --sp-2: 0.75rem;
  --sp-3: 1.15rem;
  --sp-4: 1.75rem;
  --sp-5: 2.5rem;
  --sp-6: 3.75rem;
  --sp-7: 5.5rem;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 40, 46, 0.05), 0 2px 8px rgba(20, 40, 46, 0.045);
  --shadow-md: 0 2px 6px rgba(20, 40, 46, 0.06), 0 10px 28px rgba(20, 40, 46, 0.07);
  --shadow-lg: 0 8px 20px rgba(20, 40, 46, 0.08), 0 22px 48px rgba(20, 40, 46, 0.1);

  --container: 1120px;
  --measure: 68ch;
  --header-h: 66px;
  --actionbar-h: 0px;
}

html[lang="en"] { --font: var(--font-en); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:              #0C1D22;
    --surface:         #12272D;
    --surface-tint:    #16323A;
    --surface-warm:    #2A2317;
    --text:            #EDF3F4;
    --text-muted:      #A8BCC2;
    --border:          #22434C;
    --brand:           #4FA3B8;
    --brand-strong:    #6BBBCE;
    --brand-contrast:  #06181D;
    --accent:          #E0A544;
    --accent-contrast: #1A1204;
    --accent-text:     #E8B75F;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.32), 0 10px 28px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.36), 0 22px 48px rgba(0, 0, 0, 0.34);
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--actionbar-h);
  overflow-x: hidden;
}

html[lang="en"] body { line-height: 1.7; }

h1, h2, h3, h4 {
  font-family: var(--font);
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 var(--sp-2);
  font-weight: 600;
  letter-spacing: -0.005em;
}
html[lang="ar"] h1, html[lang="ar"] h2,
html[lang="ar"] h3, html[lang="ar"] h4 { line-height: 1.5; letter-spacing: 0; }

h1 { font-size: var(--step-4); font-weight: 600; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 var(--sp-3); max-width: var(--measure); }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

img, svg, video { max-width: 100%; height: auto; display: block; }

ul, ol { padding-inline-start: 1.35em; margin: 0 0 var(--sp-3); max-width: var(--measure); }
li { margin-bottom: var(--sp-1); }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }

/* Numerals: keep Latin digits (universally readable for phone numbers/doses) */
.num, time, [dir] .tel { font-variant-numeric: lining-nums tabular-nums; }

:where(a, button, [tabindex], input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold-soft); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--sp-3);
  z-index: 200;
  background: var(--brand);
  color: var(--brand-contrast);
  padding: var(--sp-2) var(--sp-3);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { inset-block-start: 0; color: var(--brand-contrast); }

/* ---------- Language visibility (long-form prose lives in both languages) --- */
html[lang="ar"] [data-lang="en"] { display: none !important; }
html[lang="en"] [data-lang="ar"] { display: none !important; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.section { padding-block: var(--sp-6); }
.section--tint { background: var(--surface-tint); }
.section--warm { background: var(--surface-warm); }

@media (min-width: 768px) {
  .container { padding-inline: var(--sp-4); }
  .section { padding-block: var(--sp-7); }
}

.section-head { margin-bottom: var(--sp-5); max-width: var(--measure); }
.section-head p { color: var(--text-muted); margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--sp-1);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }

.grid { display: grid; gap: var(--sp-3); }
@media (min-width: 620px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px)  { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: var(--brand-contrast);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.7em 1.35em;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--accent-contrast); }
.btn--ghost  { --btn-bg: transparent; --btn-fg: var(--brand); --btn-bd: var(--border); }
.btn--ghost:hover { --btn-bg: var(--surface); }
.btn--quiet  { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border); }
.btn--sm { min-height: 40px; padding: 0.45em 1em; font-size: var(--step--1); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  flex: none;
}
.brand__mark { width: 38px; height: 38px; flex: none; color: var(--brand); }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name { font-weight: 600; font-size: var(--step-0); }
.brand__role { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

.site-nav { margin-inline-start: auto; }
.site-nav ul {
  display: flex;
  /* tightens on narrower desktops so seven items still fit on one line */
  gap: clamp(0.55rem, 0.95vw, 1.15rem);
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.86rem, 0.72rem + 0.28vw, 0.95rem);
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--brand);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: auto;
  flex: none;
}
.site-nav + .header-actions { margin-inline-start: var(--sp-3); }

.lang-toggle {
  min-height: 40px;
  padding: 0.35em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--brand); color: var(--brand); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Very small phones (≤380px). The brand and the header actions are both
   flex:none, so nothing gives way and the row forces a horizontal scroll —
   31px of it on a 320px screen. Let the brand shrink and tighten the toggle
   rather than let the whole page slide sideways. */
@media (max-width: 380px) {
  .site-header__inner { gap: var(--sp-2); }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__text { min-width: 0; }
  /* shrink the type a little rather than clip his name or wrap it */
  .brand__name { font-size: 0.85rem; white-space: nowrap; }
  .brand__role { font-size: 0.62rem; white-space: nowrap; }
  .lang-toggle { padding-inline: 0.6em; font-size: 0.82rem; }
}

@media (max-width: 1100px) {
  .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset-block-start: var(--header-h);
    inset-inline: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: var(--sp-3);
    margin: 0;
    display: none;
  }
  .site-nav[data-open="true"] { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
  }
  .site-nav li:last-child a { border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: var(--sp-6) var(--sp-6);
  overflow: hidden;
  background:
    radial-gradient(1000px 420px at var(--hero-x, 85%) -10%, var(--surface-tint) 0%, transparent 70%),
    var(--bg);
}
.hero__inner {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding-block: var(--sp-7); }
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-6); }
}

.hero__name { margin-bottom: var(--sp-1); }
.hero__title {
  font-size: var(--step-1);
  color: var(--brand);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.hero__affil {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: var(--sp-3);
  max-width: 48ch;
}
.hero__affil span { display: block; }
.hero__affil span + span { margin-block-start: 0.15rem; }
.hero__lede {
  font-size: var(--step-1);
  line-height: 1.75;
  color: var(--text);
  margin-bottom: var(--sp-4);
  max-width: 46ch;
}
.hero__note {
  margin-block-start: var(--sp-3);
  font-size: var(--step--1);
  color: var(--text-muted);
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__card {
  position: relative;
  width: min(100%, 380px);
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.hero__mark { width: 128px; height: 128px; margin-inline: auto; color: var(--brand); }
.hero__portrait {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-md);
  background: var(--surface-tint);
}
.hero__portrait-ph {
  display: grid;
  place-items: center;
  width: 108px; height: 108px;
  border-radius: 50%;
  margin-inline: auto;
  background: var(--surface-tint);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  text-align: center;
  padding: 0.4rem;
  line-height: 1.35;
}
.hero__card-name { margin-block: var(--sp-3) 0.15rem; font-size: var(--step-1); }
.hero__card-role { color: var(--text-muted); font-size: var(--step--1); margin: 0; }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding-block: var(--sp-4);
}
.trust__list {
  display: grid;
  gap: var(--sp-3);
  list-style: none;
  margin: 0; padding: 0;
}
@media (min-width: 620px) { .trust__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .trust__list { grid-template-columns: repeat(4, 1fr); } }
.trust__item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0;
}
.trust__icon { width: 26px; height: 26px; color: var(--brand); flex: none; margin-block-start: 2px; }
.trust__label { font-weight: 600; display: block; font-size: 0.98rem; }
.trust__meta { color: var(--text-muted); font-size: var(--step--1); }

/* ---------- Cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}
a.card, .card--link { text-decoration: none; color: inherit; }
a.card:hover, .card--link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  color: inherit;
}
.card__icon {
  width: 44px; height: 44px;
  color: var(--brand);
  margin-bottom: var(--sp-3);
}
.card h3 { margin-bottom: var(--sp-1); }
.card p { color: var(--text-muted); margin-bottom: var(--sp-3); font-size: 0.97rem; }
.card__more {
  margin-block-start: auto;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.card__more svg { width: 1em; height: 1em; }
html[dir="rtl"] .card__more svg { transform: scaleX(-1); }

/* Featured service cards */
.card--featured {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  background: linear-gradient(180deg, var(--surface-tint) 0%, var(--surface) 42%);
}
.card__flag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25em 0.7em;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-contrast);
  margin-bottom: var(--sp-2);
}
html[lang="ar"] .card__flag { letter-spacing: 0; }

.card__points {
  list-style: none;
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) 0 0;
  border-block-start: 1px solid var(--border);
  width: 100%;
}
.card__points li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.card__points svg {
  width: 16px; height: 16px;
  flex: none;
  margin-block-start: 5px;
  color: var(--accent-text);
  stroke-width: 2.2;
}

/* Compact list of additional services */
.chip-grid {
  display: grid;
  gap: var(--sp-2);
  list-style: none;
  margin: 0; padding: 0;
}
@media (min-width: 620px) { .chip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .chip-grid { grid-template-columns: repeat(3, 1fr); } }
.chip {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}
.chip svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-block-start: 4px; }
.chip strong { display: block; font-weight: 600; font-size: 0.97rem; }
.chip span { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ---------- About ---------- */
.about { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .about { grid-template-columns: 1.4fr 0.9fr; gap: var(--sp-6); } }
.about__aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  align-self: start;
}
.about__aside h3 { font-size: var(--step-0); margin-bottom: var(--sp-2); }
.about__aside ul { list-style: none; padding: 0; margin: 0; }
.about__aside li {
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.about__aside li:last-child { border-bottom: 0; }

/* ---------- Media rail ---------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(258px, 1fr);
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block-end: var(--sp-2);
  margin-inline: calc(var(--sp-3) * -1);
  padding-inline: var(--sp-3);
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
@media (min-width: 768px) {
  .rail { margin-inline: 0; padding-inline: 0; grid-auto-columns: minmax(300px, 1fr); }
}
.rail:empty::after {
  content: attr(data-empty);
  color: var(--text-muted);
  font-size: var(--step--1);
}

.media-card { padding: 0; overflow: hidden; }
.media-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-tint);
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
  color: var(--brand);
}
.media-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(20,40,46,0.35), rgba(20,40,46,0.1));
}
.media-card__play svg {
  width: 56px; height: 56px;
  color: var(--white);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.media-card__body { padding: var(--sp-3); display: flex; flex-direction: column; flex: 1; }
.media-card__kind {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
html[lang="ar"] .media-card__kind { letter-spacing: 0; text-transform: none; }
.media-card__body h3 { font-size: var(--step-0); margin-block: 0.25rem 0.35rem; }
.media-card__body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: var(--sp-2); }
.media-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: var(--sp-2);
  overflow: hidden;
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3);
  min-height: 56px;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-align: start;
  cursor: pointer;
  line-height: 1.6;
}
.faq__q:hover { background: var(--surface-tint); }
.faq__q svg {
  width: 20px; height: 20px;
  flex: none;
  color: var(--brand);
  transition: transform 0.22s ease;
}
.faq__q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq__a {
  padding: 0 var(--sp-3) var(--sp-3);
  color: var(--text-muted);
}
.faq__a[hidden] { display: none; }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------- Health cards (shareable) ---------- */
.healthcards { display: grid; gap: var(--sp-4); }
@media (min-width: 700px) { .healthcards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .healthcards { grid-template-columns: repeat(3, 1fr); } }

.hcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.hcard__art {
  aspect-ratio: 1 / 1;
  background: var(--gold-soft);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  color: var(--ink);
  position: relative;
}
.hcard__art h3 { font-size: var(--step-1); color: var(--teal); margin: 0; }
.hcard__art ul { margin: 0; padding-inline-start: 1.1em; font-size: 0.92rem; color: var(--ink); line-height: 1.75; }
.hcard__art li { margin-bottom: 0.35rem; }
.hcard__brandline {
  margin-block-start: auto;
  padding-block-start: var(--sp-2);
  border-block-start: 1px solid rgba(20,40,46,0.15);
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem;
}
.hcard__brandline svg { width: 18px; height: 18px; }
.hcard__actions { padding: var(--sp-3); display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: var(--sp-4); }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; gap: var(--sp-5); } }
.contact__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}
.contact__panel h3 { font-size: var(--step-1); }
.contact__list { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
.contact__list li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  padding-block: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.contact__list li:last-child { border-bottom: 0; }
.contact__list svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-block-start: 5px; }
.contact__list strong { display: block; font-size: 0.88rem; color: var(--text-muted); font-weight: 500; }
.contact__list a, .contact__list span { font-weight: 600; font-size: var(--step-0); }
.contact__list a { text-decoration: none; }
.contact__list a:hover { text-decoration: underline; }

.map-embed {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-tint);
  aspect-ratio: 4 / 3;
  text-decoration: none;
  color: inherit;
}
.map-embed__photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.map-embed:hover .map-embed__photo { transform: scale(1.03); }
.map-embed__label {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: var(--sp-4) var(--sp-3) var(--sp-3);
  /* scrim so the label stays readable over the photograph */
  background: linear-gradient(to top, rgba(10, 30, 36, 0.88) 0%, rgba(10, 30, 36, 0.66) 55%, rgba(10, 30, 36, 0) 100%);
  color: #FFFFFF;
  text-align: start;
}
.map-embed__label svg { width: 26px; height: 26px; flex: none; color: #FFFFFF; }
.map-embed__label strong { display: block; font-size: 1rem; line-height: 1.4; }
.map-embed__label span span { font-size: 0.85rem; opacity: 0.85; }
@media (prefers-reduced-motion: reduce) {
  .map-embed:hover .map-embed__photo { transform: none; }
}

/* ---------- Share bar ---------- */
.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.share__label { font-weight: 600; font-size: 0.95rem; margin-inline-end: auto; }
.share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4em 0.9em;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.share__btn:hover { border-color: var(--brand); color: var(--brand); }
.share__btn svg { width: 18px; height: 18px; }

/* ---------- Callout / alert box ---------- */
.callout {
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--brand);
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-block: var(--sp-4);
  max-width: var(--measure);
}
.callout h3 { display: flex; align-items: center; gap: 0.5rem; font-size: var(--step-0); }
.callout h3 svg { width: 22px; height: 22px; flex: none; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--urgent {
  border-inline-start-color: #B3261E;
  background: color-mix(in srgb, #B3261E 6%, var(--surface));
}
.callout--urgent h3 { color: #8C1D18; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .callout--urgent h3 { color: #F2B8B5; }
}
.callout--note { border-inline-start-color: var(--accent); background: var(--surface-warm); }


/* Visible placeholder tokens */
.ph {
  background: var(--surface-warm);
  border-bottom: 1px dashed var(--accent);
  padding-inline: 0.25em;
  border-radius: 3px;
  font-size: 0.95em;
}

/* ---------- Article (education pages) ---------- */
.article { display: grid; gap: var(--sp-5); }
@media (min-width: 1000px) {
  .article { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); align-items: start; }
}
.article__body h2 { margin-block-start: var(--sp-5); }
.article__body h2:first-of-type { margin-block-start: 0; }
.article__body h3 { margin-block-start: var(--sp-4); }

.toc {
  position: sticky;
  inset-block-start: calc(var(--header-h) + 1rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
}
.toc h2 { font-size: var(--step-0); margin-block: 0 var(--sp-2) !important; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block;
  padding-block: 0.4rem;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
  border-inline-start: 2px solid var(--border);
  padding-inline-start: 0.7rem;
}
.toc a:hover { color: var(--brand); border-inline-start-color: var(--accent); }
/* On narrow screens the contents list belongs above the article, not below it. */
@media (max-width: 999px) {
  .toc { position: static; }
  .article > aside { order: -1; }
}

.page-hero {
  background: var(--surface-tint);
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-5);
}
.page-hero h1 { margin-bottom: var(--sp-2); }
.page-hero p { color: var(--text-muted); font-size: var(--step-1); margin-bottom: 0; }

.breadcrumbs { font-size: var(--step--1); color: var(--text-muted); margin-bottom: var(--sp-3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 0.4rem; color: var(--border); }

.cta-band {
  background: var(--brand);
  color: var(--brand-contrast);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  margin-block-start: var(--sp-5);
}
.cta-band h2, .cta-band p { color: var(--brand-contrast); }
.cta-band p { margin-inline: auto; opacity: 0.92; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn--ghost { --btn-fg: var(--brand-contrast); --btn-bd: color-mix(in srgb, var(--brand-contrast) 45%, transparent); }
.cta-band .btn--ghost:hover { --btn-bg: color-mix(in srgb, var(--brand-contrast) 12%, transparent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-deep);
  color: #DCE8EA;
  padding-block: var(--sp-5) var(--sp-4);
  margin-block-start: var(--sp-6);
}
.site-footer a { color: #DCE8EA; }
.site-footer a:hover { color: var(--white); }
.footer__grid { display: grid; gap: var(--sp-4); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-5); } }
.site-footer .brand { color: #FFFFFF; }
.site-footer .brand__mark { color: var(--gold); }
.site-footer .brand__role { color: #A9C0C5; }
.footer__col h3 { color: var(--white); font-size: var(--step-0); margin-bottom: var(--sp-2); }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 0.5rem; }
.footer__col a { text-decoration: none; font-size: 0.95rem; }
.footer__col a:hover { text-decoration: underline; }
.footer__social { display: flex; gap: var(--sp-2); margin-block-start: var(--sp-3); }
.footer__social a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-pill);
}
.footer__social svg { width: 20px; height: 20px; }
.footer__bottom {
  margin-block-start: var(--sp-4);
  padding-block-start: var(--sp-3);
  border-block-start: 1px solid rgba(255,255,255,0.16);
  font-size: var(--step--1);
  color: #A9C0C5;
}
.footer__bottom p { max-width: 78ch; }
.footer__bottom .lang-toggle {
  background: transparent;
  color: #DCE8EA;
  border-color: rgba(255,255,255,0.28);
}
.footer__bottom .lang-toggle:hover { color: var(--white); border-color: var(--white); }

/* ---------- Sticky mobile action bar ---------- */
.action-bar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 110;
  display: none;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  border-block-start: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(20, 40, 46, 0.09);
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
}
.action-bar__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.action-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 56px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.35rem 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: center;
}
.action-bar a svg { width: 21px; height: 21px; }
.action-bar .ab--call { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.action-bar .ab--wa   { background: #1FA855; border-color: #1FA855; color: #FFFFFF; }
.action-bar .ab--book { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

@media (max-width: 1100px) {
  .action-bar { display: block; }
  body { --actionbar-h: 84px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  inset-block-end: calc(var(--actionbar-h) + 1rem);
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: 90vw;
  z-index: 200;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.toast[data-show="true"] { opacity: 1; transform: translateY(0); }

/* ---------- Scroll reveal ----------
   Gated on .js-reveal, which the script adds only once it is actually able to
   observe. Without JS (or without IntersectionObserver) nothing is ever hidden. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.7, 0.3, 1), transform 0.6s cubic-bezier(0.22, 0.7, 0.3, 1);
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .action-bar, .share, .cta-band, .site-footer, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Publication date on a media card */
.media-card__date {
  display: block;
  margin-block-start: auto;
  padding-block-start: var(--sp-2);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: lining-nums;
}
.media-card__date + .card__more { margin-block-start: var(--sp-1); }

/* "download / share this as a card" buttons inside a callout or after a list */
.callout__action {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-block: var(--sp-3) 0;
  max-width: none;
}
.callout__action [hidden] { display: none; }

/* Optional illustration on a health card */
.hcard__art-img {
  width: clamp(84px, 34%, 132px);
  height: auto;
  margin: var(--sp-2) auto 0;
  align-self: center;
}

/* WhatsApp action on a health card */
.btn--wa { --btn-bg: #1FA855; --btn-fg: #FFFFFF; --btn-bd: #1FA855; }
