/* ==========================================================================
   Karama theme — design system
   One warm, editorial, print-like light theme. Built with CSS logical
   properties so Arabic (RTL) and EN/FR/PT (LTR) share a single stylesheet.
   ========================================================================== */

/* ---- Fonts: self-hosted Readex Pro (Arabic + Latin), variable 300–700 ---- */
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/readex-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF,
    U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/readex-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Readex Pro";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/readex-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------- Tokens ---------------------------------- */
:root {
  /* Palette — Sudanese earth: dignity clay, Nile green, desert ochre, paper */
  --paper: #faf6f0;
  --paper-2: #f3ece1;
  --paper-3: #ede3d5;
  --card: #ffffff;
  --ink: #211e1a;
  --ink-soft: #56504a;
  --ink-faint: #8b8178;
  --line: #e6ddce;
  --line-strong: #d8ccb8;

  --clay: #bf4a30;        /* primary accent */
  --clay-deep: #9c3722;   /* hover / pressed */
  --clay-tint: #f7e8e2;   /* accent wash */
  --nile: #0f7c6b;        /* secondary (health / hope) */
  --nile-deep: #0a5c4f;
  --nile-tint: #e2f0ec;
  --ochre: #c1872a;       /* data highlight only */

  /* Typography */
  --font: "Readex Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fw-light: 300;
  --fw-reg: 400;
  --fw-med: 500;
  --fw-semi: 600;
  --fw-bold: 700;

  /* Fluid type scale (min 360px → max 1280px) */
  --fs-eyebrow: 0.78rem;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.15rem, 0.9rem + 0.9vw, 1.4rem);
  --fs-h3: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  --fs-h2: clamp(1.7rem, 1.25rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  --fs-display: clamp(2.5rem, 1.4rem + 4.6vw, 4.6rem);

  /* Spacing scale */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;

  /* Structure */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: clamp(1.15rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 6vw, 7rem);

  /* Shape — documented rule: buttons = pill, cards/inputs = 8px, media masks = custom */
  --r-card: 10px;
  --r-input: 8px;
  --r-pill: 999px;

  /* Elevation — shadows tinted to the warm paper hue, never pure black */
  --shadow-sm: 0 1px 2px rgba(48, 34, 24, 0.06), 0 2px 6px rgba(48, 34, 24, 0.05);
  --shadow-md: 0 6px 16px rgba(48, 34, 24, 0.08), 0 14px 34px rgba(48, 34, 24, 0.07);
  --shadow-lg: 0 18px 50px rgba(48, 34, 24, 0.12);

  --ring: 0 0 0 3px rgba(191, 74, 48, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------- Reset ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: var(--fw-reg);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 3px; }

/* Arabic runs a touch larger with looser line-height for legibility */
html[dir="rtl"] body { line-height: 1.85; font-size: 1.09rem; }

/* ----------------------------- Typography -------------------------------- */
h1, h2, h3, h4 { font-weight: var(--fw-semi); line-height: 1.14; color: var(--ink); letter-spacing: -0.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.3; }
.h-display { font-size: var(--fs-display); font-weight: var(--fw-bold); line-height: 1.05; letter-spacing: -0.02em; }
html[dir="rtl"] .h-display { line-height: 1.22; letter-spacing: 0; }
h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); font-weight: var(--fw-semi); }
p { max-width: 68ch; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); font-weight: var(--fw-reg); line-height: 1.6; }
strong, b { font-weight: var(--fw-semi); }

/* Inline links within article prose (programs/locations mentioned in a news
   story): visible as links via color + underline, not just the site-wide
   `a { text-decoration:none }` reset, which would otherwise make them
   indistinguishable from surrounding text. */
.entry-content a:not(.btn) {
  color: var(--clay-deep);
  text-decoration: underline;
  text-decoration-color: rgba(191, 74, 48, 0.35);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.18s var(--ease);
}
.entry-content a:not(.btn):hover { text-decoration-color: currentColor; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-eyebrow); font-weight: var(--fw-semi);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0.06em; }
.eyebrow::before { content: ""; inline-size: 1.6rem; block-size: 2px; background: var(--clay); border-radius: 2px; }

