:root {
  --ink: #0d1311;
  --ink-2: #1b2421;
  --paper: #fbf8f2;
  --sand: #f2ebdd;
  --sand-2: #e7dcc6;
  --line: #e2d8c4;
  --muted: #6a675e;
  --green: #0e472e;
  --green-2: #0a3421;
  --green-soft: #e2ece6;
  --red: #c8102e;
  --gold: #b8893d;
  --gold-soft: #f4e8d2;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(13,19,17,.06), 0 8px 30px rgba(13,19,17,.06);
  --font-ar: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  --font-en: "Inter", system-ui, sans-serif;
  --font-en-display: "Fraunces", Georgia, serif;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ar); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: var(--font-en); line-height: 1.6; }
h1, h2, h3, .display { font-family: var(--font-ar-display); font-weight: 600; line-height: 1.25; margin: 0; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] .display { font-family: var(--font-en-display); font-weight: 600; letter-spacing: -.01em; }
html[lang="ar"] h3, html[lang="ar"] h4 { font-family: var(--font-ar); font-weight: 700; }
html[lang="ar"] .disc-card h3 { font-family: var(--font-ar-display); font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green); display: inline-flex; gap: 10px; align-items: center; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin-top: 10px; }
.section-head p { color: var(--muted); max-width: 520px; margin-top: 10px; }
.muted { color: var(--muted); }

