@import "../../fonts/Cairo/stylesheet.css";

* {
    font-family: 'Cairo', sans-serif;

}


html {
    scroll-padding-top: 100px; /* Adjust the value for your needs */
}

/* =====================================================
مؤسسة الوافي للتوثيق والدراسات — style.css الألوان المعتمدة: أخضر داكن رسمي + ذهبي هادئ
   ===================================================== */

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* ══════════════════════════════════════════
   GREEN — الأخضر الرسمي
   ══════════════════════════════════════════ */

    --navy-deep: #384d32;

    --navy-mid: #4a633f;

    --navy-soft: #5c794d;

    --navy-glass: rgba(56, 77, 50, 0.6);

    /* ══════════════════════════════════════════
     BLACK — الأسود الفاخر
     ══════════════════════════════════════════ */
    --black-deep: rgb(14, 16, 16);
    --black-mid: #141414;
    --black-soft: #1e1e1e;
    --black-glass: rgba(10, 10, 10, 0.65);

    /* ══════════════════════════════════════════
     GOLD — الذهبي العتيق
     ══════════════════════════════════════════ */
    --gold: #E9BB4F;

    --gold-warm: #D5A83D;

    --gold-light: #F2CF78;

    --gold-muted: #B88F32;

    --gold-dim: #8F6F25;

    --gold-pale: rgba(233, 187, 79, 0.15);

    --gold-line: rgba(233, 187, 79, 0.5);

    --gold-glow: rgba(233, 187, 79, 0.08);

    /* ══════════════════════════════════════════
     WHITE
     ══════════════════════════════════════════ */
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-40: rgba(255, 255, 255, 0.4);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-07: rgba(255, 255, 255, 0.07);

    /* ══════════════════════════════════════════
     SEMANTIC — استخدامات الموقع
     ══════════════════════════════════════════ */
    --bg-primary: var(--navy-deep);
    --bg-section: #f5f2ea;
    --bg-section2: #dce6d7;
    --bg-card: #ffffff;
    --text-on-dark: var(--white-90);
    --text-on-light: var(--navy-deep);
    --accent: var(--gold);
    --accent-hover: var(--gold-light);

    /* ══════════════════════════════════════════
     ALIASES — لضمان التوافق مع الكود الحالي
     (القديم → الجديد)
     ══════════════════════════════════════════ */
    --green-deep: var(--navy-deep);
    --green-mid: var(--navy-mid);
    --green-soft: var(--navy-soft);
    --green-glass: var(--navy-glass);

    /* ══════════════════════════════════════════
     DIMENSIONS & TYPOGRAPHY
     ══════════════════════════════════════════ */
    --header-h: 98px;
    --nav-h: 46px;
    --total-h: calc(var(--header-h) + var(--nav-h));
    --max-w: 1440px;
    --nav-pad-x: 40px;
    /* padding أفقي للـ nav-inner — متغيّر حسب الشاشة */
    --font: "Tajawal", "Amiri", sans-serif;
    --ease: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    /* clip بدل hidden لئلا يكسر position:sticky للأبناء */
    direction: ltr;
    /* يبقي شريط التمرير على اليمين رغم RTL */
}

body {
    font-family: var(--font);
    background: #ffffff;
    color: var(--green-deep);
    overflow-x: clip;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #e8e4da;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-muted);
    border-radius: 3px;
}

/* =====================================================
   SITE BACKGROUND OVERLAY
   CSS translation of the React background-components.tsx + demo.tsx
   ─────────────────────────────────────────────────────────────────
   ::before  → "Soft Yellow Glow"   (radial-gradient + mix-blend-mode)
   ::after   → "Crosshatch Art"     (four repeating-linear-gradients)
   ===================================================== */
.site-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    isolation: isolate;
}

/* ── ترتيب الطبقات على مستوى الصفحة ──────────────────
   0 → خلفيات الأقسام (لون كل قسم)
   2 → .site-bg-overlay::after  (النقش الهندسي)
   3 → محتوى الأقسام + الأقسام المستثناة من النقش
   ملاحظة: أي قسم يُراد ظهور النقش فوق لونه يجب أن يبقى
   z-index: auto حتى تتمكّن عناصره الداخلية من تجاوز النقش.
   (تُضبط القيم داخل قاعدة كل قسم ومحتواه أدناه)
   ──────────────────────────────────────────────────── */

/* -- Layer 1: Soft Yellow Glow ─────────────────────── */
/* .site-bg-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at center,
    #fff991 0%,
    transparent 70%
  );
  opacity: 0.6;
  mix-blend-mode: multiply;
} */

/* -- Layer 2: Crosshatch Art — Light Pattern ───────── */
.site-bg-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            22.5deg,
            transparent,
            transparent 2px,
            rgba(56, 77, 50, 0.09) 2px,
            rgba(56, 77, 50, 0.09) 3px,
            transparent 3px,
            transparent 8px
        ),

        repeating-linear-gradient(
            67.5deg,
            transparent,
            transparent 2px,
            rgba(74, 99, 63, 0.075) 2px,
            rgba(74, 99, 63, 0.075) 3px,
            transparent 3px,
            transparent 8px
        ),

        repeating-linear-gradient(
            112.5deg,
            transparent,
            transparent 2px,
            rgba(42, 59, 38, 0.06) 2px,
            rgba(42, 59, 38, 0.06) 3px,
            transparent 3px,
            transparent 8px
        ),

        repeating-linear-gradient(
            157.5deg,
            transparent,
            transparent 2px,
            rgba(38, 52, 34, 0.045) 2px,
            rgba(38, 52, 34, 0.045) 3px,
            transparent 3px,
            transparent 8px
        )
}

/* =====================================================
   SITE HEADER  (position: fixed, transparent bg)
   ===================================================== */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
    direction: rtl;
    transition:
        transform 0.4s ease,
        box-shadow 0.3s ease;
}

/* ─── TOP BAR ─── */
.top-bar {
    background: transparent;
    height: var(--header-h);
    position: relative;
}

.top-bar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    gap: 20px;
}

/* ─── BRAND ─── */
.header-brand {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    transition: transform var(--ease);
}

.brand-logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 64px;
    height: auto;
}

.brand-texts {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    margin-top: 15px;
}

.brand-text-row {
    display: flex;
    align-items: center;
}

.abbasia-svg {
    height: 29px;
    width: auto;
    filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
}

.title-img {
    height: 35px;
    width: auto;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

/* ─── SOCIAL ICONS (desktop top-bar) ─── */
.header-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 13px;
    transition: all var(--ease);
    background: var(--navy-deep);
}

.social-icon:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(195, 168, 74, 0.23);
}

/* ─── RESPONSIVE UTILITIES ─── */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

/* ─── NAVBAR ─── */
.main-nav {
    height: var(--nav-h);
    background: var(--navy-deep);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    max-width: var(--max-w);
    margin: 10px auto;
    position: relative;
    box-shadow: 0 2px 18px rgba(20, 52, 79, 0.18);
}

/* ── Pinned nav (after 200px scroll) ── */
.main-nav.nav-pinned {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border: none;
    border-bottom: 1.5px solid rgba(20, 52, 79, 0.07);
    max-width: 100%;
    margin: 0;
    height: 60px;
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* انتقال سلس عند تثبيت/إزالة التثبيت */
.main-nav {
    transition:
        transform 0.4s ease,
        box-shadow 0.3s ease,
        height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.main-nav.nav-pinned .nav-link {
    /* color: var(--navy-deep); */
    font-size: 15px;
}

.main-nav.nav-pinned .nav-item:hover .nav-link,
.main-nav.nav-pinned .nav-item.active .nav-link {
    color: var(--gold-warm);
}


.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--nav-pad-x);
    position: relative;
    transition: padding 0.3s ease;
}

/* ─── NAV LIST (desktop) ─── */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    justify-content: center;
    transition: padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── NAV BRAND (Logo + Title) — يظهر فقط عند تثبيت الـ nav ─── */
.nav-brand-pinned {
    position: absolute;
    right: var(--nav-pad-x);
    /* محاذاة مع padding الـ nav-inner */
    top: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(24px);
    /* يبدأ من اليمين قليلاً للانزلاق */
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.4s;
    z-index: 5;
}

.nav-brand-logo-img {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    transition: transform 0.35s ease;
    flex-shrink: 0;
}

.nav-brand-title-img {
    height: 32px;
    width: auto;
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.22));
    flex-shrink: 0;
}

.nav-brand-pinned:hover .nav-brand-logo-img {
    transform: rotate(-6deg) scale(1.05);
}

/* ─── حالة التثبيت: إظهار البراند + إفساح مكان له في الـ nav-list ─── */
.main-nav.nav-pinned .nav-brand-pinned {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
    transition:
        opacity 0.45s ease 0.05s,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.05s,
        visibility 0s linear 0s;
}

@media (max-width: 1280px) {
    :root {
        --nav-pad-x: 32px;
    }
}

/* للشاشات بين 1100px و 850px نقلّل البراند قليلاً + الـ padding */
@media (max-width: 1100px) {
    :root {
        --nav-pad-x: 28px;
    }

    .nav-brand-logo-img {
        height: 60px;
    }

    .nav-brand-title-img {
        height: 28px;
    }
}

@media (max-width: 1024px) {
    :root {
        --nav-pad-x: 24px;
    }
}

/* ـــــ للشاشات أصغر من 850px: إخفاء البراند تماماً وإرجاع الـ navbar لحجمه الطبيعي ـــــ */
@media (max-width: 1000px) {
    .nav-brand-pinned {
        display: none;
    }
    .main-nav.nav-pinned .nav-list {
        padding-right: 0;
    }

    .main-nav.nav-pinned {
        height: var(--nav-h);
    }

    .main-nav.nav-pinned .nav-link {
        font-size: 15.3px;
        padding: 0 13px;
    }
}

.nav-item {
    height: 100%;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 13px;
    font-size: 15.3px;
    font-weight: 600;
    color: var(--white-90);
    white-space: nowrap;
    transition: color var(--ease);
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 13px;
    left: 13px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px 2px 0 0;
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
    color: var(--gold-light);
}

.nav-item:hover .nav-link::after,
.nav-item.active .nav-link::after {
    transform: scaleX(1);
}

/* ─── DESKTOP NAV: has-dropdown indicator + chevron ─── */
.nav-item.has-dropdown > .nav-link {
    gap: 6px;
}

.nav-chev {
    font-size: 9px;
    color: var(--gold-light);
    opacity: 0.75;
    transition:
        transform 0.28s ease,
        opacity 0.28s ease,
        color 0.28s ease;
    margin-top: 2px;
}

.nav-item.has-dropdown:hover > .nav-link .nav-chev,
.nav-item.has-dropdown:focus-within > .nav-link .nav-chev {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--gold);
}

/* ─── DESKTOP DROPDOWN PANEL ─── */
.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%) translateY(-6px);
    min-width: 220px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--navy-deep);
    border: 1px solid rgba(195, 168, 74, 0.25);
    border-radius: 14px;
    box-shadow:
        0 18px 40px -10px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(195, 168, 74, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.28s ease;
    z-index: 1100;
}

/* فتح القائمة عند الـ hover */
.nav-item.has-dropdown:hover > .nav-dropdown,
.nav-item.has-dropdown:focus-within > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(50%) translateY(0);
}

/* جسر شفّاف لتفادي قطع الـ hover بين الزر والقائمة */
.nav-dropdown::before {
    content: "";
    position: absolute;
    inset: -10px 0 calc(100% - 1px) 0;
    /* مسافة فوق القائمة تكفي للهوفر */
}

/* سهم صغير يشير لأعلى */
.nav-dropdown::after {
    content: "";
    position: absolute;
    top: -6px;
    right: 50%;
    transform: translateX(50%) rotate(45deg);
    width: 11px;
    height: 11px;
    background: #E9BB4F;
    border-top: 1px solid rgba(195, 168, 74, 0.25);
    border-right: 1px solid rgba(195, 168, 74, 0.25);
    border-radius: 2px;
}

/* روابط القائمة المنسدلة */
.nav-dropdown li {
    list-style: none;
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        padding 0.25s ease;
    position: relative;
}

.nav-dropdown-link::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0;
    transform: scale(0);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
    flex-shrink: 0;
}

.nav-dropdown-link:hover {
    background: rgba(195, 168, 74, 0.1);
    color: var(--gold-light);
    padding-right: 18px;
}

.nav-dropdown-link:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* عند تثبيت الـ navbar (white pinned) — حافِظ على القائمة المنسدلة بنفس النمط الكحلي للتباين */
.main-nav.nav-pinned .nav-chev {
    color: var(--gold-muted);
}

.main-nav.nav-pinned .nav-item.has-dropdown:hover > .nav-link .nav-chev {
    color: var(--gold);
}

/* Search button — right side (first in RTL) */
.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(195, 168, 74, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 15px;
    transition: all var(--ease);
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
    box-shadow: 0 4px 14px rgba(195, 168, 74, 0.4);
}

/* ─── HAMBURGER BUTTON ─── left side (last in RTL) ─── */
.hamburger-btn {
    width: 38px;
    height: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    border-radius: 8px;
    transition: all var(--ease);
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: rgba(195, 168, 74, 0.12);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold-light);
    border-radius: 2px;
    transition: all 0.35s ease;
    transform-origin: center;
}

/* Animated X when drawer is open */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================================
   SIDE DRAWER — opens from the RIGHT (RTL)
   ===================================================== */

/* Backdrop */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.drawer-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

