/* ==========================================================================
   Rafek CMS — طبقة تحسين الواجهة (Premium Polish Layer) — إضافية وآمنة
   ترفع المستوى البصري (إيقاع، مسافات، بطاقات، صور، أزرار، وصولية) باستخدام
   نفس متغيرات نظام التصميم القائمة (--asala-*) دون تعديل الأساس أو كسر أي شيء.
   ========================================================================== */
:root {
    --e-container-max: 1240px;
    --e-section-y: clamp(3.5rem, 6vw, 6rem);
    --e-lift: cubic-bezier(.22, .61, .36, 1);
    --e-ring: 0 0 0 .22rem color-mix(in srgb, var(--asala-primary) 28%, transparent);
}

/* حاوية أوسع قليلًا على الشاشات الكبيرة لمظهر مؤسسي فسيح */
@media (min-width: 1400px) {
    .container, .container-lg, .container-xl { max-width: var(--e-container-max); }
}

/* ---------- إيقاع الطباعة (Typography rhythm) ---------- */
body { line-height: 1.75; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .section-title, .hero-h { letter-spacing: -.015em; }
h2, .section-title { line-height: 1.25; }
p { text-wrap: pretty; }
.lead, p.lead { line-height: 1.7; }

/* ---------- إيقاع الأقسام (تنفّس رأسي أفخم على الديسктوп) ---------- */
.services-section, .about-section, .solutions-section,
.partners-section, .news-section, .testimonials-section,
.cta-section, section[class*="-section"] { padding-block: var(--e-section-y); }

/* ---------- بطاقات أرقى: ارتفاع ناعم عند المرور + حدّ لطيف ---------- */
.service-card, .stats-card, .news-card, .feature-card, .expert-card,
.spec-card, .testimonial-card, .price-card, .card {
    transition: transform .35s var(--e-lift), box-shadow .35s var(--e-lift), border-color .35s var(--e-lift);
}
.service-card:hover, .news-card:hover, .feature-card:hover,
.expert-card:hover, .spec-card:hover, .testimonial-card:hover, .price-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* ---------- معالجة الصور: زوايا، ظل، قصّ نسبة، تكبير لطيف ---------- */
.news-thumb, .card-img-top, .media-frame, .img-cover {
    overflow: hidden;
    border-radius: calc(var(--radius) - 6px);
    background: #eef3f9;
}
.news-thumb img, .card-img-top, .media-frame img, .img-cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .6s var(--e-lift);
}
.news-card:hover .news-thumb img,
.media-frame:hover img, .img-cover:hover img { transform: scale(1.06); }

/* ---------- أزرار: لمعة ناعمة وحواف متّسقة ---------- */
.btn { letter-spacing: .01em; }
.btn-primary, .btn-gold { position: relative; overflow: hidden; }
.btn-primary::after, .btn-gold::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .28) 50%, transparent 100%);
    transform: translateX(-120%); transition: transform .6s var(--e-lift);
}
.btn-primary:hover::after, .btn-gold:hover::after { transform: translateX(120%); }

/* ---------- شريط التنقّل: زجاجية أنيقة عند التمرير ---------- */
.asala-navbar.scrolled {
    background: color-mix(in srgb, var(--asala-darker) 92%, transparent) !important;
    backdrop-filter: saturate(140%) blur(10px);
    box-shadow: 0 6px 24px rgba(10, 44, 82, .16);
}
.asala-navbar .nav-link { position: relative; font-weight: 600; }
.asala-navbar .nav-link::after {
    content: ""; position: absolute; inset-inline: .8rem; bottom: .35rem; height: 2px;
    background: var(--grad-gold); border-radius: 2px; transform: scaleX(0);
    transform-origin: inline-start; transition: transform .3s var(--e-lift);
}
.asala-navbar .nav-link:hover::after, .asala-navbar .nav-link.active::after { transform: scaleX(1); }

/* ---------- إظهار العناصر عند التمرير (يعمل مع .reveal الحالي) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--e-lift), transform .7s var(--e-lift); }
    .reveal.visible { opacity: 1; transform: none; }
    .reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
}

/* ---------- وصولية: حلقة تركيز واضحة وموحّدة ---------- */
a:focus-visible, .btn:focus-visible, .form-control:focus-visible,
.form-select:focus-visible, button:focus-visible {
    outline: none; box-shadow: var(--e-ring);
}

/* ---------- عناوين الأقسام: توسيط أنيق واتّساق المسافات ---------- */
.section-eyebrow { letter-spacing: .12em; }
.section-title { margin-bottom: .35rem; }

/* ---------- الفوتر: تباعد وروابط أوضح ---------- */
footer a { transition: color .25s var(--e-lift), opacity .25s var(--e-lift); }
footer a:hover { opacity: 1; color: var(--asala-secondary-2); }

/* ---------- ريسبونسيف: راحة على الموبايل/التابلت ---------- */
@media (max-width: 991.98px) {
    :root { --e-section-y: clamp(2.5rem, 7vw, 4rem); }
    .hero-content h1, .hero-content .hero-h { font-size: clamp(1.8rem, 7vw, 2.6rem); }
}
@media (max-width: 575.98px) {
    .btn { padding: .6rem 1.25rem; }
    .stat-number { font-size: clamp(1.6rem, 9vw, 2.2rem); }
}

/* ==========================================================================
   المرحلة 2 — تلميع الأقسام (Section-level polish) — إضافية وآمنة
   ========================================================================== */

