/**
 * ═══════════════════════════════════════════════════════════════════════════
 * تنسيقات قالب شرح الكتب والمتون العلمية الموحدة — المنهاج (Book Explanation Master CSS)
 * ملف التنسيقات الخاص بالقالب: book_explanation.css
 * يشمل:
 *  1. الأنماط العامة، الخطوط، وقواعد SweetAlert2 لمنع الاهتزاز
 *  2. أنماط صفحة عرض أقسام شرح الكتب (.lbg-scope)
 *  3. أنماط صفحة قائمة دروس ومواد شرح الكتاب (.bel-scope)
 *  4. أنماط صفحة عرض المادة / الدرس (.be-scope)
 * متوافق 100% مع نظام ألوان المنهاج، الوضع الليلي، والتجاوب مع جميع الشاشات
 * ═══════════════════════════════════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Naskh+Arabic:wght@400;600;700&family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ── قواعد تثبيت ومنع اهتزاز الصفحة عند ظهور تنبيهات SweetAlert2 ── */
body.swal2-shown {
    overflow: auto !important;
    padding-right: 0 !important;
}

.swal2-container {
    overflow: auto !important;
}

/* ── شريط مسار التنقل والأدوات العلوية للقسم ── */
.cat-breadcrumb-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.cat-breadcrumb-wrap .cat-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.cat-adm-tools-pill {
    display: inline-flex !important;
    align-items: center !important;
    height: 38px !important;
    background: #ffffff !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    border: 1px solid #e0d8ca !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    vertical-align: middle !important;
}

.cat-adm-tools-pill .adm-cat-quick-tools {
    margin: 0 !important;
    gap: 4px !important;
}

.cat-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid #e0d8ca !important;
    color: var(--cat-warm, #154c31) !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.cat-action-btn:hover {
    transform: translateY(-2px) !important;
    color: #154c31 !important;
    border-color: #c8a96a !important;
    box-shadow: 0 6px 16px rgba(200, 169, 106, 0.2) !important;
    background: #ffffff !important;
}

.cat-title-wrap.cat-title-wrap-book .cat-actions {
    position: static !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   القسم الأول: أنماط عرض أقسام شرح الكتب والمتون (.lbg-scope)
   ═══════════════════════════════════════════════════════════════════════════ */
.lbg-scope {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    direction: rtl !important;
    position: relative !important;
    --be-primary: #13462c;
    --be-olive: #2f4617;
    --be-gold: #c8a96a;
    --be-text: #1e293b;
    --be-muted: #52665a;
    --be-card-bg: #ffffff;
    --be-border: #e2ebd8;

    background: #ffffff !important;
    border: 1.5px solid #d8e8dc !important;
    border-radius: 24px !important;
    padding: 0 22px 28px !important;
    box-shadow: 0 12px 36px rgba(19, 70, 44, 0.05) !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.lbg-scope *,
.lbg-scope *::before,
.lbg-scope *::after {
    box-sizing: border-box;
}

/* الشريط الزمردي الذهبي العلوي */
.lbg-scope::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #13462c, #c8a96a 50%, #2f4617);
    border-radius: 24px 24px 0 0;
    z-index: 3;
}

/* ── رأس القسم + عداد النتائج الفوري ── */
.lbg-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 22px 4px 16px !important;
    border-bottom: 1.5px solid rgba(200, 169, 106, 0.28) !important;
    margin-bottom: 16px !important;
    flex-wrap: wrap !important;
}

.lbg-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.lbg-header-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #13462c 0%, #2f4617 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
    box-shadow: 0 6px 16px rgba(19, 70, 44, 0.2) !important;
    flex-shrink: 0 !important;
}

.lbg-header-title {
    font-size: 1.28rem !important;
    font-weight: 800 !important;
    color: #13462c !important;
    margin: 0 !important;
}

.lbg-header-sub {
    font-size: 0.84rem !important;
    color: #52665a !important;
    margin-top: 2px !important;
    font-weight: 600 !important;
}

.lbg-header-count {
    background: #edf4ef !important;
    color: #13462c !important;
    border: 1px solid rgba(19, 70, 44, 0.22) !important;
    padding: 6px 18px !important;
    border-radius: 999px !important;
    font-weight: 800 !important;
    font-size: 0.86rem !important;
    white-space: nowrap !important;
}

/* ── شريط البحث والفلترة مع زر التفريغ ── */
.lbg-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2ebd8 !important;
    border-radius: 16px !important;
    padding: 10px 14px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
}

.lbg-search-box {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #f7faf8 !important;
    border: 1px solid #d5e4d8 !important;
    border-radius: 12px !important;
    padding: 7px 12px !important;
    flex: 1 1 220px !important;
    min-width: 220px !important;
    box-sizing: border-box !important;
}

.lbg-search-box i {
    color: #52665a !important;
}

.lbg-search-box input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 0.88rem !important;
    color: #1e293b !important;
    padding: 2px 4px !important;
}

.lbg-clear-btn {
    display: none;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(82, 102, 90, 0.16) !important;
    color: #1e293b !important;
    font-size: 0.72rem !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: 0.2s !important;
}

.lbg-clear-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.lbg-filter-pills {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.lbg-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 16px !important;
    border-radius: 999px !important;
    border: 1px solid #d5e4d8 !important;
    background: #f8faf8 !important;
    color: #52665a !important;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.lbg-filter-btn:hover {
    background: #edf4ef !important;
    color: #13462c !important;
    border-color: #b8d8be !important;
}

.lbg-filter-btn.active {
    background: #2f4617 !important;
    color: #ffffff !important;
    border-color: #2f4617 !important;
    box-shadow: 0 3px 10px rgba(47, 70, 23, 0.22) !important;
}

/* ── شبكة البطاقات المرنة لجميع الشاشات ── */
.lecture-books-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.lecture-books-grid tbody,
.lecture-books-grid tr,
.lecture-books-grid td {
    display: contents !important;
}

.lecture-book-card-wrap {
    width: 100% !important;
    display: flex !important;
    min-width: 0 !important;
    height: 100% !important;
}

