/* =========================================================
   جمعية القبلة للعناية بالمساجد — نظام التصميم
   ========================================================= */
/* ---------------- خط ثمانية (استضافة ذاتية) ---------------- */
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyah/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyah/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyah/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("../fonts/thmanyah/thmanyahsans-Black.woff2") format("woff2"); font-weight: 800 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyah/thmanyahserifdisplay-Medium.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyah/thmanyahserifdisplay-Bold.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; }

:root {
  /* الألوان */
  --bg: #F5F2EA;
  --bg-alt: #EDE8DC;
  --surface: #FFFFFF;
  --line: #E2DBCA;
  --ink: #2B3026;
  --ink-soft: #4A4F43;
  --muted: #74786B;

  --olive-900: #232C1B;
  --olive-800: #34402A;
  --olive-700: #465537;
  --olive-600: #5A6B47;
  --olive-500: #76875F;
  --olive-200: #CCD4BB;
  --olive-100: #E3E8D6;
  --olive-50:  #F0F3E8;

  --gold-600: #9A5E14;   /* ذهبي الشعار — داكن للنصوص */
  --gold-500: #E0951F;   /* ذهبي الشعار الأساسي */
  --gold-400: #EDB256;
  --gold-100: #FAEFDB;

  --danger: #A2493A;
  --whatsapp: #1F8F55;

  /* الأبعاد */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(35, 44, 27, .06);
  --shadow: 0 8px 28px -12px rgba(35, 44, 27, .18);
  --shadow-lg: 0 30px 70px -24px rgba(35, 44, 27, .35);

  /* الخطوط */
  --font: "Thmanyah Sans", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Thmanyah Serif Display", "Thmanyah Sans", serif;

  --container: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.ltr, .ltr-num { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--olive-800); color: #fff; padding: 8px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; }

/* ---------------- الأزرار ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1.4; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--olive-700); color: #fff; box-shadow: 0 6px 16px -8px rgba(70, 85, 55, .7); }
.btn-primary:hover { background: var(--olive-800); }
.btn-ghost { background: transparent; color: var(--olive-800); border-color: var(--olive-200); }
.btn-ghost:hover { background: var(--olive-50); border-color: var(--olive-500); }
.btn-light { background: var(--gold-100); color: var(--olive-900); }
.btn-light:hover { background: #fff; }
.btn-danger { background: transparent; color: var(--danger); border-color: #E7C9C2; }
.btn-danger:hover { background: #FBEFEC; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #17784A; }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------------- شريط الآية ---------------- */
/* الآية الكريمة أعلى الواجهة */
.hero-ayah {
  margin-block: 0 44px;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.ayah {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.8;
  color: var(--olive-900);
}
/* خطوط ذهبية مزخرفة على جانبي الآية */
.ayah::before,
.ayah::after {
  content: '';
  flex-shrink: 0;
  width: clamp(28px, 6vw, 72px);
  height: 10px;
  background:
    radial-gradient(circle, var(--gold-500) 3px, transparent 3.5px) center / 10px 10px no-repeat,
    linear-gradient(var(--gold-500), var(--gold-500)) center / 100% 1.5px no-repeat;
}
.ayah::before { mask: linear-gradient(to left, #000 60%, transparent); -webkit-mask: linear-gradient(to left, #000 60%, transparent); }
.ayah::after  { mask: linear-gradient(to right, #000 60%, transparent); -webkit-mask: linear-gradient(to right, #000 60%, transparent); }
.ayah-ref { color: var(--gold-600); font-size: 14px; font-weight: 500; }

/* ---------------- الهيدر ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 242, 234, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(35, 44, 27, .4); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { flex-shrink: 0; }
.brand-mark { width: auto; height: 62px; }
.brand-light .brand-mark { background: #fff; border-radius: 12px; padding: 4px; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 18px; font-weight: 700; color: var(--olive-900); }
.brand-text small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .brand-supervisor { display: none; } }

.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { padding: 8px 14px; border-radius: 10px; color: var(--ink-soft); font-weight: 500; transition: background-color .2s, color .2s; }
.main-nav a:hover { background: var(--olive-50); color: var(--olive-800); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--olive-800); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-drawer-head, .nav-overlay { display: none; }

/* ---------------- الواجهة الرئيسية ---------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: 64px 80px;
}
/* صورة الخلفية بتأثير زجاج مغبّش */
.hero::before {
  content: '';
  position: absolute;
  inset: -24px; /* يمنع ظهور حواف فاتحة بسبب التغبيش */
  z-index: -2;
  background: url("../img/hero-bg.jpg") center / cover no-repeat;
  background-image: image-set(url("../img/hero-bg.webp") type("image/webp"), url("../img/hero-bg.jpg") type("image/jpeg"));
  filter: blur(9px) saturate(1.1);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(245, 242, 234, .6);
}
.hero-grid { max-width: 760px; }
.hero h1, .section-title, .success-view h3 { font-family: var(--font-display); }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 700; color: var(--olive-900); margin-block: 0 14px; line-height: 1.3; }
.hero h1 .accent { color: var(--olive-600); position: relative; }
.hero h1 .accent::after { content: ''; position: absolute; inset-inline: 0; bottom: 4px; height: 10px; background: var(--gold-400); opacity: .35; border-radius: 4px; z-index: -1; }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }


/* ---------------- الأقسام ---------------- */
.section { padding-block: 88px; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head.center { justify-content: center; text-align: center; }
.section-kicker { display: inline-block; color: var(--gold-600); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.section-kicker::before { content: '◆ '; font-size: 10px; vertical-align: 2px; }
.section-title { font-size: clamp(26px, 3vw, 36px); font-weight: 700; color: var(--olive-900); }
.section-sub { color: var(--muted); margin-top: 8px; }

.filters, .segmented {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.filters button, .segmented button {
  border: 0; background: transparent; padding: 8px 18px; border-radius: 9px;
  cursor: pointer; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s;
}
.filters button[aria-selected="true"], .segmented button[aria-selected="true"] { background: var(--olive-700); color: #fff; }

/* ---------------- بطاقات المشاريع ---------------- */
/* البطاقات في المنتصف بعرض ثابت، فلا تبدو ضائعة عند قلة المشاريع */
.cat-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.cat-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.cat-chip:hover { border-color: var(--olive-500); }
.cat-chip[aria-pressed="true"] { background: var(--olive-700); border-color: var(--olive-700); color: #fff; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 370px)); justify-content: center; gap: 24px; }
.project-media.is-placeholder { display: grid; place-items: center; background: var(--gold-100); }
.project-media.is-placeholder img { width: 38%; height: auto; object-fit: contain; opacity: .9; }
.card-preview .project-media.is-placeholder img, .project-card:hover .project-media.is-placeholder img { transform: none; }
.empty-soon { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; border-style: solid; }
.empty-soon img { margin-bottom: 6px; }
.empty-soon h3 { font-family: var(--font-display); font-size: 22px; color: var(--olive-900); }
.empty-soon p { max-width: 46ch; margin-bottom: 8px; }
.empty-state { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 48px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line); }

.project-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.project-media { position: relative; aspect-ratio: 16 / 10; background: var(--olive-100); overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.04); }
.chip {
  position: absolute; top: 14px; inset-inline-start: 14px;
  background: rgba(255, 255, 255, .92); color: var(--olive-800);
  font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.ribbon {
  position: absolute; top: 14px; inset-inline-end: 14px;
  background: var(--gold-600); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
}

.project-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.project-title { font-size: 19px; font-weight: 700; color: var(--olive-900); }
.project-desc {
  color: var(--muted); font-size: 15px; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.progress-block { margin-top: auto; padding-top: 18px; }
.amounts { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.amounts .label { display: block; font-size: 12.5px; color: var(--muted); }
.amounts strong { font-size: 18px; font-weight: 700; color: var(--olive-800); font-variant-numeric: tabular-nums; }
.amounts small { font-size: 12px; font-weight: 500; color: var(--muted); }
.amount-target { text-align: end; }
.amount-target strong { color: var(--ink-soft); }

.progress { height: 10px; background: var(--olive-50); border: 1px solid var(--olive-100); border-radius: 999px; overflow: hidden; }
.progress-sm { height: 8px; }
.progress-fill {
  display: block; height: 100%; width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--olive-500), var(--olive-700));
  border-radius: inherit;
  transition: width 1.3s var(--ease);
}
.project-card .progress-fill { width: 0; }
.project-card.in-view .progress-fill { width: var(--pct); }
.is-complete .progress-fill { background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); }

.progress-meta { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; font-size: 14px; }
.pct { font-weight: 700; color: var(--olive-700); min-width: 3.2ch; }
.is-complete .pct { color: var(--gold-600); }
.remaining { color: var(--ink-soft); }
.remaining b { color: var(--olive-800); white-space: nowrap; }

.project-action { margin-top: 18px; display: flex; gap: 8px; }
.project-action > :first-child { flex: 1; }
.btn-share {
  flex-shrink: 0; width: 46px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  color: var(--olive-700); cursor: pointer; transition: background-color .2s, border-color .2s;
}
.btn-share:hover { background: var(--olive-50); border-color: var(--olive-500); }
.project-card.is-linked { box-shadow: 0 0 0 3px var(--gold-500), var(--shadow); }
.badge-complete {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px;
  background: var(--gold-100); color: var(--gold-600);
  border: 1px solid #E8D9B9; font-weight: 700;
}

/* ---------------- الخدمات ---------------- */
.services-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px;
}
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; display: grid; gap: 8px; align-content: start;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--olive-50); color: var(--olive-700); margin-bottom: 4px;
}
.service-card h3 { font-size: 18px; color: var(--olive-900); }
.service-card p { color: var(--muted); font-size: 15px; }
.services-cta { text-align: center; margin-top: 32px; }
/* سطر هادئ لطلب الخدمة — يلاحظه من يبحث عنه فقط */
.services-note { text-align: center; margin-top: 28px; color: var(--muted); font-size: 15px; }
.services-note a { color: var(--olive-700); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.services-note a:hover { color: var(--gold-600); }

/* ---------------- الأخبار ---------------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); justify-content: center; gap: 22px; }
.news-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-media { aspect-ratio: 16 / 9; background: var(--olive-100); }
.news-media img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 20px 22px; display: grid; gap: 6px; }
.news-body time { color: var(--gold-600); font-size: 13.5px; font-weight: 500; }
.news-body h3 { font-size: 18px; color: var(--olive-900); }
.news-body p { color: var(--muted); font-size: 15px; }

/* ---------------- التقارير والإنجازات ---------------- */
.impact-stats {
  list-style: none; margin: 0 0 32px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px;
}
.impact-stats li {
  background: var(--olive-800); color: #fff; border-radius: var(--radius); padding: 20px;
  display: grid; gap: 2px; text-align: center;
}
.impact-stats strong { font-size: 30px; font-weight: 700; color: var(--gold-100); font-family: var(--font-display); }
.impact-stats span { font-size: 14px; color: rgba(255, 255, 255, .75); }

.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.impact-title { font-size: 18px; color: var(--olive-900); margin-bottom: 12px; }
.done-list, .reports-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.done-list a, .reports-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
}
.done-list a { transition: border-color .2s; }
.done-list a:hover { border-color: var(--olive-500); }
.done-list b, .reports-list b { color: var(--olive-900); font-size: 16px; }
.done-list span, .report-info span { color: var(--muted); font-size: 14px; }
.done-list a::after { content: '✓'; color: var(--gold-600); font-weight: 700; }
.report-info { display: grid; gap: 2px; min-width: 0; }

/* ---------------- الخطوات ---------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--line); position: relative; counter-increment: step; }
.step::after { content: counter(step); position: absolute; top: 20px; inset-inline-end: 24px; font-size: 44px; font-weight: 700; color: var(--olive-100); line-height: 1; }
.step-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--olive-50); color: var(--olive-700); margin-bottom: 16px; }
.step h3 { font-size: 19px; color: var(--olive-900); margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------------- عن الجمعية ---------------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.about-logo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); display: grid; place-items: center; box-shadow: var(--shadow); }
.about-logo img { width: min(100%, 320px); height: auto; }
.about-grid .values { margin-top: 24px; }
.about-text { color: var(--ink-soft); font-size: 17px; margin-top: 14px; }
.about-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.about-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-top: 16px; }
.about-pair .about-box { margin-top: 0; }
.about-box h3 { font-family: var(--font-display); font-size: 19px; color: var(--olive-900); margin-bottom: 8px; }
.about-icon { color: var(--gold-500); font-size: 13px; vertical-align: 3px; }
.about-box p { color: var(--ink-soft); font-size: 15.5px; }
.goals { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; color: var(--ink-soft); font-size: 15.5px; }
.goals li::marker { color: var(--gold-500); }
.about-box .values { margin-top: 4px; }
.about-box .values li { background: var(--olive-50); border-color: var(--olive-100); }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.values li { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--olive-600); border-radius: var(--radius); padding: 16px 20px; }
.values b { color: var(--olive-900); font-size: 17px; }
.values span { color: var(--muted); font-size: 15px; }

/* ---------------- صفحة «عن الجمعية» ---------------- */
.about-more { margin-top: 24px; }
.about-hero { padding-block: 56px 8px; }
.about-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.about-lead { color: var(--ink-soft); font-size: 17px; margin-top: 16px; }
.about-page .about-box h2 { font-family: var(--font-display); font-size: 21px; color: var(--olive-900); margin-bottom: 8px; }
.about-services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.about-services li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  border-inline-start: 4px solid var(--gold-500); padding: 18px 20px; display: grid; gap: 4px;
}
.about-services b { color: var(--olive-900); font-size: 17px; }
.about-services span { color: var(--muted); font-size: 15px; }
.about-official { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.official-light { background: var(--line); }
.official-light div { background: var(--surface); }
.official-light dt { color: var(--muted); }
.official-light dd { color: var(--olive-900); }
.about-cta { text-align: center; display: grid; justify-items: center; gap: 20px; }
@media (max-width: 900px) {
  .about-hero-grid, .about-official { grid-template-columns: 1fr; gap: 28px; }
  .about-hero .about-logo { order: -1; }
}

/* ---------------- الأعضاء المؤسسون ---------------- */
.founders {
  list-style: none; margin: 0; padding: 0; counter-reset: founder;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 10px;
}
.founders li {
  counter-increment: founder;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  color: var(--olive-900); font-size: 15.5px; line-height: 1.6;
}
.founders li::before {
  content: counter(founder);
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--olive-100); color: var(--olive-800);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
@media (max-width: 520px) {
  .founders { grid-template-columns: 1fr; }
  .founders li { font-size: 14.5px; padding: 12px 14px; }
}

/* ---------------- مجلس الإدارة ---------------- */
.board-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 16px;
}
.board-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 18px 22px; text-align: center; display: grid; gap: 6px; justify-items: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.board-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.board-avatar {
  width: 86px; height: 86px; display: block; margin-bottom: 8px;
  border-radius: 50%; overflow: hidden; border: 2px solid var(--gold-500);
}
.board-avatar svg { width: 100%; height: 100%; display: block; }
/* الألوان في CSS لا داخل SVG — متغيّرات CSS غير مدعومة في سمات SVG على بعض متصفحات Safari */
.board-avatar .av-bg { fill: var(--olive-100); }
.board-avatar .av-fg { fill: var(--olive-900); }
.board-name { color: var(--olive-900); font-size: 16px; line-height: 1.5; }
.board-role { color: var(--gold-600); font-size: 13.5px; font-weight: 600; }
.board-quote {
  color: var(--muted); font-size: 14px; line-height: 1.75; margin: 8px 0 0;
  padding-top: 10px; border-top: 1px solid var(--line); width: 100%;
}
.board-quote::before { content: '«'; }
.board-quote::after { content: '»'; }
@media (max-width: 520px) { .board-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .board-card { padding: 20px 12px 18px; } .board-avatar { width: 68px; height: 68px; }
  .board-name { font-size: 14.5px; } .board-quote { font-size: 13px; } }

/* ---------------- قائمة التبرعات في اللوحة ---------------- */
.donations-total { color: var(--muted); margin: 0 0 14px; }
.donations-total b { color: var(--olive-900); }
.donation-row {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 9px;
}
.donation-row .dn-main { display: grid; gap: 2px; min-width: 0; }
.donation-row .dn-main b { color: var(--olive-900); }
.donation-row .dn-main span { font-size: 13.5px; }
.donation-row .dn-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.dn-amount { font-weight: 700; color: var(--olive-800); white-space: nowrap; }
.dn-phone { color: var(--muted); text-decoration: none; }
.dn-phone:hover { color: var(--olive-800); text-decoration: underline; }
.donation-row time { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .donation-row { flex-direction: column; align-items: stretch; } }

/* ---------------- بيانات المتبرع في نافذة التبرع ---------------- */
.donor-fields { border: 0; padding: 0; margin: 18px 0 4px; }
.donor-fields legend { font-weight: 600; color: var(--olive-900); font-size: 15.5px; padding: 0; margin-bottom: 10px; }
.donor-fields legend small { color: var(--muted); font-weight: 400; font-size: 13.5px; }
.donor-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.donor-mode .chip-btn { padding: 11px 6px; font-size: 15px; }
.donor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.donor-grid .field { display: grid; gap: 5px; min-width: 0; }
.donor-grid .field > span { font-size: 13.5px; color: var(--muted); }
.donor-grid input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15.5px;
}
.donor-grid input:focus-visible { outline: 2px solid var(--olive-600); outline-offset: 1px; border-color: transparent; }
.donor-grid input[name="donorPhone"] { direction: ltr; text-align: start; }
.donor-note { color: var(--muted); font-size: 13px; margin: 9px 0 0; line-height: 1.6; }
@media (max-width: 460px) { .donor-grid { grid-template-columns: 1fr; } }

/* ---------------- صفحة 404 ---------------- */
.notfound { text-align: center; max-width: 620px; margin-inline: auto; padding: 40px 0 20px; }
.notfound-code {
  display: block; font-family: var(--font-display); font-size: clamp(74px, 16vw, 128px);
  line-height: 1; color: var(--gold-500); opacity: .5; letter-spacing: 4px;
}
.notfound .section-title { margin-top: 10px; }
.notfound-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }

/* ---------------- صفحة الحوكمة ---------------- */
.governance-page .section-head { margin-bottom: 32px; }
.policy-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 40px; }
.policy-index a {
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.policy-index a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.policy-index b { color: var(--olive-900); font-size: 16.5px; }
.policy-index span { color: var(--muted); font-size: 14.5px; }

.policy {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 38px); margin-bottom: 24px; scroll-margin-top: 100px;
}
.policy-title {
  font-family: var(--font-display); font-size: clamp(21px, 2.6vw, 27px); color: var(--olive-900);
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid var(--gold-500);
}
.policy h3 { font-size: 18px; color: var(--olive-800); margin: 22px 0 8px; }
.policy h3::before { content: '◈ '; color: var(--gold-500); font-size: 12px; vertical-align: 3px; }
.policy p { color: var(--ink-soft); font-size: 16px; margin-bottom: 10px; }
.policy-list { margin: 0 0 14px; padding-inline-start: 22px; display: grid; gap: 8px; color: var(--ink-soft); font-size: 16px; }
.policy-list li::marker { color: var(--gold-500); }