/* Hero: طبقة تعتيم متدرّجة أنعم + عنوان أوضح + مؤشّر تمرير */
.hero-slide::before { background: linear-gradient(115deg, rgba(6,29,56,.90) 0%, rgba(13,75,143,.72) 55%, rgba(28,109,208,.42) 100%); }
.hero-content .lead { text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.hero-content .btn { box-shadow: 0 10px 28px rgba(0,0,0,.22); }

/* Stats: أرقام أوضح + أيقونة داخل دائرة لطيفة */
.stat-ico { width: 54px; height: 54px; line-height: 54px; margin-inline: auto; border-radius: 50%;
    background: color-mix(in srgb, var(--asala-secondary) 16%, #fff); color: var(--asala-secondary); }
.stats-card { border: 1px solid #eef3f9; }

/* Services / Solutions: أيقونة داخل شارة متدرّجة + عنوان يتحوّل لونه عند المرور */
.service-icon-wrap, .feature-icon, .sol-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 16px; margin-bottom: 1rem;
    background: color-mix(in srgb, var(--asala-primary) 10%, #fff); color: var(--asala-primary);
    transition: transform .35s var(--e-lift), background .35s var(--e-lift), color .35s var(--e-lift);
}
.service-card:hover .service-icon-wrap { transform: translateY(-3px) scale(1.05); background: var(--grad-primary); color: #fff; }

/* CTA: شريط متدرّج بارز مع نمط خفيف */
.cta-section { background: var(--grad-primary); color: #fff; position: relative; overflow: hidden; }
.cta-section::after { content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none;
    background-image: radial-gradient(circle at 85% 15%, rgba(255,201,77,.5), transparent 42%),
                      radial-gradient(circle at 10% 90%, rgba(255,255,255,.35), transparent 45%); }
.cta-section .btn-light, .cta-section .btn-gold { position: relative; z-index: 1; }

/* Partners: شعارات رمادية تتلوّن عند المرور (مظهر مؤسسي) */
.partner-logo img, .partners-grid img { filter: grayscale(1) opacity(.7); transition: filter .35s var(--e-lift); }
.partner-logo:hover img, .partners-grid img:hover { filter: grayscale(0) opacity(1); }

/* Testimonials: بطاقة اقتباس أنيقة */
.testimonial-card { position: relative; }
.testimonial-card::before { content: "\201C"; position: absolute; top: -.2rem; inset-inline-start: 1rem;
    font-size: 4rem; line-height: 1; color: color-mix(in srgb, var(--asala-secondary) 45%, transparent); font-family: Georgia, serif; }

/* News: شارة تاريخ أوضح + عنوان يتحوّل */
.news-card h5 { transition: color .3s var(--e-lift); }
.news-card:hover h5 { color: var(--asala-primary); }
.news-date { background: var(--grad-primary); color: #fff; padding: .2rem .6rem; border-radius: 8px; font-size: .78rem; }

/* Footer: تباعد أفخم وحدّ علوي متدرّج */
footer { position: relative; }
footer::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px; background: var(--grad-gold); }
footer h5, footer .footer-title { font-weight: 800; margin-bottom: 1rem; }
footer .social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,.08); margin-inline-end: .4rem; transition: background .3s var(--e-lift), transform .3s var(--e-lift); }
footer .social a:hover { background: var(--asala-secondary); transform: translateY(-3px); }

/* عناوين الأقسام: مسافة سفلية متّسقة قبل الشبكة */
.section-title + .lead-muted, .section-title + p { margin-top: .6rem; }

/* ============================================================
   هوية الهيرو والهيدر — شارة اللوجو القوسية + Ken Burns + كاروسيل الأخبار
   ============================================================ */

/* ————— شريط قائمة زجاجي عائم (Glassmorphism) + هوية مزدوجة كموقع جامعة العاصمة —————
   • أعلى الصفحة: بطاقة اللوجو الكامل (خلفية بيضاء) مثبّتة أقصى اليمين = الهوية الرئيسية،
     بينما داخل الشريط لوجو دائري صغير فقط.
   • عند التمرير: تختفي البطاقة الكاملة، ويظهر اسم الشركة بجوار اللوجو الدائري داخل الشريط (Sticky). */
header{ position:relative; }

/* الشريط الزجاجي العائم — أعلى الصفحة يترك فراغًا على جهة الهوية (اليمين) لبطاقة اللوجو الكاملة */
.asala-navbar.glass-pill{ position:fixed; top:16px; inset-inline-start:170px; inset-inline-end:3%; z-index:1055;
    background:rgba(255,255,255,.12); -webkit-backdrop-filter:blur(16px) saturate(150%); backdrop-filter:blur(16px) saturate(150%);
    border:1px solid rgba(255,255,255,.28); border-radius:999px; padding:.35rem 1.4rem;
    box-shadow:0 14px 44px rgba(6,29,56,.30);
    transition:top .35s var(--e-lift,cubic-bezier(.2,.8,.2,1)), inset-inline-start .4s var(--e-lift,cubic-bezier(.2,.8,.2,1)), inset-inline-end .4s ease, border-radius .35s ease, background .35s ease, padding .3s ease; }
.asala-navbar.glass-pill .container{ max-width:100%; padding-inline:.5rem; }
/* عند التمرير: تختفي البطاقة، فيمتدّ الشريط لكامل العرض ويصلب ويلتصق بالأعلى */
body.nav-shrink .asala-navbar.glass-pill{ top:0; inset-inline-start:0; inset-inline-end:0; border-radius:0;
    background:rgba(6,25,50,.92); border-color:rgba(255,255,255,.08); box-shadow:0 8px 26px rgba(0,0,0,.28); }

/* اللوجو الدائري داخل الشريط + الاسم اللاصق */
.brand-nav{ display:flex; align-items:center; gap:.55rem; }
.brand-nav .brand-circle{ height:46px; width:46px; border-radius:50%; display:block;
    box-shadow:0 4px 14px rgba(0,0,0,.30); transition:height .3s ease, width .3s ease; }
.brand-nav .brand-sticky-name{ color:#fff; font-weight:800; white-space:nowrap; overflow:hidden;
    max-width:0; opacity:0; transform:translateX(6px);
    transition:max-width .45s var(--e-lift,cubic-bezier(.2,.8,.2,1)), opacity .3s ease, transform .35s ease; }
body.nav-shrink .brand-nav .brand-sticky-name{ max-width:420px; opacity:1; transform:none; }

/* بطاقة اللوجو الكامل — مثبّتة أقصى جهة الهوية (اليمين في RTL) أعلى الصفحة، وتختفي عند التمرير */
.brand-card{ position:fixed; top:8px; inset-inline-start:24px; z-index:1060; display:block; line-height:0;
    background:#fff; border-radius:14px; padding:8px 12px;
    box-shadow:0 10px 30px rgba(6,29,56,.28); border:1px solid rgba(6,29,56,.06);
    transition:opacity .35s ease, transform .4s var(--e-lift,cubic-bezier(.2,.8,.2,1)); }
.brand-card img{ height:104px; width:auto; display:block; }
body.nav-shrink .brand-card{ opacity:0; transform:translateY(-16px) scale(.9); pointer-events:none; }

@media (max-width:991.98px){
    /* على الموبايل: نُخفي البطاقة الكبيرة ونُبقي اللوجو الدائري + الاسم دائمًا داخل الشريط */
    .asala-navbar.glass-pill{ top:10px; inset-inline-start:2%; inset-inline-end:2%; padding:.3rem 1rem; }
    .brand-card{ display:none; }
    .brand-nav .brand-circle{ height:40px; width:40px; }
    .brand-nav .brand-sticky-name{ max-width:260px; opacity:1; transform:none; }
    .brand-nav .brand-sticky-name{ font-size:.95rem; }
}
@media (max-width:575.98px){
    .brand-nav .brand-sticky-name{ max-width:170px; font-size:.85rem; white-space:normal; line-height:1.1; }
}

/* الهيدر يصلب ويصغر عند التمرير على الرئيسية */
body.nav-shrink .asala-navbar.at-top{ background:rgba(6,29,56,.96)!important; box-shadow:0 6px 24px rgba(0,0,0,.25);
    backdrop-filter:saturate(140%) blur(6px); }
.asala-navbar{ transition:background .3s ease, box-shadow .3s ease, padding .3s ease; }
body.nav-shrink .asala-navbar{ padding-top:.15rem; padding-bottom:.15rem; }

/* Ken Burns: تكبير سينمائي ناعم للشريحة النشطة + منع الفيض */
.hero-carousel, .hero-slide{ overflow:hidden; }
.hero-carousel .carousel-item.active .hero-slide{ animation:heroKB 15s ease-out both; }
@keyframes heroKB{ from{ transform:scale(1.08); } to{ transform:scale(1); } }
/* التدرّج مُخبوز داخل الصورة نفسها (لوحة كحلية يمين للنص + موتيف ذهبي) — نُبقي طبقة CSS خفيفة جدًا فقط */
.hero-slide::before{ background:linear-gradient(180deg, rgba(6,29,56,.14) 0%, rgba(6,29,56,0) 40%, rgba(6,29,56,.24) 100%)!important; }
.hero-content h1, .hero-content .hero-h{ text-shadow:0 6px 30px rgba(0,0,0,.45); }
/* أسهم ونقاط أوضح */
.hero-carousel .carousel-indicators [data-bs-target]{ width:34px; height:5px; border-radius:4px; }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next{ width:6%; opacity:.75; }
.hero-carousel .carousel-control-prev:hover, .hero-carousel .carousel-control-next:hover{ opacity:1; }

/* كاروسيل الأخبار — بطاقات متحرّكة تلقائيًا */
.news-carousel{ position:relative; }
.news-carousel .carousel-control-prev, .news-carousel .carousel-control-next{
    width:44px; height:44px; top:50%; transform:translateY(-50%); background:var(--asala-primary,#0d4b8f);
    border-radius:50%; opacity:.9; box-shadow:0 6px 18px rgba(0,0,0,.2); }
.news-carousel .carousel-control-prev{ inset-inline-start:-8px; } .news-carousel .carousel-control-next{ inset-inline-end:-8px; }
.news-carousel .carousel-control-prev:hover, .news-carousel .carousel-control-next:hover{ opacity:1; background:var(--asala-secondary,#c9a227); }
.news-carousel .carousel-indicators{ position:static; margin-top:1.2rem; }
.news-carousel .carousel-indicators [data-bs-target]{ width:10px; height:10px; border-radius:50%; background:var(--asala-primary,#0d4b8f); opacity:.4; }
.news-carousel .carousel-indicators .active{ opacity:1; background:var(--asala-secondary,#c9a227); }

/* ============================================================
   تحسينات مستوحاة من المواقع المرجعية: Typewriter + سوشيال بالهيدر + فواصل الأقسام
   ============================================================ */

/* مؤشّر الكتابة (Typewriter) في سطر الهيرو المتحرّك */
.hero-tw.tw-caret::after{ content:"|"; margin-inline-start:2px; color:var(--asala-secondary,#c9a227);
    animation:twBlink 1s step-end infinite; font-weight:400; }
@keyframes twBlink{ 50%{ opacity:0; } }

/* أيقونات التواصل داخل الهيدر */
.nav-social{ margin-inline-start:.4rem; }
.nav-social a{ display:inline-flex; width:32px; height:32px; align-items:center; justify-content:center;
    border-radius:50%; color:#fff; background:rgba(255,255,255,.10);
    transition:background .25s ease, transform .25s var(--e-lift,cubic-bezier(.2,.8,.2,1)), color .25s ease; font-size:.95rem; }
.nav-social a:hover{ background:var(--asala-secondary,#c9a227); color:#08243f; transform:translateY(-2px); }
@media (max-width:991.98px){ .nav-social{ margin:.6rem 0; } }

/* فاصل زخرفي رقيق بين الأقسام (خط ذهبي متدرّج مع نقطة) — مستوحى من الفواصل الفنية بأسلوب مؤسسي هادئ */
.cms-sec + .cms-sec:not(.sec-hasmedia):not([class*="secbg-"])::before{
    content:""; display:block; width:min(88%,1080px); height:2px; margin:0 auto;
    background:linear-gradient(90deg,transparent 0%,rgba(201,162,39,.0) 8%,rgba(201,162,39,.55) 50%,rgba(201,162,39,.0) 92%,transparent 100%);
    position:relative; }

/* الموقع الأساسي بلا لوجو: يُعرض اسم الموقع داخل الشريط، ولا مساحة محجوزة للبطاقة */
.asala-navbar.glass-pill.no-logo{ inset-inline-start:3%; }
body.nav-shrink .asala-navbar.glass-pill.no-logo{ inset-inline-start:0; }
.brand-name-nologo{ color:#fff; font-weight:800; font-size:1.05rem; white-space:nowrap;
    background:linear-gradient(90deg,#fff 0%,#f3e2b3 100%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
@media (max-width:575.98px){ .brand-name-nologo{ font-size:.92rem; white-space:normal; line-height:1.15; } }

/* ============================================================
   الرئيسية بمستوى عالمي: دخول متنوّع لكل قسم + توسيط الموبايل + إيقاع
   ============================================================ */

/* دخول الأقسام بحركة متنوّعة — يُفعّل فقط عند توفّر JS (body.js-reveal) حتى لا تختفي عند غيابه */
body.js-reveal main[role="main"] > .cms-sec:not([data-anim]):not([data-fx]){ opacity:0; will-change:transform,opacity;
    /* شبكة أمان CSS خالصة: إظهار مضمون بعد 2.6ث مهما فشل الـ JS */
    animation:secFailsafe .01s linear 2.6s forwards; }
@keyframes secFailsafe{ to{ opacity:1; transform:none; } }
body.js-reveal main[role="main"] > .cms-sec.sec-in:not([data-anim]):not([data-fx]){ opacity:1; }
@media (prefers-reduced-motion: no-preference){
  body.js-reveal main[role="main"] > .cms-sec:not([data-anim]):not([data-fx]){ transition:opacity .8s var(--e-lift,cubic-bezier(.2,.8,.2,1)), transform .9s var(--e-lift,cubic-bezier(.2,.8,.2,1)); }
  /* تنويع الاتجاه حسب موضع القسم */
  body.js-reveal main[role="main"] > .cms-sec:not([data-anim]):not([data-fx]):nth-of-type(3n+1){ transform:translateY(42px) scale(.985); }
  body.js-reveal main[role="main"] > .cms-sec:not([data-anim]):not([data-fx]):nth-of-type(3n+2){ transform:translateX(46px); }
  body.js-reveal main[role="main"] > .cms-sec:not([data-anim]):not([data-fx]):nth-of-type(3n+3){ transform:translateX(-46px); }
  body.js-reveal main[role="main"] > .cms-sec.sec-in:not([data-anim]):not([data-fx]){ transform:none!important; }
  /* Stagger لبطاقات الأقسام عند الظهور */
  body.js-reveal .cms-sec:not([data-anim]):not([data-fx]) .row > [class*="col"]{ opacity:0; transform:translateY(26px); transition:opacity .7s var(--e-lift), transform .7s var(--e-lift); }
  body.js-reveal .cms-sec.sec-in:not([data-anim]):not([data-fx]) .row > [class*="col"]{ opacity:1; transform:none; }
  body.js-reveal .cms-sec.sec-in .row > [class*="col"]:nth-child(2){ transition-delay:.08s; }
  body.js-reveal .cms-sec.sec-in .row > [class*="col"]:nth-child(3){ transition-delay:.16s; }
  body.js-reveal .cms-sec.sec-in .row > [class*="col"]:nth-child(4){ transition-delay:.24s; }
  body.js-reveal .cms-sec.sec-in .row > [class*="col"]:nth-child(5){ transition-delay:.32s; }
  body.js-reveal .cms-sec.sec-in .row > [class*="col"]:nth-child(6){ transition-delay:.40s; }
}

/* إيقاع بصري: تبادل خلفية خفيفة بين الأقسام لإحساس أرقى */
main[role="main"] > .cms-sec:nth-of-type(even):not([class*="secbg-"]):not(.cta-section){
  background:linear-gradient(180deg,#f7fafd 0%,#eef4fa 100%);
}

/* ——— توسيط كامل على الموبايل (≤ 767px) ——— */
@media (max-width: 767.98px){
  main[role="main"] .cms-sec .sec-inner,
  main[role="main"] .cms-sec .container{ text-align:center; }
  main[role="main"] .cms-sec .section-title,
  main[role="main"] .cms-sec .section-title:not(.center-line)::after{ margin-inline:auto; }
  main[role="main"] .cms-sec .d-flex{ justify-content:center!important; }
  main[role="main"] .cms-sec .row{ justify-content:center; }
  main[role="main"] .cms-sec .btn, main[role="main"] .cms-sec .cta-btns,
  main[role="main"] .cms-sec .carousel-caption-cta{ margin-inline:auto; justify-content:center; display:flex; flex-wrap:wrap; gap:.6rem; }
  .hero-content{ text-align:center; margin-inline:auto; }
  .hero-content .eyebrow, .hero-content h1, .hero-content .hero-h, .hero-content .lead{ text-align:center; }
  .service-card, .news-card, .feature-card, .spec-card, .stats-card{ text-align:center; }
  .news-carousel .carousel-indicators{ justify-content:center; }
}

/* ============================================================
   v5.22 — تحسين تصميم شامل (UX/UI):
   استبدال قاعدة «ملء الشاشة» التي سبّبت فراغات وارتفاعات زائدة، بنظام
   تحجيم حسب المحتوى بإيقاع رأسي موحّد. المحتوى القصير يبقى مدمجًا، والغني
   يملأ الشاشة طبيعيًا — فيظهر أغلب الأقسام كاملًا عند تكبير 100% بلا فراغ.
   ============================================================ */
main[role="main"] > .cms-sec > .sec-inner{ min-height:0; }

/* إيقاع رأسي موحّد لكل الأقسام (يعالج تفاوت الـ Padding بين الأقسام) */
main[role="main"] > .cms-sec > .sec-inner > .container,
main[role="main"] > .cms-sec > .sec-inner > .container-fluid{
  padding-top: clamp(2.5rem, 4.2vw, 4rem) !important;
  padding-bottom: clamp(2.5rem, 4.2vw, 4rem) !important;
}
/* قسم البطل (Hero) يحتفظ بارتفاعه الكبير المميّز */
main[role="main"] > .cms-sec.sec-hasmedia:first-child > .sec-inner{ min-height:auto; }

/* ---------- هرمية الخطوط والعناوين ---------- */
.section-eyebrow{ font-size:.82rem; letter-spacing:1.5px; margin-bottom:.6rem; }
.section-title{ font-size:clamp(1.6rem, 2.6vw, 2.35rem); line-height:1.25; letter-spacing:-.01em; }
.lead-muted{ font-size:clamp(1rem, 1.4vw, 1.12rem); color:#5b6b7f; max-width:56ch; margin-inline:auto; }
main[role="main"] .container > .text-center.mb-5{ margin-bottom:2.5rem !important; }

/* ---------- بطاقات أنعم وأكثر احترافية ---------- */
.service-card, .news-card, .feature-card, .spec-card, .gcard, .stats-card, .card-boxed{
  border-radius:18px; border:1px solid #eaf0f7;
  box-shadow:0 4px 18px -12px rgba(11,46,89,.28);
  transition:transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, border-color .28s;
}
.service-card:hover, .news-card:hover, .feature-card:hover, .spec-card:hover, .gcard:hover, .card-boxed:hover{
  transform:translateY(-6px);
  box-shadow:0 18px 40px -18px rgba(11,46,89,.35);
  border-color:#cfe0f2;
}
/* أيقونات الأقسام دائرة متدرّجة أنعم */
.spec-ico-wrap, .gcard-ico, .feature-icon{ transition:transform .28s; }
.spec-card:hover .spec-ico-wrap, .gcard:hover .gcard-ico{ transform:scale(1.08) rotate(-3deg); }

/* أزرار «استعرض/عرض التفاصيل» أوضح */
.spec-btn{ font-weight:700; color:var(--asala-primary,#0b2e59); display:inline-flex; align-items:center; gap:.4rem; transition:gap .2s, color .2s; }
.spec-card:hover .spec-btn, .gcard:hover .spec-btn{ gap:.75rem; color:var(--asala-gold,#c8a24a); }

/* ---------- فواصل ناعمة بين الأقسام لإحساس بالتناسق ---------- */
main[role="main"] > .cms-sec + .cms-sec{ position:relative; }

/* ---------- الشبكات: مسافات متناسقة ---------- */
.cms-grid{ gap:1.5rem; }
@media (min-width:992px){ .cms-grid.cols-3{ grid-template-columns:repeat(3,1fr); } }

/* ---------- الموبايل: تكثيف الإيقاع ---------- */
@media (max-width: 575.98px){
  main[role="main"] > .cms-sec > .sec-inner > .container,
  main[role="main"] > .cms-sec > .sec-inner > .container-fluid{
    padding-top:2.25rem !important; padding-bottom:2.25rem !important;
  }
  .section-title{ font-size:1.5rem; }
}

/* ---------- تحسين المنيو (Header) لمظهر أكثر احترافية ---------- */
.asala-navbar.glass-pill{
  box-shadow:0 10px 34px -14px rgba(6,29,56,.45);
  backdrop-filter:blur(14px);
}
.asala-navbar .navbar-nav{ gap:.15rem; align-items:center; }
.asala-navbar .nav-link{ font-weight:700; font-size:.98rem; padding-inline:.85rem !important; opacity:.92; transition:opacity .2s, color .2s; }
.asala-navbar .nav-link:hover, .asala-navbar .nav-link.active{ opacity:1; }
.asala-navbar .nav-link::after{ bottom:.15rem; height:2.5px; }
/* زر الدعوة «اطلب خدمة» داخل المنيو: بارز واحترافي مهما كان تصنيفه */
.asala-navbar .navbar-nav .nav-item .nav-link.btn,
.asala-navbar .navbar-nav .nav-item.cta .nav-link,
.asala-navbar .nav-cta,
.asala-navbar .nav-link.nav-cta{
  background:var(--grad-gold,linear-gradient(135deg,#e0b64e,#c8a24a));
  color:#0b2e59 !important; border-radius:50px; padding:.5rem 1.25rem !important;
  box-shadow:0 6px 16px -6px rgba(200,162,74,.6); font-weight:800;
}
.asala-navbar .nav-cta:hover{ filter:brightness(1.06); transform:translateY(-1px); }
.asala-navbar .nav-cta::after{ display:none; }
/* أيقونة البحث ومبدّل اللغة متناسقان مع الأزرار */
.asala-navbar .nav-social a, .asala-navbar .lang-switch, .asala-navbar .search-toggle{ opacity:.95; }

/* ---------- تأثير ظهور أنعم (لا مبالغة) ---------- */
body.js-reveal main[role="main"] > .cms-sec{ animation-duration:.7s !important; }

/* ============================================================
   استوديو الأنيميشن — أسبقية مضمونة
   يُحمَّل هذا الملف بعد animations.css، وقواعد الظهور العامة أعلى تخصيصًا،
   فكانت تُلغي إعدادات الحركة الخاصة بكل قسم. هذه الكتلة تعيد الأولوية
   للإعداد المحفوظ من لوحة التحكم (تبويب «الحركة»).
   ============================================================ */
body.js-reveal main[role="main"] > .cms-sec[data-anim],
body.js-reveal main[role="main"] > .cms-sec[data-fx]{ animation:none !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-ready.as-prep:not(.as-in){ opacity:0 !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-up.as-prep:not(.as-in){ transform:translateY(34px) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-down.as-prep:not(.as-in){ transform:translateY(-34px) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-right.as-prep:not(.as-in){ transform:translateX(44px) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-left.as-prep:not(.as-in){ transform:translateX(-44px) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-zoom.as-prep:not(.as-in){ transform:scale(.88) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-scale.as-prep:not(.as-in){ transform:scale(1.08) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-rotate.as-prep:not(.as-in){ transform:rotate(-6deg) scale(.94) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-flip.as-prep:not(.as-in){ transform:perspective(900px) rotateX(14deg) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-bounce.as-prep:not(.as-in){ transform:translateY(40px) scale(.96) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-blur.as-prep:not(.as-in){ filter:blur(10px) !important; }
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-in,
body.js-reveal main[role="main"] > .cms-sec[data-fx].as-in{ opacity:1 !important; transform:none !important; filter:none !important; }
/* الأقسام ذات المؤثر المستمر فقط (بلا حركة دخول) تبقى ظاهرة دائمًا */
body.js-reveal main[role="main"] > .cms-sec[data-fx]:not([data-anim]){ opacity:1 !important; transform:none !important; }

/* ==========================================================================
   v5.27.3 — «شاشة لكل قسم» في الصفحة الرئيسية (Full-Viewport Sections)
   --------------------------------------------------------------------------
   المبدأ: min-height لا height. الارتفاع أرضيةٌ لا سقف — القسم يملأ الشاشة
   إن كان محتواه أقصر، ويتمدّد تلقائيًا إن كان أطول، فلا يُقصّ محتوى أبدًا
   ولا يظهر تمرير داخلي.

   وحدة القياس: svh (Small Viewport Height) بدل vh. على الموبايل يتغيّر ارتفاع
   الـ 100vh عند ظهور/اختفاء شريط عنوان المتصفح، فتقفز الأقسام أثناء التمرير؛
   الـ svh ثابت على أصغر حالة فيختفي الاهتزاز. مع تراجُع (fallback) إلى vh
   للمتصفحات الأقدم عبر @supports.
   ========================================================================== */

:root { --screen-h: 100vh; }
@supports (height: 100svh) { :root { --screen-h: 100svh; } }

/* الشرط (min-height:520px) يمنع سحق المحتوى على الهواتف في الوضع الأفقي
   وعلى النوافذ القصيرة جدًا — هناك يعود القسم لارتفاعه الطبيعي. */
@media (min-height: 520px) {

    /* v5.34.0 — تصحيح جذري لـ«المساحات البيضاء الفارغة»:
       كان كل قسم في الصفحة الرئيسية مُجبرًا على ارتفاع الشاشة كاملة
       (100vh = 730px)، فقسم قصير مثل «حلولنا» محتواه 403px كان يترك
       ~330px بياضًا ميتًا. الآن: البانر وحده يأخذ الشاشة كاملة،
       وبقية الأقسام تأخذ ارتفاع محتواها مع إيقاع رأسي موحّد،
       فتتقاسم الشاشة الواحدة قسمين قصيرين كما طلب العميل. */
    .home-page main[role="main"] > .cms-sec {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .home-page main[role="main"] > .cms-sec:first-child {
        min-height: var(--screen-h);
    }

    /* المحتوى يتمدّد ليملأ الفراغ ويتمركز رأسيًا؛ min-height:0 يسمح بالتجاوز
       عند طول المحتوى بدل ضغطه. */
    .home-page main[role="main"] > .cms-sec > .sec-inner {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 0;
        padding-block: 96px; /* v5.34.0 — إيقاع رأسي موحّد بمستوى واحد */
    }
    .home-page main[role="main"] > .cms-sec:first-child > .sec-inner,
    .home-page main[role="main"] > .cms-sec:has(> .sec-inner > .stats-band) > .sec-inner { padding-block: 0; }

    /* الأقسام التي تبني حاويتها بنفسها (section/div داخلي) — نمدّدها كذلك
       حتى لا تبقى الخلفية قصيرة داخل قسم طويل. */
    .home-page main[role="main"] > .cms-sec > .sec-inner > section,
    .home-page main[role="main"] > .cms-sec > .sec-inner > div:only-child {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* البانر: شرائح الكاروسيل تأخذ ارتفاع الشاشة كاملًا بدل 640px الثابتة. */
    .home-page main[role="main"] > .cms-sec:first-child .hero-slide { min-height: var(--screen-h); }
    .home-page main[role="main"] > .cms-sec:first-child .carousel,
    .home-page main[role="main"] > .cms-sec:first-child .carousel-inner,
    .home-page main[role="main"] > .cms-sec:first-child .carousel-item { min-height: var(--screen-h); }

    /* استثناء واحد مقصود: شريط الإحصائيات شريطٌ رفيع مسحوب فوق البانر
       (margin-top:-60px) وليس قسمًا مستقلًا بصريًا؛ إعطاؤه شاشة كاملة يخلق
       فراغًا هائلًا. يبقى ملحقًا بالبانر — وهو ما يجعل الانتقال متناسقًا. */
    .home-page main[role="main"] > .cms-sec:has(> .sec-inner > .stats-band) {
        min-height: 0;
        display: block;
    }
    .home-page main[role="main"] > .cms-sec:has(> .sec-inner > .stats-band) > .sec-inner {
        display: block;
        padding-block: 0;
    }

    /* الشريط الملوّن الختامي (CTA): شاشة كاملة مع تمركز تام. */
    .home-page main[role="main"] > .cms-sec > .sec-inner > .cta-band {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* الشبكات الداخلية لا تُشدّ عموديًا: تحافظ على ارتفاعها الطبيعي
       ويتوزّع الفائض كمسافة حول المحتوى لا داخل البطاقات. */
    .home-page main[role="main"] > .cms-sec .cms-grid,
    .home-page main[role="main"] > .cms-sec .row { flex: 0 0 auto; }

    /* هوامش التمرير إلى المراسي: تعويض شريط التنقّل الثابت. */
    .home-page main[role="main"] > .cms-sec { scroll-margin-top: 84px; }
}

/* الشاشات القصيرة والعريضة (لابتوب 1366×768 وما دونه ارتفاعًا):
   تقليل الحشو الداخلي حتى يبقى العنوان وجزء من المحتوى ظاهرًا في الشاشة الواحدة. */
@media (min-height: 520px) and (max-height: 800px) and (min-width: 992px) {
    .home-page main[role="main"] > .cms-sec > .sec-inner { padding-block: clamp(1.2rem, 2.5vh, 2.4rem); }
    .home-page main[role="main"] > .cms-sec .section-title { font-size: clamp(1.5rem, 2.2vw, 2.1rem); }
    .home-page main[role="main"] > .cms-sec .py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
}

/* الجوال: الشاشة الواحدة تبقى مطبّقة، لكن الشبكات متعدّدة البطاقات تتجاوزها
   طبيعيًا فتتمدّد — وهو السلوك المطلوب (تمدّد لا قصّ). */
@media (min-height: 520px) and (max-width: 575.98px) {
    .home-page main[role="main"] > .cms-sec > .sec-inner { padding-block: clamp(1.5rem, 3vh, 2.5rem); }
}

/* تراجُع للمتصفحات بلا دعم :has() — لا يُطبَّق استثناء الإحصائيات هناك،
   فنعيده بالمُعرِّف المباشر للفئة على الحاوية الأب عبر قاعدة احتياطية. */
@supports not selector(:has(*)) {
    .home-page main[role="main"] > .cms-sec:nth-of-type(3) { min-height: 0; display: block; }
    .home-page main[role="main"] > .cms-sec:nth-of-type(3) > .sec-inner { display: block; padding-block: 0; }
}

/* الحركة المخفَّضة: لا تغيير في الارتفاعات (لا علاقة لها بالحركة) — تُترك كما هي. */

/* ======================================================================
   v5.29.0 — أنماط الخصائص الجديدة القابلة للتحكم من لوحة التحكم
   (فيديو الهيرو، شريط الإحصائيات المدمج، تخطيط المعرض، صف أزرار الوسوم،
    قسم «كيف نعمل»، قسم «مركز التدريب»)
   ====================================================================== */

/* ---- هيرو: فيديو خلفية + تعتيم + إحصائيات مدمجة ---- */
.hero-carousel { position: relative; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-video-poster { position: absolute; inset: 0; background: center/cover no-repeat; z-index: 0; display: none; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-carousel > .carousel { position: relative; z-index: 2; }
.hero-slide-plain { background: none !important; }
.hero-slide-plain::before{ background:none !important; }
@media (max-width: 767.98px) {
  /* لا فيديو على الموبايل توفيرًا للبيانات — تظهر صورة الـPoster فقط */
  .hero-has-video:not(.hero-video-mobile) .hero-video { display: none; }
  .hero-has-video:not(.hero-video-mobile) .hero-video-poster { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-video-poster { display: block; }
}
.hero-stats-wrap { position: relative; z-index: 3; margin-top: auto; }
.hero-stats-card {
  background: #fff; border-radius: 22px 22px 0 0; padding: 1.5rem 1rem .9rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; text-align: center; box-shadow: 0 -6px 28px rgba(6,29,56,.12);
}
.hero-stat .bi { color: var(--asala-primary, #0d4b8f); font-size: 1.4rem; }
.hero-stat-num { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 900; color: var(--asala-primary, #0d4b8f); }
.hero-stat-label { font-size: .9rem; color: var(--asala-muted, #6b7a90); }

/* ---- المعرض: بطاقة كبيرة + بطاقتان / شبكة متداخلة ---- */
.gal-feature-wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1rem; }
.gal-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 1rem; }
.gal-tile { position: relative; display: block; overflow: hidden; border-radius: 20px; height: 100%; min-height: 190px; }
.gal-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.gal-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,29,56,.9), transparent 55%); }
.gal-tile-title { position: absolute; inset-inline: 1rem; bottom: 1rem; z-index: 2; color: #fff; font-weight: 700; }
.gal-lift { transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s; }
.gal-lift:hover { transform: translateY(-8px); box-shadow: 0 16px 36px rgba(6,29,56,.18); }
.gal-tile:hover img { transform: scale(1.07); }
.gal-masonry { columns: 3; column-gap: 1rem; }
.gal-masonry > * { break-inside: avoid; margin-bottom: 1rem; }
@media (max-width: 767.98px) {
  .gal-feature-wrap { grid-template-columns: 1fr; }
  .gal-tile-lg { height: 260px !important; }
  .gal-masonry { columns: 2; }
}

/* ---- شبكة الوسوم بشكل صف أزرار ---- */
.tag-pill-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.tag-pill {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: #fff; border: 1px solid rgba(13,75,143,.12); border-radius: 18px; padding: 1rem .6rem;
  color: var(--asala-ink, #1a2b42); text-decoration: none; font-weight: 700;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s, border-color .35s;
}
.tag-pill .bi { font-size: 1.7rem; color: var(--asala-primary, #0d4b8f); }
.tag-pill:hover { transform: translateY(-6px); border-color: rgba(13,75,143,.35); box-shadow: 0 14px 30px rgba(6,29,56,.12); color: var(--asala-primary, #0d4b8f); }

/* ---- تكبير صور بطاقات القطاعات عند المرور ---- */
.spec-hover-zoom .spec-media { overflow: hidden; }
.spec-hover-zoom .spec-media img { transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.spec-hover-zoom .spec-card:hover { transform: translateY(-10px); }
.spec-hover-zoom .spec-card:hover .spec-media img { transform: scale(1.07); }

/* ---- قسم «كيف نعمل» ---- */
.process-sec { position: relative; overflow: hidden; color: #fff; }
.process-sec::before, .process-sec::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; opacity: .16; pointer-events: none;
}
.process-sec::before { background: radial-gradient(circle, #1c6dd0, transparent 70%); top: -180px; inset-inline-start: -120px; }
.process-sec::after { background: radial-gradient(circle, #ffc94d, transparent 70%); bottom: -200px; inset-inline-end: -140px; }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.2rem 1.2rem; position: relative; z-index: 2; }
.process-card {
  background: rgba(255,255,255,.05); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 2.6rem 1.2rem 1.4rem; position: relative; text-align: center;
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.process-card:hover { transform: translateY(-10px); }
.process-num {
  position: absolute; top: -34px; inset-inline-start: 50%; transform: translateX(50%);
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #e0b64e, #c8a24a); color: #061d38; font-weight: 900; font-size: 1.4rem;
}
.process-card:hover .process-num { animation: procPulse 1.6s ease-in-out infinite; }
@keyframes procPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,201,77,.5); } 50% { box-shadow: 0 0 0 14px rgba(255,201,77,0); } }
.process-card h5 { font-weight: 800; margin-bottom: .5rem; }
.process-card p { color: rgba(255,255,255,.78); font-size: .95rem; margin: 0; }
.process-flow-line {
  height: 3px; border-radius: 3px; margin: 2.6rem 0 1.4rem; position: relative; z-index: 2;
  background: linear-gradient(90deg, transparent, #ffc94d, transparent); background-size: 200% 100%;
  animation: procFlow 6s linear infinite;
}
@keyframes procFlow { from { background-position: 0% 0; } to { background-position: 200% 0; } }
.spec-marquee { overflow: hidden; position: relative; z-index: 2; }
.spec-marquee-track { display: flex; gap: .8rem; width: max-content; animation: specMarquee 42s linear infinite; }
@keyframes specMarquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
.spec-chip { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 50px; padding: .45rem 1.1rem; white-space: nowrap; font-size: .92rem; }
.process-note { text-align: center; color: rgba(255,255,255,.8); margin-top: 1.2rem; position: relative; z-index: 2; }

/* ---- قسم «مركز التدريب» ---- */
.training-sec { position: relative; overflow: hidden; }
.training-sec::before {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(28,109,208,.12), transparent 70%);
  top: -220px; inset-inline-end: -160px; pointer-events: none;
}
.training-media { position: relative; border-radius: 22px; overflow: hidden; }
.training-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.training-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,29,56,.88), transparent 58%); }
.training-media-caption { position: absolute; inset-inline: 1.2rem; bottom: 1.1rem; z-index: 2; color: #fff; }
.training-media-caption strong { display: block; font-size: 1.15rem; }
.training-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.training-card {
  background: #fff; border: 1px solid rgba(13,75,143,.1); border-radius: 18px; padding: 1.3rem;
  position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s;
}
.training-card::after {
  content: ""; position: absolute; bottom: 0; inset-inline-end: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, #0d4b8f, #ffc94d); transition: width .45s cubic-bezier(.22,.61,.36,1);
}
.training-card:hover { transform: translateY(-8px); box-shadow: 0 16px 34px rgba(6,29,56,.12); }
.training-card:hover::after { width: 100%; }
.training-ico { width: 52px; height: 52px; border-radius: 12px; background: #eef4fb; display: grid; place-items: center; margin-bottom: .8rem; }
.training-ico .bi { font-size: 1.4rem; color: var(--asala-primary, #0d4b8f); }
.training-card h6 { font-weight: 800; margin-bottom: .35rem; }
.training-card p { color: var(--asala-muted, #6b7a90); font-size: .92rem; margin: 0; }

/* ---- شريط الشركاء المدمج أسفل الأخبار ---- */
.partners-strip { border-top: 1px solid rgba(13,75,143,.12); margin-top: 2.5rem; padding-top: 1.8rem; }
.partners-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.5rem; }
.partners-row img { object-fit: contain; max-width: 100%; filter: grayscale(1); opacity: .75; transition: filter .35s, opacity .35s; }
/* v5.39.0 — على الموبايل: شعار عريض بارتفاع ثابت كان يتجاوز عرض الشاشة (573px داخل 375px). */
@media (max-width: 575.98px) {
  .partners-row { gap: 1.25rem; }
  .partners-row img { max-width: 44vw; height: auto !important; max-height: 56px; }
}
.partners-row img:hover { filter: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .spec-marquee-track, .process-flow-line, .process-card:hover .process-num { animation: none !important; }
  .gal-lift, .gal-tile img, .tag-pill, .training-card { transition: none !important; }
}

@media (max-width: 767.98px) {
  /* بطاقات البرامج التدريبية تنزل لعمود واحد مهما كان إعداد الأعمدة في اللوحة */
  .training-cards { grid-template-columns: 1fr !important; }
  .process-grid { grid-template-columns: 1fr; }
}

/* ============ v5.29.0 — هيكل الموقع: شريط علوي، زر الطلب، تأثيرات عامة ============ */
.site-topbar{position:fixed;top:0;inset-inline:0;z-index:1035;display:flex;align-items:center;font-size:.82rem}
.site-topbar .container{display:flex;align-items:center;min-height:inherit;padding-block:4px}
.site-topbar .stb-link{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:.35rem;transition:color .25s}
.site-topbar .stb-link:hover{color:#ffc94d}
.site-topbar .stb-social a{color:inherit;margin-inline-start:.55rem;text-decoration:none;transition:color .25s}
.site-topbar .stb-social a:hover{color:#ffc94d}
.site-topbar .stb-note{opacity:.85}
@media (max-width:575.98px){.site-topbar{display:none}}

/* زر «اطلب خدمة» — لا يُلفّ أبدًا ولا يختفي عند الطيّ */
.header-cta{flex:0 0 auto;white-space:nowrap;display:inline-flex;align-items:center;gap:.4rem;
  margin-inline-start:auto;margin-inline-end:.5rem;padding:.5rem 1.15rem;border-radius:50px;
  font-weight:700;font-size:.92rem;text-decoration:none;position:relative;overflow:hidden;
  background:linear-gradient(135deg,#e0b64e,#c8a24a);color:#06213f;
  box-shadow:0 6px 18px -8px rgba(224,182,78,.8);transition:transform .3s cubic-bezier(.22,.61,.36,1)}
.header-cta:hover{transform:translateY(-2px);color:#06213f}
.header-cta-shimmer::after{content:"";position:absolute;top:0;inset-inline-start:-60%;width:45%;height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);
  animation:ctaShimmer 3.2s ease-in-out infinite}
@keyframes ctaShimmer{0%,72%{inset-inline-start:-60%}100%{inset-inline-start:130%}}

/* شريط تقدّم التمرير */
.scroll-progress{position:fixed;top:0;inset-inline-start:0;height:3px;width:0;z-index:2000;
  background:linear-gradient(90deg,#0d4b8f,#ffc94d);transition:width .1s linear;pointer-events:none}

/* زر العودة إلى الأعلى */
.back-to-top{position:fixed;inset-inline-end:22px;bottom:22px;width:52px;height:52px;border-radius:50%;
  border:0;background:#0a2c52;color:#fff;font-size:1.25rem;z-index:1040;cursor:pointer;
  opacity:0;visibility:hidden;transform:translateY(12px);
  box-shadow:0 10px 26px -10px rgba(6,29,56,.7);
  transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.22,.61,.36,1)}
.back-to-top.show{opacity:1;visibility:visible;transform:translateY(0)}
.back-to-top:hover{background:#0d4b8f}

@media (prefers-reduced-motion: reduce){
  .header-cta-shimmer::after{animation:none;display:none}
  .header-cta:hover{transform:none}
  .back-to-top{transition:none}
}

/* ==========================================================================
   v5.30.0 — إصلاح جذري: الانزياح الأفقي للصفحة (Horizontal Overflow)
   --------------------------------------------------------------------------
   السبب المُشخَّص: أقسام الصفحة عرضها كامل الشاشة، وحركات الدخول (flip / zoom /
   scale / rotate) تُطبَّق عليها *قبل* ظهورها في الشاشة عبر الحالة .as-prep.
   التحويل ثلاثي الأبعاد perspective(900px) rotateX(14deg) يوسّع الصندوق المرئي
   للقسم بمقدار ~300px، ولأن العنصر بعرض الشاشة أصلًا فالفائض يخلق تمريرًا أفقيًا
   في <html> — وهو ما يجعل الصفحة كلها تبدو مزاحة ويظهر فراغ أبيض على الجانب.
   (كان body{overflow-x:hidden} موجودًا لكنه لا ينفع، لأن الذي يمرّر هو <html>.)

   العلاج على طبقتين:
   1) قصّ الفائض الأفقي على <html> بـ overflow-x:clip — لا ينشئ حاوية تمرير،
      فلا يكسر position:sticky للهيدر (بخلاف overflow:hidden).
   2) إلغاء حركة flip للأقسام كاملة العرض واستبدالها بحركة صعود لطيفة —
      الدوران ثلاثي الأبعاد على عنصر بعرض الشاشة تأثير مبالغ فيه ولا يليق
      بموقع استشاري، وهو مصدر المشكلة الأساسي.
   ========================================================================== */
html{ overflow-x:clip; }
@supports not (overflow-x: clip){ html{ overflow-x:hidden; } }
body{ overflow-x:clip; max-width:100%; }

/* (2) لا دوران ثلاثي الأبعاد على قسم بعرض الشاشة */
body.js-reveal main[role="main"] > .cms-sec[data-anim].as-anim-flip.as-prep:not(.as-in){
  transform:translateY(30px) !important;
}

/* ==========================================================================
   v5.30.0 — بطاقات القطاعات: مستوى المكاتب الاستشارية العالمية
   --------------------------------------------------------------------------
   المبدأ: رقيّ بلا مبالغة. صورة بنسبة ثابتة (لا تقفز الشبكة مهما اختلفت أبعاد
   الصور المرفوعة)، طبقة تدرّج تُعمّق الصورة وتوحّد لون الصور المختلفة، تكبير
   بطيء جدًا (0.9s) بدل «القفزة»، رفع خفيف مع ظل ملوّن بلون الهوية، وزر تفاصيل
   يتحوّل من نصّي هادئ إلى زر ممتلئ عند الـ Hover. كل الحركات على transform /
   opacity فقط — بلا إعادة تخطيط، فلا أثر على السرعة.
   ========================================================================== */
.spec-card{ border-radius:18px; background:#fff; }
.spec-card .spec-media{
  /* full-bleed: يلغي حشو البطاقة (1.8rem) ليلتصق أعلى الصورة بحواف البطاقة */
  position:relative; margin:-1.8rem -1.8rem 1.35rem; border-radius:18px 18px 0 0;
  aspect-ratio:16/10; overflow:hidden; background:#eef3f9;
}
.spec-card .spec-media img{
  width:100%; height:100%; object-fit:cover; display:block; border-radius:0; margin:0;
  transition:transform .9s cubic-bezier(.22,.61,.36,1), filter .5s ease;
  will-change:transform;
}
/* طبقة تدرّج سفلية: توحّد ألوان الصور وتمنح البطاقة عمقًا */
.spec-card .spec-media::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(to top, rgba(6,29,56,.45) 0%, rgba(6,29,56,.10) 42%, transparent 70%);
  transition:opacity .45s ease; opacity:.85;
}
.spec-card:hover .spec-media img{ transform:scale(1.06); }
.spec-card:hover .spec-media::after{ opacity:.55; }

/* رفع أهدأ + ظل بلون الهوية بدل الأسود الرمادي */
.spec-card:hover{
  transform:translateY(-8px);
  box-shadow:0 26px 50px -22px rgba(13,75,143,.42), 0 6px 16px -10px rgba(13,75,143,.25);
}

/* زر التفاصيل: هادئ في الوضع العادي، بارز ومكتمل عند الـ Hover */
.spec-card .spec-btn{
  border-color:transparent; padding-inline:0; background:transparent;
  transition:background .35s cubic-bezier(.22,.61,.36,1), color .3s ease,
             border-color .3s ease, padding .35s cubic-bezier(.22,.61,.36,1),
             box-shadow .35s ease;
}
.spec-card:hover .spec-btn{
  background:var(--asala-primary,#0d4b8f); color:#fff;
  border-color:var(--asala-primary,#0d4b8f); padding-inline:1.35rem;
  box-shadow:0 12px 24px -10px rgba(13,75,143,.55);
}
.spec-card:hover .spec-btn i{ transform:translateX(-5px); }

/* الشريط العلوي المتدرّج يبقى فوق الصورة */
.spec-card::before{ z-index:3; }

@media (max-width:575.98px){
  .spec-card .spec-media{ aspect-ratio:16/9; }
}
@media (prefers-reduced-motion:reduce){
  .spec-card .spec-media img, .spec-card .spec-btn{ transition:none; }
  .spec-card:hover{ transform:none; }
  .spec-card:hover .spec-media img{ transform:none; }
}


/* ==========================================================================
   v5.30.1 — إصلاح الهوية في الهيدر: إلغاء بطاقة الشعار العائمة
   --------------------------------------------------------------------------
   السبب المُشخَّص: كان الشعار يظهر مرتين في وقت واحد — شعار دائري صغير داخل
   شريط الهيدر، وبطاقة بيضاء ضخمة (ارتفاع الصورة 104px + حشو) مثبّتة بـ
   position:fixed عند top:8px خارج حاوية الصفحة. البطاقة أطول من شريط الهيدر
   نفسه فتبرز فوقه وتُقصّ من أعلى الشاشة، وتقع خارج عرض الحاوية فتبدو منفصلة
   عن التصميم ومعلّقة فوق صورة الهيرو — وهو ما ظهر في اللقطة المرفقة.
   العلاج: هوية واحدة فقط داخل الشريط (شعار + اسم الشركة) ظاهرة في كل الحالات،
   وهي نفس الحالة التي تظهر عند التمرير وتبدو مضبوطة. لا شعار عائم إطلاقًا.
   ========================================================================== */
.brand-card{ display:none !important; }

/* الاسم يظهر دائمًا بجوار الشعار — لا ينتظر التمرير */
.brand-nav .brand-sticky-name{ max-width:420px; opacity:1; transform:none; }
.brand-nav .brand-circle{ height:44px; width:44px; }
body.nav-shrink .brand-nav .brand-circle{ height:38px; width:38px; }
@media (max-width:575.98px){
  .brand-nav .brand-sticky-name{ max-width:170px; }
}

/* ==========================================================================
   v5.33.0 — علاج «المساحات البيضاء الكبيرة الفارغة»
   السبب: قسم يحمل as-prep ولا يصله IntersectionObserver فيبقى opacity:0
   محتفظًا بارتفاعه كاملًا. عولج بشبكة الأمان الرباعية في anim-studio.js
   (فحص بعد أول رسم + فحص عند التمرير + مؤقّت 1500ms + تعطيل الإخفاء بلا دعم).
   وحالة الإخفاء .as-ready لا تُضاف إلا بجافاسكربت — فبلا جافاسكربت كل شيء ظاهر.
   ========================================================================== */

/* توحيد المسافات الرأسية: 96px سطح المكتب / 56px الجوال.
   v5.34.0: الحشو الرأسي يُملَك في مستوى واحد فقط (.sec-inner) والحاويات
   الداخلية تُصفَّر — كان تراكُب حشو .sec-inner مع py-5 مع 96px يضاعف
   الفراغ بين الأقسام إلى أكثر من 300px. */
main[role="main"] > .cms-sec > .sec-inner{ padding-block: 96px; }
main[role="main"] > .cms-sec > .sec-inner > .container,
main[role="main"] > .cms-sec > .sec-inner > .container-fluid,
main[role="main"] > .cms-sec > .container,
main[role="main"] > .cms-sec > .container-fluid{ padding-block: 0; }
@media (max-width: 767.98px){
  main[role="main"] > .cms-sec > .sec-inner,
  .home-page main[role="main"] > .cms-sec > .sec-inner{ padding-block: 56px; }
}
/* البانر وشريط الإحصائيات لا يخضعان للإيقاع (يملكان حشوهما الخاص). */
main[role="main"] > .cms-sec:first-child > .sec-inner,
main[role="main"] > .cms-sec:has(> .sec-inner > .stats-band) > .sec-inner{ padding-block: 0; }

/* ==========================================================================
   v5.33.1 — «الجزء غير المفهوم في نهاية البانر»
   --------------------------------------------------------------------------
   أثبت القياس الحيّ السبب: حاويات الكاروسيل مربوطة بارتفاع الشاشة الكامل
   (--screen-h = 730px) بينما شريحة البانر تلتزم بارتفاعها المعتمد
   min(78vh,620px) = 569px — فينشأ شريط تدرّج أزرق فارغ ارتفاعه 161px أسفل
   الصورة تعلوه الموجة البيضاء بلا محتوى. العلاج: الحاويات ترث ارتفاع البانر
   بدل ارتفاع الشاشة، والشريحة تملأ الحاوية. النتيجة: بانر 569px في شاشة
   730px → القسم التالي «يطلّ» أسفله كما تنصّ المواصفة.
   ========================================================================== */
.hero-carousel{ height:auto !important; }
.hero-carousel .carousel,
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item{ min-height:inherit !important; height:auto !important; }
.hero-carousel .carousel-item.active{ display:flex !important; }
.hero-carousel .hero-slide{ flex:1 1 auto; width:100%; }

@media (prefers-reduced-motion: reduce){
  main[role="main"] > .cms-sec[data-anim]{ opacity:1 !important; transform:none !important; }
}

/* ==========================================================================
   v5.34.0 — إعادة تصميم قسم «من أنت؟ / حلولنا»
   القسم كان قصير المحتوى (317px) داخل قسم مفروض عليه ارتفاع شاشة كاملة
   (730px) فظهرت فجوة بيضاء ميتة ~330px فوقه ومثلها تحته. بعد تحرير
   الارتفاع أُعيد تصميم الأزرار الستّة لتبدو بطاقات اختيار حقيقية:
   شبكة سداسية متساوية، أيقونة داخل دائرة، رفع عند التمرير، وخط ذهبي سفلي.
   ========================================================================== */
.tag-pill-row{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:16px;
  align-items:stretch;
}
.tag-pill-row > .tag-pill{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:.6rem; width:auto; padding:22px 10px;
  background:#fff; border:1px solid rgba(13,75,143,.10); border-radius:18px;
  box-shadow:0 4px 18px rgba(6,29,56,.05);
  color:var(--asala-ink,#1a2b42); font-weight:700; text-decoration:none;
  position:relative; overflow:hidden;
  transition:transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s cubic-bezier(.22,.61,.36,1), border-color .35s;
}
.tag-pill-row > .tag-pill i{
  font-size:1.45rem; color:var(--asala-primary,#0d4b8f);
  width:52px; height:52px; display:grid; place-items:center;
  border-radius:50%; background:#eef4fb; transition:background .35s, color .35s, transform .35s;
}
.tag-pill-row > .tag-pill span{ font-size:.95rem; line-height:1.3; text-align:center; }
.tag-pill-row > .tag-pill::after{
  content:""; position:absolute; inset-inline:0; bottom:0; height:3px;
  background:linear-gradient(90deg,#0d4b8f,#ffc94d);
  transform:scaleX(0); transform-origin:right; transition:transform .35s cubic-bezier(.22,.61,.36,1);
}
.tag-pill-row > .tag-pill:hover{
  transform:translateY(-8px);
  box-shadow:0 16px 34px rgba(6,29,56,.12);
  border-color:rgba(13,75,143,.22);
}
.tag-pill-row > .tag-pill:hover i{ background:var(--asala-primary,#0d4b8f); color:#fff; transform:scale(1.06); }
.tag-pill-row > .tag-pill:hover::after{ transform:scaleX(1); }
@media (max-width:991.98px){ .tag-pill-row{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:575.98px){ .tag-pill-row{ grid-template-columns:repeat(2,1fr); gap:12px; } }
@media (prefers-reduced-motion:reduce){
  .tag-pill-row > .tag-pill,
  .tag-pill-row > .tag-pill i,
  .tag-pill-row > .tag-pill::after{ transition:none !important; }
  .tag-pill-row > .tag-pill:hover{ transform:none; }
}


/* U15 (v5.87): امنع كسر الـlightbox/modal — إلغاء containing block الناتج عن will-change/transform بعد ظهور القسم أو عند فتح نافذة */
body.js-reveal main[role="main"] > .cms-sec.sec-in:not([data-anim]):not([data-fx]){ will-change:auto; }
body.modal-open .cms-sec, body.modal-open .cms-sec > .sec-inner{ transform:none !important; will-change:auto !important; }