/* Drawer panel */
.side-drawer {
    position: fixed;
    top: 0;
    right: -340px;
    /* offscreen right (RTL start) */
    width: 320px;
    direction: rtl;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(175deg, var(--navy-deep) 0%, #2a3b26 100%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
}

.side-drawer.open {
    right: 0;
}

/* ─── Drawer Header ─── */
.drawer-header {
    padding: 22px 24px 18px;
    border-bottom: 1px solid rgba(195, 168, 74, 0.22);
    position: relative;
}

.drawer-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 16px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.drawer-close:hover {
    background: rgba(220, 60, 60, 0.2);
    border-color: #e05555;
    color: #e05555;
}

.drawer-brand {
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    padding-top: 8px;
}

.drawer-logo {
    width: 44px;
    height: auto;
}

.drawer-title-img {
    height: 35px;
    width: auto;
    margin-top: 8px;
}

/* ─── Drawer Links ─── */
.drawer-links {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.drawer-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-link {
    display: block;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 600;
    color: var(--white-70);
    text-align: right;
    transition: all 0.25s ease;
    position: relative;
}

.drawer-link::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.drawer-link:hover,
.drawer-link.active {
    color: var(--gold-light);
    background: rgba(195, 168, 74, 0.08);
    padding-right: 36px;
}

.drawer-link:hover::before,
.drawer-link.active::before {
    transform: scaleY(1);
}

/* ─── MOBILE DRAWER: ACCORDION للقوائم المنسدلة ─── */

/* الزر يصير flex عشان نخلي الـ chevron في الطرف الأيسر */
.drawer-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: "Tajawal", sans-serif;
}

.drawer-chev {
    font-size: 11px;
    color: var(--gold-muted);
    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.25s ease;
    flex-shrink: 0;
}

.drawer-item.has-submenu.expanded .drawer-chev {
    transform: rotate(180deg);
    color: var(--gold-light);
}

.drawer-item.has-submenu.expanded > .drawer-toggle {
    color: var(--gold-light);
    background: rgba(195, 168, 74, 0.1);
}

.drawer-item.has-submenu.expanded > .drawer-toggle::before {
    transform: scaleY(1);
}

/* القائمة الفرعية: مغلقة افتراضياً */
.drawer-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-item.has-submenu.expanded > .drawer-submenu {
    /* يكفي لاستيعاب 5 عناصر فرعية × ~46px */
    max-height: 320px;
}

.drawer-submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.drawer-submenu li:last-child {
    border-bottom: 0;
}

.drawer-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 44px 11px 28px;
    font-family: "Tajawal", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
    text-align: right;
    transition:
        background 0.22s ease,
        color 0.22s ease,
        padding 0.22s ease;
    position: relative;
    text-decoration: none;
}

/* نقطة ذهبية صغيرة قبل كل رابط فرعي */
.drawer-sublink::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold-muted);
    opacity: 0.55;
    flex-shrink: 0;
    transition:
        opacity 0.22s ease,
        background 0.22s ease,
        transform 0.22s ease;
}

.drawer-sublink:hover,
.drawer-sublink:active,
.drawer-sublink.active {
    color: var(--gold-light);
    background: rgba(195, 168, 74, 0.06);
    padding-right: 52px;
}

.drawer-sublink:hover::before,
.drawer-sublink:active::before,
.drawer-sublink.active::before {
    background: var(--gold);
    opacity: 1;
    transform: scale(1.25);
}

/* ─── Drawer Social ─── */
.drawer-social {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(195, 168, 74, 0.18);
}

.drawer-social-title {
    font-size: 12px;
    font-weight: 400;
    color: var(--white-40);
    margin-bottom: 12px;
    text-align: right;
    letter-spacing: 0.5px;
}

.drawer-social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.drawer-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 14px;
    transition: all var(--ease);
    background: rgba(255, 255, 255, 0.04);
}

.drawer-social-icon:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(195, 168, 74, 0.35);
}

/* =====================================================
   HERO SECTION — imamali.net exact technique
   Two layered arcs: gold underlay (140%) + image container (150%)
   Height diff = gold border at bottom curve
   ===================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 95.2vh;
    min-height: 596px;
    overflow: visible;
    background: transparent;
    z-index: 3; /* فوق طبقة النقش */
}

/* -- Layer 1: Gold underlay (140% wide, 85.2vh tall) --
   Provides the gold border ring under the image curve   */
.hero-gold-underlay {
    background: var(--navy-deep);
    width: 140%;
    height: 95.4vh;
    min-height: 610px;
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    position: absolute;
    top: 0;
    right: -20%;
    z-index: 1;
}

/* -- Layer 2: Image container (150% wide, 84vh tall) --
   Slightly shorter → exposes ~1.2vh of gold as border  */
.hero-bg-wrap {
    width: 150%;
    height: 94vh;
    min-height: 596px;
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    position: absolute;
    top: 0;
    right: -25%;
    overflow: hidden;
    z-index: 2;
}

/* -- Hero Slider (5 slides / auto-change every 6s) --
   السلايدات مكدّسة فوق بعضها وتتبدّل بتلاشٍ متقاطع (cross-fade) */
.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s ease, visibility 0s linear 0s;
    z-index: 1;
}

/* طبقة التعتيم داخل كل سلايد — فوق الصورة وتحت المحتوى */
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 25%);
    z-index: 1;
    pointer-events: none;
}

/* السلايدات النصّية تحتاج تعتيماً أقوى قليلاً لوضوح العنوان */
.hero-slide--text::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* حركة زووم خفيفة جداً للسلايد الظاهر (Ken Burns) */
.hero-slide.is-active .hero-bg-img {
    animation: heroSlideZoom 7.2s ease-out forwards;
}

@keyframes heroSlideZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}

/* تقدير حركة المستخدم: تبديل بلا تلاشٍ ولا زووم */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
    .hero-slide.is-active .hero-bg-img {
        animation: none;
    }
}

/* -- Hero Image inside the container -- */
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.72) saturate(0.82);
    box-shadow: rgba(10, 25, 45, 0.88) 0px -380px 200px -260px inset;
}

/* --- Hero Content (نسخة مستقلّة داخل كل سلايد) --- */
.hero-content {
    direction: rtl;
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding-top: var(--total-h);
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 60px;
}

/* حركة الدخول تُعاد في كل مرّة يُصبح فيها السلايد فعّالاً */
.hero-slide.is-active .hero-content {
    animation: heroFadeIn 1.2s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    width: 105px;
}

@keyframes logoPulse {
    0%,
    100% {
        filter: drop-shadow(0 0 22px rgba(195, 168, 74, 0.65))
        drop-shadow(0 0 48px rgba(195, 168, 74, 0.28));
    }

    50% {
        filter: drop-shadow(0 0 34px rgba(195, 168, 74, 0.95))
        drop-shadow(0 0 65px rgba(195, 168, 74, 0.45));
    }
}

.hero-slide.is-active .hero-abbasia {
    animation: heroFadeIn 1s 0.35s ease both;
}

.hero-abbasia-svg {
    height: 46px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}

.hero-slide.is-active .hero-title {
    animation: heroFadeIn 1s 0.55s ease both;
}

.hero-title-img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* --- محتوى السلايدات النصّية: عنوان + زر --- */
.hero-heading {
    max-width: 20ch;
    color: var(--white);
    font-family: var(--font);
    font-size: clamp(24px, 3.4vw, 46px);
    font-weight: 800;
    line-height: 1.55;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
}

.hero-slide.is-active .hero-heading {
    animation: heroFadeIn 1s 0.3s ease both;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.hero-slide.is-active .hero-actions {
    animation: heroFadeIn 1s 0.55s ease both;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 30px;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    color: var(--navy-deep);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.hero-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.hero-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    transform: translateY(-2px);
}

.hero-btn:hover i {
    transform: translateX(-4px);
}

/* --- أسهم التنقّل بين السلايدات --- */
.hero-nav {
    position: absolute;
    top: var(--total-h);
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 6;
    pointer-events: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    color: var(--gold);
    font-size: 18px;
    background: rgba(56, 77, 50, 0.16);
    border: 1px solid var(--gold-line);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.hero-arrow-prev {
    right: 26px;
}

.hero-arrow-next {
    left: 26px;
}

.hero-arrow:hover {
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    border-color: var(--gold);
    color: var(--navy-deep);
    transform: translateY(-50%) scale(1.07);
}

.hero-arrow:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

/* --- SLIDER DOTS — نقاط التنقّل بين السلايدات --- */
.hero-dots {
    direction: rtl; /* أوّل نقطة على اليمين — بحسب اتجاه الموقع */
    position: absolute;
    top: calc(94vh - 60px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition:
        width 0.4s ease,
        background 0.35s ease;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.75);
}

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
}

.hero-dot:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

/* --- ORNAMENT STRIP — sits inside image curve near bottom --- */
.ornament-strip {
    position: absolute;
    bottom: 30px;
    right: 0;
    left: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    height: 34px;
    pointer-events: none;
}

.ornament-img {
    height: 26px;
    width: auto;
    opacity: 0.18;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* --- GOLD ACCENT LINE — sits on top of the gold underlay arc ---
   Positioned so it aligns with the peak of the gold curve border */
.hero-gold-line {
    position: absolute;
    top: calc(84vh - 2px);
    right: calc(25% + 2%);
    left: calc(25% + 2%);
    height: 4px;
    border-radius: 2px;
    z-index: 6;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold-muted) 10%,
        var(--gold-light) 35%,
        var(--gold) 50%,
        var(--gold-light) 65%,
        var(--gold-muted) 90%,
        transparent 100%
    );
    box-shadow:
        0 0 12px rgba(195, 168, 74, 0.65),
        0 0 28px rgba(195, 168, 74, 0.28);
}

/* =====================================================
   SOCIAL DIALOG — ألوان هادئة
   ===================================================== */
.social-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(480px, 90vw);
    max-height: 90vh;
    background: #1b456859;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(195, 168, 74, 0.3);
    border-radius: 16px;
    padding: 0;
    z-index: 10000;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(195, 168, 74, 0.18);
    overflow: hidden;
}

.social-dialog::backdrop {
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
}

@keyframes dialogPop {
    from {
        opacity: 0;
        transform: scale(0.87) translateY(18px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dialog-inner {
    padding: 30px 26px;
    position: relative;
}

.dialog-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.25);
    color: var(--gold-light);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.06);
}

.dialog-close:hover {
    background: rgba(220, 60, 60, 0.18);
    border-color: #e05555;
    color: #e05555;
}

.dialog-title {
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(195, 168, 74, 0.18);
}

.dialog-socials {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.dsocial-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.24s;
    color: var(--white-70);
}

.dsocial-item:hover {
    transform: translateY(-2px);
    border-color: rgba(195, 168, 74, 0.35);
    background: rgba(195, 168, 74, 0.1);
    color: var(--white);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
}

.dsocial-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dsocial-icon.fb {
    background: #1877f2;
    color: #fff;
}

.dsocial-icon.ig {
    background: linear-gradient(
        45deg,
        #f09433,
        #e6683c,
        #dc2743,
        #cc2366,
        #bc1888
    );
    color: #fff;
}

.dsocial-icon.tw {
    background: #111;
    color: #fff;
}

.dsocial-icon.yt {
    background: #ff0000;
    color: #fff;
}

.dsocial-icon.tg {
    background: #2ca5e0;
    color: #fff;
}

.dsocial-icon.tt {
    background: #010101;
    color: #fff;
}

.dsocial-icon.ws {
    background: #25d366;
    color: #fff;
}

.dsocial-icon.sn {
    background: #fffc00;
    color: #111;
}

.dsocial-name {
    font-size: 13.5px;
    font-weight: 600;
}

/* =====================================================
   SEARCH OVERLAY
   ===================================================== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: #384d3259;
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.search-box-wrap {
    width: min(680px, 90vw);
    position: relative;
    animation: searchSlide 0.38s ease both;
}

@keyframes searchSlide {
    from {
        transform: translateY(-28px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-close {
    position: absolute;
    top: -48px;
    left: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.35);
    color: var(--gold-light);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: rgba(195, 168, 74, 0.08);
}

.search-close:hover {
    background: rgba(220, 60, 60, 0.18);
    border-color: #e05555;
    color: #e05555;
}

.search-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(195, 168, 74, 0.38);
    border-radius: 50px;
    padding: 16px 26px;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(195, 168, 74, 0.12);
}

.search-icon-lrg {
    font-size: 20px;
    color: var(--gold);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 17px;
    color: var(--white);
    direction: rtl;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

/* =====================================================
   SITES OVERLAY — مواقع المؤسسة
   نفس طبقة الـ search-overlay لكن بدل شريط البحث
   تظهر بطاقات المواقع التابعة (اللوكو فوق والاسم أسفله)
   ===================================================== */
.sites-overlay {
    position: fixed;
    inset: 0;
    background: #384d3259;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 24px;
}

.sites-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.sites-box-wrap {
    /* width: min(420px, 100%);*/
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    direction: rtl;
    padding: 40px 36px 36px;
    border-radius: 22px;
    background: rgba(14, 16, 16, 0.72);
    border: 1px solid rgba(233, 187, 79, 0.28);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(233, 187, 79, 0.12);
    animation: sitesSlide 0.38s ease both;
    scrollbar-width: thin;
}

@keyframes sitesSlide {
    from {
        transform: translateY(-24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sites-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.35);
    color: var(--gold-light);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: rgba(195, 168, 74, 0.08);
    cursor: pointer;
}

.sites-close:hover {
    background: rgba(220, 60, 60, 0.18);
    border-color: #e05555;
    color: #e05555;
}

/* ── رأس النافذة ── */
.sites-head {
    text-align: center;
    margin-bottom: 30px;
}

.sites-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1.3;
}

