@charset "utf-8";

/* ================================================================
   صندوق الدعم والتنمية — تنسيق الموقع
   الخطوط محمولة مع الموقع، فلا يتعلّق ظهورُه بخدمةٍ خارجية.
   ================================================================ */

@font-face {
  font-family: "SDF Naskh";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/naskh-400.woff2") format("woff2");
}
@font-face {
  font-family: "SDF Naskh";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/naskh-700.woff2") format("woff2");
}
@font-face {
  font-family: "SDF Sans";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nsa-400.woff2") format("woff2");
}
@font-face {
  font-family: "SDF Sans";
  font-weight: 600;
  font-display: swap;
  src: url("fonts/nsa-600.woff2") format("woff2");
}
@font-face {
  font-family: "SDF Sans";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nsa-700.woff2") format("woff2");
}

:root {
  --navy: #2e3853;
  --navy-soft: #4a5884;
  --sand: #faf9f6;
  --paper: #ffffff;
  --ink: #1b1b1b;
  --muted: #5d6460;
  --line: #e2e0da;
  --accent: #d0ab54;
  --shadow: 0 1px 2px rgba(46, 56, 83, .06),
            0 8px 24px rgba(46, 56, 83, .09);
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "SDF Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.95;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

a { color: var(--navy-soft); text-decoration-thickness: 1px;
    text-underline-offset: 3px; }
a:hover { color: var(--navy); }

/* ---------------- الترويسة ---------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 72px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; margin-inline-end: auto; }
.brand a { color: #fff; text-decoration: none; }
.brand .mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: "SDF Sans", sans-serif; font-size: 12.5px; font-weight: 700;
  line-height: 1; letter-spacing: .8px; direction: ltr;
  padding-inline-start: .8px;
}
.brand .name {
  font-family: "SDF Naskh", serif; font-size: 20px; font-weight: 700;
  line-height: 1.35;
}
.brand .sub {
  display: block; font-family: "SDF Sans", sans-serif;
  font-size: 12.5px; font-weight: 400; opacity: .72; letter-spacing: .2px;
}

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: rgba(255, 255, 255, .86); text-decoration: none;
  padding: 8px 14px; border-radius: 999px; font-size: 15.5px;
}
.site-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600;
}

/* ---------------- الواجهة ---------------- */

.hero {
  background: var(--navy);
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
}
.hero::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: rgba(255, 255, 255, .12);
}
.hero h1 {
  font-family: "SDF Naskh", serif;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.45; margin: 0 0 18px; font-weight: 700;
}
.hero p {
  font-size: clamp(17px, 2.2vw, 19.5px);
  max-width: 62ch; margin: 0 0 14px; color: rgba(255, 255, 255, .9);
}
.hero .eyebrow {
  font-size: 13.5px; letter-spacing: 2px; text-transform: none;
  color: var(--accent); margin: 0 0 14px; font-weight: 600;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }
}

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent; transition: .15s ease;
}
.btn-solid { background: #fff; color: var(--navy); }
.btn-solid:hover { background: #e9ecf3; color: var(--navy); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08);
                   color: #fff; }

/* ---------------- الأقسام ---------------- */

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-family: "SDF Naskh", serif;
  font-size: clamp(23px, 3.4vw, 30px);
  color: var(--navy); margin: 0 0 8px; font-weight: 700; line-height: 1.5;
}
h3 {
  font-size: 19px; color: var(--navy-soft); margin: 26px 0 8px;
  font-weight: 600;
}
.lede { color: var(--muted); max-width: 70ch; margin: 0 0 26px; }
p { margin: 0 0 14px; max-width: 74ch; }

ul, ol { max-width: 74ch; padding-inline-start: 22px; margin: 0 0 16px; }
li { margin-bottom: 7px; }
ol.ar { list-style: arabic-indic; padding-inline-start: 26px; }
ol.ar::marker, ol.ar > li::marker { color: var(--navy); }

.grid { display: grid; gap: 18px; margin-top: 26px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 17.5px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #edf0f7; color: var(--navy);
  font-family: "SDF Naskh", serif; font-size: 15px; font-weight: 700;
  margin-bottom: 10px;
}

.note {
  background: #edf0f7; border-inline-start: 3px solid var(--navy);
  border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 22px 0;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--navy); }

