/* =========================================================
   pages.css — عناصر الموقع متعدد الصفحات:
   ستارة الانتقال، رأس الصفحات الداخلية، أماكن الصور،
   أقسام النبذة في الرئيسية، صفحة أوف سكربت، التواصل، الفريق
   ========================================================= */

/* غطاء مؤقت لين تجهز الصفحة (يمنع ظهورها بدون هيدر) */
.js.is-loading body::before { content: ""; position: fixed; inset: 0; z-index: 98; background: var(--bg); animation: loaderFallback .3s 8s forwards; }

/* ---------- ستارة الانتقال بين الصفحات ---------- */
.curtain { position: fixed; inset: 0; z-index: 99; display: none; place-items: center; background: var(--ink); }
.curtain svg { width: 64px; height: 64px; }

/* ---------- الهيدر: اسم الحاضنة بخط رفيع ومتباعد مثل الشعار ---------- */
.brand__text b { font-weight: 300; letter-spacing: .32em; font-size: 14px; display: flex; gap: .6em; }
.brand__text b i { font-weight: 400; letter-spacing: .22em; }
.brand__text small { letter-spacing: .02em; font-weight: 400; }
.nav a.is-active { color: var(--ink); }

/* ---------- مكان الصورة (يظهر نمط ذهبي إذا الصورة لسا ما انضافت) ---------- */
.slot { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.slot img { display: block; width: 100%; height: auto; } /* الصورة بمقاسها الأصلي، بدون قص */
.slot.is-empty { aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 30%, rgb(227 191 128 / 45%), transparent 55%),
    radial-gradient(circle at 75% 80%, rgb(11 16 52 / 12%), transparent 50%),
    repeating-linear-gradient(45deg, rgb(196 149 90 / 8%) 0 1px, transparent 1px 22px),
    var(--bg-2);
}
.slot.is-empty::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 26%; aspect-ratio: 1; opacity: .55;
  background: url("../images/brand/emblem.svg") center / contain no-repeat;
}