.sites-title::after {
    content: "";
    display: block;
    width: 54px;
    height: 2px;
    margin: 12px auto 0;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        rgba(233, 187, 79, 0),
        var(--gold),
        rgba(233, 187, 79, 0)
    );
}

.sites-subtitle {
    margin-top: 12px;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.6);
}

/* ── شبكة المواقع ── */
.sites-grid {
    display: flex;
    /* مسارات بعرض ثابت — البطاقة لا تكبر ولا تصغر،
     وتبقى في منتصف الشبكة مهما دها */
    grid-template-columns: repeat(auto-fit, 240px);
    justify-content: center;
    gap: 20px;
}

/* ── بطاقة موقع — اللوكو فوق والاسم أسفله ── */
.sites-card {
    width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 22px 18px 20px;
    border-radius: 16px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.sites-card:hover {
    transform: translateY(-6px);
    background: rgba(233, 187, 79, 0.07);
    border-color: rgba(233, 187, 79, 0.45);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.sites-card-logo {
    /* قياس ثابت ومربّع تقريباً */
    width: 190px;
    height: 190px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(233, 187, 79, 0.14);
}

.fatwa-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.sites-card:hover .fatwa-logo {
    transform: scale(1.06);
}

.sites-card-name {
    font-family: "Tajawal", sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.3s ease;
}

.sites-card:hover .sites-card-name {
    color: var(--gold-light);
}

@media (max-width: 540px) {
    .sites-box-wrap {
        padding: 34px 18px 24px;
        border-radius: 18px;
    }

    .sites-grid {
        gap: 16px;
    }
}

/* ─── NAV TOGGLE (hamburger) — hidden on desktop ─── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 4px;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* ── 1280px: Desktop medium ────────────────────────── */
@media (max-width: 1444px) {
    .nav-link {
        padding: 0 10px;
        font-size: 13.5px;
    }
}

/* ── 1100px: Desktop small ─────────────────────────── */
@media (max-width: 1100px) {
    .nav-link {
        padding: 0 8px;
        font-size: 12.5px;
    }
}

/* ── 960px: Tablet landscape ───────────────────────── */
@media (max-width: 960px) {
    .logo-img {
        width: 60px;
    }

    .abbasia-svg {
        height: 30px;
    }

    .title-img {
        height: 34px;
    }

    .nav-link {
        padding: 0 7px;
        font-size: 12px;
    }

    .hero-logo {
        width: 90px;
    }

    .hero-abbasia-svg {
        height: 38px;
    }

    .hero-title-img {
        height: 46px;
    }
}

/* ── 768px: ★ BREAKPOINT — switch to mobile layout ─── */
@media (max-width: 1244px) {
    /* Flip responsive utilities */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    /* ─ Top bar: center brand, social hidden via .desktop-only ─ */
    .top-bar-inner {
        justify-content: center;
        padding: 0 16px;
    }

    .logo-img {
        width: 60px;
    }

    .brand-texts {
        gap: 3px;
        margin-top: 10px;
    }

    .abbasia-svg {
        height: 25px;
    }

    .title-img {
        height: 30px;
    }

    /* ─ Navbar: search + hamburger only ─ */
    .main-nav {
        height: var(--nav-h);
        margin: 4px 16px;
        border-radius: 8px;
    }

    /* ─ Hero ─ */
    .hero-section {
        height: 100vh;
        min-height: 560px;
    }

    .hero-gold-underlay {
        width: 168%;
        right: -34%;
        height: 96.5vh;
        min-height: 580px;
    }

    .hero-bg-wrap {
        width: 168%;
        right: -34%;
        height: 95vh;
        min-height: 564px;
    }

    .hero-content {
        gap: 12px;
        padding-bottom: 50px;
    }

    .hero-logo {
        width: 82px;
    }

    .hero-abbasia-svg {
        height: 32px;
    }

    .hero-title-img {
        height: 38px;
    }

    .hero-heading {
        max-width: 18ch;
    }

    .hero-btn {
        padding: 10px 22px;
        font-size: 13.5px;
    }

    .hero-nav {
        bottom: 50px;
    }

    .hero-arrow {
        width: 46px;
        height: 46px;
        font-size: 16px;
    }

    .hero-arrow-prev {
        right: 14px;
    }

    .hero-arrow-next {
        left: 14px;
    }

    .hero-dots {
        top: calc(95vh - 55px);
    }
    .nav-inner {
        justify-content: space-between;
    }
}

/* ── 480px: Mobile ─────────────────────────────────── */
@media (max-width: 480px) {
    .top-bar-inner {
        padding: 0 12px;
        justify-content: center;
    }

    .header-brand {
        gap: 6px;
        min-width: 0;
        overflow: hidden;
    }

    .logo-img {
        width: 60px;
    }

    .brand-texts {
        display: flex;
        gap: 3px;
        margin-top: 4px;
        min-width: 0;
        overflow: hidden;
    }

    .abbasia-svg {
        height: 25px;
        width: auto;
        max-width: 100%;
    }

    .title-img {
        height: 28px;
        width: auto;
        max-width: 100%;
    }

    .main-nav {
        margin: 4px 12px;
    }

    .hero-section {
        height: 100svh;
        min-height: 600px;
    }

    .hero-gold-underlay {
        width: 185%;
        right: -42.5%;
        height: 97.2vh;
        min-height: 518px;
    }

    .hero-bg-wrap {
        width: 185%;
        right: -42.5%;
        height: 95.7vh;
        min-height: 502px;
    }

    .hero-content {
        gap: 10px;
        padding-bottom: 40px;
    }

    .hero-logo {
        width: 70px;
    }

    .hero-abbasia-svg {
        height: 27px;
    }

    .hero-title-img {
        height: 32px;
    }

    .hero-actions {
        gap: 10px;
    }

    .hero-heading {
        font-size: clamp(20px, 5.6vw, 28px);
        max-width: 15ch;
        line-height: 1.5;
    }

    .hero-btn {
        padding: 9px 18px;
        font-size: 13px;
    }

    .hero-nav {
        bottom: 40px;
    }

    .hero-arrow {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .hero-arrow-prev {
        right: 8px;
    }

    .hero-arrow-next {
        left: 8px;
    }

    .hero-dots {
        top: calc(95.7vh - 50px);
        gap: 8px;
    }

    .hero-dot {
        width: 9px;
        height: 9px;
    }

    .hero-dot.is-active {
        width: 28px;
    }
}

/* ── 360px: Small mobile ───────────────────────────── */
@media (max-width: 360px) {
    .hero-logo {
        width: 60px;
    }

    .hero-abbasia-svg {
        height: 22px;
    }

    .hero-title-img {
        height: 27px;
    }

    .hero-btn {
        padding: 8px 15px;
        font-size: 12.5px;
    }

    .hero-heading {
        font-size: 19px;
        max-width: 14ch;
    }

    .hero-arrow {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* =====================================================
   ACTIVITIES SECTION
   ===================================================== */
.activities-section {
    position: relative;
    /* بلا z-index → يبقى لون الخلفية تحت طبقة النقش */
    padding: 88px 0 72px;
    background: linear-gradient(
        180deg,
        rgba(245, 242, 234, 0.09) 0%,
        rgba(245, 242, 234, 0.1) 30%,
        rgba(245, 242, 234, 0.3) 50%,
        rgba(245, 242, 234, 0.6) 60%,


        #f4ecde 100%
    );
    direction: rtl;
    overflow: hidden;
    z-index: 2;
}

/* طبقة ضبابية ناعمة تمنح عمقاً دون إخفاء الزخارف */
.activities-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 60% at 50% 50%,
        rgba(245, 242, 234, 0.22) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.activities-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
}

/* ── Section Header ── */
.activities-header {
    text-align: center;
    margin-bottom: 44px;
}


.section-title {
    font-family: 'Scheherazade New', serif;
    font-size: 44px;
    font-weight: 900;
    color: var(--navy-deep);
    line-height: 1.2;
    margin-bottom: 16px;
}

/* ── Main Stage ── */
.act-stage {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 520px;
    margin-bottom: 18px;
    box-shadow:
        0 24px 70px rgba(20, 52, 79, 0.2),
        0 0 0 1px rgba(195, 168, 74, 0.16);
}

.act-stage-bg {
    position: absolute;
    inset: 0;
}

.act-stage-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}

.act-stage-img.fading {
    opacity: 0;
    transform: scale(1.04);
}

.act-stage-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(42, 62, 5, 0.05) 0%,
        rgba(30, 30, 30, 0.35) 45%,
        rgba(30, 30, 30, 0.82) 100%
    );
}

.act-stage-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 42px 46px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    text-align: right;
}

.act-stage-content.sliding {
    animation: actSlideUp 0.55s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes actSlideUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.act-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    color: var(--navy-deep);
    font-size: 12px;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 30px;
}

.act-title {
    font-size: 27px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.45;
    max-width: 780px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.act-desc {
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--white-70);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 680px;
}

.act-stage-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.act-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    color: var(--navy-deep);
    font-weight: 800;
    font-size: 14px;
    border-radius: 40px;
    font-family: var(--font);
    transition: all 0.3s ease;
}

.act-detail-btn i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.act-detail-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    transform: translateY(-2px);
}

.act-detail-btn:hover i {
    transform: translateX(-3px);
}

.act-views {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--white-70);
    font-size: 13.5px;
    padding: 7px 14px;
}

.act-views i {
    color: var(--gold-light);
    font-size: 14px;
}

/* Progress bar */
.act-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.act-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-muted), var(--gold-light));
    width: 0%;
}

/* ── Thumbnail Cards ── */
.act-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 46px;
}

.act-card {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    border: 2px solid transparent;
    position: relative;
    text-align: right;
    box-shadow: 0 4px 18px rgba(20, 52, 79, 0.12);
}

.act-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(20, 52, 79, 0.2);
}

.act-card.active {
    border-color: var(--gold);
    box-shadow: 0 8px 32px rgba(195, 168, 74, 0.3);
    transform: translateY(-5px);
}

/* ── Image wrapper fills the whole card ── */
.act-card-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.act-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
    display: block;
}

.act-card:hover .act-card-img,
.act-card.active .act-card-img {
    transform: scale(1.08);
}

/* ── Gradient overlay to protect readability ── */
.act-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(42, 62, 5, 0.04) 0%,
        rgba(30, 30, 30, 0.30) 45%,
        rgba(30, 30, 30, 0.75) 100%
    );
    transition: background 0.35s ease;
}

.act-card:hover .act-card-overlay,
.act-card.active .act-card-overlay {
    background: linear-gradient(
        180deg,
        rgba(42, 62, 5, 0.05) 0%,
        rgba(30, 30, 30, 0.35) 45%,
        rgba(30, 30, 30, 0.82) 100%
    );
}

/* ── Category badge — top-right corner ── */
.act-card-cat {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    color: var(--navy-deep);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 0 0 0 10px;
    z-index: 3;
    white-space: nowrap;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ── Active card: gold line at top ── */
.act-card.active::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--gold-muted),
        var(--gold-light),
        var(--gold-muted)
    );
    z-index: 4;
}

/* ── Card body — sits at the bottom over the image ── */
.act-card-body {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 12px 13px 14px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.act-card-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.act-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-light);
    font-family: var(--font);
    padding: 4px 11px;
    border: 1px solid rgba(195, 168, 74, 0.5);
    border-radius: 20px;
    background: rgba(8, 18, 36, 0.45);
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: all 0.25s ease;
}

.act-card-btn i {
    font-size: 9px;
}

.act-card-btn:hover,
.act-card.active .act-card-btn {
    background: var(--gold);
    color: var(--navy-deep);
    border-color: var(--gold);
}

/* ── Footer Button ── */
.act-footer {
    text-align: center;
}

.act-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 38px;
    border: 2px solid var(--navy-mid);
    color: var(--navy-mid);
    font-size: 15.5px;
    font-weight: 700;
    font-family: var(--font);
    border-radius: 50px;
    transition: all 0.35s ease;
    background: transparent;
}

.act-all-btn:hover {
    background: var(--navy-deep);
    color: var(--gold-light);
    border-color: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(20, 52, 79, 0.22);
}

.act-all-btn i {
    transition: transform 0.35s ease;
    font-size: 13px;
}

.act-all-btn:hover i {
    transform: translateX(-4px);
}

/* ── Activities Responsive ── */
@media (max-width: 960px) {
    .act-stage {
        height: 450px;
    }

    .act-stage-content {
        padding: 32px 32px;
    }

    .act-title {
        font-size: 23px;
    }
}

@media (max-width: 768px) {
    .activities-section {
        padding: 68px 0 55px;
    }

    .section-title {
        font-size: 30px;
    }

    .activities-header {
        margin-bottom: 32px;
    }

    .act-stage {
        height: 400px;
        border-radius: 16px;
    }

    .act-stage-content {
        padding: 26px 24px;
    }

    .act-title {
        font-size: 20px;
    }

    .act-desc {
        font-size: 13.5px;
    }

    .act-thumbs {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 32px;
    }

    .act-card-img-wrap {
        height: 170px;
    }
}