.lecture-book-card-container {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

/* ── البطاقة الرئيسية ── */
a.lecture-book-card {
    background: #ffffff !important;
    border: 1.5px solid #e2ebd8 !important;
    border-radius: 22px !important;
    padding: 16px 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 100% !important;
    height: auto !important;
    flex: 1 1 auto !important;
    color: #1e293b !important;
    box-shadow: 0 4px 18px rgba(19, 70, 44, 0.05) !important;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease !important;
    box-sizing: border-box !important;
}

a.lecture-book-card:hover {
    transform: translateY(-7px) !important;
    box-shadow: 0 18px 38px -6px rgba(19, 70, 44, 0.14) !important;
    border-color: #13462c !important;
}

/* ── صف الشارة العلوية وأدوات المشرف (مرن بدون تداخل على الجوال) ── */
.lecture-book-top-bar {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    z-index: 15 !important;
}

.lecture-book-badge {
    background: #13462c !important;
    color: #ffffff !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(200, 169, 106, 0.45) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.lecture-book-badge i {
    color: #fde68a !important;
    font-size: 0.8rem !important;
}

.lecture-book-adm-bar {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #ffffff !important;
    padding: 3px 7px !important;
    border-radius: 9px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2ebd8 !important;
    margin-right: auto !important;
    z-index: 10 !important;
}

.lecture-book-adm-bar:empty {
    display: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ── جسم محتوى البطاقة ── */
.lecture-book-main {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
}

/* ── مجسم غلاف الكتاب ثلاثي الأبعاد 3D ── */
.lecture-book-stage {
    position: relative !important;
    width: 100% !important;
    padding: 8px 0 14px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    perspective: 950px !important;
}

.lecture-book-3d {
    position: relative !important;
    width: 148px !important;
    height: 214px !important;
    border-radius: 4px 12px 12px 4px !important;
    background: #1e293b !important;
    box-shadow: 0 12px 26px -4px rgba(0, 0, 0, 0.22),
        -6px 8px 16px rgba(0, 0, 0, 0.12),
        inset 3px 0 6px rgba(255, 255, 255, 0.25),
        inset -5px 0 10px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lecture-book-3d::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.35) 0%, rgba(255, 255, 255, 0.22) 35%, rgba(0, 0, 0, 0.22) 100%);
    pointer-events: none;
    z-index: 5;
}

.lecture-book-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0%, transparent 45%, rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
    z-index: 4;
}

.lecture-book-ribbon {
    position: absolute !important;
    top: 0 !important;
    left: 20px !important;
    width: 14px !important;
    height: 46px !important;
    background: linear-gradient(180deg, #d4af37 0%, #b48a28 80%, #996e14 100%) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    z-index: 6 !important;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%) !important;
    pointer-events: none !important;
    transition: transform 0.35s ease !important;
}

a.lecture-book-card:hover .lecture-book-ribbon {
    transform: translateY(4px) !important;
}

a.lecture-book-card:hover .lecture-book-3d {
    transform: translateY(-7px) rotate(-2deg) scale(1.03) !important;
    box-shadow: 0 20px 40px -6px rgba(0, 0, 0, 0.26), -10px 14px 24px rgba(0, 0, 0, 0.16) !important;
}

.lecture-book-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s ease !important;
}

a.lecture-book-card:hover .lecture-book-img {
    transform: scale(1.04) !important;
}

/* ── حالة الموك اب الجاهز (Mockup) ── */
.is-mockup .lecture-book-3d {
    width: 172px !important;
    height: 220px !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.is-mockup .lecture-book-3d::before,
.is-mockup .lecture-book-3d::after,
.is-mockup .lecture-book-ribbon {
    display: none !important;
}

.is-mockup .lecture-book-img {
    object-fit: contain !important;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18)) !important;
}

a.lecture-book-card:hover .is-mockup .lecture-book-3d {
    transform: translateY(-6px) scale(1.03) !important;
    box-shadow: none !important;
}

/* ── الغلاف الاحتياطي الذكي بالعنوان الحقيقي ── */
.lecture-book-fallback {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(145deg, #13462c 0%, #093520 55%, #031e12 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 12px !important;
    border: 2px solid rgba(200, 169, 106, 0.45) !important;
    outline: 1px dashed rgba(200, 169, 106, 0.35) !important;
    outline-offset: -5px !important;
    border-radius: inherit !important;
    text-align: center !important;
}

.lecture-book-fallback-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
}

.lecture-book-fallback-top i {
    font-size: 30px !important;
    color: #c8a96a !important;
}

.lecture-book-fallback-sub {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    color: #a7f3d0 !important;
}

