/* ============================================================================
   جمعية آفاق للتنمية الشبابية بالجرين — public site
   Hand-written, no framework. Brand tokens from the official logo:
     --navy #31375C  (primary, headings, header)
     --sage #B1C67A  (accent, CTAs, highlights)

   Scope note: this file styles ONLY the Razor public site. The admin SPA has its own
   stylesheet under AfaqGrin.AdminUI/src/styles and the two never load together, so a
   token renamed here cannot break the panel.
   ========================================================================= */

@import url('/fonts/cairo.css');

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  /* Chrome on Android applies an automatic dark filter to pages that do not declare a
     scheme, which turned a sibling project's login inputs invisible. Declaring light here
     AND in a <meta name="color-scheme"> opts the whole document out. Every input below
     also states its own background and colour rather than trusting the UA default. */
  color-scheme: light;

  /* Every value below is the MEASURED scale from Docs/brand.md §2.1–2.5 — WCAG 2.1 ratios
     computed, not estimated. Do not hand-tune one of these to taste: three of the previous
     values missed AA (sage-700 was 4.09:1 while its own comment claimed 4.6, sage-600 was
     2.71:1 behind the focus ring, and the amber was 3.97:1), and the failure mode is a site
     that looks fine to the person who picked the colour. */
  --navy: #31375C;          /* 11.47:1 on white — body text, header, footer */
  --navy-700: #282D4A;      /* 13.42:1 */
  --navy-900: #171A2B;      /* 17.23:1 */
  --navy-100: #E3E5EF;      /* surface only */
  --navy-050: #F2F3F8;      /* surface only */

  /* ⭐ The governing brand rule: SAGE IS A SURFACE COLOUR, NEVER A TEXT COLOUR.
     #B1C67A is 1.87:1 on white — it fails by a wide margin. Text on a sage button is navy
     (6.13:1). The only sage that may carry text on white is --sage-700. */
  --sage: #B1C67A;          /* 1.87:1 on white 🚫 · 6.13:1 under navy text ✅ */
  --sage-400: #98AE5C;      /* accent-button hover — 7.0:1 under navy-900 text */
  --sage-600: #667A34;      /* 4.77:1 on white — focus ring, control borders */
  --sage-700: #53642A;      /* 6.51:1 on white — the ONLY sage that may be text */
  --sage-100: #E2EBC9;
  --sage-050: #F3F7E7;

  --ink: #14172A;           /* 17.71:1 */
  --ink-2: #3A3F55;         /* 10.39:1 */
  --ink-3: #5F6478;         /* 5.86:1 — the lightest text this site uses */
  --line: #DFE2EA;
  --bg: #FFFFFF;
  --bg-2: #F7F8FA;

  /* Status colours are NOT the brand colours: sage is an identity, green is a message.
     Colour never carries meaning alone here — every state also has a word (WCAG 1.4.1). */
  --ok: #2E7D32;            /* 5.13:1 */
  --warn: #A15C00;          /* 5.19:1 */
  --danger: #B3261E;        /* 6.54:1 */
  --info: #1F6FA8;          /* 5.39:1 */

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(26, 30, 54, .06), 0 2px 8px rgba(26, 30, 54, .04);
  --shadow-2: 0 4px 12px rgba(26, 30, 54, .08), 0 12px 32px rgba(26, 30, 54, .07);
  --shadow-3: 0 18px 50px rgba(26, 30, 54, .16);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);

  --font: 'Cairo', 'Segoe UI', Tahoma, 'Noto Sans Arabic', system-ui, sans-serif;

  /* One easing for everything that moves, so the site feels like one object. */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The sticky header must not cover the heading an in-page anchor jumps to. */
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.35; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-inline-start: 1.4em; }
a { color: var(--navy); text-decoration-color: color-mix(in srgb, var(--navy) 35%, transparent); text-underline-offset: .22em; }
a:hover { text-decoration-color: currentColor; }