@media (max-width: 480px) {
    .activities-section {
        padding: 55px 0 45px;
    }

    .activities-container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .act-stage {
        height: 360px;
        border-radius: 14px;
    }

    .act-stage-content {
        padding: 20px 18px;
        gap: 8px;
    }

    .act-category {
        font-size: 11px;
        padding: 4px 12px;
    }

    .act-title {
        font-size: 17px;
    }

    .act-desc {
        font-size: 12.5px;
    }

    .act-detail-btn {
        padding: 9px 18px;
        font-size: 13px;
    }

    .act-views {
        font-size: 12px;
        padding: 6px 12px;
    }

    .act-thumbs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 28px;
    }

    .act-card-img-wrap {
        height: 155px;
    }

    .act-card-title {
        font-size: 11.5px;
    }

    .act-card-cat {
        font-size: 9.5px;
        padding: 3px 8px;
    }

    .act-all-btn {
        padding: 11px 28px;
        font-size: 14px;
    }
}

/* =====================================================
   DOCUMENTS CENTER SECTION — Scroll-Driven Animation
   ===================================================== */

/* ── الـ Section الرئيسي ── */
.documents-section {
    position: relative;
    width: 100%;
    height: auto;
    padding: 100px 0;
    direction: rtl;
    z-index: 3; /* مستثنى: يعلو طبقة النقش */
    isolation: isolate;
    /* border-top: 2px solid var(--gold); */
    /* صورة الخلفية */
    /* background-color: var(--bg-section); */
}

/* طبقة صورة الخلفية */
.documents-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("../../images/bookback.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* opacity: 0.9; */
}

/* طبقة اللون الفاتح فوق الصورة */
.documents-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgb(244, 236, 222, 1) 0%,
        rgba(244, 236, 222, 0.7) 5%,
        rgba(244, 236, 222, 0.4) 12%,
        rgba(244, 236, 222, 0.3) 30%,
        rgba(244, 236, 222, 0.3) 50%,
        rgba(244, 236, 222, 0.1) 100%
    );
}

/* ── الحاوية الداخلية ── */
.documents-section-inner {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    height: auto;
    gap: 40px;
}

/* ── النصف الأيمن ── */
.right-side {
    flex: 0 0 50%;
    position: relative;
    padding: 0 50px 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

/* ── النصف الأيسر ── */
.left-side {
    flex: 0 0 50%;
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

/* ── المسرح ── */
.docs-stage {
    position: relative;
    width: min(360px, 88vw);
    height: min(480px, 117vw);
    margin: 0 auto;
}

/* ── Eyebrow ── */
.section-eyebrow {
    font-family: "Tajawal", sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-eyebrow::before {
    content: "";
    width: 28px;
    height: 1.5px;
    background: var(--gold);
}

/* ── عنوان القسم ── */
.docs-section-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.3;
    margin-bottom: 22px;
    position: relative;
}

.docs-section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(to left, var(--gold), var(--gold-light));
    border-radius: 2px;
    margin-top: 14px;
}

/* ── وصف القسم ── */
.section-desc {
    font-family: "Tajawal", sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--navy-mid);
    line-height: 2;
    margin-bottom: 32px;
    max-width: 540px;
}

.section-desc .highlight {
    color: var(--navy-deep);
    font-weight: 700;
}

/* ── بطاقتا الأقسام ── */
.archives-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 540px;
}

/* ── بطاقة واحدة ── */
.archive-card {
    position: relative;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 1.5px solid var(--gold-line);
    background: var(--navy-deep);
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.archive-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 20px 48px rgba(56, 77, 50, 0.35);
}

/* صورة الخلفية */
.archive-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.archive-card:hover .archive-card-bg {
    transform: scale(1.06);
}

/* طبقة التعتيم */
.archive-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(42, 62, 5, 0.05) 0%,
        rgba(30, 30, 30, 0.35) 45%,
        rgba(30, 30, 30, 0.82) 100%
    );
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.archive-card:hover .archive-card-overlay {
    background: linear-gradient(
        180deg,
        rgba(42, 62, 5, 0.07) 0%,
        rgba(30, 30, 30, 0.40) 45%,
        rgba(30, 30, 30, 0.90) 100%
    )
}

/* محتوى البطاقة */
.archive-card-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    direction: rtl;
}

.archive-card-num {
    font-family: "Tajawal", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    opacity: 0.85;
}

.archive-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.archive-card-title {
    font-family: "Scheherazade New", serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.archive-card-count {
    font-family: "Tajawal", sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.archive-card-count::before {
    content: "";
    width: 16px;
    height: 1px;
    background: var(--gold);
}

/* السهم عند hover */
.archive-card-arrow {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(8px);
    transition:
        opacity 0.3s,
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.archive-card:hover .archive-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.archive-card-arrow svg {
    width: 12px;
    height: 12px;
    stroke: var(--navy-deep);
    stroke-width: 2.5;
    fill: none;
    transform: rotate(180deg);
}

/* ── الوثيقة الواحدة ── */
.doc {
    position: absolute;
    left: calc(50% - min(140px, 36vw));
    top: calc(50% - min(210px, 54vw));
    width: min(280px, 72vw);
    height: min(420px, 108vw);
    cursor: pointer;
    will-change: transform, opacity;
    backface-visibility: hidden;
    /* Hidden by default — deck positions set by JS via data-pos */
    opacity: 0;
    transform: translateY(70px);
    transition:
        transform 0.95s cubic-bezier(0.34, 1.1, 0.64, 1),
        opacity 0.8s ease,
        filter 0.4s ease;
}

.doc[data-doc="2"] {
    transition-delay: 0.14s;
}

.doc[data-doc="3"] {
    transition-delay: 0.28s;
}

.doc[data-doc="4"] {
    transition-delay: 0.42s;
}

/* ── Deck positions (assigned by JS) ── */
.doc[data-pos="1"] {
    transform: translate3d(0, 0, 0) rotate(0deg);
    z-index: 4;
    opacity: 1;
}

.doc[data-pos="2"] {
    transform: translate3d(20px, -14px, 0) rotate(4deg);
    z-index: 3;
    opacity: 0.78;
}

.doc[data-pos="3"] {
    transform: translate3d(-18px, -26px, 0) rotate(-3.5deg);
    z-index: 2;
    opacity: 0.48;
}

.doc[data-pos="4"] {
    transform: translate3d(10px, -38px, 0) rotate(1.8deg);
    z-index: 1;
    opacity: 0.28;
}

.doc:hover {
    filter: brightness(1.1);
}

.doc[data-pos="1"]:hover {
    transform: translate3d(0, -8px, 0) rotate(0deg) scale(1.3);
    z-index: 10;
}

.doc[data-pos="2"]:hover {
    transform: translate3d(24px, -18px, 0) rotate(3deg) scale(1.07);
}

.doc[data-pos="3"]:hover {
    transform: translate3d(-22px, -30px, 0) rotate(-2.5deg) scale(1.06);
}

.doc[data-pos="4"]:hover {
    transform: translate3d(14px, -42px, 0) rotate(1deg) scale(1.06);
}

/* الإطار الداخلي */
.doc-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid rgba(195, 168, 74, 0.3);
    box-shadow:
        0 20px 50px rgba(56, 77, 50, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    background: var(--navy-deep);
    transition:
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s;
}

.doc:hover .doc-inner {

    border-color: var(--gold);

    box-shadow:
        0 28px 64px rgba(56, 77, 50, 0.5),
        0 0 0 1px rgba(233, 187, 79, 0.2) inset;

}

/* صورة الوثيقة */
.doc-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(0.4) contrast(1.08);
    transition:
        filter 0.5s,
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.revealed .doc-inner .doc-image {
    filter: grayscale(0) contrast(1);
}

.doc:hover .doc-image {
    transform: scale(1.05);
}

/* تعتيم سفلي */
.doc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(42, 62, 5, 0.04) 0%,
        rgba(30, 30, 30, 0.15) 45%,
        rgba(30, 30, 30, 0.90) 100%
    );
}

/* معلومات الوثيقة */
.doc-info {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    direction: rtl;
}

/* البيانات السفلية */
.doc-meta {
    margin-top: auto;
    margin-bottom: 8px;
}

.doc-date {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.5s,
        transform 0.5s;
}

.doc-source {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
    line-height: 1.5;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.5s 0.1s,
        transform 0.5s 0.1s;
}

.doc-summary {
    font-family: "Tajawal", sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.5s 0.2s,
        transform 0.5s 0.2s;
}

/* ── الوثيقة الأمامية تُظهر بياناتها ── */
.doc.revealed .doc-date,
.doc.revealed .doc-source,
.doc.revealed .doc-summary {
    opacity: 1;
    transform: translateY(0);
}

/* ── تنقل الوثائق ── */
.docs-nav-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
    max-width: 360px;
}

.docs-counter {
    font-family: "Tajawal", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy-mid);
    letter-spacing: 2px;
    opacity: 0.7;
}

.docs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.docs-nav-btn {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid rgba(20, 52, 79, 0.25);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition:
        transform 0.35s ease,
        background 0.35s ease,
        border-color 0.35s ease;
}

.docs-nav-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.4);
}

.docs-nav-btn:hover:not(.active) {
    border-color: var(--navy-mid);
}

/* شريط التقدم */
.docs-progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(20, 52, 79, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.docs-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-muted), var(--gold-light));
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* ── Documents Responsive ── */
@media (max-width: 1024px) {
    .documents-section {
        padding: 60px 0;
    }

    .documents-section-inner {
        flex-direction: column;
        gap: 0;
    }

    .right-side,
    .left-side {
        flex: 0 0 100%;
        width: 100%;
        padding: 40px 24px;
    }

    .left-side {
        padding-top: 20px;
        padding-bottom: 48px;
    }

    /* الـ deck يعمل بنفس الطريقة — min() تتكفل بالتقليص */

    .archives-cards {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .right-side {
        padding: 32px 20px !important;
    }

    .docs-section-title {
        font-size: 28px;
    }

    .section-desc {
        font-size: 14px;
    }

    .archives-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .archive-card {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .right-side {
        padding: 24px 16px !important;
    }

    .left-side {
        padding: 0 16px 24px !important;
        margin-top: 35px;
    }

    .docs-section-title {
        font-size: 24px;
    }

    .archive-card {
        height: 160px;
    }

    .archive-card-title {
        font-size: 18px;
    }
}

/* =====================================================
   IDAAT AL-MARJAIYA SECTION — إضاءات المرجعية
   ===================================================== */

.idaat-section {
    position: relative;
    width: 100%;
    padding: 96px 0 128px;
    direction: rtl;
    overflow: hidden;
    background: var(--black-deep);
    z-index: 3; /* مستثنى: يعلو طبقة النقش */
}

/* ── Background pattern layers ── */
.idaat-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l15 15-15 15L15 15zM0 30l15 15-15 15L-15 45zM60 30l15 15-15 15L45 45zM30 60l15 15-15 15-15-15z' fill='%23eac249' fill-opacity='0.15' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
}

.idaat-bg-reveal {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l15 15-15 15L15 15zM0 30l15 15-15 15L-15 45zM60 30l15 15-15 15L45 45zM30 60l15 15-15 15-15-15z' fill='%23eac249' fill-opacity='0.8' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    -webkit-mask-image: radial-gradient(
        circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        black 0%,
        transparent 100%
    );
    mask-image: radial-gradient(
        circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        black 0%,
        transparent 100%
    );
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.idaat-section.idaat-section-hovered .idaat-bg-reveal {
    opacity: 1;
}

/* ── Golden glow orb ── */
.idaat-glow-orb {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        rgba(234, 194, 73, 0.15) 0%,
        rgba(234, 194, 73, 0) 70%
    );
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.idaat-section.idaat-section-hovered .idaat-glow-orb {
    opacity: 1;
}

/* ── Content container ── */
.idaat-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ── Section Header ── */
.idaat-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.idaat-header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.idaat-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: #e2e2e2;
    line-height: 1.2;
}

/* View All button */
.idaat-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    background: #1e2020;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d0c5af;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    transition:
        border-color 0.3s ease,
        color 0.3s ease;
    white-space: nowrap;
    align-self: center;
}

.idaat-view-all-btn:hover {
    border-color: rgba(234, 194, 73, 0.5);
    color: #eac249;
}

.idaat-view-all-arrow {
    transition: transform 0.3s ease;
}

.idaat-view-all-btn:hover .idaat-view-all-arrow {
    transform: translateX(-4px);
}

/* ── Tabs ── */
.idaat-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* إخفاء scrollbar في Firefox */
    scrollbar-width: none;
    /* إخفاء scrollbar في IE/Edge القديم */
    -ms-overflow-style: none;
}

.idaat-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.idaat-tab {
    padding: 8px 24px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d0c5af;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    white-space: nowrap;
}

.idaat-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e2e2;
}

.idaat-tab.active {
    background: rgba(234, 194, 73, 0.15);
    border-color: rgba(234, 194, 73, 0.5);
    color: #eac249;
}

/* ── Cards Grid ── */
.idaat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 10;
}

/* ── Single Card ── */
.idaat-card {
    position: relative;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    direction: rtl;
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.idaat-card:hover {
    border-color: rgba(234, 194, 73, 0.6);
    transform: translateY(-8px);
    box-shadow:
        0 15px 40px -10px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(234, 194, 73, 0.25);
}

/* Card gradient overlay */
.idaat-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #121414, transparent, transparent);
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.idaat-card:hover .idaat-card-gradient {
    opacity: 1;
}

/* ── Card image ── */
.idaat-card-img-wrap {
    position: relative;
    height: 192px;
    overflow: hidden;
    flex-shrink: 0;
}

.idaat-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) saturate(0.8) sepia(0.2);
    transition:
        filter 0.5s ease,
        transform 0.5s ease;
}

.idaat-card:hover .idaat-card-img {
    filter: brightness(1) saturate(1.1) sepia(0);
    transform: scale(1.05);
}

