/* ==========================================================
   جمعية خُود وأعطي الخيرية — Give & Take Charity
   Shared stylesheet (works for Arabic RTL and English LTR)
   ========================================================== */

:root {
  --green-900: #0f1f38;
  --green-800: #16294a;
  --green-700: #2c4468;
  --green-100: #e8edf4;
  --accent: #c75b24;
  --accent-700: #a84a1b;
  --accent-100: #fbeee6;
  --sand: #f6f7f9;
  --sand-200: #edf0f4;
  --paper: #ffffff;
  --ink: #1a2233;
  --muted: #5a6475;
  --line: #e1e5eb;
  --todo-bg: #fff5c2;
  --todo-line: #e3c34d;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 31, 56, .06), 0 6px 20px rgba(15, 31, 56, .07);
  --wrap: 1320px;

  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-head: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.45;
  color: var(--green-900);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: var(--green-900); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Placeholder content the charity must fill in ---------- */
.todo {
  background: var(--todo-bg);
  border-bottom: 2px dashed var(--todo-line);
  padding: 0 .3em;
  border-radius: 4px;
}
.todo-box {
  background: var(--todo-bg);
  border: 2px dashed var(--todo-line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #5c4a00;
  font-size: .95rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  max-width: 100%;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: .75em 1.4em; border-radius: 999px;
  border: 2px solid transparent; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-700); color: #fff; }
.btn-primary { background: var(--green-800); color: #fff; }
.btn-primary:hover { background: var(--green-900); color: #fff; }
.btn-outline { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-800); color: #fff; }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--accent-100); color: var(--green-900); }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--green-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  font-family: var(--font-head); font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; gap: .4em;
}
.link-arrow::after { content: "←"; transition: transform .15s; }
[dir="ltr"] .link-arrow::after { content: "→"; }
.link-arrow:hover::after { transform: translateX(-4px); }
[dir="ltr"] .link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 74px;
}
.brand {
  min-width: 0;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--green-900); flex-shrink: 0;
}
.brand-mark { width: 44px; height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: .78rem; color: var(--muted); }

.main-nav { margin-inline-start: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 11px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--green-100); color: var(--green-900); }
.main-nav a[aria-current="page"] { color: var(--green-700); background: var(--green-100); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { padding: .55em 1.1em; font-size: .88rem; }
.lang-switch {
  font-size: .85rem; font-weight: 700; text-decoration: none;
  padding: 6px 10px; border-radius: var(--radius-sm); color: var(--green-800);
  border: 1px solid var(--line);
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 44px; height: 44px; cursor: pointer; color: var(--green-900);
  align-items: center; justify-content: center;
}

@media (max-width: 1480px) {
  .main-nav a { padding: 8px 8px; font-size: .9rem; }
}
@media (max-width: 1400px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; inset-inline: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 12px; font-size: 1rem; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .btn { white-space: normal; text-align: center; }
  .header-actions .btn { white-space: nowrap; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: .95rem; }
  .header-actions .btn-help { display: none; }
  .header-inner { gap: 10px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tight { padding: clamp(40px, 6vw, 64px) 0; }
.section-white { background: var(--paper); }
.section-green { background: var(--green-800); color: #eef1f6; }
.section-green h2, .section-green h3 { color: #fff; }
.section-green a:not(.btn) { color: #fff; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .85rem;
  color: var(--accent); margin-bottom: .6em; letter-spacing: 0;
}
.section-green .eyebrow { color: #f3b48f; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.section-green .lead { color: #c9d2df; }
.section-head { margin-bottom: 36px; max-width: 720px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .lead { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--green-900);
  color: #eef1f6;
  padding: clamp(64px, 10vw, 120px) 0 clamp(72px, 10vw, 128px);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../img/pattern.svg");
  background-size: 120px; opacity: .08;
}
.hero::after {
  content: ""; position: absolute; inset-inline-start: -10%; bottom: -40%;
  width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(199,91,36,.22), transparent 65%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { font-size: 1.2rem; max-width: 60ch; color: #cdd5e1; }
.hero .btn-row { margin-top: 28px; }

.page-hero {
  background: var(--green-800); color: #d2d9e4;
  padding: clamp(48px, 7vw, 84px) 0;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("../img/pattern.svg"); background-size: 110px; opacity: .07;
}
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { max-width: 64ch; font-size: 1.1rem; margin: 0; }
.breadcrumb { font-size: .88rem; margin-bottom: 14px; color: #a9b4c4; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }
.page-hero .hero-icon {
  width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.12);
  display: grid; place-items: center; margin-bottom: 18px; color: #fff;
}
.page-hero .hero-icon svg { width: 34px; height: 34px; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.section-white .card { background: var(--sand); box-shadow: none; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.card-link:hover { transform: translateY(-3px); border-color: var(--green-700); color: inherit; }
.card-link .link-arrow { margin-top: auto; padding-top: 12px; color: var(--green-700); }

.icon-badge {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--green-100); color: var(--green-800);
  display: grid; place-items: center; margin-bottom: 16px; flex-shrink: 0;
}
.icon-badge svg { width: 28px; height: 28px; }
.icon-badge.accent { background: var(--accent-100); color: var(--accent-700); }

.value-card { border-top: 4px solid var(--green-700); }
.value-card h3 { color: var(--green-800); }

.mv-card {
  background: var(--green-800); color: #dde3ec; border: 0;
}
.mv-card h3 { color: #fff; }
.mv-card.alt { background: var(--accent); color: #fff4ec; }

/* ---------- Two-column split ---------- */
.split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1.1fr .9fr; align-items: center; }
.split.top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.fact {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center;
}
.section-white .fact { background: var(--sand); }
.fact strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--accent); line-height: 1.3; }
.fact span { color: var(--muted); font-size: .95rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li {
  counter-increment: step; position: relative;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 22px;
}
.section-white .steps li { background: var(--sand); }
.section-green .steps li { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.15); }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--font-head); font-weight: 700;
  margin-bottom: 12px;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .3em; }
.steps p { margin: 0; font-size: .97rem; }

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-inline-start: 32px; margin-bottom: .6em; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23a84a1b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--accent); color: #fff; border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; color: #fff1e7; max-width: 60ch; }

.highlight-band {
  border-radius: var(--radius); padding: clamp(26px, 4vw, 40px);
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: #dde3ec; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
}
.highlight-band[hidden] { display: none; }
.highlight-band h2 { color: #fff; margin-bottom: .2em; font-size: 1.5rem; }
.highlight-band p { margin: 0; }
.pulse-mark { width: 72px; height: 72px; color: #f3b48f; }
@media (max-width: 760px) { .highlight-band { grid-template-columns: 1fr; } }

.status-pill {
  display: inline-block; font-size: .8rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
  background: var(--accent-100); color: var(--accent-700);
}
.status-pill.green { background: var(--green-100); color: var(--green-700); }

/* ---------- In-page sub navigation ---------- */
.subnav {
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 74px; z-index: 40;
}
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block; padding: 14px 14px; white-space: nowrap; text-decoration: none;
  color: var(--muted); font-weight: 500; font-size: .95rem; border-bottom: 3px solid transparent;
}
.subnav a:hover { color: var(--green-800); border-bottom-color: var(--green-100); }

.anchor { scroll-margin-top: 140px; }

/* ---------- Document / report list ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.doc-list li {
  display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.section-white .doc-list li { background: var(--sand); }
.doc-list .doc-title { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.doc-list .doc-title svg { width: 22px; height: 22px; color: var(--green-700); flex-shrink: 0; }

/* ---------- Info table ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 38%; color: var(--muted); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 20px;
}
.section-white .faq details { background: var(--sand); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; color: var(--green-900);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 18px; color: var(--muted); }

/* ---------- Forms ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.field .req { color: var(--accent); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px var(--green-100);
}
.field input[type="tel"], .field input[type="email"] { direction: ltr; text-align: start; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0392b; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.consent input { width: 20px; height: 20px; margin-top: 4px; flex-shrink: 0; accent-color: var(--green-700); }
.form-msg { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-sm); display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: var(--green-100); color: var(--green-900); }
.form-msg.info { background: var(--accent-100); color: #6d3112; }
.form-msg.err { background: #fbe4e1; color: #8a2318; }

.privacy-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--green-100); color: var(--green-900); border-radius: var(--radius-sm);
  padding: 14px 18px; font-size: .95rem; margin-bottom: 22px;
}
.privacy-note svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon-badge { width: 46px; height: 46px; margin: 0; }
.contact-list .icon-badge svg { width: 22px; height: 22px; }
.contact-list strong { display: block; font-family: var(--font-head); color: var(--green-900); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Empty states ---------- */
.empty {
  text-align: center; padding: 40px 24px; border: 2px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); background: var(--paper);
}
.section-white .empty { background: var(--sand); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--green-700); opacity: .7; }

/* ---------- Prose (policy pages) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #aeb8c7; padding: 64px 0 0; font-size: .95rem; }
.site-footer a { color: #e3e8ef; text-decoration: none; }
.site-footer a:hover { color: #f3b48f; text-decoration: underline; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand-sub { color: #8e9bb0; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08);
}
.social a:hover { background: var(--accent); }
.social svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding: 20px 0;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .88rem;
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 44px; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Bank details ---------- */
.bank-card .bank-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.bank-card .bank-head .icon-badge { margin: 0; }
.table-scroll { overflow-x: auto; }
.bank-table th { width: 30%; white-space: nowrap; }
.iban {
  direction: ltr; unicode-bidi: isolate; display: inline-block;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95rem;
  letter-spacing: .02em; word-break: break-all; color: var(--green-900); font-weight: 600;
}
.copy-btn {
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--green-700);
  border-radius: 999px; padding: 2px 12px; margin-inline-start: 8px; vertical-align: middle;
}
.copy-btn:hover { border-color: var(--green-700); }
.copy-btn.copied { background: var(--green-100); border-color: var(--green-100); }
@media (max-width: 640px) {
  .bank-table th, .bank-table td { display: block; width: 100%; }
  .bank-table th { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- News item ---------- */
.news-item { max-width: 860px; }
.news-figures { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0 4px; }
.news-figures div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 20px; text-align: center; }
.news-figures strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--accent); }
.news-figures span { font-size: .9rem; color: var(--muted); }

/* ==========================================================
   Corporate look: sharp corners, dark navy top bar, orange accent lines
   ========================================================== */
:root { --radius: 4px; --radius-sm: 3px; }
.btn { border-radius: 4px; }

.site-header { background: var(--green-900); border-bottom: 3px solid var(--accent); backdrop-filter: none; }
.brand, .brand-name { color: #fff; }
.brand-sub { color: #cdd5e1; }
.main-nav a { color: #eef1f6; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.lang-switch { color: #fff; border-color: rgba(255,255,255,.3); }
.nav-toggle { color: #fff; border-color: rgba(255,255,255,.3); }
@media (max-width: 1400px) { .main-nav { background: var(--green-900); border-bottom-color: rgba(255,255,255,.1); } }

/* "Request help" button in the header: orange outline on navy */
.site-header .btn-help { border-color: var(--accent); color: #f3b48f; background: transparent; }
.site-header .btn-help:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.hero { background: linear-gradient(90deg, var(--green-900) 0%, var(--green-800) 100%); }
.hero::after { display: none; }
.hero h1 { border-inline-start: 6px solid var(--accent); padding-inline-start: 22px; }

.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--accent); margin-top: 14px; }
.section-head.center h2::after { margin-inline: auto; }

.value-card { border-top: 0; border-inline-start: 4px solid var(--accent); }
.card-link { border-top: 3px solid transparent; }
.card-link:hover { transform: none; border-top-color: var(--accent); }
.icon-badge { border-radius: 4px; }
.steps li::before { border-radius: 4px; }

/* Top bar stays at the top of the page and scrolls away with it (does not follow) */
.site-header { position: relative; z-index: 50; }
.subnav { top: 0; }

/* Banner background: the logo shown clearly on the side with a soft orange glow */
.hero::after, .page-hero::after {
  content: ""; display: block; position: absolute; z-index: 0; pointer-events: none;
  left: 0; top: 50%; bottom: auto; right: auto; aspect-ratio: 1; opacity: 1; clip-path: none;
  transform: translate(-12%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(199,91,36,.22), transparent 65%);
}
.hero::after { width: 560px; }
.page-hero::after { width: 380px; }
.hero::before, .page-hero::before {
  z-index: 1; inset: 0 auto 0 0; width: 34%; opacity: .95;
  background: url("../img/logo-feature.svg") no-repeat 30% 50% / auto 62%;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
}
.hero .wrap, .page-hero .wrap { position: relative; z-index: 2; }
/* English (left-to-right): logo moves to the right side */
[dir="ltr"] .hero::after, [dir="ltr"] .page-hero::after { left: auto; right: 0; transform: translate(12%, -50%); }
[dir="ltr"] .hero::before, [dir="ltr"] .page-hero::before { inset: 0 0 0 auto; background-position: 70% 50%; }
/* Smaller screens: the text needs the space, so the logo fades into a soft watermark */
@media (max-width: 1100px) {
  .hero::before, .page-hero::before { opacity: .12; filter: none; }
  .hero::after, .page-hero::after { opacity: .6; }
}

/* Logo (navy square) — faint edge so it stands out on the navy bar and footer */
.brand-mark { border-radius: 25%; box-shadow: 0 0 0 1px rgba(255,255,255,.22); }
.brand-mark { width: 60px; height: 60px; }
.header-inner { min-height: 84px; }
@media (max-width: 560px) { .brand-mark { width: 48px; height: 48px; } }

/* Inner-page banners: one fixed height on every page (homepage banner is separate) */
.page-hero {
  display: flex; align-items: center; box-sizing: border-box;
  min-height: 360px; height: auto; padding: 32px 0;
}
.page-hero .wrap { display: flow-root; }
.page-hero p { max-width: 78ch; }
/* page icon sits beside the title instead of above it, so it adds no height */
.page-hero .hero-icon { float: right; margin: 6px 0 0 22px; }
[dir="ltr"] .page-hero .hero-icon { float: left; margin: 6px 22px 0 0; }
@media (max-width: 900px) {
  .page-hero { min-height: 320px; }
}
@media (max-width: 640px) {
  .page-hero { height: auto; min-height: 340px; padding: 40px 0; }
  .page-hero .hero-icon { width: 48px; height: 48px; border-radius: 12px; margin-inline-start: 0; }
  [dir="rtl"] .page-hero .hero-icon { margin-left: 14px; }
  [dir="ltr"] .page-hero .hero-icon { margin-right: 14px; }
  .page-hero .hero-icon svg { width: 26px; height: 26px; }
}

/* Banner logo: gentle jumping animation (glow pulses with each landing) */
@keyframes logo-jump {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  10%      { transform: translateY(0) scale(1.06, .94); }   /* crouch */
  35%      { transform: translateY(-9%) scale(.97, 1.03); }  /* in the air */
  55%      { transform: translateY(0) scale(1.05, .95); }    /* landing */
  65%      { transform: translateY(-2%) scale(1, 1); }        /* small bounce */
  75%      { transform: translateY(0) scale(1, 1); }
}
@keyframes glow-pulse {
  0%, 100%, 75% { opacity: 1; }
  35%           { opacity: .6; }
  55%           { opacity: 1.2; }
}
.hero::before, .page-hero::before {
  transform-origin: 30% 80%;
  animation: logo-jump 2.4s ease-in-out infinite;
}
.hero::after, .page-hero::after { animation: glow-pulse 2.4s ease-in-out infinite; }
[dir="ltr"] .hero::before, [dir="ltr"] .page-hero::before { transform-origin: 70% 80%; }
/* no animation on small screens (logo is a faint watermark there) */
@media (max-width: 1100px) {
  .hero::before, .page-hero::before, .hero::after, .page-hero::after { animation: none; }
}

/* ==========================================================
   Site animations (always on)
   ========================================================== */
:root { --ease: cubic-bezier(.22,.8,.3,1); }

/* 1. Banner entrance: items glide in one after another when a page opens */
@keyframes a-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero .eyebrow, .page-hero .breadcrumb { animation: a-up .7s var(--ease) .1s both; }
.hero h1, .page-hero h1                 { animation: a-up .8s var(--ease) .25s both; }
.page-hero .hero-icon                   { animation: a-up .8s var(--ease) .2s both; }
.hero p, .page-hero p                   { animation: a-up .8s var(--ease) .45s both; }
.hero .btn-row                          { animation: a-up .8s var(--ease) .65s both; }

/* 2. Fade up on scroll (classes added by site.js) */
.rv { opacity: 0; transform: translateY(34px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* 3. Staggered cards: items in a row appear one after another */
.st { opacity: 0; transform: translateY(28px) scale(.98);
  transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  transition-delay: calc(var(--i, 0) * 90ms); }
.st.in { opacity: 1; transform: none; }
.st.done { transition-delay: 0s; transition-duration: .35s; }

/* 4. Number count-up: done in site.js */

/* 5. Growing heading lines */
.section-head h2::after { width: 0; transition: width .8s var(--ease) .2s; }
.section-head.in h2::after { width: 56px; }

/* 6. Card hover lift */
.card-link { transition: opacity .6s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card-link:hover, .card-link.st.in:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(15,31,56,.14); }
.card-link .icon-badge { transition: transform .35s var(--ease), background .35s, color .35s; }
.card-link:hover .icon-badge { transform: rotate(-6deg) scale(1.08); background: var(--accent); color: #fff; }
.value-card:hover, .value-card.st.in:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(15,31,56,.1); }

/* 7. Button shine + lift on hover */
.btn-accent { position: relative; overflow: hidden; }
.btn-accent::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); }
.btn-accent:hover::after { left: 120%; transition: left .7s ease; }
.btn { transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(199,91,36,.28); }

/* 8. Steps pop: numbered circles pop in one by one */
.steps li::before { transform: scale(0); transition: transform .5s cubic-bezier(.34,1.6,.5,1); transition-delay: calc(var(--n, 0) * 160ms + .15s); }
.steps.in li::before { transform: scale(1); }


/* ---------- Beneficiaries bar (homepage): white bar sitting on the bottom edge of the banner ---------- */
.stat-bar-wrap { position: relative; z-index: 3; margin-top: -64px; background: linear-gradient(transparent 64px, var(--paper) 64px); }
.stat-bar-wrap + .section { padding-top: clamp(40px, 6vw, 64px); }
.stat-bar {
  background: #fff; border-radius: var(--radius); box-shadow: 0 18px 50px rgba(15,31,56,.16);
  display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); overflow: hidden; border-top: 4px solid var(--accent);
  animation: a-up .8s var(--ease) .8s both;
}
.stat-bar .cell { padding: 26px 22px; text-align: center; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stat-bar .cell-total { border: 0; background: var(--green-800); color: #d2d9e4; align-items: flex-start; text-align: start; }
.stat-bar .num { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; color: var(--green-900); line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-bar .cell-total .num { color: #fff; font-size: 2.4rem; }
.stat-bar .lbl { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.stat-bar .cell-total .lbl { color: #f3b48f; }
.stat-bar .cell-total .lbl:first-child { color: #d2d9e4; font-weight: 700; }
.stat-bar .ic { color: var(--accent); display: inline-grid; margin-bottom: 4px; transition: transform .35s var(--ease); }
.stat-bar .ic svg { width: 28px; height: 28px; }
.stat-bar .cell:hover .ic { transform: translateY(-3px) scale(1.1); }
.stat-bar .more { margin-top: 8px; font-size: .88rem; color: #fff; font-weight: 700; text-decoration: none; }
.stat-bar .more::after { content: " ←"; }
[dir="ltr"] .stat-bar .more::after { content: " →"; }
.stat-bar .more:hover { color: #f3b48f; }
@media (max-width: 900px) {
  .stat-bar { grid-template-columns: 1fr 1fr; }
  .stat-bar .cell-total { grid-column: 1 / -1; }
  .stat-bar .cell { border-top: 1px solid var(--line); }
  .stat-bar .cell:nth-child(even) { border-inline-start: 0; }
}

/* ---------- Beneficiary statistics (impact page): ranked bars with % of total ---------- */
.stat-bars { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat-bars-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; padding: 26px 28px; border-bottom: 1px solid var(--line); background: var(--sand); }
.stat-bars-top .eyebrow { margin: 0; }
.stat-bars-top .tot { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stat-bars-top .num { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--green-900); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-bars-top .tot span:last-child { color: var(--muted); font-weight: 700; }
.stat-bars ul { list-style: none; margin: 0; padding: 14px 28px 22px; }
.stat-bars li { display: grid; grid-template-columns: minmax(150px, 230px) 1fr 120px; gap: 18px; align-items: center; padding: 10px 0; position: relative; }
.stat-bars li + li { border-top: 1px solid var(--sand-200); }
.stat-bars .lbl { font-family: var(--font-head); font-weight: 700; color: var(--green-900); font-size: .95rem; display: flex; gap: 10px; align-items: center; }
.stat-bars .lbl svg { width: 20px; height: 20px; color: var(--accent-700); flex-shrink: 0; }
.stat-bars .track { height: 14px; background: var(--sand-200); border-radius: 4px; overflow: hidden; }
.stat-bars .track i { display: block; height: 100%; width: var(--w, 0); background: var(--accent); border-radius: 4px; transition: background .2s; }
.stat-bars li:hover .track i { background: var(--accent-700); }
.stat-bars .val { text-align: end; }
.stat-bars .val .num { font-family: var(--font-head); font-weight: 700; color: var(--green-900); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stat-bars .val small { display: block; color: var(--muted); font-size: .8rem; }
.stat-bars .tip { position: absolute; z-index: 5; inset-inline-start: 240px; top: -30px; background: var(--green-900); color: #fff; font-size: .85rem; padding: 5px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.stat-bars li:hover .tip { opacity: 1; transform: none; }
/* animation (only when site.js is running) */
.stat-bars.ready li { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--k, 0) * 70ms); }
.stat-bars.ready .track i { width: 0; transition: width 1.3s var(--ease), background .2s; transition-delay: calc(var(--k, 0) * 80ms + .25s); }
.stat-bars.ready.play li { opacity: 1; transform: none; }
.stat-bars.ready.play .track i { width: var(--w, 0); }
@media (max-width: 680px) {
  .stat-bars ul { padding: 10px 18px 18px; }
  .stat-bars-top { padding: 20px 18px; }
  .stat-bars li { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .stat-bars .track { grid-column: 1 / -1; order: 3; }
  .stat-bars .tip { display: none; }
}

/* ---------- Google map (contact page) ---------- */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--sand-200); }
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Header logo (new emblem image): white rounded-square badge so it reads on the navy bar */
.brand-mark-img { border-radius: 25%; background: #fff; object-fit: contain; padding: 2px; box-sizing: border-box; }

/* Header "تسجيل الدخول" button (team login → admin/): white outline on the navy bar */
.site-header .btn-login { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.site-header .btn-login:hover { background: #fff; border-color: #fff; color: var(--green-900); }
.main-nav .nav-login { display: none; }
@media (max-width: 560px) {
  .header-actions .btn-login { display: none; }   /* no room: it moves into the menu */
  .main-nav .nav-login { display: block; }
}


/* ===== الأشخاص وراء العمل: photos + biography box ===== */
.team-photo { display: block; width: 160px; height: 160px; margin: 0 auto 14px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-100); background: var(--sand); }
.team-card.has-bio { cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.team-card.has-bio:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.team-card.has-bio:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.team-more { display: inline-block; margin-top: 10px; font-family: var(--font-head); font-weight: 700; font-size: .85rem; color: var(--accent-700); }
.team-more::after { content: " ←"; }

body.modal-open { overflow: hidden; }
.team-modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 31, 56, .6); opacity: 0; transition: opacity .2s ease; }
.team-modal-backdrop.show { opacity: 1; }
.team-modal { position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--paper); border-radius: var(--radius); border-top: 4px solid var(--accent);
  box-shadow: 0 24px 60px rgba(15, 31, 56, .35); padding: 28px; transform: translateY(12px) scale(.98); transition: transform .2s ease; }
.team-modal-backdrop.show .team-modal { transform: none; }
.team-modal-close { position: absolute; top: 10px; inset-inline-end: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--sand); color: var(--green-900); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.team-modal-close:hover { background: var(--accent-100); }
.team-modal-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding-inline-end: 40px; }
.team-modal-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 4px solid var(--accent-100); }
.team-modal-noimg { display: grid; place-items: center; background: var(--accent-100); color: var(--accent-700); }
.team-modal-noimg svg { width: 52px; height: 52px; }
.team-modal-head h2 { margin: 0 0 4px; font-size: 1.4rem; }
.team-modal-role { margin: 0; color: var(--accent-700); font-weight: 700; }
.team-modal-bio { color: var(--ink); line-height: 1.9; border-top: 1px solid var(--line); padding-top: 16px; }
.team-modal-bio p { margin: 0 0 .8em; }
@media (max-width: 520px) {
  .team-modal { padding: 22px 18px; }
  .team-modal-head { flex-direction: column; text-align: center; padding-inline-end: 0; padding-top: 10px; }
}

/* ==========================================================
   آخر أخبارنا — news cards, homepage featured news, news page
   ========================================================== */
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.news-meta time { font-size: .85rem; color: var(--muted); }
.news-list .news-item { max-width: none; }

/* list on impact.html */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 24px; }
.news-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease, ease), box-shadow .25s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15, 31, 56, .12); }
.news-card-cover { display: block; aspect-ratio: 16 / 9; background: var(--sand); overflow: hidden; }
.news-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease, ease); }
.news-card:hover .news-card-cover img { transform: scale(1.04); }
.news-card-cover.no-cover, .feature-thumb.no-cover { display: grid; place-items: center; background: linear-gradient(135deg, var(--green-900), var(--green-800)); }
.news-card-cover .news-logo, .feature-thumb .news-logo { width: 84px; height: 84px; object-fit: contain; border-radius: 22%; background: #fff; padding: 4px; transform: none !important; }
.news-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card-body h3 { font-size: 1.15rem; line-height: 1.5; margin: 0; }
.news-card-body h3 a { color: var(--green-900); text-decoration: none; }
.news-card-body h3 a:hover { color: var(--accent-700); }
.news-card-body p { color: var(--muted); margin: 0; font-size: .95rem; }
.news-card-body .news-figures { margin: 4px 0 0; gap: 10px; }
.news-card-body .news-figures div { padding: 8px 14px; }
.news-card-body .news-figures strong { font-size: 1.15rem; }
.news-card-body .news-figures span { font-size: .8rem; }
.news-card-body .link-arrow { margin-top: auto; padding-top: 6px; }
.news-grid.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.news-grid.compact .news-card-body p, .news-grid.compact .news-figures { display: none; }

/* homepage featured news */
.home-news-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.home-news-head h2 { margin-bottom: 0; }
.featured-news { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.featured-news.count-1 { grid-template-columns: 1fr; }
.feature-lead { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 440px; background: linear-gradient(135deg, var(--green-900), var(--green-800)); box-shadow: var(--shadow); }
.featured-news.count-1 .feature-lead { min-height: 400px; }
.feature-lead-link { position: absolute; inset: 0; display: flex; align-items: flex-end; color: #fff; text-decoration: none; }
.feature-lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease, ease); }
.feature-lead:hover img { transform: scale(1.04); }
.feature-lead-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 22, 42, .94) 0%, rgba(10, 22, 42, .55) 45%, rgba(10, 22, 42, .05) 100%); }
.feature-lead.no-cover .feature-lead-link::after { background: radial-gradient(circle at 15% 20%, rgba(199, 91, 36, .35), transparent 55%); }
.feature-lead-text { position: relative; z-index: 1; padding: 30px 32px; display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.feature-lead-text h3 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.45; margin: 0; }
.feature-lead-text p { color: #dbe3ee; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feature-lead-text .news-meta time { color: #c9d3e2; }
.feature-lead-text .status-pill { background: var(--accent); color: #fff; }
.feature-lead-text .link-arrow { color: #f3b48f; }
.feature-amount { display: inline-block; align-self: flex-start; font-family: var(--font-head); font-weight: 700; color: #fff; background: rgba(199, 91, 36, .9); padding: 4px 14px; border-radius: 99px; font-size: .95rem; }
.feature-amount.small { font-size: .8rem; padding: 2px 10px; background: var(--accent-100); color: var(--accent-700); margin-top: 6px; }
.feature-side { display: grid; grid-auto-rows: 1fr; gap: 16px; }
.feature-item { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.feature-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-thumb { display: block; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 4px); overflow: hidden; background: var(--sand); }
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-thumb .news-logo { width: 54px; height: 54px; }
.feature-item h3 { font-size: 1rem; line-height: 1.5; margin: 6px 0 0; }
.feature-item h3 a { color: var(--green-900); text-decoration: none; }
.feature-item h3 a::after { content: ""; position: absolute; inset: 0; }
.feature-item { position: relative; }
.feature-item h3 a:hover { color: var(--accent-700); }
.feature-item .news-meta { gap: 8px; }
.feature-item .status-pill { font-size: .72rem; padding: 2px 9px; }
.feature-item .news-meta time { font-size: .78rem; }
@media (max-width: 900px) {
  .featured-news { grid-template-columns: 1fr; }
  .feature-lead { min-height: 360px; }
}
@media (max-width: 520px) {
  .feature-item { grid-template-columns: 104px 1fr; gap: 12px; }
  .feature-lead-text { padding: 22px 20px; }
}

/* news page */
.news-hero h1 { max-width: 900px; }
.news-meta-hero { margin-top: 12px; }
.news-meta-hero time { color: #c9d3e2; }
.news-article-wrap { max-width: 920px; }
.news-cover { margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sand); }
.news-cover img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.news-article-text { font-size: 1.08rem; line-height: 2; }
.news-article-text > .news-figures { margin: 0 0 24px; }
.news-article-text p { margin: 0 0 1.1em; }
.news-subhead { font-size: 1.15rem; margin: 1.4em 0 .6em; }
.news-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0 10px; }
.news-gallery.count-1 { grid-template-columns: 1fr; }
.news-gallery.count-2 { grid-template-columns: 1fr 1fr; }
.news-gallery-item { padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--sand); }
.news-gallery.count-1 .news-gallery-item { aspect-ratio: 16 / 9; }
.news-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease, ease); }
.news-gallery-item:hover img { transform: scale(1.05); }
.news-gallery-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.news-article-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.news-more { margin-top: 56px; }
.news-more h2 { font-size: 1.35rem; }
@media (max-width: 600px) { .news-gallery { grid-template-columns: 1fr 1fr; } }

/* photo viewer */
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(8, 16, 30, .92); display: grid; place-items: center; padding: 50px 60px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.9rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--accent); }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #c9d3e2; font-size: .9rem; }
@media (max-width: 600px) { .lightbox { padding: 60px 12px; } }
/* homepage: news sits right under the numbers bar; when there is no featured news the next section keeps the short top spacing */
.stat-bar-wrap + .home-news[hidden] + .section { padding-top: clamp(40px, 6vw, 64px); }
.home-news-head { max-width: none; width: 100%; }
/* news now sits between «تعرّف علينا» (white) and the mission section (grey): a divider keeps the two grey sections apart */
.home-news { border-bottom: 1px solid var(--line); }
/* date next to «آخر اجتماع لمجلس الإدارة» (set in the control panel) */
.doc-date { display: inline-flex; align-items: center; font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--accent-700); background: var(--accent-100); padding: 4px 14px; border-radius: 99px; white-space: nowrap; }
/* uploaded report PDFs on transparency.html */
.doc-list .doc-file-item .doc-text { display: flex; flex-direction: column; gap: 2px; }
.doc-list .doc-sub { font-weight: 500; font-size: .82rem; color: var(--muted); }
.doc-list .doc-file-item .btn { white-space: nowrap; }

