/* صفحة التبرع: مكوّنات خاصة بها فقط */

/* الرأس: px-hero */
.d-hero .px-hero__h { max-width: 12em; }
.d-stats-row { margin-bottom: clamp(28px, 4vw, 44px); }

/* الحملة الحالية */
.d-feat { display: grid; border-radius: var(--r-lg); overflow: hidden; background: hsl(var(--card)); box-shadow: var(--shadow-lift); }
@media (min-width: 960px) { .d-feat { grid-template-columns: 1fr 1.05fr; } }
.d-feat__media { position: relative; margin: 0; min-height: 260px; background: hsl(var(--tint)); }
.d-feat__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-feat__body { display: grid; gap: 12px; align-content: center; padding: clamp(24px, 3.4vw, 44px); }
.d-feat__nums { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 18px; font-size: 15px; color: hsl(var(--fg-2)); }
.d-feat__nums span:first-child b, .d-feat__nums span:nth-child(3) b { font-size: 26px; }
.d-feat__nums span:nth-child(3) { grid-row: 1; grid-column: 2; }
.d-feat__nums span:nth-child(4) { grid-column: 2; text-align: end; }
.d-feat__nums b { color: hsl(var(--fg)); font-size: 18px; font-variant-numeric: tabular-nums; }
.d-buys { margin-top: 6px; padding-top: 14px; border-top: 1px solid hsl(var(--border)); }
.d-buys__h { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.d-buys ul { display: grid; gap: 8px; }
@media (min-width: 560px) { .d-buys ul { grid-template-columns: 1fr 1fr; } }
.d-buys li { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: hsl(var(--tint)); }
.d-buys b { font-size: 22px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--red); }
.d-buys span { font-size: 14.5px; line-height: 1.5; }
.d-feat__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 8px; }

/* شريط التصفية */
.d-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.d-filter button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid hsl(var(--border)); background: hsl(var(--card)); font-weight: 600; font-size: 15px; color: hsl(var(--fg-2)); transition: border-color .2s, background-color .2s, color .2s; }
.d-filter button:hover { border-color: hsl(38 12% 62%); color: hsl(var(--fg)); }
.d-filter button[aria-pressed="true"] { background: hsl(var(--fg)); border-color: hsl(var(--fg)); color: #fff; }
@media (max-width: 759px) { .d-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); } .d-filter::-webkit-scrollbar { display: none; } .d-filter button { flex: none; } }
.d-filter i { font-style: normal; font-size: 12.5px; opacity: .7; font-variant-numeric: tabular-nums; }

/* بطاقات البرامج */
.d-progs { display: grid; gap: 20px; }
@media (min-width: 860px) { .d-progs { grid-template-columns: 1fr 1fr; } }
.d-prog { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: hsl(var(--card)); box-shadow: var(--shadow-card); }
.d-prog[hidden] { display: none; }
.d-prog__img { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: hsl(var(--tint)); }
.d-prog__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.d-prog:hover .d-prog__img img { transform: scale(1.03); }
.d-prog__body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; flex: 1; }
.d-prog__k { font-size: 13.5px; font-weight: 600; color: var(--red); }
.d-prog h3 { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.3; }
.d-prog__desc { color: hsl(var(--fg-2)); line-height: 1.75; font-size: 15.5px; }
.d-prog .btn { align-self: start; }
@media (min-width: 860px) {
  .d-prog--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.05fr 1fr; }
  .d-prog--wide .d-prog__img { aspect-ratio: auto; min-height: 100%; }
  .d-prog--wide .d-prog__body { padding: 32px 36px; }
  .d-prog--wide h3 { font-size: 32px; }
  .is-filtered .d-prog--wide { grid-template-columns: 1fr 1fr; }
}

/* أسعار الوحدة: كل سطر زر */
.d-units { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d-units > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.d-prog:not(.d-prog--wide) .d-stats { margin-top: auto; }
.d-units a { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; height: 100%; min-height: 64px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid hsl(var(--border)); transition: border-color .2s, background-color .2s; }
.d-units a:hover { border-color: var(--red); background: rgba(196, 37, 47, .04); }
.d-units b { flex-shrink: 0; font-size: 20px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--red); }
.d-units span { font-size: 14.5px; line-height: 1.45; }
.d-unit-note { font-size: 14.5px; line-height: 1.6; padding: 10px 12px; border-radius: var(--r-sm); background: hsl(var(--tint)); color: hsl(var(--fg-2)); }