/* Visible on EVERY focusable thing. Keyboard users on an Arabic site are not an edge case,
   and the default UA ring disappears against the navy header. */
:focus-visible {
  outline: 3px solid var(--sage-600);
  outline-offset: 3px;
  border-radius: 6px;
}
/* No single sage reads on both grounds: --sage-600 is 4.77:1 on white but only 2.4:1 on navy,
   and the brand --sage is the mirror image (1.87:1 on white, 6.13:1 on navy). So the ring
   swaps colour in the four dark regions rather than being a compromise that fails in both. */
.topbar :focus-visible,
.section--navy :focus-visible,
.cta :focus-visible,
.footer :focus-visible {
  outline-color: var(--sage);
}

::selection { background: var(--sage-100); color: var(--navy-900); }

/* ── Layout helpers ───────────────────────────────────────────────────────── */
.wrap { width: min(var(--wrap), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tint { background: var(--bg-2); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; margin: 0; }
.section--navy .section-head p { color: rgba(255, 255, 255, .82); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  color: var(--sage-700); text-transform: none;
  margin-bottom: .7em;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; background: var(--sage); border-radius: 2px;
}
.section--navy .eyebrow { color: var(--sage); }
.section--navy .eyebrow::before { background: var(--sage); }

.grid { display: grid; gap: clamp(16px, 2.2vw, 26px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .78em 1.7em;
  font: inherit; font-weight: 700; font-size: .98rem;
  border: 1.5px solid transparent; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--shadow-2); transform: translateY(-2px); }

.btn--accent { background: var(--sage); color: var(--navy-900); box-shadow: var(--shadow-1); }
/* Hover goes to sage-400, not sage-600: the label on this button is navy, so darkening the
   surface too far pushes the pair under AA (sage-600 + navy-900 is 3.6:1). sage-400 reads
   as pressed and keeps the text at 7.0:1. */
.btn--accent:hover { background: var(--sage-400); box-shadow: var(--shadow-2); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy-100); }
.btn--ghost:hover { border-color: var(--navy); background: var(--navy-050); }

.btn--onDark { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .34); }
.btn--onDark:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn--sm { padding: .5em 1.1em; font-size: .88rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; pointer-events: none; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--navy-900); color: rgba(255, 255, 255, .74);
  font-size: .8rem; padding-block: 7px;
}
.topbar .wrap { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.topbar a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__meta { display: flex; gap: 16px; flex-wrap: wrap; }

.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 18px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand img { height: 52px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name { font-weight: 800; color: var(--navy); font-size: 1.02rem; }
.brand__sub { font-size: .72rem; color: var(--ink-3); font-weight: 600; }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: .55em .85em; border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: .95rem; color: var(--ink-2);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav a:hover { color: var(--navy); background: var(--navy-050); }
.nav a[aria-current='page'] { color: var(--navy); background: var(--sage-050); }
.nav a[aria-current='page']::after {
  content: ''; display: block; height: 2px; margin-top: 3px; border-radius: 2px; background: var(--sage);
}

.header__cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* The menu toggle is a <details>, so it opens with no JavaScript at all — one of the
   progressive-enhancement rules: navigation must never need a script. */
.menu { display: none; }
.menu > summary {
  list-style: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  display: grid; place-items: center; background: #fff; color: var(--navy);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel {
  position: absolute; inset-inline: var(--gutter); top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-3); padding: 10px; display: grid; gap: 2px;
}
.menu__panel a {
  padding: .7em .9em; border-radius: 10px; text-decoration: none; color: var(--ink);
  font-weight: 600;
}
.menu__panel a:hover, .menu__panel a[aria-current='page'] { background: var(--navy-050); color: var(--navy); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -12%, rgba(177, 198, 122, .30), transparent 62%),
    radial-gradient(760px 460px at 6% 108%, rgba(49, 55, 92, .10), transparent 60%),
    linear-gradient(178deg, #FBFCF8 0%, #FFFFFF 60%);
  border-bottom: 1px solid var(--line);
}
/* A faint dot field, drawn in CSS rather than shipped as an image. */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(49, 55, 92, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent 72%);
}
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(52px, 8vw, 108px);
}
.hero__title { margin-bottom: .35em; }
.hero__title em { font-style: normal; color: var(--sage-700); }
.hero__lead { font-size: clamp(1.02rem, .95rem + .35vw, 1.22rem); color: var(--ink-2); max-width: 54ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero__badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }

.badge {
  display: inline-flex; align-items: center; gap: .5em;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .42em 1em; font-size: .82rem; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-1);
}
.badge strong { color: var(--navy); font-weight: 800; }

/* The hero art is a composed card, not a stock photo — the association has no photography
   yet, and a generic stock image reads as a template. */
.hero__art { position: relative; display: grid; place-items: center; }
.hero__mark {
  width: min(340px, 78%); aspect-ratio: 1; border-radius: 40px;
  background: linear-gradient(150deg, #fff, var(--sage-050));
  border: 1px solid var(--line); box-shadow: var(--shadow-3);
  display: grid; place-items: center; padding: 34px;
  transform: rotate(-3deg);
}
.hero__mark img { width: 100%; }
.hero__orbit {
  position: absolute; inset: -6%;
  border: 1.5px dashed rgba(49, 55, 92, .16); border-radius: 50%;
  pointer-events: none;
}
.hero__slide-nav { display: flex; gap: 8px; margin-top: 22px; }
.hero__dot {
  width: 34px; height: 5px; border-radius: 3px; border: 0; padding: 0;
  background: var(--navy-100); cursor: pointer;
  transition: background-color .2s var(--ease), width .2s var(--ease);
}
.hero__dot[aria-selected='true'] { background: var(--sage-600); width: 52px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--navy-100); }
.card__media { aspect-ratio: 16 / 10; background: var(--navy-050); position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__media--empty {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-050), var(--sage-050));
  color: var(--navy-100);
}
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { margin: 0; font-size: 1.16rem; }
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--sage-700); }
.card__text { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.8; }
.card__meta { margin-top: auto; padding-top: 6px; display: flex; gap: 14px; flex-wrap: wrap;
              font-size: .82rem; color: var(--ink-3); }
.card__icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--sage-050); color: var(--sage-700); border: 1px solid var(--sage-100);
  margin-bottom: 4px;
}

/* Objective cards — numbered, from the charter's المادة الخامسة. */
.objective {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px 26px 26px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.objective:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.objective__num {
  position: absolute; inset-block-start: -16px; inset-inline-start: 26px;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--navy); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem;
  box-shadow: var(--shadow-2);
}
.objective p { margin: 10px 0 0; color: var(--ink-2); font-size: 1rem; }