/* Concept ribbon */
.concept { background: var(--ink); color: #d9d3c6; font-size: 13px; text-align: center; padding: 7px 16px; }
.concept b { color: var(--gold); font-weight: 600; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(251,248,242,.86); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.scrolled { border-color: var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: auto; height: 46px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-family: var(--font-ar-display); font-size: 16px; font-weight: 600; }
html[lang="en"] .brand-text b { font-family: var(--font-en-display); }
.brand-text span { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink-2); transition: background .15s; }
.nav a:hover { background: var(--sand); }
.nav a.active { background: var(--ink); color: var(--paper); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.lang-btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.lang-btn:hover { background: var(--sand); }
.menu-btn { display: none; border: 0; background: var(--sand); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 20px rgba(14,71,46,.28); }
.btn-primary:hover { background: var(--green-2); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; border-color: currentColor; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn .arrow { transition: transform .15s; }
html[lang="ar"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(3px); }
html[lang="ar"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* Hero */
.hero { position: relative; background: var(--ink); color: var(--paper); overflow: hidden; }
.hero-art { position: absolute; inset: 0; }
.hero-art svg { width: 100%; height: 100%; }
html[dir="rtl"] .hero-art svg, html[dir="rtl"] .page-hero .pattern { transform: scaleX(-1); }
.hero .wrap { position: relative; padding-top: 110px; padding-bottom: 72px; min-height: min(86vh, 760px); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(42px, 7vw, 92px); max-width: 900px; text-wrap: balance; }
.page-hero h1, .section-head h2, .cta h2 { text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { text-wrap: balance; font-size: clamp(17px, 2vw, 21px); color: #cfc8b9; max-width: 620px; margin-top: 22px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-ctas .btn-ghost { color: var(--paper); border-color: rgba(251,248,242,.35); }
.hero-strip { display: grid; max-width: 760px; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(251,248,242,.14); border: 1px solid rgba(251,248,242,.14); border-radius: var(--radius); overflow: hidden; margin-top: 64px; }
.hero-strip div { background: rgba(13,19,17,.55); backdrop-filter: blur(6px); padding: 20px 22px; }
.hero-strip b { display: block; font-family: var(--font-en-display); font-size: 38px; font-weight: 600; color: var(--paper); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-strip span { font-size: 14px; color: #bdb6a6; }

/* Quick services */
.quick { margin-top: -38px; position: relative; z-index: 3; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick a { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: transform .15s, border-color .15s; }
.quick a:hover { transform: translateY(-3px); border-color: var(--green); }
.quick .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.quick b { font-size: 17px; }
.quick span { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Cards / grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--muted); }

/* Disciplines */
.disc-card { position: relative; border-radius: var(--radius); padding: 28px; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--paper); overflow: hidden; background: var(--ink-2); }
.disc-card svg.bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; z-index: 0; }
.disc-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(13,19,17,.95) 22%, rgba(13,19,17,.55) 55%, rgba(13,19,17,0) 80%); }
.disc-card > *:not(svg) { position: relative; z-index: 2; }
.disc-card .tag { z-index: 2; }
.disc-card svg.bg { transition: transform .5s ease; }
.disc-card:hover svg.bg { transform: scale(1.04); }
html[dir="rtl"] .disc-card svg.bg, html[dir="rtl"] .news-card .thumb svg { transform: scaleX(-1); }
html[dir="rtl"] .disc-card:hover svg.bg { transform: scale(-1.04, 1.04); }
.disc-card h3 { font-size: 26px; }
.disc-card p { color: #d7d0c1; font-size: 15px; margin-top: 6px; }
.disc-card .tag { position: absolute; top: 22px; inset-inline-start: 22px; font-size: 12px; font-weight: 600; background: rgba(251,248,242,.14); border: 1px solid rgba(251,248,242,.2); border-radius: 999px; padding: 4px 12px; }

/* Timeline / events */
.events { display: grid; gap: 12px; }
.event { display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; transition: border-color .15s; }
.event:hover { border-color: var(--ink); }
.event .when { text-align: center; border-inline-end: 1px solid var(--line); padding-inline-end: 18px; }
.event .when b { display: block; font-family: var(--font-en-display); font-size: 30px; line-height: 1; }
.event .when span { font-size: 13px; color: var(--muted); }
.event h4 { margin: 0; font-size: 18px; }
.event .meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 4px 11px; background: var(--sand); color: var(--ink-2); white-space: nowrap; }
.pill.j { background: var(--gold-soft); color: #7a5520; }
.pill.e { background: var(--green-soft); color: var(--green-2); }
.pill.abroad { background: #f9e3e6; color: #8f0b21; white-space: normal; max-width: 100%; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Stats band */
.band { background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats div { padding: 34px 26px; border-inline-start: 1px solid var(--line); }
.stats div:first-child { border-inline-start: 0; }
.stats b { display: block; font-family: var(--font-en-display); font-size: 48px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 15px; display: block; margin-top: 10px; }

/* Diaspora */
.diaspora { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.country-list { display: grid; gap: 10px; }
.country { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.country .bar { grid-column: 1 / -1; height: 8px; background: var(--sand-2); border-radius: 999px; overflow: hidden; }
.country .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 999px; }
html[lang="ar"] .country .bar i { background: linear-gradient(270deg, var(--green), var(--gold)); }
.country b { font-weight: 600; }
.country span { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }

/* Athletes */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.search { flex: 1 1 280px; position: relative; }
.search input { width: 100%; height: 50px; border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 0 20px; padding-inline-start: 48px; font-size: 16px; }
.search svg { position: absolute; inset-inline-start: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chip { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.select { height: 40px; border-radius: 999px; border: 1px solid var(--line); background: #fff; padding: 0 14px; font-size: 14px; }
.result-count { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.athletes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ath { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, transform .15s; }
.ath:hover { border-color: var(--ink); transform: translateY(-2px); }
.ath-top { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--ink-2); flex-shrink: 0; font-family: var(--font-en); }
.avatar.f { background: var(--gold-soft); color: #7a5520; }
.ath h4 { margin: 0; font-size: 16px; line-height: 1.3; font-family: var(--font-en); font-weight: 600; }
.ath .id { font-size: 12.5px; color: var(--muted); font-family: var(--font-en); }
.ath .row { display: flex; gap: 6px; flex-wrap: wrap; }
.ath .foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13.5px; color: var(--muted); }
.ath .foot a { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }
.ath .foot { gap: 10px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Page hero */
.page-hero { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.page-hero .wrap { padding-top: 72px; padding-bottom: 64px; position: relative; }
.page-hero h1 { font-size: clamp(36px, 5.5vw, 64px); max-width: 820px; }
.page-hero p { color: #cfc8b9; max-width: 640px; margin-top: 16px; font-size: 18px; }
.page-hero .pattern { position: absolute; inset: 0; opacity: .5; }

/* Portal */
.portal { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.side { position: sticky; top: 96px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.side button { display: flex; width: 100%; gap: 12px; align-items: center; text-align: start; padding: 12px 14px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; font-size: 15px; font-weight: 500; }
.side button:hover { background: var(--sand); }
.side button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.side .count { margin-inline-start: auto; font-size: 12px; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 8px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel h2 { font-size: 28px; }
.steps { display: flex; gap: 8px; margin: 22px 0 28px; }
.steps span { flex: 1; height: 5px; background: var(--sand-2); border-radius: 999px; }
.steps span.on { background: var(--green); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--paper); }
.field textarea { height: 110px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px var(--green-soft); }
.field small { color: var(--muted); font-size: 12.5px; }
.upload { grid-column: 1 / -1; border: 1.5px dashed var(--sand-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); background: var(--paper); cursor: pointer; }
.upload:hover { border-color: var(--green); color: var(--green); }
.form-actions { display: flex; justify-content: space-between; margin-top: 26px; gap: 10px; }
.service-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.service-cards button { text-align: start; border: 1px solid var(--line); background: var(--paper); border-radius: 16px; padding: 20px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.service-cards button:hover { border-color: var(--green); }
.service-cards b { font-size: 17px; }
.service-cards span { color: var(--muted); font-size: 14px; }
.service-cards .fee { font-size: 13px; color: var(--green); font-weight: 600; margin-top: 6px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: start; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); }
html[lang="ar"] .table th { letter-spacing: 0; font-size: 13px; }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.pending { background: var(--gold-soft); color: #7a5520; }
.status.approved { background: var(--green-soft); color: var(--green-2); }
.status.review { background: #e5ecf7; color: #234f8f; }
.status.rejected { background: #f9e3e6; color: #8f0b21; }

/* Admin */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.kpi span { color: var(--muted); font-size: 14px; }
.kpi b { display: block; font-family: var(--font-en-display); font-size: 36px; line-height: 1.1; margin-top: 6px; }
.admin-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.inbox-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item .avatar { width: 38px; height: 38px; font-size: 13px; }
.inbox-item b { font-size: 14.5px; }
.inbox-item p { font-size: 13.5px; color: var(--muted); }
.actions { display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--sand); }
.icon-btn.ok:hover { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.icon-btn.no:hover { background: #f9e3e6; color: var(--red); border-color: var(--red); }

/* Docs */
.doc { display: flex; gap: 16px; align-items: center; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.doc:hover { border-color: var(--ink); }
.doc .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--sand); display: grid; place-items: center; flex-shrink: 0; }
.doc b { display: block; font-size: 15.5px; }
.doc span { font-size: 13px; color: var(--muted); }
.doc .go { margin-inline-start: auto; color: var(--muted); }

/* CTA */
.cta { background: var(--green); color: #fff; border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); }
.cta p { color: #cfe6da; margin-top: 12px; }
.cta form { display: flex; gap: 8px; background: rgba(255,255,255,.12); padding: 6px; border-radius: 999px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cta input { flex: 1; border: 0; background: transparent; color: #fff; padding: 0 16px; min-width: 0; }
.cta input::placeholder { color: #bfdccd; }
.cta input:focus { outline: none; }

/* News */
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.news-card:hover { transform: translateY(-3px); }
.news-card .thumb { height: 170px; background: var(--ink-2); position: relative; }
.news-card .thumb svg { width: 100%; height: 100%; }
.news-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 19px; }
.news-card .src { margin-top: auto; font-size: 13px; color: var(--muted); padding-top: 8px; }

/* Footer */
.footer { background: var(--ink); color: #bdb6a6; padding: 72px 0 32px; }
.footer a.brand { display: flex; padding: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer h5 { color: var(--paper); font-size: 15px; margin: 0 0 14px; }
.footer a { display: block; padding: 4px 0; font-size: 14.5px; }
.footer a:hover { color: var(--paper); }
.footer .brand-text span { color: #8f897b; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* Toast */
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 14px 20px; border-radius: 14px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; box-shadow: var(--shadow); }
html[lang="ar"] .toast { transform: translateX(50%) translateY(20px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
html[lang="ar"] .toast.show { transform: translateX(50%) translateY(0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }

/* Responsive */
@media (max-width: 1000px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; background: var(--paper); padding: 12px 20px 20px; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .menu-btn { display: block; }
  .header-actions .btn { display: none; }
  .quick-grid, .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .diaspora, .admin-grid, .cta { grid-template-columns: 1fr; }
  .portal { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .side button { white-space: nowrap; width: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(3) { border-inline-start: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .hero-strip { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-2, .service-cards, .form-grid { grid-template-columns: 1fr; }
  .event { grid-template-columns: 84px 1fr; gap: 14px; padding: 16px; }
  .event .when { padding-inline-end: 12px; }
  .event .when b { font-size: 22px; }
  .event > :last-child { justify-content: flex-start !important; }
  .cta-actions { justify-content: flex-start; }
  .event > :last-child { grid-column: 1 / -1; }
  .cta { padding: 32px 22px; }
  .cta form { flex-direction: column; border-radius: 20px; }
  .cta input { height: 46px; }
  .panel { padding: 22px; }
  .brand-text span { display: none; }
  .table-wrap { overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Web addresses, emails and phone numbers always read left to right, even on Arabic pages */
input[type="url"], input[type="email"], input[type="tel"] { direction: ltr; }
html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"] { text-align: right; }

/* Events dashboard layout: form + lists side by side on desktop, stacked on tablets and phones */
.admin-grid.ev { grid-template-columns: 1.25fr 1fr; }
@media (max-width: 1000px) { .admin-grid.ev { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .kpis { gap: 8px; } .kpi { padding: 14px; } .kpi b { font-size: 28px; } }
@media (max-width: 640px) {
  .footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

.nav .nav-contact { display: none; }
@media (max-width: 1000px) { .nav .nav-contact { display: block; } }
@media (max-width: 640px) { .hero-art .fence { display: none; } }

/* The emblem is dark green, so it sits on a light tile in the dark footer */
.footer .brand-mark { background: var(--paper); border-radius: 12px; padding: 5px 7px; height: 56px; }

/* Event status */
.pill.status-postponed { background: #fdf0d5; color: #8a5a00; }
.pill.status-cancelled { background: #f9e3e6; color: #8f0b21; }
.event.is-cancelled h4 { text-decoration: line-through; text-decoration-color: rgba(143,11,33,.55); }
.event.is-cancelled .when, .event.is-cancelled .meta { opacity: .6; }