/* phones: the top bar must fit 360px screens (logo + name + «تبرّع الآن» + menu button) */
@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  .brand { flex-shrink: 1; min-width: 0; gap: 8px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: .82rem; line-height: 1.35; white-space: normal; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .header-actions .btn-donate { padding: .45em .8em; font-size: .78rem; }
  .nav-toggle { padding: 6px 8px; }
}

/* long words / links (e.g. a long Facebook link or a title without spaces) wrap inside their box instead of widening the page */
main h1, main h2, main h3, main h4, main p, main li, main dd, main figcaption,
.contact-list a, .news-card-body h3, .feature-item h3, .feature-lead-text h3, .doc-list .doc-title, .footer-grid a { overflow-wrap: anywhere; }
.featured-news > *, .feature-item > div, .news-card-body, .doc-list .doc-title, .doc-list .doc-text, .contact-list li > div, .card { min-width: 0; }

/* ==========================================================
   Phones & tablets — portrait and landscape
   ========================================================== */
/* no grey flash when tapping links/buttons; text keeps its size when a phone is turned sideways */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, summary, .card-link, .team-card { -webkit-tap-highlight-color: transparent; }

/* dropdown menu (all sizes where the ☰ button shows): never taller than the screen — it scrolls inside */
@media (max-width: 1400px) {
  .main-nav.open { max-height: calc(100vh - 87px); max-height: calc(100dvh - 87px); overflow-y: auto; overscroll-behavior: contain; }
  .main-nav a { border-radius: var(--radius-sm); }
}
/* tablets & landscape phones: menu items in two/three columns so the whole menu fits at a glance */
@media (min-width: 600px) and (max-width: 1400px) {
  .main-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; }
}
@media (min-width: 900px) and (max-width: 1400px) {
  .main-nav ul { grid-template-columns: repeat(3, 1fr); }
}