/* Category badge */
.idaat-card-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    z-index: 20;
    padding: 4px 12px;
    border-radius: 0 0 0 10px;
    background: rgba(18, 20, 20, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(234, 194, 73, 0.3);
    color: #eac249;
    font-family: "Tajawal", sans-serif;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Card body ── */
.idaat-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 16px;
    position: relative;
    z-index: 20;
}

.idaat-card-title {
    font-family: "Scheherazade New", serif;
    font-size: 20px;
    font-weight: 600;
    color: #e2e2e2;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.idaat-card-desc {
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #d0c5af;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card footer ── */
.idaat-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.idaat-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: "Tajawal", sans-serif;
    font-size: 12px;
    color: rgba(208, 197, 175, 0.7);
}

.idaat-views svg {
    flex-shrink: 0;
    stroke: rgba(208, 197, 175, 0.7);
}

.idaat-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #eac249;
    transition: color 0.3s ease;
}

.idaat-arrow {
    stroke: currentColor;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.idaat-card:hover .idaat-arrow {
    transform: translateX(-8px);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .idaat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .idaat-section {
        padding: 72px 0 80px;
    }

    .idaat-content {
        padding: 0 16px;
        gap: 32px;
    }

    .idaat-title {
        font-size: 32px;
    }

    .idaat-header {
        align-items: flex-start;
    }

    .idaat-tabs {
        gap: 8px;
    }

    .idaat-tab {
        padding: 7px 16px;
        font-size: 12.5px;
    }
}

@media (max-width: 540px) {
    .idaat-cards {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   WISDOM & ARTICLES — حكم ومقالات
   (sub-section inside .idaat-section, shares background)
   ===================================================== */

.idaat-wisdom {
    margin-top: 32px;
    padding-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 45px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Cards grid: 3 columns ── */
.wisdom-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 10;
}

/* ── Single quote card ── */
.wisdom-card {
    position: relative;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    cursor: pointer;
    direction: rtl;
    min-height: 340px;
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.4s ease;
}

.wisdom-card:hover {
    transform: scale(1.02);
    border-color: rgba(234, 194, 73, 0.6);
    background: rgba(234, 194, 73, 0.03);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(234, 194, 73, 0.15);
}

/* Decorative quote icon */
.wisdom-card-icon {
    font-size: 44px;
    color: #eac249;
    opacity: 0.35;
    line-height: 1;
    transition: opacity 0.4s ease;
}

.wisdom-card:hover .wisdom-card-icon {
    opacity: 0.6;
}

/* Quote text */
.wisdom-card-text {
    font-family: "Scheherazade New", serif;
    font-size: 21px;
    font-weight: 600;
    color: #e2e2e2;
    line-height: 1.75;
    flex: 1;
}

/* Footer: attribution + arrow */
.wisdom-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.wisdom-attribution {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wisdom-author {
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #eac249;
}

.wisdom-source {
    font-family: "Tajawal", sans-serif;
    font-size: 12px;
    color: rgba(208, 197, 175, 0.65);
}

/* Arrow inherits .idaat-read-more + .idaat-arrow from parent CSS */
.wisdom-card:hover .idaat-arrow {
    transform: translateX(-8px);
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .wisdom-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .wisdom-cards {
        grid-template-columns: 1fr;
    }

    .wisdom-card {
        min-height: auto;
    }
}

/* ══════════════════════════════════════════════════════
   مرئيات الوافي — Video Coverflow Slider (6 slides / 7s)
══════════════════════════════════════════════════════ */
.mrai-section {
    position: relative;
    width: 100%;
    padding: 96px 0 112px;
    direction: rtl;
    overflow: hidden;
    background: var(--black-deep);
}

.mrai-content {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.mrai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mrai-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: #e2e2e2;
    line-height: 1.2;
}

/* ── تبويبات القسم (الفيديوهات / معرض الصور) ── */
.mrai-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* إخفاء scrollbar في Firefox */
    scrollbar-width: none;
    /* إخفاء scrollbar في IE/Edge القديم */
    -ms-overflow-style: none;
}

.mrai-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.mrai-tab {
    padding: 8px 24px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d0c5af;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    white-space: nowrap;
}

.mrai-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e2e2;
}

.mrai-tab.active {
    background: rgba(234, 194, 73, 0.15);
    border-color: rgba(234, 194, 73, 0.5);
    color: #eac249;
}

/* ── مسرح البطاقات ── */
.mrai-stage {
    position: relative;
    height: 470px;
}

/* وضع معرض الصور — تختفي أيقونة التشغيل فوق الصورة
   (باقي تفاصيل البطاقة تبقى كما هي) */
.mrai-stage.mrai-mode-gallery .mrai-play {
    display: none;
}

/* هالة ذهبية خلف البطاقة الوسطى — تزيد بروزها */
.mrai-stage::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 760px;
    height: 440px;
    max-width: 90%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        ellipse at center,
        rgba(234, 194, 73, 0.16) 0%,
        rgba(234, 194, 73, 0) 70%
    );
    z-index: 0;
    pointer-events: none;
}

.mrai-track {
    position: absolute;
    inset: 0;
}

.mrai-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(640px, 66vw);
    aspect-ratio: 16 / 10;
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1c1c;
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition:
        transform 0.85s cubic-bezier(0.22, 0.9, 0.24, 1),
        opacity 0.6s ease,
        filter 0.7s ease,
        box-shadow 0.7s ease;
}

/* البطاقة الوسطى — ملوّنة وبارزة */
.mrai-card[data-pos="0"] {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 4;
    pointer-events: auto;
    box-shadow:
        0 34px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(234, 194, 73, 0.35);
}

/* البطاقتان الجانبيتان — أبيض وأسود ومائلتان */
.mrai-card[data-pos="1"],
.mrai-card[data-pos="-1"] {
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
    filter: grayscale(1) brightness(0.6);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
}

.mrai-card[data-pos="1"] {
    transform: translate(-50%, -50%) translateX(-46%) translateY(12px) scale(0.78) rotate(-5deg);
}

.mrai-card[data-pos="-1"] {
    transform: translate(-50%, -50%) translateX(46%) translateY(12px) scale(0.78) rotate(5deg);
}

.mrai-card[data-pos="1"]:hover,
.mrai-card[data-pos="-1"]:hover {
    filter: grayscale(0.55) brightness(0.78);
}

/* مواقع الدخول/الخروج — تأتي من خارج المسرح */
.mrai-card[data-pos="2"],
.mrai-card[data-pos="-2"] {
    opacity: 0;
    z-index: 2;
    filter: grayscale(1) brightness(0.5);
}

.mrai-card[data-pos="2"] {
    transform: translate(-50%, -50%) translateX(-92%) scale(0.62) rotate(-9deg);
}

.mrai-card[data-pos="-2"] {
    transform: translate(-50%, -50%) translateX(92%) scale(0.62) rotate(9deg);
}

/* حركة دخول لطيفة للبطاقة لحظة وصولها إلى الوسط */
.mrai-card-inner {
    position: absolute;
    inset: 0;
}

.mrai-card[data-pos="0"] .mrai-card-inner {
    animation: mraiPop 0.85s cubic-bezier(0.22, 0.9, 0.24, 1);
}

@keyframes mraiPop {
    0% {
        transform: scale(0.94);
    }

    62% {
        transform: scale(1.025);
    }

    100% {
        transform: scale(1);
    }
}

.mrai-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* تعتيم أسفل البطاقة لإبراز العنوان */
.mrai-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(8, 10, 10, 0.94) 0%,
        rgba(8, 10, 10, 0.7) 42%,
        rgba(8, 10, 10, 0) 100%
    );
}

.mrai-card-title {
    transition: opacity 0.5s ease;
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 3;
    padding: 0 26px 22px;
    color: #f2efe6;
    font-family: "Tajawal", sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

/* شريط ذهبي رفيع فوق العنوان */
.mrai-card-title::before {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(234, 194, 73, 0));
}

/* ── أيقونة التشغيل ── */
.mrai-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    border-radius: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #101010;
    font-size: 22px;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.mrai-play i {
    margin-right: 3px; /* يوازن المثلّث بصرياً داخل الدائرة */
}

.mrai-play::before,
.mrai-play::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(234, 194, 73, 0.6);
    opacity: 0;
}

/* الأنيميشن مستمر على البطاقة الوسطى فقط */
.mrai-card[data-pos="0"] .mrai-play {
    animation: mraiBeat 2.6s ease-in-out infinite;
}

.mrai-card[data-pos="0"] .mrai-play::before {
    animation: mraiRing 2.6s ease-out infinite;
}

.mrai-card[data-pos="0"] .mrai-play::after {
    animation: mraiRing 2.6s ease-out infinite 1.3s;
}

.mrai-play:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6);
}

@keyframes mraiRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.15);
        opacity: 0;
    }
}

@keyframes mraiBeat {
    0%,
    100% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.5),
            0 0 0 10px rgba(234, 194, 73, 0.12);
    }
}

/* ── أسهم التنقّل ── */
.mrai-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #d0c5af;
    background: #1e2020;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease,
        transform 0.3s ease;
}

.mrai-arrow-prev {
    right: 0;
}

.mrai-arrow-next {
    left: 0;
}

.mrai-arrow:hover {
    color: #101010;
    background: linear-gradient(135deg, var(--gold-warm), var(--gold));
    border-color: var(--gold);
    transform: translateY(-50%) scale(1.07);
}

.mrai-arrow:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

/* ── استجابة ── */
@media (max-width: 1150px) {
    .mrai-stage {
        height: 400px;
    }

    .mrai-card {
        width: min(560px, 70vw);
    }

    .mrai-card-title {
        font-size: 17px;
        padding: 0 20px 18px;
    }
}

