/* ================================================================
   للمؤسسات: مكوّنات خاصة بالصفحة (تكمّل styles.css وpages.css)
   ================================================================ */

/* ———— الرأس: أرقام على الصورة ———— */
.ihero .wrap { gap: 36px; }
.ihero h1 { max-width: 16ch; }
.ihero .kpis { border-color: rgba(255, 255, 255, .22); margin-top: 8px; }
.ihero .kpis b { color: #fff; font-size: clamp(30px, 3.6vw, 48px); }
.ihero .kpis span { color: rgba(255, 255, 255, .86); }
.ihero .kpis small { color: rgba(255, 255, 255, .7); }
@media (min-width: 860px) { .ihero .kpis > div + div { border-color: rgba(255, 255, 255, .22); } }
.ihero__src { font-size: 12.5px; color: rgba(255, 255, 255, .66); }

/* ———— القطاعات: صفوف لا بطاقات ———— */
.svc { display: grid; border-top: 1px solid hsl(var(--border)); }
.svc > li { display: grid; gap: 10px 32px; padding: 26px 0; border-bottom: 1px solid hsl(var(--border)); }
@media (min-width: 900px) { .svc > li { grid-template-columns: 60px minmax(0, 1.05fr) minmax(0, 1.4fr) minmax(0, .9fr); align-items: start; } }
.svc__n { font-size: 13px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; padding-top: 6px; }
.svc h3 { font-family: var(--display); font-size: clamp(21px, 2vw, 25px); line-height: 1.4; }
.svc h3 small { display: block; margin-top: 4px; font-family: var(--text); font-size: 13.5px; font-weight: 600; color: hsl(var(--fg-2)); }
.svc p { color: hsl(var(--fg-2)); line-height: 1.8; }
.svc ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.svc ul li { font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: hsl(var(--tint)); }
.svc__proof { display: grid; gap: 2px; align-content: start; }
.svc__proof b { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.svc__proof span { font-size: 13.5px; color: hsl(var(--fg-2)); }

/* ———— الفهرس ———— */
.cat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.cat > * { min-width: 0; }
@media (min-width: 1080px) { .cat { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; } }
.cat__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cat__filters button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-size: 14.5px; font-weight: 600; color: hsl(var(--fg-2)); transition: background-color .2s, color .2s, border-color .2s; }
.cat__filters button:hover { border-color: hsl(var(--fg-2)); color: hsl(var(--fg)); }
.cat__filters button[aria-pressed="true"] { background: hsl(var(--fg)); border-color: hsl(var(--fg)); color: #fff; }
.cat__group { margin-top: 12px; border-radius: var(--r-md); background: hsl(var(--tint)); padding: 0 18px; }
.cat__group[open] { padding-bottom: 18px; }
.cat__group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.cat__group > summary::-webkit-details-marker { display: none; }
.cat__group > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease); }
.cat__group[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.cat__group > summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 8px; }
.cat__group[hidden] { display: none; }
.cat__group h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-family: var(--display); font-size: 21px; }
.cat__group h3 small { font-family: var(--text); font-size: 13px; font-weight: 600; color: hsl(var(--fg-2)); }
.cat__items { display: grid; gap: 14px; }
@media (min-width: 700px) { .cat__items { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat__items > .ci:last-child:nth-child(odd) { grid-column: 1 / -1; } }

.ci { display: grid; gap: 10px; grid-template-rows: auto 1fr auto; padding: 20px; border-radius: var(--r-md); background: hsl(var(--card)); border: 1px solid hsl(var(--border)); transition: border-color .2s, box-shadow .2s; }
.ci.is-on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.ci__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.ci h4 { font-size: 17px; font-weight: 700; line-height: 1.45; }
.ci__done { font-size: 12.5px; font-weight: 700; color: hsl(88 48% 22%); white-space: nowrap; }
.ci__done--live { color: var(--red); }
.ci p { font-size: 14.5px; line-height: 1.7; color: hsl(var(--fg-2)); }
.ci__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed hsl(var(--border)); }
.ci__price { font-size: 13.5px; color: hsl(var(--fg-2)); }
.ci__price b { font-size: 18px; color: hsl(var(--fg)); font-variant-numeric: tabular-nums; margin-inline-end: 2px; }
.ci__price .q { font-weight: 600; font-size: 13px; color: hsl(var(--fg-2)); }