/* أرقام البرنامج */
.d-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid hsl(var(--border)); }
.d-prog--wide .d-stats { grid-template-columns: repeat(4, 1fr); }
.d-stats div { padding: 12px 0; display: flex; flex-direction: column-reverse; gap: 0; }
.d-stats div + div { border-inline-start: 1px solid hsl(var(--border)); padding-inline-start: 12px; }
.d-stats dd { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-stats dt { font-size: 12.5px; color: hsl(var(--fg-2)); }
@media (max-width: 459px) { .d-prog--wide .d-stats { grid-template-columns: 1fr 1fr; } .d-prog--wide .d-stats div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid hsl(var(--border)); } .d-prog--wide .d-stats div:nth-child(4) { border-top: 1px solid hsl(var(--border)); } .d-stats dd { font-size: 18px; } }

/* المشروع المفتوح */
.d-open { display: grid; gap: 6px; }
.d-open p { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: hsl(var(--fg-2)); }
.d-open p b { color: hsl(var(--fg)); font-variant-numeric: tabular-nums; }
.d-open small { font-size: 13px; color: hsl(var(--fg-2)); font-variant-numeric: tabular-nums; }
.d-aside { margin-top: 28px; padding-top: 18px; border-top: 1px solid hsl(var(--border)); color: hsl(var(--fg-2)); }

/* ما وصل حتى الآن */
@media (min-width: 900px) {
}

/* التبرع العام */
.d-general { display: grid; gap: 24px; align-items: end; padding: clamp(28px, 4vw, 52px); border-radius: var(--r-lg); background: hsl(var(--card)); box-shadow: var(--shadow-card); border-inline-start: 6px solid var(--red); }
@media (min-width: 960px) { .d-general { grid-template-columns: 1fr auto; gap: 48px; } }
.d-general .h2 { max-width: 24ch; }
.d-general__act { display: grid; gap: 8px; justify-items: start; }

/* طرق العطاء */
.d-ways { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .d-ways { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.d-kinds { display: grid; border-top: 1px solid hsl(var(--border)); }
.d-kinds li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 20px; padding: 18px 0; border-bottom: 1px solid hsl(var(--border)); }
.d-kinds li > div { display: grid; gap: 2px; flex: 1 1 18rem; }
.d-kinds b { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.4; }
.d-kinds span { color: hsl(var(--fg-2)); font-size: 15.5px; line-height: 1.7; }
@media (max-width: 559px) { .d-kinds li { gap: 8px; } .d-kinds li > div { flex-basis: 100%; } }
.d-kinds--olive b { color: hsl(86 60% 26%); }
.d-kinds--olive .link { color: hsl(86 60% 26%); }
.d-pay { display: grid; gap: 14px; padding: 26px; border-radius: var(--r-md); background: hsl(var(--card)); box-shadow: var(--shadow-card); }
@media (min-width: 1024px) { .d-pay { position: sticky; top: 140px; } }
.d-pay h3 { font-family: var(--display); font-size: 24px; }
.d-pay__list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d-pay__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.d-pay__list li.pm { display: flex; align-items: center; justify-content: center; text-align: center; height: auto; min-height: 52px; padding: 8px 10px; border-radius: var(--r-sm); background: hsl(var(--bg)); border: 1px solid hsl(var(--border)); color: var(--ink); font-size: 14px; }
.d-pay__list .pm--bank { gap: 6px; font-family: inherit; }
.d-ways > * { min-width: 0; }
@media (max-width: 559px) { .d-pay__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.d-pay > p { color: hsl(var(--fg-2)); font-size: 15px; line-height: 1.8; }
.d-pay a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* سجل التسليم */
.d-log { display: grid; border-top: 2px solid hsl(var(--fg)); }
.d-log li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-bottom: 1px solid hsl(var(--border)); }
.d-log time { font-size: 13.5px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.d-log b { font-weight: 600; font-size: 16.5px; line-height: 1.6; }
.d-log li > span { font-size: 14.5px; color: hsl(var(--fg-2)); }
.d-log .d-log__n { color: hsl(var(--fg)); font-weight: 700; font-variant-numeric: tabular-nums; }
.d-log__h { display: none !important; }
@media (max-width: 759px) { .d-log li { grid-template-columns: auto 1fr; column-gap: 14px; } .d-log time, .d-log b { grid-column: 1 / -1; } }
@media (min-width: 760px) {
  .d-log li { grid-template-columns: 9.5rem 1fr 9rem 9rem; gap: 16px; align-items: baseline; padding: 16px 0; }
  .d-log__h { display: grid !important; font-size: 12.5px; font-weight: 600; color: hsl(var(--fg-2)); padding: 10px 0 !important; }
}
.d-log__foot { margin-top: 18px; font-size: 14.5px; color: hsl(var(--fg-2)); }

/* تصحيحات بعد المعاينة */
.d-general { border-inline-start: 0; background: hsl(var(--tint)); box-shadow: none; }

/* النسخة المستقلة: أرقام موحدة وخانات «تُحدَّث» */
.d-stats { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)) !important; }
.d-stats .d-tbd { font-size: 15px; font-weight: 600; color: hsl(var(--fg-2)); white-space: normal; }
.d-feat__media figcaption { position: absolute; z-index: 1; inset-inline-start: 16px; bottom: 14px; color: rgba(255, 255, 255, .85); }
.d-feat__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(27, 22, 19, .55), transparent 40%); pointer-events: none; }
.d-feat__media .badge { z-index: 1; }
.d-buys b { font-size: 14px; color: var(--red-ink); letter-spacing: .04em; }
#relief .shead { margin-bottom: var(--s-5); }
#relief .d-filter { margin-bottom: var(--s-6); }
.d-log .d-log__p { font-size: 13.5px; font-weight: 700; color: var(--red-ink); }
@media (max-width: 759px) { .d-log .d-log__p, .d-log b { grid-column: 1 / -1; } }
@media (min-width: 760px) { .d-log li { grid-template-columns: 7rem 1fr 9rem 11rem; } }
#done .shead .lead .link { display: inline; min-height: 0; }
@media (min-width: 860px) { .d-prog--wide .d-prog__img img { position: absolute; inset: 0; } .d-prog--wide .d-prog__img { min-height: 420px; } }

