/* ==========================================================================
   كتل صفحات التعريف (من نحن): الواجهة بالشعار المتحرك، المعلومات، الرؤية والرسالة،
   الخط الزمني، الرسوم البيانية، وخط التقارير الزمني. تعمل في أي صفحة مبنية بالكتل.
   ========================================================================== */

/* ---------- الواجهة بشعار متحرك ---------- */
.ph { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem); }
.ph--top { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)); }
.ph-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.ph--solo .ph-grid { grid-template-columns: 1fr; max-width: 52rem; }
.ph-title { font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1.15; font-weight: 800; margin: 0 0 1.3rem; }
.ph-t1, .ph-t2 { display: block; }
.ph-t2 { background: linear-gradient(100deg, var(--brand), var(--brand-2) 55%, color-mix(in srgb, var(--accent) 80%, var(--brand))); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.ph .lead { max-width: 38rem; }
.ph-art { position: relative; width: 100%; max-width: 440px; justify-self: center; }
.ph-art .logo-anim { width: 76%; margin: 12% auto; position: relative; z-index: 1; }
.ph-glow { position: absolute; inset: 14%; border-radius: 50%; z-index: 0; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent), transparent 68%); opacity: .8; }
.ph-art--img img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: 32px 32px 32px 120px; box-shadow: var(--shadow-lg); }

/* حركة الشعار مع الماوس: كل طبقة بعمق مختلف (translate لا يتعارض مع حركات الظهور) */
.ph[data-follow] .ph-logo, .ph[data-follow] .ph-glow, .ph[data-follow] .orbit { transition: transform .9s cubic-bezier(.16, 1, .3, 1), translate .9s cubic-bezier(.16, 1, .3, 1); }
.ph[data-follow] .logo-svg g { transition: translate .9s cubic-bezier(.16, 1, .3, 1); }
.ph[data-follow] .ph-logo { transform: perspective(1000px) rotateY(calc(var(--px, 0) * 14deg)) rotateX(calc(var(--py, 0) * -11deg)); }
.ph[data-follow="depth"] .logo-svg .l-wheat { translate: calc(var(--px, 0) * -22px) calc(var(--py, 0) * -16px); }
.ph[data-follow="depth"] .logo-svg .l-olive { translate: calc(var(--px, 0) * 30px) calc(var(--py, 0) * 22px); }
.ph[data-follow="depth"] .logo-svg .l-name { translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 8px); }
.ph[data-follow] .ph-glow { translate: calc(var(--px, 0) * 40px) calc(var(--py, 0) * 32px); }
.ph[data-follow="depth"] .orbit { translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -12px); }