.section-title { max-width: 22ch; }
.text-muted { color: var(--ink-soft); }

/* ------------------------------- Layout ---------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-2); }
.section--ink { background: #1d1a16; color: #f4ede2; }
.section--ink h2, .section--ink h3 { color: #fff; }
/* Stats sit on the dark impact band: force legible light values. */
.section--ink .stat__num { color: #fff; }
.section--ink .stat__num .suffix { color: var(--ochre); }
.section--ink .stat__label { color: #c9bfb2; }
.section--ink .stat { border-inline-start-color: var(--ochre); }
.section--ink .stat__source { color: #9a8f80; }
.stack > * + * { margin-block-start: var(--sp-4); }
.grid { display: grid; gap: var(--sp-6); }

/* ------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 0.85em 1.6em; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-weight: var(--fw-semi); font-size: 0.98rem; line-height: 1; cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--clay); color: #fff; }
.btn--primary:hover { background: var(--clay-deep); box-shadow: var(--shadow-md); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(33, 30, 26, 0.04); }
.btn--on-ink { background: #fff; color: var(--ink); }
.btn--on-ink:hover { background: var(--clay); color: #fff; }
/* Base icon sizing (applies everywhere: buttons, footer contact, social) so
   every inline SVG icon in the theme resolves to one consistent, predictable
   size relative to its context text, instead of relying on browser defaults. */
.ico { display: inline-block; inline-size: 1.15em; block-size: 1.15em; flex: none; vertical-align: -0.15em; }
/* Directional chevrons flip automatically in RTL */
html[dir="rtl"] .btn .ico--chevron { transform: scaleX(-1); }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: var(--fw-semi); color: var(--clay);
}
.link-arrow .ico { transition: transform 0.2s var(--ease); }
html[dir="rtl"] .link-arrow .ico { transform: scaleX(-1); }
.link-arrow:hover .ico { transform: translateX(3px); }
html[dir="rtl"] .link-arrow:hover .ico { transform: scaleX(-1) translateX(3px); }

/* ---------------------------- Skip link ---------------------------------- */
.skip-link {
  position: absolute; inset-inline-start: var(--sp-4); inset-block-start: -100px;
  background: var(--ink); color: #fff; padding: 0.7em 1.2em; border-radius: var(--r-input);
  z-index: 200; transition: top 0.2s var(--ease);
}
.skip-link:focus { inset-block-start: var(--sp-4); }

/* ============================== HEADER ==================================== */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 100;
  background: rgba(250, 246, 240, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-block-end: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; gap: var(--sp-6);
  min-block-size: 72px; padding-block: 0.5rem;
}
.brand { display: inline-flex; align-items: center; }
/* Official logo art already contains the wordmark - size by height, let width
   follow the asset's own aspect ratio so it's never stretched or distorted. */
.brand__logo { flex: none; width: auto; }
.brand__logo--light { block-size: 44px; }
.brand__logo--dark { block-size: 40px; }

.primary-nav { margin-inline-start: auto; }
.primary-nav > ul { display: flex; align-items: center; gap: clamp(0.6rem, 1.4vw, 1.6rem); }
.primary-nav a {
  display: inline-block; padding: 0.4rem 0.2rem; font-weight: var(--fw-med); font-size: 0.98rem;
  color: var(--ink-soft); position: relative;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--ink); }
.primary-nav .current-menu-item > a::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: -2px;
  block-size: 2px; background: var(--clay); border-radius: 2px;
}
.header__actions { display: flex; align-items: center; gap: var(--sp-3); }