.lecture-book-fallback-title {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    color: #fef7ea !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

.lecture-book-fallback-bot {
    font-size: 0.66rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    background: rgba(0, 0, 0, 0.28) !important;
    padding: 2px 10px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(200, 169, 106, 0.25) !important;
}

/* ── نصوص وبيانات الكتاب ── */
.lecture-book-info {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    margin-top: 8px !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.lecture-book-title {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin: 4px 0 8px !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 2.9em !important;
    text-align: center !important;
    transition: color 0.25s ease !important;
}

a.lecture-book-card:hover .lecture-book-title {
    color: #13462c !important;
}

/* ── صفوف المصنف والشيخ الشارح ── */
.lecture-book-authors {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 10px !important;
    text-align: right !important;
}

.lecture-author-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 6px 11px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.lecture-author-row[style*="display: none"],
.lecture-author-row[style*="display:none"],
.lecture-book-authors[style*="display: none"],
.lecture-book-authors[style*="display:none"] {
    display: none !important;
}

.lecture-author-lbl {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.lecture-author-val {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 0.94rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.lecture-row-author {
    background: #edf4ef !important;
    border: 1px solid rgba(19, 70, 44, 0.2) !important;
}

.lecture-row-author .lecture-author-lbl {
    color: #13462c !important;
}

.lecture-row-sharh {
    background: #faf6ee !important;
    border: 1px solid rgba(200, 169, 106, 0.35) !important;
}

.lecture-row-sharh .lecture-author-lbl {
    color: #996e14 !important;
}

/* ── إحصائيات المشاهدات وزر الدخول ── */
.lecture-book-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #52665a !important;
    width: 100% !important;
    padding: 8px 0 2px !important;
    margin-top: auto !important;
}

.lecture-book-meta i {
    color: #13462c !important;
}

.lecture-book-btn {
    margin-top: 8px !important;
    width: 100% !important;
    padding: 9px 16px !important;
    border-radius: 12px !important;
    background: #edf4ef !important;
    color: #13462c !important;
    border: 1px solid rgba(19, 70, 44, 0.22) !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
}

a.lecture-book-card:hover .lecture-book-btn {
    background: #13462c !important;
    color: #ffffff !important;
    border-color: #13462c !important;
    box-shadow: 0 4px 14px rgba(19, 70, 44, 0.22) !important;
}

a.lecture-book-card:hover .lecture-book-btn i {
    transform: translateX(-4px) !important;
}

/* ── تنسيق خاص بالأقسام الحاوية (المجلدات) ── */
.is-cat-container a.lecture-book-card {
    border-color: #dcd6ba !important;
    background: linear-gradient(180deg, #faf7ef 0%, #ffffff 100%) !important;
}

.is-cat-container .lecture-book-badge {
    background: #996e14 !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.is-cat-container .lecture-book-3d {
    width: 132px !important;
    height: 132px !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, #f7f2e8 0%, #edf4ef 100%) !important;
    box-shadow: 0 10px 24px -4px rgba(153, 110, 20, 0.14) !important;
    border: 2px solid rgba(200, 169, 106, 0.4) !important;
}

.is-cat-container .lecture-book-3d::before,
.is-cat-container .lecture-book-3d::after,
.is-cat-container .lecture-book-ribbon {
    display: none !important;
}

.is-cat-container .lecture-book-img {
    border-radius: 22px !important;
}

.is-cat-container .lecture-book-fallback {
    border-radius: 22px !important;
    border: none !important;
    outline: none !important;
    background: linear-gradient(145deg, #c8a96a 0%, #996e14 100%) !important;
    justify-content: center !important;
    gap: 8px !important;
}

.is-cat-container .lecture-book-fallback i {
    font-size: 42px !important;
    color: #ffffff !important;
}

.is-cat-container .lecture-book-fallback i::before {
    content: "\f07c";
}

.is-cat-container .lecture-book-btn {
    background: #faf6ee !important;
    color: #996e14 !important;
    border-color: rgba(200, 169, 106, 0.35) !important;
}

.is-cat-container a.lecture-book-card:hover .lecture-book-btn {
    background: #996e14 !important;
    color: #ffffff !important;
    border-color: #996e14 !important;
}

/* رسالة عدم وجود نتائج */
.lbg-empty-filter {
    display: none;
    text-align: center !important;
    padding: 40px 20px !important;
    background: #ffffff !important;
    border: 1.5px dashed #d5e4d8 !important;
    border-radius: 18px !important;
    color: #52665a !important;
    font-weight: 700 !important;
    margin-top: 10px !important;
}

/* التجاوب مع الجوال لعرض الأقسام */
@media (max-width: 992px) {
    .lecture-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 640px) {
    .lbg-scope {
        padding: 0 12px 18px;
        border-radius: 18px;
    }

    .lbg-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 10px;
        gap: 8px;
    }

    .lbg-search-box {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        padding: 6px 10px !important;
        max-height: 42px !important;
    }

    .lbg-search-box input {
        font-size: 0.82rem !important;
        padding: 2px 4px !important;
        height: auto !important;
        max-height: 28px !important;
    }

    .lbg-filter-pills {
        justify-content: center;
    }

    .lbg-filter-btn {
        padding: 5px 12px !important;
        font-size: 0.78rem !important;
    }

    .lecture-books-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    a.lecture-book-card {
        padding: 12px 14px 14px;
        border-radius: 18px;
        text-align: right;
        align-items: stretch;
    }

    .lecture-book-top-bar {
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .lecture-book-main {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .lecture-book-stage {
        width: auto;
        padding: 0;
        flex-shrink: 0;
    }

    .lecture-book-3d {
        width: 92px;
        height: 132px;
    }

    .is-mockup .lecture-book-3d {
        width: 100px;
        height: 138px;
    }

    .is-cat-container .lecture-book-3d {
        width: 92px;
        height: 92px;
        border-radius: 20px;
    }

    .lecture-book-ribbon {
        width: 10px;
        height: 30px;
        left: 11px;
    }

    .lecture-book-info {
        margin-top: 0;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .lecture-book-title {
        font-size: 1.12rem;
        min-height: auto;
        margin: 0 0 6px;
        word-break: break-word;
    }

    .lecture-author-row {
        padding: 4px 8px;
    }

    .lecture-author-val {
        font-size: 0.9rem;
    }

    .lecture-book-meta {
        justify-content: flex-start;
        padding: 4px 0;
    }

    .lecture-book-btn {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   القسم الثاني: أنماط قائمة دروس ومواد شرح الكتاب (.bel-scope)
   ═══════════════════════════════════════════════════════════════════════════ */
.cat-title-book-thuluth,
.cat-title-wrap-book h1 {
    font-family: 'Traditional Arabic', 'Amiri', 'Noto Naskh Arabic', serif !important;
    letter-spacing: 0.3px;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: normal !important;
}

.cat-author-pill-musannaf .cat-author-name,
.cat-author-pill-sharh .cat-author-name {
    font-family: 'Traditional Arabic', 'Amiri', 'Noto Naskh Arabic', serif !important;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.bel-scope {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
    position: relative;
    --be-primary: #13462c;
    --be-olive: #364d1b;
    --be-olive-light: #6d843a;
    --be-gold: #c8a96a;
    --be-text: #1e293b;
    --be-text-muted: #52665a;
    --be-card-bg: #ffffff;
    --be-border: #e2e8f0;

    background: linear-gradient(160deg, #f3faf5 0%, #faf9f5 45%, #ffffff 100%);
    border: 1px solid #d8e8dc;
    border-radius: 24px;
    padding: 0 24px 26px;
    box-shadow: 0 12px 36px rgba(19, 70, 44, 0.05);
    overflow: hidden;
}

.bel-scope *,
.bel-scope *::before,
.bel-scope *::after {
    box-sizing: border-box;
}

.bel-scope::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #13462c, #c8a96a 50%, #364d1b);
    z-index: 3;
}

.bel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 6px 18px;
    border-bottom: 1.5px solid rgba(200, 169, 106, 0.2);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.bel-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bel-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg, #13462c 0%, #2f4617 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 6px 16px rgba(19, 70, 44, 0.22);
    flex-shrink: 0;
}

.bel-header-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #13462c;
    margin: 0;
}

.bel-header-sub {
    font-size: 0.84rem;
    color: #52665a;
    margin-top: 2px;
    font-weight: 600;
}

.bel-header-count {
    background: #e6f4ea;
    color: #13462c;
    border: 1px solid #b8d8be;
    padding: 6px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
}

.bel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2ebd8;
    border-radius: 18px;
    padding: 10px 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(19, 70, 44, 0.02);
}

.bel-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6faf7;
    border: 1px solid #e2ebd8;
    border-radius: 12px;
    padding: 7px 14px;
    flex: 1;
    min-width: 220px;
}

.bel-search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
    color: #1e293b;
}

.bel-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bel-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e2ebd8;
    background: #f8fcf9;
    color: #4d6338;
    font-family: 'Cairo', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bel-filter-btn:hover {
    background: #e6f4ea;
    color: #13462c;
}

.bel-filter-btn.active {
    background: #2f4617;
    color: #ffffff;
    border-color: #2f4617;
    box-shadow: 0 3px 10px rgba(47, 70, 23, 0.22);
}

.bel-scope .plays-grid-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 4px 0 !important;
    width: 100% !important;
}

.bel-wrapper {
    width: 100%;
    transition: all 0.25s ease;
}

.bel-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: #ffffff;
    border: 1px solid #e2ebd8;
    border-radius: 20px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.015);
}

.bel-item:hover,
.bel-wrapper.is-playing .bel-item {
    border-color: #729641;
    box-shadow: 0 8px 24px rgba(47, 70, 23, 0.08);
    transform: translateY(-2px);
}

.bel-wrapper.is-playing .bel-item {
    background: linear-gradient(90deg, #f8fcf9 0%, #ebf7ee 100%);
    border-color: #2f4617;
    border-radius: 20px 20px 0 0;
}

.bel-seq-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f3f9ee 0%, #e4f0da 100%);
    color: #243812;
    border: 1px solid #c9dec0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.bel-seq-num {
    font-size: 16px;
    font-weight: 800;
    transition: opacity 0.2s;
}

.bel-seq-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    color: #ffffff;
    background: #364d1b;
    transition: opacity 0.2s;
}

.bel-seq-eq {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #13462c;
}

.bel-seq-eq span {
    width: 3px;
    height: 16px;
    background: #a7f3d0;
    border-radius: 2px;
    animation: belEq 0.6s ease infinite alternate;
}

.bel-seq-eq span:nth-child(2) {
    animation-delay: 0.2s;
    height: 10px;
}

.bel-seq-eq span:nth-child(3) {
    animation-delay: 0.4s;
    height: 20px;
}

.bel-seq-eq span:nth-child(4) {
    animation-delay: 0.1s;
    height: 14px;
}

@keyframes belEq {
    from { transform: scaleY(0.3); }
    to { transform: scaleY(1); }
}

.bel-item:hover .bel-seq-play {
    opacity: 1;
}

.bel-item:hover .bel-seq-num {
    opacity: 0;
}

.bel-wrapper.is-playing .bel-seq-eq {
    display: flex;
}

.bel-wrapper.is-playing .bel-seq-play,
.bel-wrapper.is-playing .bel-seq-num {
    display: none;
}

.bel-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bel-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bel-title {
    margin: 0;
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.5;
    color: #0f172a;
}

.bel-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.bel-item:hover .bel-title a,
.bel-title a:hover {
    color: #13462c;
}

.bel-done-badge {
    display: none;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.bel-subline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.bel-meta-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.82rem;
    color: #52665a;
}

.bel-tag-chap {
    background: #e6f4ea;
    color: #13462c;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #c9e6ce;
}

.bel-tag-sharh {
    background: #fef7ea;
    color: #855814;
    padding: 3px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ebd5a7;
}

.bel-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.bel-media-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bel-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bel-pill-btn:hover {
    transform: translateY(-1px);
}

.bel-pill-listen {
    background: #eef6e8;
    border-color: #c9dec0;
    color: #2f4617;
}

.bel-pill-listen:hover,
.bel-pill-listen.active {
    background: #2f4617;
    border-color: #2f4617;
    color: #ffffff;
}

.bel-pill-audio {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.bel-pill-audio:hover {
    background: #15803d;
    color: #ffffff;
}

.bel-pill-pdf {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.bel-pill-pdf:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.bel-pill-video {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.bel-pill-video:hover {
    background: #2563eb;
    color: #ffffff;
}

.bel-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    border: none !important;
}

.bel-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e2ebd8;
    background: #f8fcf9;
    color: #52665a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.bel-tool-btn:hover {
    background: #e6f4ea;
    color: #13462c;
    border-color: #b8d8be;
}

.bel-btn-fav.active {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

/* ── درج المشغل الصوتي المدمج ── */
.bel-player-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(90deg, #13462c 0%, #1d3c1a 100%);
    border-radius: 0 0 20px 20px;
    color: #ffffff;
    margin-top: 0;
    border: none;
}

.bel-player-drawer.open {
    max-height: 220px;
    margin-top: -2px;
    border: 1.5px solid #2f4617;
    border-top: none;
}

.bel-player-content {
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bel-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.bel-p-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.bel-p-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.08);
}

.bel-p-play {
    width: 46px;
    height: 46px;
    background: #6d843a;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(109, 132, 58, 0.45);
}

.bel-p-play:hover {
    background: #586c2d;
}

.bel-spd-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.28);
    padding: 3px 6px;
    border-radius: 999px;
    direction: ltr;
}