.qty { display: inline-flex; align-items: center; border: 1px solid hsl(38 12% 62%); border-radius: 12px; overflow: hidden; background: hsl(var(--card)); }
.qty button { width: 44px; height: 44px; font-size: 20px; font-weight: 600; color: hsl(var(--fg)); }
.qty button:hover { background: hsl(var(--tint)); }
.qty button:disabled { opacity: .35; cursor: default; background: none; }
.qty input { width: 64px; height: 44px; border: 0; border-inline: 1px solid hsl(var(--border)); text-align: center; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent; color: hsl(var(--fg)); -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* الملخص الثابت */
.basket { position: sticky; bottom: 8px; z-index: 30; display: grid; gap: 12px; padding: 18px; border-radius: var(--r-md); background: hsl(var(--fg)); color: #fff; box-shadow: 0 20px 40px -20px rgba(23, 17, 15, .6); }
@media (min-width: 1080px) { .basket { top: calc(var(--nav-total) + 4px + 62px + 16px); bottom: auto; padding: 24px; } }
.basket__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.basket__row span { font-size: 14px; color: var(--linen-ink); }
.basket__row b { font-size: 24px; font-variant-numeric: tabular-nums; }
.basket__total b { font-size: clamp(20px, 2.2vw, 26px); }
.basket__list { display: none; gap: 6px; max-height: 260px; overflow: auto; font-size: 14px; color: var(--linen-ink); padding-block: 4px; border-block: 1px solid rgba(255, 255, 255, .14); }
.basket__list li { display: flex; justify-content: space-between; gap: 10px; padding-block: 4px; }
.basket__list li b { color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.basket__list:not(:empty) { display: grid; }
@media (max-width: 1079px) { .basket__list { display: none !important; } .basket h3, .basket__fine { display: none; } }
.basket h3 { font-family: var(--display); font-size: 21px; color: #fff; }
.basket__fine { font-size: 13px; color: var(--linen-ink); line-height: 1.7; }
.basket .btn[aria-disabled="true"] { opacity: 1; pointer-events: none; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .55); box-shadow: none; border-color: transparent; }
.basket__actions { display: flex; gap: 8px; }
.basket__actions .btn { flex: 1; }
.basket__clear { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 14px; font-weight: 600; }
.basket__clear:hover { border-color: #fff; }

.req { margin-top: 48px; display: grid; gap: 28px; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-lg); background: hsl(var(--card)); box-shadow: var(--shadow-card); }
@media (min-width: 960px) { .req { grid-template-columns: .8fr 1.2fr; gap: 48px; } }
.req h3 { font-family: var(--display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.35; }
.req ol { display: grid; gap: 12px; margin-top: 18px; counter-reset: r; }
.req ol li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; color: hsl(var(--fg-2)); line-height: 1.7; counter-increment: r; }
.req ol li::before { content: counter(r); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: hsl(var(--tint)); color: hsl(var(--fg)); font-weight: 700; font-size: 14px; }
.req .form { max-width: none; }

/* ———— كيف نعمل: ست مراحل ———— */
.flow { display: grid; gap: 0; counter-reset: f; }
@media (min-width: 1000px) { .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.flow li { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px 0 26px; padding-inline-start: 44px; border-top: 1px solid rgba(255, 255, 255, .14); }
@media (min-width: 1000px) { .flow li { padding: 26px 18px 0 0; padding-inline-start: 0; padding-inline-end: 18px; border-top: 2px solid rgba(255, 255, 255, .18); } .flow li:first-child { border-top-color: var(--red); } }
.flow li::before { counter-increment: f; content: counter(f); position: absolute; inset-inline-start: 0; top: 22px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; }
@media (min-width: 1000px) { .flow li::before { position: static; margin-bottom: 6px; } }
.flow b { font-family: var(--display); font-size: 20px; color: #fff; line-height: 1.4; }
@media (min-width: 1000px) { .flow li { grid-template-rows: auto minmax(2.8em, auto) 1fr auto; } .flow b { align-self: start; } .flow .sla { align-self: end; margin-top: 8px; } }
.flow p { font-size: 15px; line-height: 1.75; color: var(--linen-ink); }
.flow .sla { justify-self: start; display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, .1); color: #fff; }
.dark .qa details { border-color: rgba(255, 255, 255, .14); }
.dark .qa summary { color: #fff; }
.dark .qa summary::after { color: var(--linen-ink); }
.dark .qa details > div { color: var(--linen-ink); }
.how-grid { display: grid; gap: 40px; margin-top: 56px; }
.how-h { font-family: var(--display); font-size: var(--fs-h3-lg); line-height: var(--lh-h3-lg); color: #fff; margin-bottom: 6px; }
@media (min-width: 960px) { .how-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; } }
.need { display: grid; gap: 10px; margin-top: 14px; }
.need li { display: flex; gap: 10px; color: var(--linen-ink); line-height: 1.7; }
.need li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin-top: .7em; border-radius: 2px; background: var(--red); transform: rotate(45deg); }

/* ———— التوثيق ———— */
.doc-table td:first-child { white-space: nowrap; }
.doc-table td:first-child b { display: inline; font-family: var(--display); font-size: 18px; vertical-align: middle; }
.doc-table td:first-child small { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: hsl(var(--tint)); color: var(--red-ink, var(--red)); font-size: 13px; font-weight: 700; margin-inline-end: 10px; vertical-align: middle; }
.doc-table td { vertical-align: top; }
.doc-table td { line-height: 1.7; }
.doc-table td:nth-child(3), .doc-table td:nth-child(4) { white-space: nowrap; }
@media (max-width: 760px) {
  .doc-table thead { display: none; }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; width: 100%; }
  .doc-table tr { padding: 14px 0; border-bottom: 1px solid hsl(var(--border)); }
  .doc-table td { border: 0; padding: 4px 0; white-space: normal !important; }
  .doc-table td[data-k]::before { content: attr(data-k) ": "; font-size: 13px; font-weight: 600; color: hsl(var(--fg-2)); }
}
.doc-aside { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 900px) { .doc-aside { grid-template-columns: 1fr 1fr; } }

/* ———— الحزم ———— */
.packs { display: grid; gap: 16px; }
@media (min-width: 1000px) { .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pack { display: grid; grid-template-rows: auto auto auto 1fr auto auto auto; gap: 14px; padding: 26px; border-radius: var(--r-lg); background: hsl(var(--card)); border: 1px solid hsl(var(--border)); }
.pack--lead { background: hsl(var(--fg)); color: #fff; border-color: hsl(var(--fg)); }
.pack__k { font-size: 13px; font-weight: 700; color: var(--red); }
.pack--lead .pack__k { color: #f3b4b8; }
.pack h3 { font-family: var(--display); font-size: 26px; line-height: 1.35; }
.pack > p { color: hsl(var(--fg-2)); line-height: 1.75; font-size: 15.5px; }
.pack--lead > p { color: var(--linen-ink); }
.pack ul { display: grid; gap: 0; align-content: start; }
.pack ul li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid hsl(var(--border)); font-size: 15px; }
.pack--lead ul li { border-color: rgba(255, 255, 255, .14); }
.pack ul li span:last-child { color: hsl(var(--fg-2)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pack--lead ul li span:last-child { color: var(--linen-ink); }
.pack__proof { font-size: 13.5px; color: hsl(var(--fg-2)); line-height: 1.7; }
.pack--lead .pack__proof { color: var(--linen-ink); }
.pack .btn { justify-self: start; }
.pack__total { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding-top: 14px; border-top: 2px solid currentColor; }
.pack__total span { font-size: 14px; font-weight: 700; }
.pack__total b { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 2.2vw, 28px); line-height: 1.2; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.pack__total small { grid-column: 1 / -1; font-size: 13px; color: hsl(var(--fg-2)); }
.pack--lead .pack__total small { color: var(--linen-ink); }
@media (min-width: 1000px) {
  .packs { grid-template-rows: repeat(7, auto); row-gap: 0; }
  .pack { grid-row: span 7; grid-template-rows: subgrid; row-gap: 14px; }
}
.pack ul { align-self: start; }

/* ———— الشراكة ———— */
.partners { display: grid; gap: 0; border-top: 1px solid hsl(var(--border)); }
.partners li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid hsl(var(--border)); }
.partners b { font-family: var(--display); font-size: 19px; }
.partners__note { margin-top: 14px; font-size: 14px; line-height: 1.7; color: hsl(var(--fg-2)); }
.partners span { font-size: 14.5px; color: hsl(var(--fg-2)); }
.comply { display: grid; gap: 10px; margin-top: 20px; }
.comply li { display: flex; gap: 10px; line-height: 1.7; }
.comply li::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin-top: .7em; border-radius: 2px; background: hsl(88 48% 26%); transform: rotate(45deg); }
/* المورّدون: خطوات + نموذج */
.join { display: grid; gap: 24px; }
@media (min-width: 1000px) { .join { grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; } }
.join__steps { display: grid; counter-reset: j; border-top: 1px solid hsl(var(--border)); }
.join__steps li { display: grid; grid-template-columns: 40px 1fr; gap: 4px 14px; padding: 18px 0; border-bottom: 1px solid hsl(var(--border)); counter-increment: j; }
.join__steps li::before { content: counter(j); grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.join__steps b { font-family: var(--display); font-size: 19px; line-height: 1.45; }
.join__steps span { color: hsl(var(--fg-2)); line-height: 1.7; }
.join__partner { margin-top: 24px; padding: 18px 20px; border-radius: var(--r-md); background: hsl(var(--card)); box-shadow: inset 0 0 0 1px hsl(var(--border)); line-height: 1.75; color: hsl(var(--fg-2)); }
.join__partner b { color: var(--ink); }
.join__partner a { white-space: nowrap; color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.fbox { padding: clamp(22px, 3.4vw, 36px); border-radius: var(--r-lg); background: hsl(var(--card)); box-shadow: var(--shadow-card); }
.fbox h3 { font-family: var(--display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.4; }
.fbox > p { color: hsl(var(--fg-2)); margin: 8px 0 20px; line-height: 1.75; }
.fbox .form { max-width: none; }
.req__sub { margin-top: 12px; color: hsl(var(--fg-2)); line-height: 1.75; }
.contact-line { margin-top: 16px; font-size: 14px; line-height: 1.7; color: hsl(var(--fg-2)); }
.contact-line a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: hsl(var(--border)); }
.contact-line a:hover { color: var(--red); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sec.dark > .wrap { border-top: 0 !important; }
.sec.dark + .sec > .wrap, .sec--tint + .sec > .wrap { border-top: 0 !important; }
.field small { display: inline; font-size: 12px; margin-inline-start: 4px; }
.row2 { align-items: end; }
/* الأرقام والنطاقات تُقرأ من اليسار داخل النص العربي */
.pack ul li span:last-child, .ci__price b, .basket__list b, #bkSum { direction: ltr; unicode-bidi: isolate; }

/* الملخص على الجوال: شريط مضغوط فوق شريط التبرع السفلي */
@media (max-width: 1079px) {
  .basket { bottom: calc(12px + env(safe-area-inset-bottom)); grid-template-columns: auto auto 1fr; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; }
  [dir="rtl"] .basket { padding: 10px 14px 10px 10px; }
  .basket__row { display: grid; gap: 0; justify-content: start; }
  .basket__row span { font-size: 12px; }
  .basket__row b, .basket__total b { font-size: 18px; }
  .basket__actions { justify-content: flex-end; }
  .basket__actions .btn { flex: 0 1 auto; min-height: 44px; padding: 0 16px; font-size: 15px; }
  .basket__clear { display: none; }
}

/* v31 */
.ihero > img, .ihero > picture > img { object-position: 50% 78%; }

/* v54: شريط سفلي واحد على الجوال، وقطاعات مضغوطة */
@media (max-width: 760px) { body:has(.basket) .dock, body:has(.basket) .bp-dock { display: none !important; } }
@media (max-width: 699px) {
  .cat__filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter, 20px)); padding-inline: var(--gutter, 20px); padding-bottom: 2px; }
  .cat__filters::-webkit-scrollbar { display: none; }
  .cat__filters button { flex: none; }
  .cat__group { padding: 0 14px; }
}
@media (max-width: 899px) {
  .svc > li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 20px 0; }
  .svc__n { grid-column: 1 / -1; padding-top: 0; }
  .svc > li > h3, .svc > li > div:not(.svc__proof) { grid-column: 1 / -1; }
  .svc > li > h3 { grid-column: 1; grid-row: 2; }
  .svc__proof { grid-column: 2; grid-row: 2; text-align: end; justify-items: end; }
  .svc__proof b { font-size: 22px; }
  .svc__proof span { font-size: 12px; max-width: 12ch; line-height: 1.5; }
}
#catalog .head { margin-bottom: var(--s-6); }

/* ======================================================================
   v60: لغة الرئيسية — px-hero، شريط القطاعات px-marquee، أرقام px-stat-row، px-close
   ====================================================================== */
[data-page="institutions"] main { overflow-x: clip; }
.ihero h1.px-hero__h { max-width: 15em; }
.in-marquee { margin-top: 12px; }
.in-stats { padding-block: clamp(36px, 4vw, 64px) clamp(8px, 1vw, 16px); }
.in-stats .px-stat-row { color: var(--ink); }
.in-stats .ihero__src { margin-top: 14px; font-size: 13px; color: var(--px-muted, #6d625a); }
.in-stats + .subnav + .sec > .wrap { border-top: 0; }
#services .h2, #partner .h2, #packages .h2, #catalog .h2, #how .h2, #documentation .h2, #join .h2 { font-weight: 800; }
#how.dark { background: var(--px-ink, #17110f) !important; }
.svc__n { color: var(--red); font-family: var(--display); font-weight: 800; }

/* آخر خدمة بلا خطّ سفلي: الفاصل بين القسمين يرسمه styles.css، فلا يتكرر الخطّ */
#services .svc > li:last-child { border-bottom: 0; }

/* صندوق الشركاء: بطاقة فيها ما هو مؤكد اليوم، ثم الشركاء الذين تُنشر أسماؤهم بعد موافقتهم */
.partners-box { padding: clamp(20px, 2.6vw, 30px); border-radius: var(--r-lg); background: hsl(var(--card)); border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-card); }
.partners__k { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--red-ink, var(--red)); letter-spacing: .02em; }
.partners__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.partners__facts li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: hsl(88 30% 92%); color: hsl(88 48% 22%); font-size: 14px; font-weight: 600; }
.partners__facts li::before { content: ""; width: 7px; height: 7px; border-radius: 1px; background: hsl(88 48% 30%); transform: rotate(45deg); }
.partners-box .partners li:last-child { border-bottom: 0; padding-bottom: 4px; }
.partners-box .partners__note { padding-top: 12px; border-top: 1px dashed hsl(var(--border)); }
.partners__more { margin: 12px 0 0; font-size: 15px; font-weight: 600; }