/* الأرقام البارزة */
.ph-stats { list-style: none; margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.ph-stats li { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center; padding: 1.1rem 1.2rem; border-radius: 20px;
  background: color-mix(in srgb, var(--white) 78%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 12%, transparent); box-shadow: 0 18px 40px -30px rgba(8, 60, 72, .55); }
.ph-stats .ico, .ph-fb .ico { grid-row: span 2; width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--accent-soft); color: var(--brand); }
.ph-stats b, .ph-fb b { font: 800 clamp(1.5rem, 2.6vw, 2rem)/1.1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.ph-stats small, .ph-fb small { color: var(--ink-soft); font-size: .9rem; line-height: 1.3; }

/* القالب: في المنتصف */
.v-centered .ph-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.v-centered .ph-art { order: -1; max-width: 300px; }
.v-centered .ph .lead { margin-inline: auto; }
.v-centered .hero-actions { justify-content: center; }
.v-centered .ph-stats li { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: .4rem; }
.v-centered .ph-stats .ico { grid-row: auto; }
.v-centered .ph-stats b { text-align: center; }

/* القالب: داكن فاخر */
.v-dark .ph { background: radial-gradient(70rem 40rem at 80% 10%, color-mix(in srgb, var(--brand-2) 40%, transparent), transparent 60%), linear-gradient(160deg, #052c35, var(--deep) 55%, #063c48); color: #fff; }
.v-dark .ph .blob { opacity: .25; }
.v-dark .ph-title, .v-dark .ph .lead { color: #fff; }
.v-dark .ph .lead { color: rgba(255, 255, 255, .78); }
.v-dark .ph-t2 { background: linear-gradient(100deg, var(--accent), #e4f28f 60%, #9fe6ef); -webkit-background-clip: text; background-clip: text; }
.v-dark .ph .kicker { background: rgba(255, 255, 255, .08); color: #e9f6c0; border-color: rgba(255, 255, 255, .14); }
.v-dark .ph-glow { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 66%); opacity: .55; }
.v-dark .ph .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.v-dark .ph-stats li { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); box-shadow: none; backdrop-filter: blur(6px); }
.v-dark .ph-stats b { color: #fff; }
.v-dark .ph-stats small { color: rgba(255, 255, 255, .7); }
.v-dark .ph-stats .ico { background: rgba(184, 208, 52, .16); color: var(--accent); }
.v-dark .orbit span { border-color: rgba(255, 255, 255, .18); }
.v-dark .logo-svg .lo, .v-dark .logo-svg .c1 { fill: #6fd3e0; }
.v-dark .ph-logo { filter: drop-shadow(0 0 40px rgba(184, 208, 52, .18)); }

/* القالب: أرقام عائمة حول الشعار */
.ph-fb { z-index: 2; }
.ph-fb-1 { inset-inline-start: -12%; bottom: -4%; }
.ph-fb-2 { inset-inline-end: -8%; top: 6%; animation-delay: -3s, 3.1s; }
.ph-fb-3 { inset-inline-end: -12%; bottom: 26%; animation-delay: -1.5s, 2.4s; }
.ph-fb-4 { inset-inline-start: -6%; top: 22%; animation-delay: -4.5s, 3.6s; }
.ph-fb .ico { width: 34px; height: 34px; padding: 7px; border-radius: 10px; }
.ph-fb b { font-size: 1.2rem; }
.ph-fb small { font-size: .76rem; }

/* ---------- تعريف وبطاقة معلومات ---------- */
.ab-facts-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.ab-facts-grid.is-solo { grid-template-columns: 1fr; }
.ab-intro { font: 600 clamp(1.15rem, 2vw, 1.4rem)/1.85 var(--font-display); color: var(--ink); margin: 0 0 1.4rem; padding-inline-start: 1.1rem; border-inline-start: 4px solid var(--accent); }
.ab-facts-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.ab-facts-list > div { padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); }
.ab-facts-list > div:nth-child(2n) { border-inline-end: 0; }
.ab-facts-list > div.is-wide { grid-column: 1 / -1; border-inline-end: 0; }
.ab-facts-list dt { font-size: .82rem; font-weight: 700; color: var(--brand); margin-bottom: .3rem; letter-spacing: .01em; }
.ab-facts-list dd { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.7; }
.ab-chips { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ab-chips li { padding: .3rem .75rem; border-radius: 99px; background: var(--accent-soft); color: var(--deep); font-size: .86rem; font-weight: 600; }
.ab-fact-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--brand); text-decoration: none; }
.ab-fact-link:hover { text-decoration: underline; }
.ab-fact-link .ico { width: 1em; height: 1em; flex: none; }
/* قالب البطاقات */
.v-cards .ab-facts-grid { grid-template-columns: 1fr; }
.v-cards .ab-facts-text { max-width: 52rem; }
.v-cards .ab-facts-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; background: none; border: 0; box-shadow: none; overflow: visible; }
.v-cards .ab-facts-list > div { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); box-shadow: var(--shadow); }
/* قالب الجدول */
.v-table .ab-facts-grid { grid-template-columns: 1fr; }
.v-table .ab-facts-list { grid-template-columns: 1fr; }
.v-table .ab-facts-list > div { display: grid; grid-template-columns: minmax(150px, 15rem) 1fr; gap: 1rem; align-items: baseline; border-inline-end: 0; }
.v-table .ab-facts-list dt { margin: 0; font-size: .92rem; }

/* ---------- الرؤية والرسالة ---------- */
.ab-st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(1rem, 2.5vw, 1.6rem); }
.ab-st { position: relative; padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: 28px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.ab-st::after { content: ""; position: absolute; width: 14rem; aspect-ratio: 1; inset-inline-end: -5rem; top: -6rem; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; }
.ab-st-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.ab-st-ic { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 14px 28px -16px var(--brand); }
.ab-st-ic .ico { width: 26px; height: 26px; }
.ab-st h3 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.ab-st-text p { margin: 0 0 .8rem; font-size: 1.1rem; line-height: 1.95; color: var(--ink-soft); }
.ab-st-text p:last-child { margin: 0; }
/* شرائط كبيرة */
.v-bands .ab-st-grid { grid-template-columns: 1fr; gap: 0; }
.v-bands .ab-st { border-radius: 0; border: 0; box-shadow: none; background: transparent; padding: clamp(2.4rem, 5vw, 3.6rem) 0; border-bottom: 1px solid var(--line); text-align: center; }
.v-bands .ab-st:last-child { border-bottom: 0; }
.v-bands .ab-st::after { display: none; }
.v-bands .ab-st-head { flex-direction: column; gap: .6rem; }
.v-bands .ab-st-text { max-width: 54rem; margin-inline: auto; }
.v-bands .ab-st-text p { font: 600 clamp(1.25rem, 2.6vw, 1.75rem)/1.75 var(--font-display); color: var(--ink); }
/* عنوان جانبي */
.v-split .ab-st-grid { grid-template-columns: 1fr; gap: 1rem; }
.v-split .ab-st { display: grid; grid-template-columns: minmax(180px, 16rem) 1fr; gap: 1.5rem 3rem; align-items: start; }
.v-split .ab-st-head { flex-direction: column; align-items: flex-start; margin: 0; }

/* ---------- الخط الزمني ---------- */
.ab-tl { list-style: none; margin: 0; padding: 0; position: relative; }
/* خط أفقي */
.v-line .ab-tl { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.4rem); }
.v-line .ab-tl::before { content: ""; position: absolute; top: 9px; inset-inline: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--brand-2), var(--brand)); opacity: .5; }
.v-line .ab-tl li { position: relative; padding-top: 2.4rem; }
.ab-tl-dot { position: absolute; top: 0; inset-inline-start: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--white); border: 5px solid var(--brand); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 12%, transparent); }
.ab-tl-label { display: block; font: 800 clamp(1.4rem, 2.6vw, 1.9rem)/1.2 var(--font-display); color: var(--brand); margin-bottom: .6rem; }
.ab-tl p { margin: 0; color: var(--ink-soft); line-height: 1.9; }
/* عمودي */
.v-vertical .ab-tl { max-width: 50rem; padding-inline-start: 2.6rem; }
.v-vertical .ab-tl::before { content: ""; position: absolute; top: .4rem; bottom: .4rem; inset-inline-start: 9px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), var(--brand)); opacity: .55; }
.v-vertical .ab-tl li { position: relative; padding-bottom: 2rem; }
.v-vertical .ab-tl-dot { inset-inline-start: -2.6rem; top: .35rem; }
/* بطاقات */
.v-cards .ab-tl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.v-cards .ab-tl li { padding: 1.6rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.v-cards .ab-tl-dot { display: none; }

/* ---------- الرسم البياني: أعمدة ---------- */
.ab-cols-fig { margin: 0; padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ab-cols { list-style: none; margin: 0; padding: 0; height: clamp(260px, 32vw, 340px); display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(.5rem, 2vw, 1.4rem); align-items: end;
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); background-size: 100% calc(100% - 2.2rem); background-repeat: no-repeat; }
.ab-cols li { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .45rem; min-width: 0; }
.ab-col-val { font: 700 clamp(.78rem, 1.4vw, 1rem)/1.3 var(--font-display); color: var(--ink); text-align: center; opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s; transition-delay: calc(.9s + var(--d, 0) * 120ms); }
.ab-col-bar { width: min(68px, 72%); height: calc(var(--h) * .74); border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, var(--accent), var(--brand-2) 55%, var(--brand));
  transform: scaleY(0); transform-origin: bottom; transition: transform 1.3s var(--ease-out); transition-delay: calc(.2s + var(--d, 0) * 120ms); box-shadow: 0 14px 26px -16px var(--brand); }