/* ===== جولة الخبراء ===== */
/* البرامج على الجوال: شريط أفقي بدل عمود من خمس شاشات */
@media (max-width: 859px) {
  .d-progs { grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; scroll-padding-inline: var(--gutter); }
  .d-progs::-webkit-scrollbar { display: none; }
  .d-prog { scroll-snap-align: start; }
  .is-filtered.d-progs { grid-auto-columns: 100%; }
}
/* التبرع العام + طريقان */
.d-paths { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 800px) { .d-paths { grid-template-columns: 1fr 1fr; } }
.d-path { display: grid; grid-template-columns: 38% 1fr; min-height: 200px; border-radius: var(--r-md); overflow: hidden; background: hsl(var(--card)); box-shadow: var(--shadow-card); transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.d-path:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.d-path__img { position: relative; margin: 0; background: hsl(var(--tint)); }
.d-path__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-path__body { display: grid; gap: 6px; align-content: center; padding: 20px 22px; }
.d-path__k { font-size: 13.5px; font-weight: 700; color: var(--red-ink); }
.d-path__t { font-family: var(--display); font-size: var(--fs-h3, 22px); line-height: 1.4; font-weight: 700; }
.d-path__d { font-size: 15px; line-height: 1.7; color: hsl(var(--fg-2)); }
.d-path__d b { color: hsl(var(--fg)); font-size: 17px; }
.d-path__go { margin-top: 4px; font-weight: 700; color: var(--red-ink); }
.d-path:hover .d-path__go { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 459px) { .d-path { grid-template-columns: 1fr; } .d-path__img { aspect-ratio: 2 / 1; } }
@media (max-width: 859px) { .d-units { grid-template-columns: repeat(2, minmax(0, 1fr)); } .d-units a { min-height: 60px; padding: 8px 12px; } .d-units span { font-size: 13.5px; } }

/* جدار العائلات الخمسمئة في بطاقة الحملة */
.d-wall { display: grid; gap: 10px; margin-block: 6px 4px; }
.d-wall .px-bricks { --cols: 50; --cols-m: 25; --cols-s: 25; gap: 2px; }

/* الحركات فوق السطر الأول من العنوان تحتاج نفَسًا تحت الوسم */
.d-hero .px-hero__eyebrow { margin-bottom: 22px; }
/* الإطلاق بالعملات الرقمية: شارة العملات المنشورة بعرض السطر، ولا قائمة فارغة */
.d-pay__list .pm--cx { grid-column: 1 / -1; gap: 8px; font-weight: 700; letter-spacing: .02em; }
.d-pay__list:not(:has(> li:not([hidden]))) { display: none; }