/* ---------------- الفوتر ---------------- */
.site-footer { background: var(--olive-900); color: rgba(255, 255, 255, .78); padding-top: 64px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.2fr .7fr; gap: 48px; padding-bottom: 48px; }
.footer-logo { display: inline-block; background: #fff; border-radius: var(--radius); padding: 16px 20px; }
.footer-logo img { width: 150px; height: auto; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text small { color: var(--gold-400); }
.footer-brand p { margin-block: 16px; }
.footer-title { font-size: 16px; color: #fff; margin-bottom: 16px; font-weight: 700; }
.contact-list, .footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.contact-list span:first-child { color: rgba(255, 255, 255, .5); }
.footer-links a:hover, .contact-list a:hover { color: var(--gold-400); }
.wa-link { color: #7FD3A6; font-weight: 700; }
.social-links { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 10px; }
.social-links a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, .08); color: #fff; transition: background-color .2s, color .2s;
}
.social-links a:hover { background: var(--gold-500); color: var(--olive-900); }
.official { margin: 0; display: grid; gap: 1px; background: rgba(255, 255, 255, .08); border-radius: 14px; overflow: hidden; }
.official div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px; background: var(--olive-900); }
.official dt { color: rgba(255, 255, 255, .55); }
.official dd { margin: 0; color: #fff; font-weight: 700; text-align: end; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 18px; font-size: 13.5px; color: rgba(255, 255, 255, .5); text-align: center; }

/* ---------------- النافذة المنبثقة ---------------- */
.modal {
  width: min(100% - 24px, 580px);
  max-height: min(92vh, 900px);
  padding: 0; border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(28, 34, 22, .55); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .35s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-inner { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }

.modal-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 14px; align-items: center;
  padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.modal-thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--olive-100); }
.modal-head-text { flex: 1; min-width: 0; }
.modal-kicker { font-size: 12.5px; color: var(--muted); }
.modal-head h2 { font-size: 17px; font-weight: 700; color: var(--olive-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-progress { margin-top: 6px; }
.modal-progress small { font-size: 12.5px; color: var(--muted); }
.modal-progress b { color: var(--olive-800); }
.modal-close { align-self: flex-start; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 0; background: var(--olive-50); color: var(--olive-800); cursor: pointer; }
.modal-close:hover { background: var(--olive-100); }

.modal-body { padding: 20px; display: grid; gap: 20px; }

.amount-picker { border: 0; padding: 0; margin: 0; }
.amount-picker legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.amount-picker legend small { color: var(--muted); font-weight: 400; }
.amount-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.chip-complete {
  grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; gap: 8px;
  border-color: var(--gold-500); color: var(--olive-900);
}
.chip-complete small { color: var(--olive-700); font-weight: 700; }
.chip-complete[aria-pressed="true"] small { color: rgba(255, 255, 255, .85); }
.chip-btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 10px 6px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.chip-btn small { font-weight: 400; color: var(--muted); }
.chip-btn:hover { border-color: var(--olive-500); }
.chip-btn[aria-pressed="true"] { background: var(--olive-700); border-color: var(--olive-700); color: #fff; }
.chip-btn[aria-pressed="true"] small { color: rgba(255, 255, 255, .75); }
.amount-custom { position: relative; display: block; margin-top: 8px; }
.amount-custom input { width: 100%; padding: 11px 16px; padding-inline-end: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.amount-custom .currency { position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }

.pay-step { display: grid; gap: 12px; }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--olive-900); }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--olive-700); color: #fff; font-size: 14px; flex-shrink: 0; }

.bank-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.bank-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bank-name { font-weight: 700; color: var(--olive-800); }
.sample-flag { font-size: 11.5px; background: #FBEFEC; color: var(--danger); padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.bank-rows { margin: 0; display: grid; gap: 4px; }
.bank-rows div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14.5px; }
.bank-rows dt { color: var(--muted); }
.bank-rows dd { margin: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.iban-box {
  margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--olive-50); border: 1px dashed var(--olive-200); border-radius: 12px; padding: 12px 14px;
}
.iban-label { display: block; font-size: 12.5px; color: var(--muted); }
.iban { display: block; font-weight: 700; font-size: 16px; letter-spacing: .5px; color: var(--olive-900); font-variant-numeric: tabular-nums; }
.icon-btn { border: 0; background: transparent; color: var(--olive-600); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--olive-50); }
.btn-copy { background: var(--olive-700); color: #fff; padding: 8px 14px; font-size: 14px; }
.btn-copy:hover { background: var(--olive-800); }
.btn-copy.copied, .icon-btn.copied { background: var(--gold-600); color: #fff; }

.segmented { display: flex; width: 100%; }
.segmented button { flex: 1; }
.tab-panel { display: grid; gap: 12px; }
.wa-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink-soft); font-size: 15px; }

.dropzone {
  position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px; border: 2px dashed var(--olive-200); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--olive-500); background: var(--olive-50); }