@media (max-width: 768px) {
    .mrai-section {
        padding: 76px 0 90px;
    }

    .mrai-tabs {
        gap: 8px;
        padding-bottom: 18px;
    }

    .mrai-tab {
        padding: 7px 18px;
        font-size: 13px;
    }

    .mrai-stage {
        height: 330px;
    }

    .mrai-card {
        width: min(460px, 70vw);
        border-radius: 18px;
    }

    .mrai-card[data-pos="1"] {
        transform: translate(-50%, -50%) translateX(-42%) translateY(8px) scale(0.72) rotate(-5deg);
    }

    .mrai-card[data-pos="-1"] {
        transform: translate(-50%, -50%) translateX(42%) translateY(8px) scale(0.72) rotate(5deg);
    }

    /* إخفاء عناوين البطاقات الجانبية على الشاشات الصغيرة
     حتى لا يُقصّ النص عند حافة الشاشة */
    .mrai-card[data-pos="1"] .mrai-card-title,
    .mrai-card[data-pos="-1"] .mrai-card-title {
        opacity: 0;
    }

    .mrai-play {
        width: 62px;
        height: 62px;
        margin: -31px 0 0 -31px;
        font-size: 18px;
    }

    .mrai-arrow {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .mrai-content {
        gap: 30px;
    }

    .mrai-stage {
        height: 250px;
    }

    .mrai-card {
        width: min(360px, 78vw);
        border-radius: 14px;
    }

    .mrai-card[data-pos="1"] {
        transform: translate(-50%, -50%) translateX(-40%) translateY(6px) scale(0.66) rotate(-5deg);
    }

    .mrai-card[data-pos="-1"] {
        transform: translate(-50%, -50%) translateX(40%) translateY(6px) scale(0.66) rotate(5deg);
    }

    .mrai-card-title {
        font-size: 14.5px;
        padding: 0 15px 13px;
    }

    .mrai-card-title::before {
        width: 30px;
        height: 2px;
        margin-bottom: 8px;
    }

    .mrai-play {
        width: 50px;
        height: 50px;
        margin: -25px 0 0 -25px;
        font-size: 15px;
    }

    .mrai-arrow {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
}

/* تقدير حركة المستخدم */
@media (prefers-reduced-motion: reduce) {
    .mrai-card {
        transition: opacity 0.3s ease;
    }

    .mrai-card[data-pos="0"] .mrai-card-inner,
    .mrai-card[data-pos="0"] .mrai-play,
    .mrai-card[data-pos="0"] .mrai-play::before,
    .mrai-card[data-pos="0"] .mrai-play::after {
        animation: none;
    }
}

/* ══════════════════════════════════════════════════════
   STUDIES & REPORTS — Vertical Card Slider
══════════════════════════════════════════════════════ */
.studies-section {
    position: relative;
    width: 100%;
    padding: 96px 0 112px;
    background: #f5f2eaad;
    direction: rtl;
    overflow: hidden;
}

.studies-content {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ── Section Header ── */
.studies-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.studies-eyebrow {
    font-family: "Tajawal", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    opacity: 0.85;
}

.studies-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.2;
}

.studies-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(56, 77, 50, 0.18);
    border-radius: 9999px;
    background: rgba(56, 77, 50, 0.16);
    color: var(--navy-mid);
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    margin-top: 6px;
}

.studies-view-all:hover {
    background: rgba(195, 168, 74, 0.16);
    border-color: rgba(195, 168, 74, 0.65);
}

.studies-view-all svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.studies-view-all:hover svg {
    transform: translateX(-4px);
}

/* ── Stage ── */
.studies-stage {
    display: flex;
    flex-direction: column;
    /* viewport on top, sidebar below */
    align-items: stretch;
    gap: 20px;
}

/* ── Card Viewport ── */
.studies-viewport {
    width: 100%;
    /* fill full width in column-flex stage */
    position: relative;
    height: 690px;
    /* 3 × 220px cards + 2 × 14px gaps + 2px buffer */
    overflow: hidden;
}

/* ══ Individual Card ══ */
.studies-card {
    position: absolute;
    left: 0;
    right: 0;
    height: 220px;
    border-radius: 20px;
    overflow: hidden;
    /* explicit white bg for light-mode visibility */
    border: 1px solid rgba(195, 168, 74, 0.3);
    transition:
        top 0.52s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.38s ease,
        border-color 0.32s ease,
        box-shadow 0.32s ease;
    will-change: top;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ── Card Slot States ── */

/* Waiting above viewport — invisible */
.studies-card.slot-above {
    top: -260px;
    opacity: 0;
    pointer-events: none;
}

/* Three visible slots — all share the same full styling */
.studies-card.slot-0 {
    top: 0px;
    opacity: 1;
    pointer-events: auto;
}

.studies-card.slot-1 {
    top: 234px;
    opacity: 1;
    pointer-events: auto;
}

/* 220 + 14 */
.studies-card.slot-2 {
    top: 468px;
    opacity: 1;
    pointer-events: auto;
}

/* 234 × 2  */

/* Waiting below viewport — invisible */
.studies-card.slot-below {
    top: 760px;
    opacity: 0;
    pointer-events: none;
}

/* Hover glow — applied to all visible cards */
.studies-card.slot-0:hover,
.studies-card.slot-1:hover,
.studies-card.slot-2:hover {
    border-color: rgba(195, 168, 74, 0.6);
    box-shadow:
        0 15px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1.5px rgba(195, 168, 74, 0.35);
}

/* ── Card Inner Layout (RTL horizontal) ── */
.studies-card-inner {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    background-color: #efe8d5;
}

/* Image — right side (28%) in RTL */
.studies-card-img-wrap {
    position: relative;
    width: 31%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.studies-card-img {
    width: 90%;
    height: 85%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
    transition: transform 0.6s ease;
}

/* Image zoom on hover — all three visible slots */
.studies-card.slot-0:hover .studies-card-img,
.studies-card.slot-1:hover .studies-card-img,
.studies-card.slot-2:hover .studies-card-img {
    transform: scale(1.06);
}

/* Badge overlaid on image */
.studies-card-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    background: rgba(195, 168, 74, 0.18);
    border: 1px solid rgba(195, 168, 74, 0.42);
    color: var(--gold-light);
    font-family: "Tajawal", sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 99px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.studies-card-body {
    flex: 1;
    padding: 18px 5px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

/* Category tag */
.studies-card-tag {
    display: inline-block;
    align-self: flex-start;
    font-family: "Tajawal", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--gold);
    background: rgba(195, 168, 74, 0.1);
    border: 1px solid rgba(195, 168, 74, 0.24);
    padding: 3px 11px;
    border-radius: 99px;
}

/* Title */
.studies-card-title {
    font-family: "Scheherazade New", serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Description */
.studies-card-desc {
    font-size: 14.5px;
    line-height: 1.72;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

/* Meta row */
.studies-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.studies-card-author {
    display: flex;
    align-items: center;
    gap: 9px;
}

.studies-author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #0a0a0a;
    font-family: "Tajawal", sans-serif;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1.5px solid rgba(195, 168, 74, 0.38);
}

.studies-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.studies-author-name {
    font-family: "Tajawal", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-deep);
}

.studies-author-role {
    font-family: "Tajawal", sans-serif;
    font-size: 11px;
    color: var(--navy-deep);
}

.studies-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Tajawal", sans-serif;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.studies-read-time i {
    font-size: 11px;
    color: var(--gold-muted);
}

/* ── Sidebar Navigation ── */
.studies-sidebar {
    display: flex;
    flex-direction: row;
    /* horizontal: arrow · dots · arrow */
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    height: auto;
}

.studies-arrow-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.45);
    background: rgba(56, 77, 50, 0.16);
    color: var(--gold-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.2s ease,
        opacity 0.3s ease;
}

.studies-arrow-btn:hover:not(:disabled) {
    background: rgba(195, 168, 74, 0.22);
    border-color: var(--gold);
    transform: scale(1.12);
}

.studies-arrow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.studies-arrow-btn i {
    font-size: 11px;
}

/* Dots */
.studies-dots {
    display: flex;
    flex-direction: row;
    /* horizontal dots */
    gap: 9px;
    align-items: center;
}

.studies-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid rgba(195, 168, 74, 0.5);
    background: transparent;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition:
        width 0.3s ease,
        height 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.studies-dot.active {
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-color: var(--gold);
}

.studies-dot:hover:not(.active) {
    background: rgba(195, 168, 74, 0.35);
    border-color: rgba(195, 168, 74, 0.65);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .studies-section {
        padding: 72px 0 88px;
    }

    .studies-card-title {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .studies-header {
        align-items: center;
        gap: 16px;
        padding: 8px 16px;
        font-size: 13px;
    }

    /* ─── COLUMN LAYOUT للموبايل: الصورة فوق + المحتوى تحت ─── */
    .studies-card {
        height: 300px;
        /* أعلى لاستيعاب الصورة فوق + الجسم تحت */
    }

    .studies-card-inner {
        flex-direction: column;
    }

    /* الصورة: عرض كامل وطول محدّد للجزء العلوي */
    .studies-card-img-wrap {
        width: 100%;
        height: 130px;
        flex-shrink: 0;
        padding: 6px;
    }

    .studies-card-img {
        width: 100%;
        height: 100%;
        border-radius: 14px;
    }

    /* الجسم: عرض كامل أسفل الصورة */
    .studies-card-body {
        flex: 1;
        width: 100%;
        padding: 12px 18px 14px;
        gap: 6px;
        min-height: 0;
    }

    .studies-card-title {
        font-size: 16px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .studies-card-desc {
        font-size: 13.5px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .studies-card-tag {
        font-size: 10.5px;
        padding: 2px 9px;
    }

    /* الشارة على الصورة: نقلها للزاوية اليسرى السفلى لتتناسب مع التخطيط الجديد */
    .studies-card-badge {
        bottom: 12px;
        left: 12px;
        right: auto;
    }

    /* ─── إعادة حساب مواضع الـ slots للارتفاع الجديد (300px) ─── */
    .studies-card.slot-above {
        top: -330px;
    }

    .studies-card.slot-0 {
        top: 0px;
    }

    .studies-card.slot-1 {
        top: 314px;
        /* 300 + 14 */
    }

    .studies-card.slot-2 {
        top: 628px;
        /* 314 × 2 */
    }

    .studies-card.slot-below {
        top: 950px;
    }

    /* ارتفاع الـ viewport يستوعب 3 بطاقات عمودية */
    .studies-viewport {
        height: 928px;
        /* 3 × 300 + 2 × 14 */
    }
}

@media (max-width: 540px) {
    .studies-card-body {
        padding: 11px 16px 12px;
    }

    .studies-card-title {
        font-size: 15px;
    }

    .studies-author-role {
        display: none;
    }
}

/* =====================================================
   STUDIES — SCROLL-DRIVEN REVEAL (بسيط وسلس)
   fade-up لطيف للكتل فقط. لا يُلمس أي عنصر يتفاعل مع الـhover
   (البطاقات) → لا تعارض مع الـhover أو حركة الكاروسيل.
   ===================================================== */

/* الحالة الأوّلية: مخفي قليلاً للأسفل — تُضاف عبر JS */
.studies-anim {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--anim-delay, 0s);
}

/* الحالة النهائية: ظاهر بمكانه الطبيعي */
.studies-anim.studies-visible {
    opacity: 1;
    transform: translateY(0);
}

/* بعد انتهاء الحركة نُزيل will-change ضمنياً (لا نستخدمه أصلاً)
   حتى تبقى البطاقات داخل الـviewport حرة تماماً للـhover */

/* احترام تفضيل المستخدم بتقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .studies-anim {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============ نهاية حركات قسم الدراسات ============ */

/* =====================================================
  قسم المقالات — MAQALAT SECTION
   ===================================================== */

.maqalat {
    position: relative;
    background: var(--bg-section2);
    padding-top: 80px;
    padding-bottom: 80px;
}

/* ── هيدر القسم ── */
.maqalat-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    direction: rtl;
}

.maqalat-header-right {
    width: 100%;
    display: flex;

    justify-content: space-between;
    gap: 16px;
}

/* ── عنوان القسم ── */
.maqalat .maqalat-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    text-align: right;
    color: #14344f;
    margin: 0;
}

/* ── تبويبات التصفية ── */
.maqalat-tabs {
    display: flex;
    gap: 10px;
    direction: rtl;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.maqalat-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.maqalat-tab {
    font-family: "Tajawal", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 20px;
    border-radius: 9999px;
    border: 1px solid rgba(56, 77, 50, 0.18);
    background: rgba(56, 77, 50, 0.16);
    color: var(--navy-mid);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.maqalat-tab:hover {
    background: rgba(195, 168, 74, 0.08);
    border-color: rgba(195, 168, 74, 0.45);
    color: #14344f;
}

.maqalat-tab.active {
    background: var(--navy-deep);
    border-color: var(--navy-deep);
    color: #fff;
}

/* ── زر عرض الكل ── */
.maqalat-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(56, 77, 50, 0.18);
    border-radius: 9999px;
    background: rgba(56, 77, 50, 0.16);
    color: var(--navy-mid);
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    margin-top: 6px;
    height: fit-content;
}

.maqalat-view-all-btn:hover {
    background: rgba(195, 168, 74, 0.16);
    border-color: rgba(195, 168, 74, 0.65);
}

.maqalat-view-all-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.maqalat-view-all-btn:hover svg {
    transform: translateX(-4px);
}

/* ── شبكة البطاقات ── */
.maqalat .maqalat-container {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    padding-top: 60px;
    direction: rtl;
}

/* ── البطاقة الواحدة ── */
.maqalat .maqalat-card {
    background: rgba(255, 255, 255, 0.77);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 7%);
    direction: rtl;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s ease;
}

/* ── حركات الهوفر ── */
.maqalat .maqalat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(56, 77, 50, 0.35);
    border-color: rgba(195, 168, 74, 0.35);
}

.maqalat .maqalat-card:hover .maqalat-img img {
    transform: scale(1.08);
}

.maqalat .maqalat-card .maqalat-img img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.maqalat .maqalat-card:hover .maqalat-text {
    color: #14344f;
}

.maqalat .maqalat-card .maqalat-text {
    transition: color 0.3s ease;
}

/* ── حاوية الصورة والتصنيف ── */
.maqalat .maqalat-img-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

/* ── الصورة الرمزية ── */
.maqalat .maqalat-card .maqalat-img {
    position: absolute;
    padding: 10px;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    right: -5px;
    top: -50px;
}

.maqalat .maqalat-card .maqalat-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* ── شارة التصنيف ── */
.maqalat .maqalat-category {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    gap: 5px;
    position: absolute;
    right: 90px;
    top: 8px;
    font-family: "Tajawal", sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 14px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.maqalat .maqalat-category::before {
    content: "";
    width: 16px;
    height: 1.5px;
    background: var(--gold);
}

/* ── تصنيف تاريخية ── */
.maqalat-cat-historical {
    color: #6d4c2a;
}

/* ── إخفاء/إظهار الكروت عند الفلترة ── */
.maqalat .maqalat-card.maqalat-hidden {
    display: none;
}

/* ── اسم الكاتب ── */
.maqalat .maqalat-card h2 {
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
}

/* ── نص المقال (3 أسطر كحد أقصى) ── */
.maqalat .maqalat-card .maqalat-text {
    font-family: "Tajawal", sans-serif;
    line-height: 1.8;
    margin: 10px 0;
    font-weight: 600;
    text-indent: 70px;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── وقت القراءة ── */
.maqalat .maqalat-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-family: "Tajawal", sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--navy-mid);
    justify-content: space-between;
}

.maqalat .maqalat-read-time i {
    font-size: 12px;
    color: #c3a84a;
}

/* ── استجابة المقالات ── */
@media (max-width: 768px) {
    .maqalat {
        padding: 60px 0;
    }

    .maqalat .maqalat-container {
        padding: 0 16px;
        padding-top: 60px;
    }

    .maqalat-header {
        flex-direction: column;
        gap: 20px;
    }

    .maqalat-tabs {
        gap: 8px;
    }

    .maqalat-tab {
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 540px) {
    .maqalat {
        padding: 50px 0;
    }

    .maqalat .maqalat-container {
        grid-template-columns: 1fr;
    }
    .maqalat-view-all-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============ نهاية قسم المقالات ============ */

/* =====================================================
   MAQALAT — SCROLL-DRIVEN REVEAL ANIMATIONS
   حركات لطيفة تنطلق عند دخول العناصر في الشاشة
   ===================================================== */

/* الحالة الأوّلية لجميع العناصر القابلة للأنميشن (تُضاف بـ JS لئلا تختفي إذا تعطّل JS) */
.maqalat-anim {
    opacity: 0;
}

/* ─── الهيدر: عنوان القسم ─── */
.maqalat-title.maqalat-anim {
    transform: translateX(40px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.maqalat-title.maqalat-visible {
    opacity: 1;
    transform: translateX(0);
}

/* زر "عرض الكل" — ينزلق من اليسار */
.maqalat-view-all-btn.maqalat-anim {
    transform: translateX(-30px);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.maqalat-view-all-btn.maqalat-visible {
    opacity: 1;
    transform: translateX(0);
}

/* التبويبات — تنبثق متسلسلة (stagger عبر --anim-delay من JS) */
.maqalat-tab.maqalat-anim {
    transform: translateY(15px) scale(0.85);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    transition-delay: var(--anim-delay, 0s);
}

.maqalat-tab.maqalat-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ─── البطاقات — fade up مع scale + stagger ─── */
.maqalat .maqalat-card.maqalat-anim {
    opacity: 0;
    transform: translateY(55px) scale(0.96);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s ease;
    transition-delay: var(--anim-delay, 0s);
}

.maqalat .maqalat-card.maqalat-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* الصورة الدائرية: تظهر بحركة rotate + scale نابضة */
.maqalat .maqalat-card.maqalat-anim .maqalat-img {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition:
        opacity 0.5s ease,
        transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--anim-delay, 0s) + 0.25s);
}

.maqalat .maqalat-card.maqalat-visible .maqalat-img {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* الصورة الداخلية للـ img: تنزّوم خفيف بعد دخول البطاقة */
.maqalat .maqalat-card.maqalat-anim .maqalat-img img {
    transform: scale(1.3);
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--anim-delay, 0s) + 0.4s);
}

.maqalat .maqalat-card.maqalat-visible .maqalat-img img {
    transform: scale(1);
}

/* شارة التصنيف — تنزلق من اليسار بعد ظهور الصورة */
.maqalat .maqalat-card.maqalat-anim .maqalat-category {
    opacity: 0;
    transform: translateX(-25px);
    transition:
        opacity 0.55s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--anim-delay, 0s) + 0.5s);
}