/* ── Stats band ───────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2px;
         background: rgba(255, 255, 255, .12); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--navy); padding: 30px 22px; text-align: center; }
.stat__value {
  font-size: clamp(2.1rem, 1.5rem + 2vw, 3.2rem); font-weight: 800; line-height: 1.05;
  color: #fff; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat__suffix { font-size: .5em; color: var(--sage); margin-inline-start: .25em; font-weight: 700; }
.stat__label { color: rgba(255, 255, 255, .78); font-size: .92rem; margin-top: 6px; }

/* ── CTA band ─────────────────────────────────────────────────────────────── */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 55%, var(--navy-900) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center;
}
.cta::after {
  content: ''; position: absolute; inset-block-start: -40%; inset-inline-end: -8%;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(177, 198, 122, .3), transparent 65%);
  pointer-events: none;
}
.cta h2 { color: #fff; margin-bottom: .35em; }
.cta p { color: rgba(255, 255, 255, .84); margin: 0; max-width: 60ch; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }

/* ── Partners ─────────────────────────────────────────────────────────────── */
.logos { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.logos__item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 26px; min-width: 160px; display: grid; place-items: center;
  filter: grayscale(1); opacity: .72;
  transition: filter .25s var(--ease), opacity .25s var(--ease), transform .25s var(--ease);
}
.logos__item:hover { filter: none; opacity: 1; transform: translateY(-3px); }
.logos__item img { max-height: 46px; width: auto; }

/* ── Prose (DB-authored HTML) ─────────────────────────────────────────────── */
.prose { max-width: 72ch; font-size: 1.05rem; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5em; }
.prose img { border-radius: var(--radius); margin-block: 1.5em; }
.prose ol, .prose ul { margin-bottom: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose blockquote {
  margin: 1.6em 0; padding: 1em 1.4em; border-inline-start: 4px solid var(--sage);
  background: var(--sage-050); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2);
}
.prose a { color: var(--sage-700); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.5em; }
.prose th, .prose td { border: 1px solid var(--line); padding: .6em .9em; text-align: start; }
.prose th { background: var(--navy-050); }

/* Wide content must scroll inside its own box; the page body never scrolls sideways. */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Page header (inner pages) ────────────────────────────────────────────── */
.pagehead {
  background: linear-gradient(180deg, var(--navy-050), #fff);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(32px, 5vw, 60px);
}
.pagehead h1 { margin-bottom: .3em; }
.pagehead p { color: var(--ink-2); max-width: 68ch; margin: 0; }

.crumbs { font-size: .84rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }
.crumbs span { margin-inline: .45em; opacity: .5; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field > label { font-weight: 700; font-size: .92rem; color: var(--navy); }
.field__hint { font-size: .82rem; color: var(--ink-3); }
.req { color: var(--danger); margin-inline-start: .2em; }

/* Explicit background AND colour on every control. Chrome's Android force-dark repaints
   controls that inherit the UA default, and a sibling project shipped a login form whose
   fields were invisible on those devices. */
input[type='text'], input[type='email'], input[type='tel'], input[type='date'],
input[type='number'], input[type='search'], input[type='password'], input[type='file'],
select, textarea {
  width: 100%; font: inherit; font-size: 1rem;
  padding: .72em .95em;
  color: var(--ink);
  background-color: #fff;
  border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #C9CEDE; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--sage-600);
  box-shadow: 0 0 0 4px var(--sage-100);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.8; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235F6478' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1em center;
  padding-inline-start: .95em; padding-inline-end: 2.4em;
}
input[type='file'] { padding: .55em .7em; background-color: var(--bg-2); }

.check { display: flex; gap: 11px; align-items: flex-start; font-size: .94rem; color: var(--ink-2); }
.check input[type='checkbox'] {
  width: 20px; height: 20px; margin: 3px 0 0; flex-shrink: 0;
  accent-color: var(--sage-600);
}
.check a { color: var(--sage-700); font-weight: 600; }

.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 600; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius); padding: 16px 20px; font-size: .96rem;
  border: 1px solid; display: flex; gap: 12px; align-items: flex-start;
}
.alert strong { display: block; margin-bottom: .2em; }
.alert--ok { background: #F1F8F4; border-color: #BFE0CE; color: #1F5B43; }
.alert--warn { background: #FDF7EA; border-color: #EBD9AE; color: #7A5512; }
.alert--error { background: #FCF2F1; border-color: #EFC9C4; color: #8E3229; }
.alert--info { background: var(--navy-050); border-color: var(--navy-100); color: var(--navy-700); }

/* «محتوى مبدئي» — placeholder content the association has not yet approved must SAY so. */
.placeholder-flag {
  display: inline-flex; align-items: center; gap: .4em;
  background: #FDF7EA; color: #7A5512; border: 1px dashed #E2C98F;
  border-radius: 999px; padding: .18em .8em; font-size: .74rem; font-weight: 700;
}

.pill {
  display: inline-flex; align-items: center; gap: .35em;
  border-radius: 999px; padding: .2em .8em; font-size: .78rem; font-weight: 700;
  background: var(--sage-050); color: var(--sage-700); border: 1px solid var(--sage-100);
}
.pill--navy { background: var(--navy-050); color: var(--navy); border-color: var(--navy-100); }
.pill--muted { background: var(--bg-2); color: var(--ink-3); border-color: var(--line); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty {
  text-align: center; padding: clamp(40px, 7vw, 80px) 20px;
  border: 1.5px dashed var(--line); border-radius: var(--radius-lg); background: var(--bg-2);
}
.empty h3 { color: var(--ink-2); }
.empty p { color: var(--ink-3); margin: 0 auto; max-width: 46ch; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 44px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding-inline: .7em;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: .92rem; color: var(--ink-2); background: #fff;
}
.pager a:hover { border-color: var(--navy); color: var(--navy); }
.pager [aria-current='page'] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager .is-disabled { opacity: .4; pointer-events: none; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, .72); padding-block: clamp(44px, 6vw, 72px) 0; }
.footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: clamp(24px, 4vw, 48px); }
.footer h4 { color: #fff; font-size: .98rem; margin-bottom: 1em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55em; font-size: .93rem; }
.footer__brand img { height: 62px; margin-bottom: 16px; }
.footer__about { font-size: .92rem; line-height: 1.9; max-width: 42ch; }

.footer__legal {
  margin-top: 34px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap;
  font-size: .82rem; color: rgba(255, 255, 255, .58);
}
.footer__ids { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__ids b { color: rgba(255, 255, 255, .86); font-weight: 700; }

.social { display: flex; gap: 10px; margin-top: 4px; }
.social a {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  transition: background-color .18s var(--ease), transform .18s var(--ease);
}
.social a:hover { background: var(--sage); color: var(--navy-900); transform: translateY(-2px); }

/* ── Skip link ────────────────────────────────────────────────────────────── */
.skip {
  position: absolute; inset-inline-start: 50%; transform: translate(-50%, -140%);
  z-index: 200; background: var(--navy); color: #fff;
  padding: .7em 1.4em; border-radius: 0 0 12px 12px; text-decoration: none; font-weight: 700;
  transition: transform .18s var(--ease);
}
.skip:focus { transform: translate(-50%, 0); }

/* ── Scroll reveal ────────────────────────────────────────────────────────── */
/* The island adds .reveal-ready to <html> once it has an IntersectionObserver wired up.
   Until then — and forever, if the script never loads — everything is simply visible.
   Content must never depend on JavaScript to appear. */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); }
.reveal-ready .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu { display: block; margin-inline-start: auto; }
  .header__cta .btn--ghost { display: none; }
  .hero__inner { grid-template-columns: 1fr; text-align: start; }
  .hero__art { order: -1; }
  .hero__mark { width: min(240px, 60%); }
  .cta { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand img { height: 44px; }
  .brand__sub { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .topbar__meta { gap: 10px; font-size: .74rem; }
  .stat { padding: 22px 14px; }
}

@media print {
  .header, .topbar, .footer, .cta, .btn { display: none !important; }
  body { font-size: 12pt; }
}

/* ── Spam honeypot ────────────────────────────────────────────────────────── */
/* Hides the trap field without pushing it off-canvas. The obvious
   `position:absolute; left:-9999px` is RTL-unsafe: in a dir="rtl" document that
   offset extends the scrollable area instead of leaving it, so every page with a
   form gained ~10,000px of horizontal scroll on mobile. Clipping keeps the field
   in place, invisible, and still submitted — which is all a honeypot needs. */
.hp-trap {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Content + sidebar split ──────────────────────────────────────────────── */
/* The ratio is per page, passed in as custom properties, but the collapse is
   shared. This used to be an inline grid-template-columns on each page, which
   could not be overridden by a media query — so at 390px the main column was
   computing to 60px while the sidebar held its 270px minimum, and every form
   page was unusable on a phone. */
.split {
  display: grid;
  grid-template-columns: minmax(0, var(--split-main, 1.6fr)) minmax(var(--split-aside, 260px), 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}