.dropzone.has-file { border-style: solid; border-color: var(--olive-500); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--olive-50); color: var(--olive-700); flex-shrink: 0; }
.dz-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.dz-text small { color: var(--muted); }
.dz-file { width: 100%; font-size: 14px; font-weight: 700; color: var(--olive-700); overflow-wrap: anywhere; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 400; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--olive-500); box-shadow: 0 0 0 3px rgba(118, 135, 95, .2); }
.form-error { color: var(--danger); background: #FBEFEC; border-radius: 10px; padding: 8px 12px; font-size: 14px; }

.success-view { text-align: center; justify-items: center; padding-block: 40px; }
.success-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--olive-100); color: var(--olive-700); }
.success-icon svg { width: 38px; height: 38px; }
.success-view h3 { font-size: 22px; color: var(--olive-900); }
.success-view p { color: var(--ink-soft); max-width: 40ch; }

/* ---------------- زر الاستفسار الثابت ---------------- */
.contact-fab {
  position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--whatsapp); color: #fff;
  padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  box-shadow: 0 10px 28px -10px rgba(31, 143, 85, .8);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.contact-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(31, 143, 85, .9); }
.fab-text { display: grid; line-height: 1.3; }
.fab-text b { font-size: 13px; font-weight: 500; opacity: .9; }
@media (max-width: 560px) {
  .contact-fab { inset-inline-start: 14px; bottom: 14px; padding: 12px; }
  .fab-text { display: none; }
}
@media print { .contact-fab { display: none; } }