.maqalat .maqalat-card.maqalat-visible .maqalat-category {
    opacity: 1;
    transform: translateX(0);
}

/* النص — يطفو من الأسفل بعد ظهور الصورة */
.maqalat .maqalat-card.maqalat-anim .maqalat-text {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.65s ease,
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.3s ease;
    transition-delay: calc(var(--anim-delay, 0s) + 0.35s);
}

.maqalat .maqalat-card.maqalat-visible .maqalat-text {
    opacity: 1;
    transform: translateY(0);
}

/* صف وقت القراءة — آخر من يظهر */
.maqalat .maqalat-card.maqalat-anim .maqalat-read-time {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.55s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--anim-delay, 0s) + 0.5s);
}

.maqalat .maqalat-card.maqalat-visible .maqalat-read-time {
    opacity: 1;
    transform: translateY(0);
}

/* احترام رغبة المستخدم بتقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .maqalat-anim,
    .maqalat-anim *,
    .maqalat-visible,
    .maqalat-visible * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============ نهاية حركات قسم المقالات ============ */

/* =====================================================
   KUTTAB SECTION — كُتّاب مؤسسة الوافي
   بانر مع شرائط متحركة للأقلام
   ===================================================== */

.kuttab-section {
    position: relative;
    width: 100%;
    padding: 96px 0 112px;
    background: var(--bg-section2);
    direction: rtl;
    overflow: hidden;
}

/* ── لمسات إضاءة خفيفة في الخلفية ── */
.kuttab-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse 50% 45% at 88% 15%,
            rgba(195, 168, 74, 0.1) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse 45% 50% at 10% 90%,
            rgba(20, 52, 79, 0.06) 0%,
            transparent 60%
        );
    pointer-events: none;
    z-index: 0;
}

/* ── المحتوى الداخلي ── */
.kuttab-content {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 48px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 48px;
    min-height: 600px;
    background: rgba(195, 168, 74, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px;
    border: 1px solid rgba(195, 168, 74, 0.18);
}

/* ── النصف الأيمن: النصوص ── */
.kuttab-text {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 560px;
}

.kuttab-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.2;
    margin: 0;
}

.kuttab-desc {
    font-family: "Tajawal", sans-serif;
    font-size: 17px;
    line-height: 1.9;
    font-weight: 400;
    color: var(--navy-deep);
    max-width: 540px;
}

/* ── زر الـ CTA ── */
.kuttab-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 9999px;
    background: var(--navy-deep);
    color: #fff;
    font-family: "Tajawal", sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(20, 52, 79, 0.18);
    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
    width: fit-content;
    margin-top: 6px;
}

.kuttab-cta:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
}

.kuttab-cta-arrow {
    color: var(--gold-light);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.kuttab-cta:hover .kuttab-cta-arrow {
    transform: translateX(-4px);
}

/* ── النصف الأيسر: حاوية المارّكي ── */
.kuttab-marquee {
    flex: 1 1 50%;
    position: relative;
    height: 400px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 12%,
        #000 88%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 12%,
        #000 88%,
        transparent 100%
    );
}

/* ── الأعمدة العمودية (ديسكتوب) ── */
.kuttab-columns {
    display: flex;
    gap: 16px;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
}

.kuttab-column {
    flex: 1 1 0;
    max-width: 180px;
    height: 100%;
    overflow: hidden;
}

.kuttab-column-mid {
    margin-top: -48px;
}

.kuttab-column-offset {
    margin-top: 32px;
}

.kuttab-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    will-change: transform;
}

.kuttab-track-down {
    animation: kuttab-marquee-down 22s linear infinite;
}

.kuttab-track-up {
    animation: kuttab-marquee-up 26s linear infinite;
}