/* Language switcher — text labels, not flags */
.lang-switch { position: relative; }
.lang-switch__btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 0.45rem 0.8rem; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: transparent; font-size: 0.9rem; font-weight: var(--fw-med); cursor: pointer;
}
.lang-switch__btn:hover { border-color: var(--ink); }
.lang-switch__menu {
  position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-input);
  box-shadow: var(--shadow-md); padding: var(--sp-2); min-inline-size: 190px;
  display: none; z-index: 120;
}
.lang-switch[aria-expanded="true"] .lang-switch__menu { display: block; }
.lang-switch__menu li a {
  display: flex; align-items: baseline; gap: var(--sp-2); justify-content: space-between;
  padding: 0.55rem 0.7rem; border-radius: 6px; font-size: 0.95rem; color: var(--ink-soft);
}
.lang-switch__menu li a:hover { background: var(--paper-2); color: var(--ink); }
.lang-switch__menu li a[aria-current="true"] { color: var(--clay); font-weight: var(--fw-semi); }
.lang-switch__menu .native { color: var(--ink-faint); font-size: 0.82rem; }

.nav-toggle { display: none; }
.nav-toggle__icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon--close { display: block; }

/* ================================ HERO =================================== */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 4vw, 4.5rem) var(--section-y); }
.hero__map {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.5; color: var(--paper-3);
  background:
    radial-gradient(circle at 12% 18%, var(--paper-2), transparent 42%),
    radial-gradient(circle at 90% 78%, var(--paper-2), transparent 46%);
}
.hero__grid {
  position: relative; z-index: 1; display: grid; align-items: center; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1.05fr 1fr;
}
.hero__content { max-width: 42ch; }
.hero__title { font-size: clamp(2.2rem, 1.3rem + 3.1vw, 3.5rem); font-weight: var(--fw-bold); line-height: 1.08; letter-spacing: -0.02em; }
html[dir="rtl"] .hero__title { line-height: 1.28; letter-spacing: 0; }
.hero__title .accent { color: var(--clay); }
.hero__lead { margin-block-start: var(--sp-5); max-inline-size: 46ch; }
.hero__cta { margin-block-start: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero__meta { margin-block-start: var(--sp-6); display: flex; gap: var(--sp-6); flex-wrap: wrap; }
.hero__meta .num { font-size: 1.7rem; font-weight: var(--fw-bold); color: var(--ink); line-height: 1; }
.hero__meta .lbl { font-size: 0.82rem; color: var(--ink-soft); margin-block-start: 4px; max-inline-size: 18ch; }

/* Sudan silhouette photo mask */
.hero__figure { position: relative; }
.sudan-mask {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  filter: drop-shadow(0 24px 40px rgba(48, 34, 24, 0.18));
}
.sudan-mask svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sudan-mask img {
  width: 100%; height: 100%; object-fit: cover;
  clip-path: url(#sudan-clip);
  -webkit-clip-path: url(#sudan-clip);
}
.sudan-mask__outline { fill: none; stroke: var(--clay); stroke-width: 3; opacity: 0.9; }
.hero__dot { position: absolute; border-radius: 50%; }
.hero__dot--1 { inline-size: 14px; block-size: 14px; background: var(--ochre); inset-block-start: 8%; inset-inline-start: 4%; }
.hero__dot--2 { inline-size: 10px; block-size: 10px; background: var(--nile); inset-block-end: 14%; inset-inline-start: 0; }
.hero__dot--3 { inline-size: 12px; block-size: 12px; background: var(--clay); inset-block-start: 30%; inset-inline-end: 2%; }

/* =============================== CARDS =================================== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: var(--sp-5); }
.card__tag { display: inline-block; font-size: 0.74rem; font-weight: var(--fw-semi); letter-spacing: 0.06em; text-transform: uppercase; color: var(--nile-deep); background: var(--nile-tint); padding: 0.25em 0.7em; border-radius: var(--r-pill); }
.card__title { font-size: var(--fs-h3); margin-block: var(--sp-3) var(--sp-2); }
.card__excerpt { color: var(--ink-soft); font-size: 0.98rem; }
.card__meta { display: flex; gap: var(--sp-3); align-items: center; font-size: 0.85rem; color: var(--ink-faint); margin-block-start: var(--sp-4); }

/* Program list — editorial, not identical cards (divided rows) */
.programs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-block-start: 1px solid var(--line); }
.program {
  padding: var(--sp-6) var(--sp-5); border-block-end: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start;
  transition: background-color 0.2s var(--ease);
}
.program:hover { background: var(--paper-2); }
.program__no { font-size: 0.85rem; font-weight: var(--fw-bold); color: var(--clay); padding-block-start: 0.2rem; font-variant-numeric: tabular-nums; }
.program__title { font-size: var(--fs-h3); font-weight: var(--fw-semi); }
.program__desc { color: var(--ink-soft); font-size: 0.96rem; margin-block-start: var(--sp-2); }
.program__where { display: inline-block; margin-block-start: var(--sp-3); font-size: 0.82rem; color: var(--nile-deep); font-weight: var(--fw-med); }

/* =============================== STATS =================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.stat { position: relative; padding-inline-start: var(--sp-4); border-inline-start: 3px solid var(--clay); }
.stat__num { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem); font-weight: var(--fw-bold); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__num .suffix { color: var(--clay); }
.stat__label { margin-block-start: var(--sp-3); color: var(--ink-soft); font-size: 0.95rem; max-inline-size: 24ch; }
.stat__source { margin-block-start: var(--sp-2); font-size: 0.76rem; color: var(--ink-faint); }
.data-note { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: 0.82rem; color: var(--ink-faint); }
.data-note .dot { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--nile); }

/* ============================ CAMPAIGN CARD ============================== */
.campaign { display: grid; grid-template-columns: 1fr; }
.campaign__media { display: block; position: relative; aspect-ratio: 16 / 11; }
.campaign__media img { width: 100%; height: 100%; object-fit: cover; }
.campaign__progress-wrap { padding: var(--sp-5); }
.campaign__figures { display: flex; justify-content: space-between; align-items: flex-end; margin-block-end: var(--sp-3); }
.campaign__pct { font-size: 2rem; font-weight: var(--fw-bold); line-height: 1; }
.campaign__pct .sign { color: var(--clay); font-size: 1.1rem; }
.progress { block-size: 8px; background: var(--paper-3); border-radius: var(--r-pill); overflow: hidden; }
.progress__fill { block-size: 100%; background: linear-gradient(90deg, var(--clay), var(--ochre)); border-radius: inherit; }
html[dir="rtl"] .progress__fill { background: linear-gradient(270deg, var(--clay), var(--ochre)); }

/* =============================== FOOTER ===================================
   One designed component: a shared type scale (title 0.8rem eyebrow-style,
   body 0.95rem everywhere - links, contact, tagline - so nothing in the grid
   reads a different size "by accident"), a shared spacing rhythm, and a
   single line-height for vertical alignment between icons and text. */
.site-footer { background: #1b1814; color: #cfc6ba; padding-block: var(--sp-9) var(--sp-6); }
.site-footer a { color: #cfc6ba; }
.site-footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr 1fr; gap: var(--sp-7) var(--sp-6); }
.footer__brand .brand { margin-block-end: var(--sp-4); }
.footer__tagline { color: #a99e90; font-size: 0.95rem; line-height: 1.6; max-inline-size: 30ch; }
.footer__title { color: #fff; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: var(--fw-semi); margin-block-end: var(--sp-4); }
html[dir="rtl"] .footer__title { letter-spacing: 0.02em; }
.footer__links, .footer__contact { font-size: 0.95rem; line-height: 1.5; }
.footer__links li + li { margin-block-start: var(--sp-3); }
.footer__contact li { display: flex; gap: var(--sp-3); align-items: flex-start; margin-block-end: var(--sp-3); color: #b8afa0; }
.footer__contact li .ico { color: #8f8577; margin-block-start: 0.2em; }
.footer__col--follow { display: flex; flex-direction: column; align-items: flex-start; }
.footer__donate { margin-block-start: var(--sp-5); }
.social { display: flex; gap: var(--sp-3); }
.social a { inline-size: 40px; block-size: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.16); border-radius: 50%; transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease); }
.social a .ico { inline-size: 1.05em; block-size: 1.05em; }
.social a:hover { background: var(--clay); border-color: var(--clay); }
.footer__disclaimer { margin-block-start: var(--sp-8); font-size: 0.85rem; line-height: 1.6; max-inline-size: 64ch; color: #8f857a; }
.footer__bottom {
  margin-block-start: var(--sp-6); padding-block-start: var(--sp-5);
  border-block-start: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem; color: #948a7c;
}

/* =============================== FORMS =================================== */
.field { display: grid; gap: var(--sp-2); margin-block-end: var(--sp-4); }
.field label { font-weight: var(--fw-med); font-size: 0.92rem; }
.field .req { color: var(--clay); }
.field input, .field select, .field textarea {
  padding: 0.75em 0.9em; border: 1.5px solid var(--line-strong); border-radius: var(--r-input);
  background: var(--card); font-size: 1rem; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--clay); box-shadow: var(--ring); }
.field .help { font-size: 0.82rem; color: var(--ink-faint); }
.field .error { font-size: 0.82rem; color: var(--clay-deep); font-weight: var(--fw-med); }
.field--invalid input, .field--invalid textarea { border-color: var(--clay); }
.form-status { padding: var(--sp-4); border-radius: var(--r-input); font-weight: var(--fw-med); }
.form-status--ok { background: var(--nile-tint); color: var(--nile-deep); }
.form-status--err { background: var(--clay-tint); color: var(--clay-deep); }

/* ============================ BREADCRUMBS ================================ */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-faint); padding-block: var(--sp-4); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.breadcrumbs li::after { content: "/"; margin-inline-start: var(--sp-2); color: var(--line-strong); }
.breadcrumbs li:last-child::after { content: ""; }
html[dir="rtl"] .breadcrumbs li::after { content: "\\"; }

/* ============================ UTILITIES ================================= */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.section-head { max-width: var(--container-narrow); margin-block-end: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-block-start: var(--sp-3); }
.section-head p { margin-block-start: var(--sp-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }

/* ============================ REVEAL ANIM =============================== */
/* Content is visible by default; only hidden pre-reveal when JS is present.
   Guarantees no blank content for no-JS, crawlers, or reduced-motion. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* =========================== RESPONSIVE ================================= */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  /* width:100% is required here: margin-inline:auto alone triggers
     shrink-to-fit sizing, and since .sudan-mask sizes itself at 100% of
     .hero__figure, that circular percentage resolves to 0 without it. */
  .hero__figure { width: 100%; max-width: 460px; margin-inline: auto; order: -1; }
  .hero__content { max-width: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--sp-7) var(--sp-6); }
}
@media (max-width: 760px) {
  .primary-nav { display: none; }
  .site-header__bar { gap: var(--sp-3); }
  .header__actions { gap: var(--sp-2); }
  /* Keep the bar from ever exceeding the viewport: donate becomes icon-only. */
  .btn--donate { padding: 0.7em; }
  .btn--donate span { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; inline-size: 42px; block-size: 42px; margin-inline-start: auto; border: 1px solid var(--line-strong); border-radius: var(--r-input); background: transparent; }
  .primary-nav.is-open {
    display: block; position: fixed; inset: 72px 0 0 0; background: var(--paper);
    padding: var(--gutter); z-index: 150; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .primary-nav.is-open > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav.is-open a { display: block; padding: var(--sp-4) 0; font-size: 1.15rem; border-block-end: 1px solid var(--line); }
  .programs { grid-template-columns: 1fr; }
  .program { border-inline-end: none; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-7); }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr; }
  .hero__meta { gap: var(--sp-5); }
}

/* ===================== ACCESSIBILITY: REDUCED MOTION =================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