.bank_fallback { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.bank_fallback summary { cursor: pointer; font-weight: 700; color: var(--olive-700); }
.bank_fallback .pay-step:first-child .step-title { display: none; }

/* ---------------- التنبيهات ---------------- */
.toast-host { position: fixed; bottom: 24px; inset-inline: 0; display: grid; justify-items: center; gap: 8px; z-index: 1000; pointer-events: none; }
.toast { background: var(--olive-900); color: #fff; padding: 10px 20px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 500; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); }

/* ---------------- الاستجابة ---------------- */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-logo img { width: min(100%, 220px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  /* قائمة جانبية منزلقة من اليمين */
  .site-header .main-nav {
    position: fixed;
    top: 0; bottom: 0; right: 0; left: auto;
    height: 100dvh; width: min(320px, 86vw);
    margin: 0; z-index: 60;
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px 16px 28px;
    background: var(--surface); border-left: 1px solid var(--line);
    box-shadow: 0 0 60px -20px rgba(28, 34, 22, .5);
    transform: translateX(105%);
    transition: transform .3s var(--ease);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .site-header .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 12px; border-radius: 12px; font-size: 16px; }
  .main-nav a + a { border-top: 1px solid var(--line); border-radius: 0; }
  .nav-drawer-head {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
  }
  .nav-drawer-head span { flex: 1; font-weight: 700; font-size: 15px; color: var(--olive-900); line-height: 1.4; }
  .nav-close {
    width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0;
    border: 0; border-radius: 12px; background: var(--olive-50); color: var(--olive-800); cursor: pointer;
  }
  .nav-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(28, 34, 22, .5); backdrop-filter: blur(2px); }
  body.nav-open { overflow: hidden; }
  .site-header { position: sticky; }
  .header-inner { position: static; }
}
@media (max-width: 560px) {
  .ayah { gap: 10px; }
  .hero-ayah { margin-bottom: 28px; }
  .header-inner { min-height: 64px; gap: 12px; }
  .brand-mark { height: 48px; }
  .brand-text strong { font-size: 16px; }
  .header-actions .btn { display: none; }
  .hero { padding-block: 40px 56px; }
  .lead { font-size: 16px; }
  .hero-cta .btn { flex: 1; }
  .section { padding-block: 60px; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal { width: 100%; max-width: 100%; max-height: 94vh; margin: auto auto 0; border-radius: 22px 22px 0 0; }
  .amount-chips { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .iban-box { flex-direction: column; align-items: stretch; }
  .iban { font-size: 15px; white-space: nowrap; letter-spacing: 0; }
  .btn-copy { width: 100%; }
  .modal-thumb { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