/* beneficiaries bar: on tablets & landscape phones the four numbers sit in one row under the total */
@media (min-width: 600px) and (max-width: 900px) {
  .stat-bar { grid-template-columns: repeat(4, 1fr); }
  .stat-bar .cell { padding: 20px 12px; }
  .stat-bar .cell:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .stat-bar .cell:nth-child(2) { border-inline-start: 0; }
  .stat-bar .cell-total { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 20px 24px; }
  .stat-bar .cell-total .lbl:first-child { flex-basis: 100%; }
  .stat-bar .cell-total .more { margin: 0 auto 0 0; }
  [dir="ltr"] .stat-bar .cell-total .more { margin: 0 0 0 auto; }
}
/* small phones: slightly tighter numbers bar */
@media (max-width: 420px) {
  .stat-bar .cell { padding: 18px 10px; }
  .stat-bar .num { font-size: 1.6rem; }
  .stat-bar .cell-total .num { font-size: 2.1rem; }
}

/* tablets (portrait): roomier side margins, footer 2 columns already */
@media (min-width: 700px) and (max-width: 1100px) {
  .wrap { width: min(100% - 48px, var(--wrap)); }
}

/* phones (portrait): full-width main buttons in the banner and call-to-action boxes, easier to tap */
@media (max-width: 480px) {
  .hero .btn-row .btn, .cta-band .btn, .highlight-band .btn { width: 100%; }
  .cta-band .btn-row, .highlight-band .btn-row { width: 100%; }
  .card { padding: 22px 18px; }
  .section-head { margin-bottom: 26px; }
  .facts { gap: 12px; }
  .fact { padding: 18px 12px; }
  .fact strong { font-size: 1.7rem; }
  .info-table th, .info-table td { padding: 10px 8px; }
  .doc-list li { padding: 12px 14px; }
  .doc-list li .btn { width: 100%; }
  .lead { font-size: 1.05rem; }
  .hero p { font-size: 1.08rem; }
}