.ab-col-lbl { font-weight: 700; color: var(--ink-soft); font-size: .92rem; white-space: nowrap; }
.ab-cols-fig.is-in .ab-col-bar { transform: scaleY(1); }
.ab-cols-fig.is-in .ab-col-val { opacity: 1; transform: none; }
.ab-cols-total { margin-top: 1rem; text-align: center; color: var(--ink-soft); }
.ab-cols-total b { font: 800 1.5rem var(--font-display); color: var(--brand); }

/* ---------- الرسم البياني: أشرطة / حلقة (داكن افتراضياً مثل قسم الأثر) ---------- */
.blk--chart:not(.has-bg).v-ring, .blk--chart:not(.has-bg).v-bars { background: var(--deep); color: #fff; position: relative; isolation: isolate; overflow: hidden; }
.blk--chart:not(.has-bg).v-ring::before, .blk--chart:not(.has-bg).v-bars::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(60rem 30rem at 85% 0%, color-mix(in srgb, var(--brand-2) 45%, transparent), transparent 60%), radial-gradient(40rem 25rem at 0% 100%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%); }
.blk--chart:not(.has-bg):is(.v-ring, .v-bars) .section-head h2 { color: #fff; }
.blk--chart:not(.has-bg):is(.v-ring, .v-bars) .section-head p { color: rgba(255, 255, 255, .72); }
.ab-impact.is-solo { grid-template-columns: 1fr; }
.v-bars .ab-impact .impact-total { aspect-ratio: auto; padding: 2rem; border-radius: var(--radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
/* على خلفية فاتحة */
.blk--chart.has-bg:not(.is-dark) .ring circle { stroke: color-mix(in srgb, var(--brand) 12%, transparent); }
.blk--chart.has-bg:not(.is-dark) .ring .ring-fill { stroke: var(--brand); }
.blk--chart.has-bg:not(.is-dark) .impact-total .num { color: var(--brand); }
.blk--chart.has-bg:not(.is-dark) .impact-total .lbl { color: var(--ink-soft); }
.blk--chart.has-bg:not(.is-dark) .bar-num { color: var(--brand); }
.blk--chart.has-bg:not(.is-dark) .bar-track { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.blk--chart.has-bg:not(.is-dark).v-bars .ab-impact .impact-total { background: var(--white); border-color: var(--line); box-shadow: var(--shadow); }

/* ---------- التقارير على خط زمني ---------- */
.ab-rep-tl { list-style: none; margin: 0; padding: 0 0 0 0; padding-inline-start: 2.4rem; position: relative; max-width: 48rem; }
.ab-rep-tl::before { content: ""; position: absolute; top: .8rem; bottom: .8rem; inset-inline-start: 9px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), var(--brand)); opacity: .5; }
.ab-rep-tl li { position: relative; margin-bottom: .9rem; }
.ab-rep-dot { position: absolute; inset-inline-start: -2.4rem; top: 50%; translate: 0 -50%; width: 21px; height: 21px; border-radius: 50%; background: var(--white); border: 5px solid var(--brand); }
.ab-rep-link { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; padding: 1rem 1.3rem; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s; }
.ab-rep-link:hover { transform: translateX(calc(var(--dir, 1) * -6px)); border-color: color-mix(in srgb, var(--brand) 35%, transparent); box-shadow: var(--shadow-lg); }
html[dir="ltr"] .ab-rep-link:hover { --dir: -1; }
.ab-rep-year { font: 800 1.6rem/1 var(--font-display); color: var(--brand); font-variant-numeric: tabular-nums; }
.ab-rep-label { font-weight: 600; }
.ab-rep-cta { display: inline-flex; align-items: center; gap: .35rem; color: var(--brand); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.ab-rep-cta .ico { width: 1em; height: 1em; }

/* ---------- خلفيات داكنة من خيارات التصميم ---------- */
.blk.is-dark .ab-st, .blk.is-dark .ab-facts-list, .blk.is-dark .ab-cols-fig, .blk.is-dark .ab-rep-link, .blk.is-dark.v-cards .ab-tl li, .blk.is-dark.v-cards .ab-facts-list > div { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); box-shadow: none; color: #fff; }
.blk.is-dark .ab-st-text p, .blk.is-dark .ab-tl p, .blk.is-dark .ab-col-lbl { color: rgba(255, 255, 255, .78); }
.blk.is-dark .ab-facts-list dd, .blk.is-dark .ab-intro, .blk.is-dark .ab-col-val, .blk.is-dark .ab-rep-label { color: #fff; }
.blk.is-dark .ab-tl-label, .blk.is-dark .ab-facts-list dt, .blk.is-dark .ab-rep-year, .blk.is-dark .ab-rep-cta { color: var(--accent); }

/* ---------- الجوال ---------- */
@media (max-width: 900px) {
  .ph-grid, .ab-facts-grid { grid-template-columns: 1fr; }
  .ph-art { order: -1; max-width: min(300px, 62vw); }
  .ph-art .logo-anim { margin: 8% auto; }
  .ph--top { padding-top: calc(var(--header-h) + 1.5rem); }
  .ph-fb-1, .ph-fb-4 { inset-inline-start: -4%; }
  .ph-fb-2, .ph-fb-3 { inset-inline-end: -4%; }
  .v-line .ab-tl { grid-template-columns: 1fr; padding-inline-start: 2.4rem; gap: 0; }
  .v-line .ab-tl::before { top: .4rem; bottom: .4rem; inset-inline: auto; inset-inline-start: 9px; width: 3px; height: auto; background: linear-gradient(180deg, var(--accent), var(--brand)); }
  .v-line .ab-tl li { padding: 0 0 1.8rem; }
  .v-line .ab-tl-dot { inset-inline-start: -2.4rem; top: .35rem; }
  .v-split .ab-st { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ph-stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .ph-stats li { grid-template-columns: 1fr; padding: .9rem; row-gap: .35rem; }
  .ph-stats .ico { grid-row: auto; width: 36px; height: 36px; padding: 8px; }
  .ab-facts-list { grid-template-columns: 1fr; }
  .ab-facts-list > div { border-inline-end: 0; }
  .v-table .ab-facts-list > div { grid-template-columns: 1fr; gap: .2rem; }
  .ab-cols { gap: .35rem; }
  .ab-col-lbl { font-size: .78rem; }
  .ab-rep-link { grid-template-columns: auto 1fr; }
  .ab-rep-cta { grid-column: 1 / -1; }
  .ph-fb { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ph[data-follow] .ph-logo, .ph[data-follow] .logo-svg g, .ph[data-follow] .ph-glow, .ph[data-follow] .orbit { transition: none; transform: none; translate: none; }
}