.todo {
  background: #fcf6e9; border: 1px dashed var(--accent);
  border-radius: 10px; padding: 18px 22px; margin: 22px 0;
}
.todo p:last-child { margin-bottom: 0; }
.todo strong { color: #8a6f28; }

/* ---------------- الخطوات ---------------- */

.steps { counter-reset: step; list-style: none; padding: 0;
         margin: 26px 0 0; max-width: 76ch; }
.steps li {
  counter-increment: step; position: relative;
  padding-inline-start: 56px; padding-bottom: 26px; margin: 0;
}
.steps li::before {
  content: counter(step, arabic-indic);
  position: absolute; inset-inline-start: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: "SDF Naskh", serif; font-size: 16px; font-weight: 700;
}
.steps li::after {
  content: ""; position: absolute;
  inset-inline-start: 17.5px; top: 40px; bottom: 4px; width: 1px;
  background: var(--line);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { margin: 4px 0 4px; font-size: 17.5px; }
.steps p { margin-bottom: 0; }

/* ---------------- النظام الداخلي ---------------- */

.doc-layout {
  display: grid; gap: 40px; align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .doc-layout { grid-template-columns: 250px 1fr; }
}

.toc {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .toc { position: sticky; top: 92px; max-height: calc(100vh - 120px);
         overflow-y: auto; }
}
.toc h2 { font-size: 16px; margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.toc li { margin-bottom: 2px; }
.toc a {
  display: block; padding: 6px 10px; border-radius: 6px;
  text-decoration: none; color: var(--muted); line-height: 1.6;
}
.toc a:hover { background: #edf0f7; color: var(--navy); }

.chapter { margin-bottom: 44px; }
.chapter > h2 {
  border-bottom: 2px solid var(--navy); padding-bottom: 8px;
  margin-bottom: 20px;
}
.chapter .kicker {
  display: block; font-family: "SDF Sans", sans-serif; font-size: 13px;
  font-weight: 600; letter-spacing: 1.4px; color: var(--accent);
  margin-bottom: 4px;
}

.article {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 26px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.article > h3 {
  font-family: "SDF Naskh", serif; font-size: 19.5px; font-weight: 700;
  color: var(--navy); margin: 0 0 12px;
}
.article h4 {
  font-size: 16px; color: var(--navy-soft); margin: 18px 0 6px;
  font-weight: 600;
}
.article ol { padding-inline-start: 24px; }
.article ul { list-style: "–  "; padding-inline-start: 22px; }
.article .tail { color: var(--muted); font-size: 16px; margin-top: 12px; }
.article dl { margin: 0; }
.article dt {
  font-weight: 700; color: var(--navy); margin-top: 12px;
}
.article dd { margin: 0 0 0 0; padding-inline-start: 0; }

.sign {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 16px;
}
.sign strong { color: var(--ink); }

/* ---------------- وسائل التبرّع ---------------- */

.channels { display: grid; gap: 16px; margin-top: 24px;
            grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.channel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px 22px; box-shadow: var(--shadow);
}
.channel h3 { margin: 0 0 10px; font-size: 17px; }
.channel dl { margin: 0; font-size: 16px; }
.channel dt { color: var(--muted); font-size: 14px; margin-top: 10px; }
.channel dt:first-child { margin-top: 0; }
.channel dd {
  margin: 2px 0 0; font-weight: 600; direction: ltr; text-align: right;
  unicode-bidi: plaintext; word-break: break-word;
}
.channel dd.rtl { direction: rtl; font-weight: 600; }

/* ---------------- التذييل ---------------- */

.site-foot {
  background: var(--navy); color: rgba(255, 255, 255, .82);
  padding: 44px 0 32px; font-size: 15px; margin-top: 20px;
}
.site-foot .wrap { display: grid; gap: 28px;
                   grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-foot h3 { color: #fff; font-size: 16px; margin: 0 0 10px; }
.site-foot a { color: rgba(255, 255, 255, .86); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 6px; }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 32px;
  padding-top: 18px; font-size: 13.5px; color: rgba(255, 255, 255, .6);
}

/* ---------------- الطباعة ---------------- */

@media print {
  .site-head, .site-foot, .toc, .hero-actions { display: none; }
  body { background: #fff; font-size: 11pt; }
  .article { box-shadow: none; border: none; padding: 0; margin-bottom: 14px;
             break-inside: avoid; }
  .chapter { break-before: page; }
  .doc-layout { grid-template-columns: 1fr; }
}