/* landscape phones (short screens): banners must not fill the whole screen */
@media (orientation: landscape) and (max-height: 520px) {
  .header-inner { min-height: 64px; }
  .brand-mark { width: 44px; height: 44px; }
  .main-nav.open { max-height: calc(100vh - 67px); max-height: calc(100dvh - 67px); }
  .hero { padding: 36px 0 84px; }
  .hero h1 { font-size: 1.8rem; max-width: none; }
  .hero p { font-size: 1.02rem; max-width: 80ch; }
  .hero .btn-row { margin-top: 18px; }
  .page-hero { min-height: 0; padding: 30px 0; }
  .page-hero h1 { font-size: 1.75rem; }
  .page-hero p { font-size: 1rem; }
  .page-hero .hero-icon { width: 46px; height: 46px; }
  .page-hero .hero-icon svg { width: 24px; height: 24px; }
  .section { padding: 44px 0; }
  .section-tight { padding: 32px 0; }
  .feature-lead, .featured-news.count-1 .feature-lead { min-height: 300px; }
  .subnav a { padding: 10px 12px; }
  .anchor { scroll-margin-top: 70px; }
  /* photo viewer & biography box use the full short height */
  .lightbox { padding: 12px 64px; }
  .lightbox img { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .team-modal { padding: 20px 22px; }
  .team-modal-head { flex-direction: row; text-align: start; }
  .team-modal-photo { width: 84px; height: 84px; }
}

/* touch screens: no "stuck" hover lift after tapping a card */
@media (hover: none) {
  .card-link:hover, .card-link.st.in:hover, .value-card:hover, .value-card.st.in:hover,
  .news-card:hover, .feature-item:hover, .team-card.has-bio:hover, .btn:hover { transform: none; }
  .btn:hover { box-shadow: none; }
  .card-link:hover .icon-badge { transform: none; }
  .news-card:hover .news-card-cover img, .feature-lead:hover img, .news-gallery-item:hover img { transform: none; }
}