.bel-spd-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
}

.bel-spd-btn.active {
    background: #6d843a;
    color: #ffffff;
}

.bel-p-seek-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
    direction: ltr;
}

.bel-p-time {
    font-size: 12px;
    font-weight: 700;
    color: #d1fae5;
    min-width: 44px;
    text-align: center;
    font-family: monospace;
}

.bel-p-range {
    flex: 1;
    height: 6px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    accent-color: #a3e635;
}

/* ── المشغل المصغر العائم (Sticky Player) ── */
.bel-sticky-player {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    z-index: 2147483647;
    background: rgba(19, 70, 44, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 2px solid #c8a96a;
    padding: 10px 24px;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.bel-sticky-player.visible {
    bottom: 0;
}

.bel-sp-title {
    flex: 1;
    min-width: 0;
    color: #ecfdf5;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bel-sp-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bel-sp-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: 0.2s;
    background: transparent;
    color: #cbd5e1;
}

.bel-sp-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.bel-sp-play {
    width: 44px;
    height: 44px;
    background: #6d843a;
    color: #fff;
    font-size: 17px;
    box-shadow: 0 4px 14px rgba(109, 132, 58, 0.45);
}

.bel-sp-progress {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.bel-sp-progress-fill {
    height: 100%;
    background: #a3e635;
    width: 0%;
    transition: width 0.2s linear;
}

.bel-sp-time {
    color: #d1fae5;
    font-size: 11.5px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
    font-family: monospace;
    direction: ltr;
}

.bel-sp-close {
    color: #94a3b8;
    font-size: 15px;
}

.bel-sp-close:hover {
    color: #fca5a5;
}

.bel-empty-filter {
    display: none;
    text-align: center;
    padding: 36px 20px;
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
    font-weight: 700;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .bel-scope {
        padding: 0 14px 18px;
    }

    .bel-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bel-filter-pills {
        justify-content: center;
    }

    .bel-item {
        padding: 15px 16px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .bel-seq-btn {
        width: 44px;
        height: 44px;
    }

    .bel-title {
        font-size: 1.18rem;
    }

    .bel-subline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bel-media-links {
        width: 100%;
    }

    .bel-actions {
        width: 100%;
        justify-content: space-around;
        padding-top: 6px;
        border: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   القسم الثالث: أنماط صفحة عرض المادة / الدرس (.be-scope)
   ═══════════════════════════════════════════════════════════════════════════ */
.be-reading-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #c8a96a, #064e3b);
    z-index: 10000;
    transition: width 0.1s ease-out;
    pointer-events: none;
}

.be-scope {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
    width: 100% !important;
    max-width: 980px !important;
    margin: 0 auto 40px !important;
    clear: both !important;
    display: block !important;
    position: relative !important;
    z-index: 2 !important;
    color: var(--gp-text, #1e293b);
    box-sizing: border-box;
    animation: beFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.be-scope *,
.be-scope *::before,
.be-scope *::after {
    box-sizing: border-box;
}

@keyframes beFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.be-card {
    background: var(--site-card-bg-actual, var(--gp-card-bg, #ffffff));
    border: 1px solid #d5e4d8;
    border-radius: 26px;
    box-shadow: 0 14px 40px rgba(6, 78, 59, 0.07);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    clear: both !important;
    display: block !important;
    width: 100% !important;
}

.be-hero {
    position: relative;
    background: linear-gradient(145deg, #13462c 0%, #0d3521 55%, #072214 100%);
    padding: 40px 36px 34px;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    border-bottom: 3px solid #c8a96a;
}

.be-hero::before {
    content: '';
    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 0l7.5 12.5L50 7.5l-5 14.5L60 30l-15 8 5 14.5-12.5-5L30 60l-7.5-12.5L10 52.5l5-14.5L0 30l15-8-5-14.5 12.5 5z' fill='none' stroke='rgba(200,169,106,0.1)' stroke-width='1.2'/%3E%3C/svg%3E");
    background-size: 56px 56px;
    opacity: 0.95;
    pointer-events: none;
}

.be-hero::after {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(200, 169, 106, 0.14) 50%, transparent 75%);
    pointer-events: none;
}

.be-hero-content {
    position: relative;
    z-index: 2;
}

.be-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.be-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.be-badge-book {
    background: rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.45);
}

.be-badge-book:hover {
    background: rgba(16, 185, 129, 0.38);
    color: #ffffff;
    transform: translateY(-2px);
}

.be-badge-author {
    background: rgba(200, 169, 106, 0.22);
    color: #fde68a;
    border: 1px solid rgba(200, 169, 106, 0.5);
}

.be-badge-sharh {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.be-badge-chap {
    background: rgba(255, 255, 255, 0.92);
    color: #13462c;
    border: 1px solid #ffffff;
}

.be-title {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 16px;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.be-title .adm-play-quick-tools {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    vertical-align: middle !important;
    margin-right: 12px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.be-title .adm-play-quick-tools > span[role="button"] {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease !important;
}

.be-title .adm-play-quick-tools > span[role="button"]:hover {
    transform: scale(1.15) !important;
}

.be-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

.be-divider-line {
    width: 90px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, #c8a96a, transparent);
}

.be-divider-icon {
    color: #c8a96a;
    font-size: 1rem;
}

.be-quick-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.be-qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #13462c;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.be-qa-btn:hover {
    background: #ffffff;
    color: #064e3b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.be-qa-playlist {
    background: linear-gradient(135deg, #c8a96a 0%, #b5924c 100%);
    color: #132a1c;
    border-color: #e5c98b;
}

.be-qa-playlist:hover {
    background: linear-gradient(135deg, #d6b87a 0%, #c29e56 100%);
    color: #091a10;
}

/* ── 2) شريط بيانات الدرس الإحصائية ── */
.be-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    background: #f6faf7;
    border-bottom: 1px solid #e0ece3;
}

.be-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #4d6338;
    transition: all 0.2s ease;
}

.be-meta-item strong {
    font-weight: 800;
    color: #13462c;
}

/* ── 3) المحتوى الداخلي للبطاقة ── */
.be-body {
    padding: 32px 34px;
    background: #fbfdfb;
}

.be-scholar-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.be-scholar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #eef7f0 0%, #e4f2e7 100%);
    border: 1.5px solid #bdd9c4;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(19, 70, 44, 0.04);
}

.be-scholar-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.be-scholar-icon-matn {
    background: #1a5c3a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 92, 58, 0.25);
}

.be-scholar-icon-sharh {
    background: #4d6b2a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(77, 107, 42, 0.25);
}

.be-scholar-info h5 {
    margin: 0 0 3px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4d6338;
}

.be-scholar-info span {
    font-size: 1.08rem;
    font-weight: 800;
    color: #133822;
}

/* ── 4) تبويبات مركز الوسائط ── */
.be-tabs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #dce8df;
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 22px;
    overflow-x: auto;
}

.be-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    background: transparent;
    color: #52665a;
    font-family: 'Cairo', sans-serif;
    font-size: 0.96rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.be-tab-btn:hover {
    background: #f2f8f4;
    color: #13462c;
}

.be-tab-btn.active {
    color: #13462c;
    background: #e6f4ea;
    box-shadow: inset 0 -3px 0 #4d6b2a;
}

.be-tab-pane {
    display: none;
    animation: bePaneIn 0.35s ease;
}

.be-tab-pane.active {
    display: block;
}

@keyframes bePaneIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── 5) المشغل الصوتي الفاخر ── */
.be-scope .be-player-box {
    background: linear-gradient(90deg, #f8fcf9 0%, #ebf7ee 55%, #d6edd9 100%) !important;
    border: 1px solid #c3dec7 !important;
    border-radius: 26px !important;
    padding: 0 !important;
    box-shadow: 0 12px 32px rgba(45, 65, 25, 0.07) !important;
    margin-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    direction: rtl !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.be-scope .be-player-row-top,
.be-scope .be-player-row-seek {
    border-bottom: 1px solid rgba(58, 82, 32, 0.12) !important;
}

.be-scope .be-player-row-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    width: 100% !important;
    padding: 22px 32px !important;
}

.be-scope .be-player-info {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.be-scope .be-sound-icon-circle {
    width: 54px !important;
    height: 54px !important;
    background: #5b7b32 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(91, 123, 50, 0.28) !important;
    flex-shrink: 0 !important;
}

.be-scope .be-player-titles {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    text-align: right !important;
}

.be-scope .be-sound-title {
    margin: 0 !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    color: #243812 !important;
    line-height: 1.3 !important;
}

.be-scope .be-sound-subtitle {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #4d6338 !important;
}

.be-scope .be-speed-group {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 14px rgba(45, 65, 25, 0.06) !important;
    border: 1px solid rgba(58, 82, 32, 0.1) !important;
    gap: 4px !important;
    direction: ltr !important;
}

.be-scope .be-spd-label {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #243812 !important;
    padding: 4px 10px 4px 8px !important;
    user-select: none !important;
    font-family: 'Cairo', sans-serif !important;
}

.be-scope .be-spd-btn {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #4d6338 !important;
    padding: 6px 12px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    line-height: 1.2 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.be-scope .be-spd-btn:hover {
    background: #eef6e8 !important;
    color: #2c4415 !important;
}

.be-scope .be-spd-btn.active {
    background: #2f4617 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    padding: 7px 15px !important;
    box-shadow: 0 3px 10px rgba(47, 70, 23, 0.28) !important;
}

.be-scope .be-player-row-seek {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    direction: ltr !important;
    padding: 18px 32px !important;
}

.be-scope .be-vol-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}

.be-scope .be-vol-btn {
    color: #2f4617 !important;
    font-size: 1.22rem !important;
    cursor: pointer !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.be-scope .be-vol-btn:hover {
    transform: scale(1.1) !important;
    color: #4c6e26 !important;
}

.be-scope .be-vol-range {
    width: 75px !important;
    height: 6px !important;
    flex-shrink: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 999px !important;
    outline: none !important;
    cursor: pointer !important;
    background: linear-gradient(90deg, #6d843a 0%, #6d843a 80%, #d4dde6 80%, #d4dde6 100%) !important;
}

.be-scope .be-vol-range::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #2f4617 !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer !important;
}

.be-scope .be-vol-range::-moz-range-thumb {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #2f4617 !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer !important;
}

.be-scope .be-time {
    font-family: 'Cairo', 'SFMono-Regular', sans-serif !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    color: #243812 !important;
    min-width: 46px !important;
    text-align: center !important;
    user-select: none !important;
    flex-shrink: 0 !important;
}

.be-scope .be-wave-container {
    flex: 1 !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 3px !important;
    cursor: pointer !important;
    position: relative !important;
    padding: 4px 2px !important;
    user-select: none !important;
    touch-action: none !important;
}

.be-scope .be-wave-bar {
    flex: 1 !important;
    max-width: 4px !important;
    min-width: 2px !important;
    background: #c5ced6 !important;
    border-radius: 99px !important;
    transition: background-color 0.15s ease, transform 0.15s ease !important;
}

.be-scope .be-wave-bar.played {
    background: #6d843a !important;
}

.be-scope .be-wave-container:hover .be-wave-bar {
    transform: scaleY(1.06) !important;
}

.be-scope .be-player-row-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    width: 100% !important;
    direction: rtl !important;
    padding: 20px 32px 16px !important;
}

.be-scope .be-main-transport {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 22px !important;
    direction: ltr !important;
}

.be-scope .be-ctrl-btn {
    border: none !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.be-scope .be-ctrl-skip {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #243812 !important;
    box-shadow: 0 5px 15px rgba(36, 56, 18, 0.09) !important;
    border: 1px solid rgba(36, 56, 18, 0.08) !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.be-scope .be-ctrl-skip i {
    font-size: 0.92rem !important;
    line-height: 1 !important;
    color: #243812 !important;
}

.be-scope .be-ctrl-skip .be-skip-tag {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    font-family: 'Cairo', sans-serif !important;
    color: #243812 !important;
    line-height: 1 !important;
    margin-top: 2px !important;
}

.be-scope .be-ctrl-skip:hover {
    background: #f3f9ee !important;
    transform: scale(1.08) !important;
    box-shadow: 0 7px 18px rgba(36, 56, 18, 0.15) !important;
}

.be-scope .be-ctrl-skip:active {
    transform: scale(0.95) !important;
}

.be-scope .be-ctrl-play {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: #364d1b !important;
    color: #ffffff !important;
    font-size: 1.65rem !important;
    box-shadow: 0 8px 22px rgba(54, 77, 27, 0.34) !important;
    border: none !important;
}

.be-scope .be-ctrl-play:hover {
    transform: scale(1.07) !important;
    background: #293c13 !important;
    box-shadow: 0 10px 26px rgba(54, 77, 27, 0.44) !important;
}

.be-scope .be-ctrl-play:active {
    transform: scale(0.95) !important;
}

.be-scope .be-feature-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 9px 18px !important;
    border-radius: 999px !important;
    border: 1.5px solid #2f4617 !important;
    background: rgba(255, 255, 255, 0.65) !important;
    color: #243812 !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
}

.be-scope .be-feature-pill:hover {
    background: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(47, 70, 23, 0.12) !important;
}

.be-scope .be-feature-pill.active {
    background: #2f4617 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(47, 70, 23, 0.25) !important;
}

.be-scope .be-smart-tools-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 12px 24px 18px !important;
    background: rgba(255, 255, 255, 0.45) !important;
    border-top: 1px dashed rgba(58, 82, 32, 0.15) !important;
}

.be-scope .be-tool-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(47, 70, 23, 0.22) !important;
    background: #ffffff !important;
    color: #2f4617 !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.be-scope .be-tool-chip:hover {
    background: #eef6e8 !important;
    border-color: #2f4617 !important;
    transform: translateY(-1px) !important;
}

.be-scope .be-tool-chip.active {
    background: #2f4617 !important;
    color: #ffffff !important;
    border-color: #2f4617 !important;
}

.be-bookmarks-panel {
    display: none;
    background: #f8fcf9;
    border: 1px solid #cce3d0;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.be-bookmarks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 0.88rem;
    font-weight: 800;
    color: #243812;
    margin-bottom: 10px;
}

.be-bookmarks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.be-bm-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #c3dec7;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #243812;
    cursor: pointer;
    transition: all 0.2s ease;
}

.be-bm-item:hover {
    background: #eef6e8;
    border-color: #5b7b32;
}

.be-bm-time {
    background: #2f4617;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.75rem;
    direction: ltr;
}

.be-bm-del {
    color: #dc2626;
    margin-right: 4px;
    padding: 2px 4px;
    border-radius: 4px;
}

.be-bm-del:hover {
    background: #fee2e2;
}

.be-resume-toast {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fefce8;
    border: 1px solid #fde047;
    color: #713f12;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.be-dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 22px;
    clear: both !important;
}

.be-dl-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 16px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

.be-dl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    color: #ffffff !important;
}

.be-dl-audio {
    background: linear-gradient(135deg, #4b6e35 0%, #3d5c2a 100%);
}

.be-dl-pdf {
    background: linear-gradient(135deg, #b8292f 0%, #991b1b 100%);
}

.be-dl-video {
    background: linear-gradient(135deg, #2b6cb0 0%, #1e4e8c 100%);
}

.be-dl-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.be-dl-card small {
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 0.82rem;
    font-weight: 600;
}

.be-text-section {
    background: #ffffff;
    border: 1px solid #d5e4d8;
    border-radius: 22px;
    padding: 28px 32px;
    margin-top: 28px;
    box-shadow: 0 6px 20px rgba(19, 70, 44, 0.03);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.be-text-section.theme-sepia {
    background: #f6efe0 !important;
    border-color: #dfd2b5 !important;
    color: #3d311d !important;
}

.be-text-section.theme-sepia .be-section-heading h3,
.be-text-section.theme-sepia .be-content-text {
    color: #3d311d !important;
}

.be-text-section.theme-sepia .be-section-heading {
    border-bottom-color: #e2d6bc !important;
}

.be-text-section.theme-dark {
    background: #141c18 !important;
    border-color: #26362e !important;
    color: #e2ece6 !important;
}

.be-text-section.theme-dark .be-section-heading h3,
.be-text-section.theme-dark .be-content-text {
    color: #e2ece6 !important;
}

.be-text-section.theme-dark .be-section-heading {
    border-bottom-color: #24332b !important;
}

.be-text-section.theme-dark blockquote {
    background: #1d2822 !important;
    color: #f3e8c8 !important;
}

.be-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1.5px solid #ebf3ed;
}

.be-heading-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.be-section-heading h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #13462c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.be-read-time-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #5b7b32;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.be-reader-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.be-font-controls {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f4f9f5;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #d5e4d8;
}

.be-font-btn {
    border: none;
    background: #ffffff;
    color: #13462c;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.be-font-btn:hover,
.be-font-btn.active {
    background: #13462c;
    color: #ffffff;
}

.be-theme-sepia-dot {
    background: #f4ead2 !important;
    color: #5c4928 !important;
    border: 1px solid #d4c49e !important;
}

.be-theme-dark-dot {
    background: #1e2923 !important;
    color: #ffffff !important;
}

.be-inlesson-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6faf7;
    border: 1px solid #d5e4d8;
    border-radius: 14px;
    padding: 8px 14px;
    margin-bottom: 18px;
}

.be-inlesson-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    min-width: 0;
}

.be-search-count {
    font-size: 0.78rem;
    font-weight: 800;
    color: #5b7b32;
    white-space: nowrap;
}

.be-search-nav-btn {
    border: 1px solid #c3dec7;
    background: #ffffff;
    color: #13462c;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.be-search-nav-btn:hover {
    background: #e6f4ea;
}

mark.be-highlight {
    background: #fde047;
    color: #1e293b;
    padding: 1px 4px;
    border-radius: 4px;
}

mark.be-highlight.current {
    background: #f97316;
    color: #ffffff;
}

.be-toc-box {
    display: none;
    background: #f4f9f5;
    border: 1px solid #cce3d0;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.be-toc-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #13462c;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.be-toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.be-toc-link {
    background: #ffffff;
    border: 1px solid #c3dec7;
    color: #243812;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.be-toc-link:hover {
    background: #13462c;
    color: #ffffff !important;
    border-color: #13462c;
}

.be-content-text {
    font-size: 1.12rem;
    line-height: 2.2;
    color: #1e293b;
    word-wrap: break-word;
    transition: font-size 0.2s ease;
}

.be-content-text blockquote {
    background: #f5f2e6;
    border-right: 4px solid #c8a96a;
    padding: 16px 22px;
    border-radius: 12px;
    margin: 18px 0;
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.25rem;
    color: #2c2410;
}

.be-quote-popover {
    position: fixed;
    display: none;
    align-items: center;
    gap: 8px;
    background: #13462c;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #c8a96a;
    animation: bePaneIn 0.2s ease;
}

.be-quote-popover:hover {
    background: #0b2e1c;
}

.be-lesson-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
    width: 100%;
}

.be-nav-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #4f6d31 0%, #3d5723 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.96rem;
    box-shadow: 0 6px 18px rgba(61, 87, 35, 0.22);
    transition: all 0.25s ease;
    min-width: 0;
    max-width: 100%;
}

.be-nav-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #5a7b38 0%, #466329 100%);
    box-shadow: 0 10px 24px rgba(61, 87, 35, 0.3);
    color: #ffffff !important;
}

.be-nav-card.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.be-nav-card i {
    flex-shrink: 0;
}

.be-nav-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.be-nav-sub {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.be-nav-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.be-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 16, 0.55);
    backdrop-filter: blur(3px);
    z-index: 10002;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.be-drawer-backdrop.open {
    display: block;
    opacity: 1;
}

.be-playlist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 88vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.2);
    z-index: 10003;
    display: flex;
    flex-direction: column;
    direction: rtl;
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.be-playlist-drawer.open {
    transform: translateX(0);
}

.be-drawer-header {
    background: linear-gradient(135deg, #13462c 0%, #092918 100%);
    color: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #c8a96a;
}

.be-drawer-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.be-drawer-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

.be-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.be-pl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fcf9;
    border: 1px solid #dce8df;
    color: #1e293b !important;
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.be-pl-item:hover {
    background: #e6f4ea;
    border-color: #5b7b32;
}

.be-pl-item.current {
    background: #13462c;
    color: #ffffff !important;
    border-color: #13462c;
}

.be-pl-status {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.be-mini-player {
    position: fixed !important;
    bottom: 16px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(130%) !important;
    width: calc(100% - 28px) !important;
    max-width: 720px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    border: 1.5px solid #b8d8be !important;
    border-radius: 999px !important;
    padding: 8px 18px !important;
    box-shadow: 0 12px 35px rgba(20, 40, 15, 0.18) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    direction: rtl !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.be-mini-player.visible {
    transform: translateX(-50%) translateY(0) !important;
}

.be-mini-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.be-mini-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #243812;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.be-mini-time {
    font-size: 0.8rem;
    font-weight: 800;
    color: #5b7b32;
    direction: ltr;
    flex-shrink: 0;
}

.be-mini-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
    flex-shrink: 0;
}

.be-mini-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d5e6d8;
    background: #f5fbf6;
    color: #243812;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.be-mini-btn:hover {
    background: #e2f2e5;
}

.be-mini-play {
    width: 42px;
    height: 42px;
    background: #364d1b;
    color: #ffffff;
    border: none;
    font-size: 1rem;
}

.be-mini-play:hover {
    background: #293c13;
}

@media (max-width: 768px) {
    .be-hero {
        padding: 30px 18px 24px;
    }

    .be-title {
        font-size: 1.65rem;
    }

    .be-body {
        padding: 18px;
    }

    .be-dl-grid {
        grid-template-columns: 1fr;
    }

    .be-lesson-nav {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .be-nav-card {
        padding: 14px 16px !important;
        font-size: 0.9rem !important;
        border-radius: 14px !important;
        justify-content: flex-start !important;
        text-align: right !important;
    }

    #be_next_lesson_link {
        order: 1;
        justify-content: space-between !important;
        text-align: right !important;
    }

    #be_prev_lesson_link {
        order: 2;
        justify-content: flex-start !important;
        text-align: right !important;
    }

    .be-nav-title {
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.45 !important;
    }

    .be-text-section {
        padding: 20px 16px;
    }

    .be-scope .be-player-row-top {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 18px 18px 16px !important;
        gap: 14px !important;
    }

    .be-scope .be-player-info {
        justify-content: flex-start !important;
    }

    .be-scope .be-sound-icon-circle {
        width: 46px !important;
        height: 46px !important;
    }

    .be-scope .be-sound-title {
        font-size: 1.18rem !important;
    }

    .be-scope .be-speed-group {
        width: 100% !important;
        justify-content: space-between !important;
        padding: 5px 8px !important;
    }

    .be-scope .be-spd-label {
        font-size: 0.82rem !important;
        padding: 2px 6px !important;
    }

    .be-scope .be-spd-btn {
        padding: 5px 9px !important;
        font-size: 0.82rem !important;
    }

    .be-scope .be-player-row-seek {
        flex-wrap: wrap !important;
        padding: 14px 18px !important;
        gap: 10px !important;
    }

    .be-scope .be-wave-container {
        order: 1 !important;
        flex-basis: 100% !important;
        width: 100% !important;
        height: 40px !important;
    }

    .be-scope #be_cur_time {
        order: 2 !important;
        font-size: 0.88rem !important;
        min-width: auto !important;
    }

    .be-scope .be-vol-wrap {
        order: 3 !important;
        margin: 0 auto !important;
    }

    .be-scope .be-vol-range {
        width: 65px !important;
    }

    .be-scope #be_dur_time {
        order: 4 !important;
        font-size: 0.88rem !important;
        min-width: auto !important;
    }

    .be-scope .be-player-row-controls {
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 16px 18px 14px !important;
        gap: 12px !important;
    }

    .be-scope .be-main-transport {
        order: 1 !important;
        flex-basis: 100% !important;
        width: 100% !important;
        gap: 20px !important;
    }

    .be-scope .be-ctrl-play {
        width: 64px !important;
        height: 64px !important;
        font-size: 1.45rem !important;
    }

    .be-scope .be-ctrl-skip {
        width: 46px !important;
        height: 46px !important;
    }

    .be-scope .be-feature-pill {
        order: 2 !important;
        flex: 1 1 calc(50% - 8px) !important;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
    }

    .be-scope .be-smart-tools-bar {
        padding: 12px 14px 16px !important;
        gap: 8px !important;
    }

    .be-scope .be-tool-chip {
        font-size: 0.76rem !important;
        padding: 6px 11px !important;
    }

    .be-mini-player {
        bottom: 10px !important;
        padding: 7px 14px !important;
    }
}