@keyframes kuttab-marquee-down {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes kuttab-marquee-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* إيقاف الحركة عند التحويم */
.kuttab-marquee:hover .kuttab-track-down,
.kuttab-marquee:hover .kuttab-track-up,
.kuttab-marquee:hover .kuttab-track-horizontal {
    animation-play-state: paused;
}

/* ── الشريط الأفقي (موبايل) ── */
.kuttab-horizontal {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    -webkit-mask-image: linear-gradient(
        to left,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to left,
        transparent 0%,
        #000 10%,
        #000 90%,
        transparent 100%
    );
}

.kuttab-track-horizontal {
    flex-direction: row;
    animation: kuttab-marquee-horizontal 28s linear infinite;
    will-change: transform;
}

@keyframes kuttab-marquee-horizontal {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

/* ── بطاقة الكاتب (Glass Card) ── */
.kuttab-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 12px;
    border-radius: 20px;
    background: rgba(195, 168, 74, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(20, 52, 79, 0.1);
    box-shadow: 0 4px 14px rgba(20, 52, 79, 0.06);
    cursor: pointer;
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    flex-shrink: 0;
}

.kuttab-card:hover {
    border-color: rgba(195, 168, 74, 0.55);
    box-shadow: 0 12px 28px rgba(20, 52, 79, 0.14);
}

.kuttab-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    background: #fff;
    transition: border-color 0.35s ease;
    box-shadow: 0 4px 10px rgba(20, 52, 79, 0.08);
}

.kuttab-card:hover .kuttab-avatar {
    border-color: var(--gold);
}

.kuttab-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.kuttab-name {
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-deep);
    text-align: center;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.kuttab-card:hover .kuttab-name {
    color: var(--gold-muted);
}

/* ── استجابة الشاشات ── */
@media (max-width: 900px) {
    .kuttab-content {
        flex-direction: column;
        text-align: center;
        gap: 36px;
        min-height: auto;
        padding: 36px 28px;
        margin: 0 16px;
    }

    .kuttab-text {
        align-items: center;
        flex: 0 0 auto;
        max-width: 640px;
    }

    .kuttab-desc {
        text-align: center;
    }

    .kuttab-marquee {
        flex: 0 0 auto;
        width: 100%;
        height: 220px;
        -webkit-mask-image: linear-gradient(
            to left,
            transparent 0%,
            #000 10%,
            #000 90%,
            transparent 100%
        );
        mask-image: linear-gradient(
            to left,
            transparent 0%,
            #000 10%,
            #000 90%,
            transparent 100%
        );
    }

    .kuttab-columns {
        display: none;
    }

    .kuttab-horizontal {
        display: flex;
    }

    .kuttab-card {
        min-width: 150px;
        padding: 14px 10px;
    }

    .kuttab-avatar {
        width: 78px;
        height: 78px;
    }
}

@media (max-width: 540px) {
    .kuttab-section {
        padding: 70px 0 80px;
    }

    .kuttab-content {
        padding: 28px 16px;
        margin: 0 12px;
        border-radius: 20px;
    }

    .kuttab-marquee {
        height: 200px;
    }

    .kuttab-avatar {
        width: 70px;
        height: 70px;
    }

    .kuttab-name {
        font-size: 13px;
    }
}

/* ============ نهاية قسم كُتّاب مؤسسة الوافي ============ */

/* =====================================================
   MAWSUAT SECTION — الموسوعات
   بطاقات متراكمة بتأثير Sticky + Scale عند التمرير
   (مكافئ vanilla لـ Motion + Lenis في React)
   ===================================================== */

.mawsuat-section {
    position: relative;
    width: 100%;
    background: rgba(245, 242, 234, 0.66);
    direction: rtl;
    overflow: visible;
}

/* ── المقدّمة (Intro) — قسم تمهيدي بشبكة مضيئة ── */
.mawsuat-intro {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    height: 50vh;
    min-height: 480px;
    width: 100%;
    display: grid;
    place-content: center;
    overflow: hidden;
}

.mawsuat-intro-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to left, rgba(195, 168, 74, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(195, 168, 74, 0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(
        ellipse 65% 55% at 50% 0%,
        #000 60%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 65% 55% at 50% 0%,
        #000 60%,
        transparent 100%
    );
    pointer-events: none;
}

.mawsuat-intro-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.mawsuat-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1.15;
    margin: 0;
    text-align: center;
    text-shadow: 0 4px 12px rgba(195, 168, 74, 0.2);
}

.mawsuat-subtitle {
    font-family: "Tajawal", sans-serif;
    font-size: 17px;
    line-height: 1.85;
    font-weight: 500;
    color: var(--navy-mid);
    max-width: 640px;
}

.mawsuat-scroll-indicator {
    margin-top: 26px;
    width: 28px;
    height: 46px;
    border: 2px solid rgba(195, 168, 74, 0.55);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.mawsuat-scroll-dot {
    width: 4px;
    height: 10px;
    background: var(--gold);
    border-radius: 999px;
    animation: mawsuat-scroll-dot 1.6s ease-in-out infinite;
}

@keyframes mawsuat-scroll-dot {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    60% {
        transform: translateY(14px);
        opacity: 0;
    }

    61% {
        transform: translateY(0);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── حاوية البطاقات المتراكبة ── */
.mawsuat-stack {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    width: 100%;

    padding-bottom: 80px;
}

/* ── حاوية بطاقة واحدة — sticky على الـ wrap لخلق التراكم ── */
.mawsuat-card-wrap {
    position: sticky;
    top: 0;
    height: 111vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* إضاءة محيطية خافتة حول كل بطاقة */
.mawsuat-card-wrap::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(195, 168, 74, 0.05) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* ── البطاقة الواحدة — relative داخل الـ wrap الـ sticky ── */
.mawsuat-card {
    position: relative;
    z-index: 1;
    top: calc(-5vh + var(--card-index, 0) * 25px);
    width: min(1150px, 82%);
    height: 460px;
    border-radius: 20px;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    color: var(--navy-deep);
    background: #efe8d5;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(195, 168, 74, 0.25);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    transform-origin: top center;
    will-change: transform;
    overflow: hidden;
}

/* لمسة ذهبية خفيفة فوق كل بطاقة */
.mawsuat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 55% 40% at 50% 0%, rgba(233, 187, 79, 0.1) 0%, transparent 65%), radial-gradient(ellipse 40% 35% at 90% 100%, rgba(56, 77, 50, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.mawsuat-card-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 700;
    text-align: center;
    color: var(--navy-deep);
    margin: 0 0 6px;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

.mawsuat-card-body {
    display: flex;
    flex-direction: row;
    gap: 36px;
    margin-top: 22px;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
}

/* النصّ على اليمين (RTL) */
.mawsuat-card-text {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.mawsuat-card-desc {
    font-family: "Tajawal", sans-serif;
    font-size: 16px;
    line-height: 1.95;
    font-weight: 600;
    margin: 0;
    text-align: justify;
}

.mawsuat-card-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
    width: fit-content;
    border: 1px solid rgba(56, 77, 50, 0.18);
    border-radius: 9999px;
    background: transparent;
    color: var(--navy-deep);
}

.mawsuat-card-more:hover {
    background: rgba(195, 168, 74, 0.16);
    border-color: rgba(195, 168, 74, 0.65);
    transform: translateY(-1px);
}

.mawsuat-card-more svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.mawsuat-card-more:hover svg {
    transform: translateX(-4px);
}

/* الصورة على اليسار (RTL) */
.mawsuat-card-image {
    position: relative;
    width: 60%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.mawsuat-card-image-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: center;
    will-change: transform;
}

.mawsuat-card-image-inner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── استجابة الشاشات ── */
@media (max-width: 900px) {
    .mawsuat-intro {
        height: 40vh;
        min-height: 380px;
    }

    .mawsuat-card {
        width: 90%;
        height: auto;
        min-height: 540px;
        padding: 28px 22px;
    }

    .mawsuat-card-body {
        flex-direction: column-reverse;
        gap: 22px;
        margin-top: 18px;
    }

    .mawsuat-card-text,
    .mawsuat-card-image {
        width: 100%;
    }

    .mawsuat-card-image {
        height: 200px;
        flex-shrink: 0;
    }

    .mawsuat-card-desc {
        font-size: 14.5px;
        line-height: 1.85;
    }
}

@media (max-width: 540px) {
    .mawsuat-card-wrap {
        height: auto;
        min-height: 65vh;
        padding: 30px 0;
    }

    .mawsuat-card {
        top: 8vh;
        width: 92%;
        padding: 22px 18px;
    }

    .mawsuat-card-title {
        font-size: 22px;
    }
}

/* ============ نهاية قسم الموسوعات ============ */

/* =====================================================
   ZAKIRA SECTION — الذاكرة الحية
   قسم تبويبات مع بطاقات 52% / 48%
   ===================================================== */

.zakira-section {
    position: relative;
    width: 100%;
    padding: 80px 0 96px;
    background: var(--bg-section2);
    direction: rtl;
}

/* ── هيدر القسم ── */
.zakira-header {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 16px;
}

.zakira-header-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.zakira-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--navy-deep);
    margin: 0;
}

/* ── تبويبات ── */
.zakira-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.zakira-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.zakira-tab {
    font-family: "Tajawal", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 20px;
    border-radius: 9999px;
    border: 1px solid rgba(20, 52, 79, 0.18);
    background: rgba(56, 77, 50, 0.16);
    color: var(--navy-mid);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.zakira-tab:hover {
    background: rgba(195, 168, 74, 0.08);
    border-color: rgba(195, 168, 74, 0.45);
    color: var(--navy-deep);
}

.zakira-tab.active {
    background: var(--navy-deep);
    border-color: var(--navy-deep);
    color: #fff;
}

/* ── زر عرض الكل ── */
.zakira-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid rgba(56, 77, 50, 0.18);
    border-radius: 9999px;
    background: rgba(56, 77, 50, 0.16);
    color: var(--navy-mid);
    font-family: "Tajawal", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    height: fit-content;
    flex-shrink: 0;
}

.zakira-view-all-btn:hover {
    background: rgba(195, 168, 74, 0.16);
    border-color: rgba(195, 168, 74, 0.65);
}

.zakira-view-all-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.zakira-view-all-btn:hover svg {
    transform: translateX(-4px);
}

/* ── منطقة المحتوى ── */
.zakira-content {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 0 24px;
    min-height: 480px;
}

/* ── اللوحات (Panels) ── */
.zakira-panel {
    display: none;
    animation: zakiraFadeIn 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.zakira-panel.active {
    display: block;
}

@keyframes zakiraFadeIn {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── الشبكة الرئيسية 52/48 ── */
.zakira-grid {
    display: grid;
    grid-template-columns: 52% 1fr;
    gap: 16px;
    height: 570px;
    overflow: hidden;
}

/* ── البطاقة المميزة (اليمين) ── */
.zakira-featured {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    height: 100%;
}

.zakira-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zakira-featured:hover img {
    transform: scale(1.05);
}

.zakira-featured-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 28px 24px 22px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: padding-bottom 0.35s ease;
}

.zakira-featured:hover .zakira-featured-overlay {
    padding-bottom: 28px;
}

.zakira-featured-title {
    font-family: "Scheherazade New", serif;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}


/* ── الشبكة الجانبية (اليسار) — 2×2 ── */
.zakira-grid-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    height: 100%;
    overflow: hidden;
}

/* ── بطاقة جانبية واحدة ── */
.zakira-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: #efe8d5;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease;
    min-height: 0;
}

.zakira-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.zakira-card-img {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.zakira-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.zakira-card:hover .zakira-card-img img {
    transform: scale(1.06);
}

.zakira-card-info {
    padding: 10px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}

.zakira-card-title {
    font-family: "Tajawal", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--navy-deep);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ── الحالة قبل السكرول للقسم: العناصر مخفية بحالتها الأوّلية للحركة
       (المنتظِرة zakira-revealed التي تُضاف بـIntersectionObserver) ── */
.zakira-section:not(.zakira-revealed) .zakira-panel.active .zakira-featured {
    opacity: 0;
    transform: translateX(30px) scale(0.97);
}

.zakira-section:not(.zakira-revealed) .zakira-panel.active .zakira-featured img,
.zakira-section:not(.zakira-revealed)
.zakira-panel.active
.zakira-card
.zakira-card-img
img {
    clip-path: inset(0 100% 0 0);
}

.zakira-section:not(.zakira-revealed) .zakira-panel.active .zakira-card {
    opacity: 0;
    transform: scale(0.9) translateY(12px);
}

/* ── أنيميشن البطاقات الفرعية:
       تشتغل لما:
         • القسم يدخل الـviewport (إضافة zakira-revealed)  → reveal أول مرة
         • أو المستخدم يبدّل التبويب بعد ذلك                → re-trigger للـpanel الجديد
       الـ.zakira-revealed يُضاف بـIntersectionObserver في JS ─── */
.zakira-section.zakira-revealed .zakira-panel.active .zakira-featured {
    animation: zakiraSlideRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.zakira-section.zakira-revealed .zakira-panel.active .zakira-featured img {
    animation: zakiraClipReveal 0.7s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    both;
}

.zakira-section.zakira-revealed .zakira-panel.active .zakira-card:nth-child(1) {
    animation: zakiraCardPop 0.45s 0.08s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.zakira-section.zakira-revealed
.zakira-panel.active
.zakira-card:nth-child(1)
.zakira-card-img
img {
    animation: zakiraClipReveal 0.6s 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    both;
}

.zakira-section.zakira-revealed .zakira-panel.active .zakira-card:nth-child(2) {
    animation: zakiraCardPop 0.45s 0.16s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.zakira-section.zakira-revealed
.zakira-panel.active
.zakira-card:nth-child(2)
.zakira-card-img
img {
    animation: zakiraClipReveal 0.6s 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    both;
}

.zakira-section.zakira-revealed .zakira-panel.active .zakira-card:nth-child(3) {
    animation: zakiraCardPop 0.45s 0.24s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.zakira-section.zakira-revealed
.zakira-panel.active
.zakira-card:nth-child(3)
.zakira-card-img
img {
    animation: zakiraClipReveal 0.6s 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    both;
}

.zakira-section.zakira-revealed .zakira-panel.active .zakira-card:nth-child(4) {
    animation: zakiraCardPop 0.45s 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.zakira-section.zakira-revealed
.zakira-panel.active
.zakira-card:nth-child(4)
.zakira-card-img
img {
    animation: zakiraClipReveal 0.6s 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94)
    both;
}

@keyframes zakiraSlideRight {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes zakiraCardPop {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes zakiraClipReveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* ── استجابة الشاشات ── */
@media (max-width: 900px) {
    .zakira-section {
        padding: 60px 0 72px;
    }

    .zakira-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .zakira-featured {
        height: 320px;
    }

    .zakira-grid-side {
        grid-template-columns: 1fr 1fr;
        height: auto;
        overflow: visible;
    }

    .zakira-card {
        height: 220px;
    }

    .zakira-tabs {
        gap: 8px;
    }

    .zakira-tab {
        font-size: 12px;
        padding: 6px 14px;
    }
}

@media (max-width: 540px) {
    .zakira-section {
        padding: 48px 0 56px;
    }

    .zakira-header {
        padding: 0 16px;
    }

    .zakira-content {
        padding: 0 16px;
        margin-top: 28px;
    }

    .zakira-featured {
        height: 240px;
    }

    .zakira-grid-side {
        grid-template-columns: 1fr;
    }

    .zakira-card {
        height: 260px;
    }

    .zakira-card-info {
        padding: 10px 12px 8px;
    }

    .zakira-view-all-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .footer-title-img {
        width: 210px;
        height: auto;
    }

    .footer-logo {
        width: 100px;
        height: auto;
    }
}

/* ============ نهاية قسم الذاكرة الحية ============ */

/* =====================================================
   FOOTER SECTION — تذييل الموقع
   ===================================================== */
.site-footer {
    position: relative;
    background: linear-gradient(175deg, var(--navy-deep) 0%, #2a3b26 100%);
    color: #fff;
    padding: 60px 0 20px;
    font-family: "Tajawal", sans-serif;
}

.footer-container {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.3fr;
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-about {
    align-items: center;
    justify-content: start;
}

.footer-logo {
    max-width: 120px;
    height: auto;
}

.footer-title-img {
    max-width: 260px;
    height: auto;
}

.footer-heading {
    font-family: "Scheherazade New", serif;
    font-size: 24px;
    color: var(--gold);
    margin: 0 0 10px;
    position: relative;
    padding-bottom: 10px;
    width: fit-content;
}

.footer-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-links li {
    position: relative;
}

.footer-links a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 9px 14px 9px 14px;
    border-radius: 8px;
    overflow: hidden;
    isolation: isolate;
    transition:
        color 0.35s ease,
        padding-right 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.35s ease;
}

/* خلفية متدرجة تنزلق من اليمين */
.footer-links a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        270deg,
        rgba(195, 168, 74, 0.18) 0%,
        rgba(195, 168, 74, 0.05) 100%
    );
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

/* شريط ذهبي عمودي يكبر على اليمين */
.footer-links a::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--gold-light), var(--gold));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(195, 168, 74, 0.55);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* أيقونة سهم تظهر مع الـhover */
.footer-links a .link-arrow,
.footer-links a > i {
    font-size: 11px;
    color: var(--gold);
    opacity: 0;
    transform: translateX(8px);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.footer-links a:hover {
    color: var(--gold-light);
    padding-right: 22px;
}

.footer-links a:hover::before {
    transform: translateX(0);
}

.footer-links a:hover::after {
    height: 70%;
}

.footer-links a:hover .link-arrow,
.footer-links a:hover > i {
    opacity: 1;
    transform: translateX(0);
}

/* ============ Footer Map & Contact ============ */
.footer-map .contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-map .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;

    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition:
        background 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.footer-map .contact-icon {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 16px;
    transition: all var(--ease);
}

.footer-map .contact-item:hover .contact-icon {
    transform: scale(1.2);
}

.footer-map .contact-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.footer-map .contact-label {
    font-size: 11.5px;
    color: var(--gold-light);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.footer-map .contact-value {
    font-size: 14.5px;
    color: #fff;
    font-weight: 600;
    direction: ltr;
    text-align: right;
    word-break: break-word;
}

.footer-map .map-container {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(195, 168, 74, 0.28);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    transition:
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        transform 0.4s ease;
}

.footer-map .map-container:hover {
    border-color: rgba(195, 168, 74, 0.55);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(195, 168, 74, 0.18);
    transform: translateY(-3px);
}

.footer-map .map-container iframe {
    display: block;
    transition: filter 0.5s ease;
}

.footer-map .map-container:hover iframe {
    filter: saturate(1.15);
}

.footer-bottom {
    position: relative;
    z-index: 3; /* فوق طبقة النقش */
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 50px 30px;
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =====================================================
   BACK-TO-TOP FLOATING BUTTON — زر العودة إلى الأعلى
   ===================================================== */
.btt-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    background-color: var(--navy-deep);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.85);
    transition:
        opacity 0.4s ease,
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        visibility 0.4s;
    isolation: isolate;
}

.btt-btn.btt-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* الخلفية: دائرة كحلية متدرّجة مع حدّ ذهبي خفيف */
.btt-bg {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px solid rgba(195, 168, 74, 0.3);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition:
        border-color 0.35s ease,
        box-shadow 0.35s ease;
    z-index: 0;
}

/* نبضة خفيفة عند الظهور */
.btt-btn.btt-visible .btt-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(195, 168, 74, 0.45);
    animation: bttPulse 2.6s ease-out infinite;
    pointer-events: none;
}

@keyframes bttPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(195, 168, 74, 0.45);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(195, 168, 74, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(195, 168, 74, 0);
    }
}

/* حلقة تقدّم القراءة (gold progress ring) */
.btt-circle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.btt-circle circle {
    fill: none;
    stroke: url(#bttGradient, var(--gold));
    stroke: var(--gold);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 289.03;
    stroke-dashoffset: 289.03;
    filter: drop-shadow(0 0 4px rgba(195, 168, 74, 0.6));
    transition:
        stroke-dashoffset 0.15s ease-out,
        stroke 0.3s ease;
}

/* سهم الـ chevron الذهبي */
.btt-arrow {
    position: relative;
    z-index: 2;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--gold);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px rgba(195, 168, 74, 0.45));
    transition:
        stroke 0.3s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* عند المرور بالماوس */
.btt-btn:hover .btt-bg {
    border-color: rgba(195, 168, 74, 0.65);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 0 3px rgba(195, 168, 74, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btt-btn:hover .btt-circle circle {
    stroke: var(--gold-light);
    stroke-width: 3.4;
    filter: drop-shadow(0 0 8px rgba(212, 188, 106, 0.85));
}

.btt-btn:hover .btt-arrow {
    stroke: var(--gold-light);
    animation: bttArrowBounce 1.1s ease-in-out infinite;
}

@keyframes bttArrowBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* عند الضغط */
.btt-btn:active {
    transform: translateY(0) scale(0.94);
}

/* Responsive */
@media (max-width: 576px) {
    .btt-btn {
        width: 48px;
        height: 48px;
        bottom: 20px;
        left: 20px;
    }
    .btt-arrow {
        width: 18px;
        height: 18px;
    }
}

/* تقدير حركة المستخدم */
@media (prefers-reduced-motion: reduce) {
    .btt-btn,
    .btt-bg,
    .btt-arrow,
    .btt-circle circle {
        transition: none;
    }
    .btt-btn.btt-visible .btt-bg::after,
    .btt-btn:hover .btt-arrow {
        animation: none;
    }
}

/* =====================================================
   PERF — إيقاف الأنيميشن المستمر عند الخروج من الشاشة
   يُضاف/يُزال عبر JS (IntersectionObserver). تحسين خفي:
   لا أثر بصري لأن العنصر خارج الشاشة أثناء الإيقاف.
   ===================================================== */
.anim-paused {
    animation-play-state: paused !important;
}