/* ---------- رأس الصفحات الداخلية ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(30px, 5vw, 70px)); padding-bottom: clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 70% 30%, #000, transparent 75%);
          mask-image: radial-gradient(ellipse 50% 60% at 70% 30%, #000, transparent 75%);
}
.page-hero__inner { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a:hover { color: var(--gold-3); }
.crumbs span[aria-hidden] { color: var(--gold-2); }
.page-hero h1 { font-size: clamp(36px, 5vw, 72px); font-weight: 500; line-height: 1.4; }
.page-hero p.lead { margin-top: 18px; }
.page-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.page-hero__media { border-radius: 30px; box-shadow: 0 40px 90px -40px rgb(11 16 52 / 45%); }
.page-hero__media::before { /* إطار ذهبي يطلّ من الزاوية */
  content: ""; position: absolute; z-index: 2; top: 18px; left: 18px; width: 64px; height: 64px;
  background: url("../images/brand/emblem.svg") center / contain no-repeat; filter: drop-shadow(0 6px 14px rgb(0 0 0 / 25%));
}
.page-hero--dark { background: var(--ink); color: #fff; }
.page-hero--dark .crumbs, .page-hero--dark .lead { color: rgb(255 255 255 / 70%); }
.page-hero--dark::before { opacity: .15; }

/* شريط روابط داخل الصفحة */
.subnav { position: sticky; top: var(--header-h); transition: top .5s var(--ease); z-index: 20; background: rgb(251 248 242 / 88%); backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.header.is-hidden ~ main .subnav { top: 0; } /* لما يختفي الهيدر يطلع الشريط لفوق */
.subnav .container { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.subnav a { flex: none; font-size: 14px; padding: 8px 16px; border-radius: 99px; color: var(--muted); transition: all .3s; }
.subnav a:hover { background: var(--surface); color: var(--ink); }

/* ---------- عناوين الأقسام مع رابط ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 50px); }
.sec-head .lead { margin-top: 10px; }
.more { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); padding-bottom: 4px; border-bottom: 1.5px solid var(--gold-2); white-space: nowrap; }
.more i { font-style: normal; transition: transform .4s var(--ease); }
.more:hover i { transform: translateX(-6px); }

/* ---------- الرئيسية: النبذة ---------- */
.intro__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.intro__media { border-radius: 30px; }
.intro__badge { position: absolute; z-index: 2; bottom: 22px; right: 22px; left: 22px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: rgb(255 255 255 / 88%); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.intro__badge svg { width: 42px; height: 42px; flex: none; }
.intro__badge b { display: block; font-weight: 500; }
.intro__badge small { color: var(--muted); font-size: 13px; }
.intro__text p:not(.kicker) { color: var(--muted); font-size: 17px; margin-top: 16px; max-width: 560px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-block: 30px; }
.mini-stats div { padding: 16px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.mini-stats b { direction: ltr; display: block; font-size: 34px; font-weight: 400; line-height: 1.2; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini-stats span { font-size: 12px; color: var(--muted); line-height: 1.6; display: block; }

/* بطاقات تفتح صفحة */
.link-card { display: flex; flex-direction: column; text-decoration: none; }
.link-card .more { margin-top: auto; padding-top: 18px; border-bottom: 0; color: var(--gold-3); }
.path--featured .more { color: var(--gold-1); }

/* الرئيسية: برنامج الاحتضان */
.prog { background: var(--surface); }
.prog__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.prog__media { border-radius: 30px; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 26px; }
.stage-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.stage-chips b { font-size: 11px; font-weight: 500; color: var(--gold-3); }
.mini-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.mini-tiers li { padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); line-height: 1.6; }
.mini-tiers b { display: block; font-size: 12px; letter-spacing: .2em; font-weight: 500; }
.mini-tiers span { font-size: 14px; color: var(--muted); }
.mini-tiers .t-bronze b { color: #b46a37; } .mini-tiers .t-silver b { color: #7d8899; } .mini-tiers .t-gold b { color: var(--gold-3); }

/* الرئيسية: شريط أوف سكربت */
.os-band { background: var(--ink); color: #fff; border-radius: 36px; padding: clamp(30px, 5vw, 64px); display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 50px); align-items: center; overflow: hidden; position: relative; }
.os-band__logo { width: 170px; background: #fff; border-radius: 16px; padding: 10px 14px; }
.os-band h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 500; line-height: 1.5; }
.os-band p { color: rgb(255 255 255 / 70%); margin-top: 8px; }

/* الرئيسية: منظومة هيم */
.holding-band { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: center; padding: clamp(28px, 4vw, 50px); border-radius: 30px; background: var(--bg-2); }
.holding-band .eco { margin-top: 0; }

/* ---------- خطوات التأسيس (صفحة الخدمات) ---------- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: t; }
.timeline li { position: relative; padding: 26px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.timeline li span { display: inline-block; font-size: 12px; color: var(--gold-3); font-weight: 500; margin-bottom: 6px; }
.timeline li h3 { font-size: 20px; font-weight: 500; margin-bottom: 10px; }
.timeline li.is-after { background: var(--ink); color: #fff; border-color: transparent; }
.timeline li.is-after .ticks li, .timeline li.is-after .ticks { color: rgb(255 255 255 / 75%); }
.timeline .ticks { font-size: 14px; color: var(--muted); gap: 6px; }
.timeline .ticks li { padding: 0 22px 0 0; background: none; border: 0; border-radius: 0; }
.timeline__label { grid-column: 1 / -1; font-size: 14px; font-weight: 500; color: var(--gold-3); margin-top: 10px; }

/* شريط اتصال سريع */
.call-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; padding: clamp(28px, 4vw, 50px); border-radius: 30px; background: var(--ink); color: #fff; }
.call-band h2 { font-size: clamp(24px, 2.8vw, 36px); font-weight: 500; line-height: 1.55; }
.call-band p { color: rgb(255 255 255 / 70%); margin-top: 10px; }
.call-band ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.call-band ul li { font-size: 13px; padding: 6px 14px; border-radius: 99px; background: rgb(227 191 128 / 12%); color: var(--gold-1); }
.call-band__actions { display: grid; gap: 10px; justify-items: start; }
.call-band .btn--ghost { color: #fff; border-color: rgb(255 255 255 / 25%); background: transparent; }

/* ---------- صفحة أوف سكربت ---------- */
.os-page .offscript__logo { margin-bottom: 0; }
.vmv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.vmv article { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.vmv h3 { font-size: 15px; color: var(--gold-3); font-weight: 500; margin-bottom: 10px; }
.vmv p { font-size: 16px; }
.loop5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.loop5 li { position: relative; padding: 26px 20px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.loop5 li b { display: block; font-size: 12px; color: var(--gold-1); font-weight: 400; }
.loop5 li h3 { font-size: 24px; font-weight: 500; margin-block: 6px 8px; }
.loop5 li p { font-size: 14px; color: rgb(255 255 255 / 70%); }
.days__weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.days__week h3 { font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.days__week > p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.days__list { display: grid; gap: 8px; }
.days__list li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.days__list li > span { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-3); font-weight: 500; }
.days__list b { font-weight: 500; display: block; line-height: 1.6; }
.days__list small { font-size: 13px; color: var(--muted); }
.skills6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skills6 li { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.skills6 b { display: block; font-size: 12px; color: var(--gold-3); font-weight: 500; }
.skills6 h3 { font-size: 19px; font-weight: 500; margin-block: 4px 6px; }
.skills6 p { font-size: 15px; color: var(--muted); }
.faq { display: grid; gap: 10px; max-width: 900px; }
.faq details { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { font-style: normal; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); transition: transform .4s var(--ease); }
.faq details[open] summary i { transform: rotate(45deg); background: var(--ink); color: #fff; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* ---------- صفحة التواصل ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 50px); align-items: start; }
.ccards { display: grid; gap: 12px; }
.ccard { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s; }
a.ccard:hover { transform: translateX(-6px); box-shadow: var(--shadow); }
.ccard__ico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--gold); color: #fff; }
.ccard__ico svg { width: 22px; height: 22px; }
.ccard small { display: block; font-size: 12px; color: var(--muted); }
.ccard b { font-weight: 500; }
.form { padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 16px; }
.form h2 { font-size: 26px; font-weight: 500; }
.form > p { color: var(--muted); font-size: 15px; margin-top: -8px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 16px; transition: border-color .3s, box-shadow .3s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__note { font-size: 14px; min-height: 1.6em; }
.form__note.is-error { color: #b3261e; }
.form__note.is-ok { color: #1f7a4d; }
.form .btn { justify-self: start; }

/* ---------- الفريق مع الصور ---------- */
.member__photo { position: relative; width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; display: grid; place-items: center; margin-bottom: 14px; background: linear-gradient(135deg, var(--bg-2), #fff); }
.member__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .8s var(--ease); }
.member__photo.has-photo img { opacity: 1; }
.member__photo.has-photo .member__av { opacity: 0; }
.member:hover .member__photo.has-photo img { transform: scale(1.05); }
.member .member__av { width: 72px; height: 72px; font-size: 30px; margin: 0; }
.member--lead .member__photo { background: linear-gradient(135deg, #1a2257, var(--ink)); }
.team__grid { grid-template-columns: repeat(4, 1fr); }
.member--lead { grid-column: auto; }
.footer__name small { display: block; }
.socials--sm { margin-top: 16px; gap: 8px; }
.socials--sm a { width: 38px; height: 38px; }
.socials--sm svg { width: 17px; height: 17px; }

/* ---------- مساعدات المسافات ---------- */
.section--tight { padding-block: clamp(30px, 5vw, 60px); }
.section-gap { margin-top: clamp(30px, 4vw, 50px); }
.section-gap--sm { margin-top: 20px; }
.center-link { text-align: center; margin-top: 40px; }
.why__list--spaced { margin-top: 28px; }
.compare--open { margin-top: 30px; padding-top: 10px; }
.contact__follow { font-size: 18px; font-weight: 500; margin-top: 34px; }

/* منظومة هيم المختصرة في الرئيسية: شعارات فقط */
.eco--compact { grid-template-columns: repeat(6, 1fr); gap: 10px; }
.eco--compact .eco__item { padding: 8px; border-radius: 16px; }
.eco--compact .eco__item--light img { padding: 10px; }

/* أوف سكربت */
.page-hero--dark .offscript__logo { margin-bottom: 22px; }
.page-hero--dark .os-marquee { margin-top: clamp(40px, 6vw, 70px); }
.os-stats--light { min-width: min(100%, 460px); }
.os-stats--light > div { background: var(--surface); border-color: var(--line); }
.os-stats--light span { color: var(--muted); }
.os-photo { width: min(100%, 420px); }
.os-assess { color: rgb(255 255 255 / 82%); }

@media (max-width: 1120px) {
  .page-hero__inner, .intro__grid, .prog__grid, .contact__grid, .holding-band, .call-band { grid-template-columns: 1fr; }
  .intro__media { max-width: 520px; }
  .os-band { grid-template-columns: 1fr; justify-items: start; }
  .loop5 { grid-template-columns: repeat(3, 1fr); }
  .timeline, .skills6, .vmv { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .page-hero__media { border-radius: 22px; }
  .page-hero__media::before { width: 44px; height: 44px; top: 12px; left: 12px; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .mini-tiers { grid-template-columns: 1fr; }
  .days__weeks, .timeline, .skills6, .vmv, .field-row { grid-template-columns: 1fr; }
  .loop5 { grid-template-columns: 1fr 1fr; }
  .eco--compact { grid-template-columns: repeat(3, 1fr); }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .sec-head { align-items: flex-start; }
}

/* الهيدر فوق رأس صفحة داكن (أوف سكربت): نص فاتح لين يبدأ التمرير */
[data-page="offscript"] .header:not(.is-scrolled) .brand__text,
[data-page="offscript"] .header:not(.is-scrolled) .brand__text small,
[data-page="offscript"] .header:not(.is-scrolled) .nav a { color: #fff; }
[data-page="offscript"] .header:not(.is-scrolled) .nav a:not(.is-active) { color: rgb(255 255 255 / 70%); }
[data-page="offscript"] .header:not(.is-scrolled) .burger { border-color: rgb(255 255 255 / 30%); }
[data-page="offscript"] .header:not(.is-scrolled) .burger span { background: #fff; }