/* ══════════════════════════════════════════════════════════
   شريط إحصائيات القسم المودرن (Modern Stats Bar)
   ══════════════════════════════════════════════════════════ */
.cat-modern-stats-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    padding: 16px 28px;
    margin: 15px 0 24px 0;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
}
.cat-stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none !important;
}
.cat-stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.cat-stat-label {
    font-family: Cairo, system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
}
.cat-stat-number {
    font-family: Cairo, system-ui, -apple-system, sans-serif !important;
    font-size: 23px !important;
    font-weight: 800 !important;
    color: #064e3b !important;
    line-height: 1.2 !important;
}
.cat-stat-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.cat-stat-item:hover .cat-stat-badge {
    transform: scale(1.08);
}
.cat-stat-badge-visitors {
    background: #eaf2ff;
    color: #2563eb;
}
.cat-stat-badge-materials {
    background: #dcfce7;
    color: #059669;
}
.cat-stat-badge-sections {
    background: #fef3c7;
    color: #1e3a2f;
}
.cat-stat-divider {
    width: 1px;
    height: 42px;
    background: #f1f5f9;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cat-modern-stats-bar {
        padding: 12px 10px !important;
        border-radius: 16px !important;
        margin: 12px 0 18px 0 !important;
        gap: 6px !important;
    }
    .cat-stat-item {
        gap: 8px !important;
    }
    .cat-stat-badge {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        font-size: 15px !important;
    }
    .cat-stat-label {
        font-size: 11px !important;
    }
    .cat-stat-number {
        font-size: 17px !important;
    }
    .cat-stat-divider {
        height: 32px !important;
    }
}
@media (max-width: 480px) {
    .cat-stat-item {
        gap: 6px !important;
    }
    .cat-stat-badge {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        font-size: 13.5px !important;
    }
    .cat-stat-label {
        font-size: 10px !important;
    }
    .cat-stat-number {
        font-size: 15px !important;
    }
}
