:root {
    --primary: #193379;
    --secondary: #ebd697;
    --primary-dark: #281a5e;
    --text: #2c2c2c;
    --light: #f8f7fc;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(53, 34, 124, 0.1);
    --shadow-lg: 0 10px 40px rgba(53, 34, 124, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--text);
    direction: rtl;
    line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====== HEADER ====== */
.top-bar {
    background: var(--primary);
    color: var(--secondary);
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

/* ====== MAIN NAV ====== */
.main-nav > ul {
    display: flex;
    list-style: none;
    gap: 6px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.main-nav > ul > li > a {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text);
    display: block;
    white-space: nowrap;
    cursor: pointer;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    background: var(--primary);
    color: var(--secondary);
}

/* ====== DROPDOWN (عمودي) ====== */
.dropdown {
    position: relative;
}

.dropdown > a {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text);
    display: block;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown:hover > a {
    background: var(--primary);
    color: var(--secondary);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    min-width: 260px;
    max-width: 320px;
    border-radius: 14px;
    box-shadow: 0 15px 50px rgba(53, 34, 124, 0.18);
    padding: 10px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    list-style: none;

    /* 🔑 العمودي */
    display: flex !important;
    flex-direction: column !important;
    gap: 2px;

    /* تحسين المظهر */
    border: 1px solid rgba(53, 34, 124, 0.06);
    z-index: 9999;
}

/* سهم صغير فوق القائمة */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    border-top: 1px solid rgba(53, 34, 124, 0.06);
    border-left: 1px solid rgba(53, 34, 124, 0.06);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 🔑 كل عنصر في القائمة يأخذ سطراً كاملاً */
.dropdown-menu li {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    float: none;
    list-style: none;
}

.dropdown-menu li a {
    display: block !important;
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14.5px;
    transition: all 0.2s;
    text-align: right;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.5;
    position: relative;
}

.dropdown-menu li a::before {
    content: '›';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-weight: 700;
    font-size: 16px;
    opacity: 0;
    transition: all 0.2s;
}

.dropdown-menu li a:hover {
    background: var(--light);
    color: var(--primary);
    padding-right: 22px;
}

.dropdown-menu li a:hover::before {
    opacity: 1;
    right: 10px;
}

/* تمرير للقوائم الطويلة جداً */
.dropdown-menu.scrollable {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu.scrollable::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu.scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown-menu.scrollable::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.mobile-toggle {
    display: none;
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* ====== HERO ====== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--secondary);
    opacity: 0.1;
    border-radius: 50%;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--secondary);
    position: relative;
    line-height: 1.4;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
}

/* ====== SECTIONS ====== */
.section { padding: 60px 0; }

.section-title {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

/* ====== NEWS GRID ====== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-badge {
    background: var(--secondary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.news-card h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.news-card p {
    color: #666;
    font-size: 14px;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 13px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ====== MEDIA SECTIONS ====== */
.media-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.media-tab {
    padding: 12px 24px;
    border-radius: 12px;
    background: white;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.3s;
}

.media-tab.active {
    background: var(--primary);
    color: var(--secondary);
}

.audio-card,
.video-card,
.pub-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-right: 4px solid var(--secondary);
}

.audio-card:hover,
.video-card:hover,
.pub-card:hover {
    transform: translateX(-8px);
    box-shadow: var(--shadow-lg);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ====== FOOTER ====== */
.main-footer {
    background: var(--primary);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col a {
    display: block;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.8);
    transition: 0.3s;
}

.footer-col a:hover {
    color: var(--secondary);
    padding-right: 8px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ====== OVERLAY ====== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.overlay.active {
    display: block;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        padding: 80px 20px 20px;
        transition: 0.3s;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 2000;
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav > ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .main-nav > ul > li > a,
    .dropdown > a {
        padding: 12px 15px;
        border-radius: 10px;
        background: var(--light);
    }

    /* القائمة المنسدلة في الجوال تظهر دائماً وتكون عمودية */
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: transparent !important;
        border: none !important;
        padding: 4px 0 4px 12px !important;
        margin: 4px 0 8px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-menu li a {
        padding: 8px 12px;
        font-size: 14px;
        background: var(--white);
        margin-bottom: 2px;
        border-right: 3px solid var(--secondary);
    }

    .dropdown-menu li a:hover {
        padding-right: 16px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .section {
        padding: 40px 0;
    }

    .header-inner {
        padding: 12px 0;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* ====== شاشات صغيرة جداً ====== */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .top-bar {
        font-size: 12px;
    }

    .top-bar-inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 22px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card img {
        height: 180px;
    }
}

/* قسم الـ Hero */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f2557 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.hero .container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
    /* لو الشعار على خلفية داكنة، أضف تأثير خفيف */
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.hero-title {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    line-height: 1.4;
}

.hero-desc {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    font-size: 17px;
    color: rgba(255,255,255,0.85);
    line-height: 1.8;
    max-width: 650px;
}

/* 📱 للموبايل */
@media (max-width: 768px) {
    .hero {
        padding: 35px 15px;
    }

    .hero .container {
        gap: 15px;
    }

    .hero-logo {
        max-width: 120px;
    }

    .hero-title {
        font-size: 20px;
        line-height: 1.5;
    }

    .hero-desc {
        font-size: 14px;
        line-height: 1.7;
    }
}



/* ====== Gallery Grid (Masonry) ====== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    box-shadow: 0 4px 15px rgba(53, 34, 124, 0.08);
    transition: all 0.3s;
    /* مفتاح الحل: نسبة ثابتة للنقر والتكبير */
    aspect-ratio: 4 / 3;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(53, 34, 124, 0.18);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    /* مفتاح الحل: احتواء ذكي بدون قص الصورة */
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(53, 34, 124, 0.7), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    background: rgba(255, 255, 255, 0.95);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transform: scale(0.7);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

/* ====== Lightbox ====== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 40, 0.97);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lb-content {
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

#lb-img {
    max-width: 90vw;
    max-height: 75vh;
    /* مفتاح الحل: الصورة كاملة بدون قص */
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.3s;
    background: #1a1a2e;
}

@keyframes zoomIn {
    from { 
        transform: scale(0.85); 
        opacity: 0;
    }
    to { 
        transform: scale(1); 
        opacity: 1;
    }
}

/* أزرار التنقل */
.lb-prev,
.lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(235, 214, 151, 0.95);
    color: #193379;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(235, 214, 151, 0.4);
}

.lb-prev:hover,
.lb-next:hover {
    background: #ebd697;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 30px rgba(235, 214, 151, 0.6);
}

.lb-prev {
    right: 20px; /* RTL: السابق على اليمين */
}

.lb-next {
    left: 20px; /* RTL: التالي على اليسار */
}

.lb-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-close:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: rotate(90deg);
}

.lb-info {
    color: #ebd697;
    font-size: 16px;
    font-weight: 700;
    margin-top: 15px;
    padding: 8px 20px;
    background: rgba(235, 214, 151, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(235, 214, 151, 0.3);
}

/* شريط المصغرات */
.lb-thumbs {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    max-width: 90vw;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ebd697 transparent;
    backdrop-filter: blur(5px);
}

.lb-thumbs::-webkit-scrollbar {
    height: 6px;
}

.lb-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.lb-thumbs::-webkit-scrollbar-thumb {
    background: #ebd697;
    border-radius: 10px;
}

.lb-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.6;
}

.lb-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.lb-thumb.active {
    border-color: #ebd697;
    opacity: 1;
    box-shadow: 0 0 15px rgba(235, 214, 151, 0.6);
}

.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-item {
        aspect-ratio: 1 / 1;
    }
    
    .lb-prev,
    .lb-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lb-prev { right: 10px; }
    .lb-next { left: 10px; }
    
    .lb-close {
        width: 40px;
        height: 40px;
        top: 10px;
        left: 10px;
    }
    
    #lb-img {
        max-width: 95vw;
        max-height: 65vh;
    }
    
    .lb-thumb {
        width: 50px;
        height: 50px;
    }
    
    .lb-thumbs {
        bottom: 10px;
        max-width: 95vw;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lb-info {
        font-size: 14px;
    }
}

/* ====== Page Hero (صفحات ثابتة) ====== */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--secondary);
    opacity: 0.08;
    border-radius: 50%;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: var(--secondary);
    opacity: 0.06;
    border-radius: 50%;
}

.page-hero-icon {
    font-size: 60px;
    margin-bottom: 15px;
    position: relative;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.page-hero h1 {
    font-size: 42px;
    color: var(--secondary);
    margin-bottom: 15px;
    position: relative;
    font-weight: 800;
}

.page-hero-line {
    width: 80px;
    height: 4px;
    background: var(--secondary);
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
}

/* ====== Page Content (محتوى الصفحة) ====== */
.page-content {
    background: white;
    border-radius: 20px;
    padding: 45px 40px;
    box-shadow: 0 4px 30px rgba(53, 34, 124, 0.08);
    font-size: 17px;
    line-height: 2;
    color: #333;
    position: relative;
    border-top: 5px solid var(--secondary);
}

.page-content::before {
    content: '❝';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 60px;
    color: var(--secondary);
    opacity: 0.3;
    font-family: serif;
    line-height: 1;
}

.page-content p {
    margin-bottom: 18px;
    color: #444;
}

.page-content h3 {
    color: var(--primary);
    font-size: 22px;
    margin: 30px 0 15px;
    padding-right: 15px;
    position: relative;
    font-weight: 700;
}

.page-content h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 22px;
    background: var(--secondary);
    border-radius: 3px;
}

.page-content strong {
    color: var(--primary);
    font-weight: 700;
}

.page-content ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.page-content ul li {
    padding: 10px 35px 10px 0;
    margin-bottom: 8px;
    background: var(--light);
    border-radius: 10px;
    border-right: 3px solid var(--secondary);
    transition: all 0.3s;
    position: relative;
    line-height: 1.7;
}

.page-content ul li::before {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.page-content ul li:hover {
    background: #f0edfa;
    transform: translateX(-4px);
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(53, 34, 124, 0.2);
}

.btn-back:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(53, 34, 124, 0.3);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .page-hero {
        padding: 40px 0 50px;
    }
    
    .page-hero h1 {
        font-size: 28px;
    }
    
    .page-hero-icon {
        font-size: 45px;
    }
    
    .page-content {
        padding: 25px 20px;
        font-size: 16px;
    }
    
    .page-content h3 {
        font-size: 19px;
    }
    
    .page-content::before {
        font-size: 40px;
        right: 15px;
        top: 10px;
    }
}

.about-us p,
.vision p,
.goals li,
.values p,
.closing p {
    text-align: justify;
    direction: rtl;
}

/* ====== Audios Hero ====== */
.audios-hero {
    background: linear-gradient(135deg, #35227c 0%, #281a5e 60%, #1a1040 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.audios-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #ebd697;
    opacity: 0.08;
    border-radius: 50%;
    animation: pulseCircle 4s ease-in-out infinite;
}

.audios-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: #ebd697;
    opacity: 0.06;
    border-radius: 50%;
    animation: pulseCircle 5s ease-in-out infinite reverse;
}

@keyframes pulseCircle {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.1); opacity: 0.12; }
}

.audios-hero-icon {
    font-size: 65px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
}

.audios-hero h1 {
    font-size: 42px;
    color: #ebd697;
    margin-bottom: 12px;
    position: relative;
    font-weight: 800;
}

.audios-hero p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 30px;
    position: relative;
}

.audios-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 25px;
    position: relative;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 36px;
    font-weight: 800;
    color: #ebd697;
    line-height: 1;
}

.hero-stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

.hero-stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(235, 214, 151, 0.3);
}

/* ====== View Switch ====== */
.view-switch {
    display: flex;
    gap: 6px;
    background: white;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(53, 34, 124, 0.1);
}

.view-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: #35227c;
    color: #ebd697;
}

.view-btn:hover:not(.active) {
    background: #f8f7fc;
    color: #35227c;
}

/* ====== Categories Grid ====== */
.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.cat-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(53, 34, 124, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #35227c, #ebd697);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s;
    z-index: 2;
}

.cat-card:hover::before {
    transform: scaleX(1);
}

.cat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(53, 34, 124, 0.18);
}

.cat-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #35227c, #281a5e);
}

.cat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.cat-card:hover .cat-card-image img {
    transform: scale(1.1);
}

.cat-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: linear-gradient(135deg, #35227c, #281a5e);
    color: #ebd697;
    position: relative;
}

.cat-card-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(235, 214, 151, 0.15), transparent 60%);
}

.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(53, 34, 124, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.cat-card:hover .cat-card-overlay {
    opacity: 1;
}

.cat-play-icon {
    width: 60px;
    height: 60px;
    background: #ebd697;
    color: #35227c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding-right: 5px;
    transform: scale(0.7);
    transition: transform 0.3s;
}

.cat-card:hover .cat-play-icon {
    transform: scale(1);
}

.cat-count-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(235, 214, 151, 0.95);
    color: #35227c;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.cat-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-card-body h3 {
    color: #35227c;
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    line-height: 1.4;
}

.cat-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 13px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.cat-arrow {
    color: #ebd697;
    font-size: 18px;
    font-weight: 700;
    transition: transform 0.3s;
}

.cat-card:hover .cat-arrow {
    transform: translateX(-5px);
    color: #35227c;
}

/* ====== Categories List ====== */
.cats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cat-list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 15px 20px;
    box-shadow: 0 2px 12px rgba(53, 34, 124, 0.06);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border-right: 4px solid transparent;
}

.cat-list-item:hover {
    transform: translateX(-8px);
    border-right-color: #ebd697;
    box-shadow: 0 10px 30px rgba(53, 34, 124, 0.12);
}

.cat-list-image {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #35227c, #281a5e);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-list-image .cat-card-placeholder {
    font-size: 32px;
}

.cat-list-content {
    flex: 1;
}

.cat-list-content h3 {
    color: #35227c;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.cat-list-count {
    color: #999;
    font-size: 13px;
}

.cat-list-arrow {
    color: #ebd697;
    font-size: 22px;
    font-weight: 700;
    transition: transform 0.3s;
}

.cat-list-item:hover .cat-list-arrow {
    transform: translateX(-6px);
    color: #35227c;
}

/* ====== Category Header ====== */
.category-header {
    margin-bottom: 25px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #35227c;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    transition: all 0.3s;
    padding: 8px 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(53, 34, 124, 0.08);
}

.back-link:hover {
    background: #35227c;
    color: #ebd697;
    transform: translateX(4px);
}

.category-title {
    color: #35227c;
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-count {
    font-size: 14px;
    background: #ebd697;
    color: #35227c;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 700;
}

/* ====== Media Tabs (مُحدَّث) ====== */
.media-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 15px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(53, 34, 124, 0.06);
}

.media-tab {
    padding: 10px 20px;
    border-radius: 10px;
    background: #f8f7fc;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 700;
    color: #35227c;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.media-tab:hover {
    background: #ebd697;
    transform: translateY(-2px);
}

.media-tab.active {
    background: #35227c;
    color: #ebd697;
    box-shadow: 0 6px 20px rgba(53, 34, 124, 0.25);
}

.tab-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
}

.media-tab:not(.active) .tab-count {
    background: #35227c;
    color: #ebd697;
}

/* ====== Audios Grid ====== */
.audios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.audio-item {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 20px rgba(53, 34, 124, 0.08);
    transition: all 0.3s;
    border-top: 4px solid #ebd697;
    position: relative;
    overflow: hidden;
}

.audio-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(53, 34, 124, 0.04), transparent 60%);
    pointer-events: none;
}

.audio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(53, 34, 124, 0.15);
    border-top-color: #35227c;
}

.audio-item-header {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.audio-number {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #35227c, #281a5e);
    color: #ebd697;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(53, 34, 124, 0.2);
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.audio-info h3 {
    color: #35227c;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.5;
    word-break: break-word;
}

.audio-cat-badge {
    display: inline-block;
    background: #f8f7fc;
    color: #35227c;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #ebd697;
}

.audio-player {
    background: #f8f7fc;
    border-radius: 12px;
    padding: 8px;
}

.audio-player audio {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    outline: none;
}

/* تنسيق خاص لمشغل الصوت */
audio::-webkit-media-controls-panel {
    background: white;
}

/* ====== Empty State ====== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(53, 34, 124, 0.06);
}

.empty-icon {
    font-size: 70px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-state h3 {
    color: #35227c;
    font-size: 22px;
    margin-bottom: 8px;
}

.empty-state p {
    color: #999;
    font-size: 15px;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .audios-hero {
        padding: 50px 0;
    }
    
    .audios-hero h1 {
        font-size: 28px;
    }
    
    .audios-hero p {
        font-size: 15px;
    }
    
    .audios-hero-icon {
        font-size: 50px;
    }
    
    .hero-stat-num {
        font-size: 28px;
    }
    
    .hero-stat-divider {
        height: 40px;
    }
    
    .audios-hero-stats {
        gap: 25px;
    }
    
    .category-title {
        font-size: 22px;
    }
    
    .cats-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
    
    .audios-grid {
        grid-template-columns: 1fr;
    }
    
    .cat-card-image {
        height: 150px;
    }
    
    .media-tabs {
        padding: 10px;
        gap: 6px;
    }
    
    .media-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cats-grid {
        grid-template-columns: 1fr;
    }
    
    .audios-hero h1 {
        font-size: 22px;
    }
    
    .hero-stat-label {
        font-size: 12px;
    }
    
    .audio-item {
        padding: 18px;
    }
    
    .cat-list-item {
        padding: 12px 15px;
        gap: 12px;
    }
    
    .cat-list-image {
        width: 55px;
        height: 55px;
    }
}

/* ====== Videos Hero ====== */
.videos-hero {
    background: linear-gradient(135deg, #35227c 0%, #281a5e 60%, #1a1040 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.videos-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #ebd697;
    opacity: 0.08;
    border-radius: 50%;
    animation: pulseCircle 4s ease-in-out infinite;
}

.videos-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: #ebd697;
    opacity: 0.06;
    border-radius: 50%;
    animation: pulseCircle 5s ease-in-out infinite reverse;
}

.videos-hero-icon {
    font-size: 65px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
}

.videos-hero h1 {
    font-size: 42px;
    color: #ebd697;
    margin-bottom: 12px;
    position: relative;
    font-weight: 800;
}

.videos-hero p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 30px;
    position: relative;
}

.videos-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 25px;
    position: relative;
}

/* ====== Video Category Card (تمييز بصري بسيط) ====== */
.video-cat-card .cat-card-image {
    background: linear-gradient(135deg, #281a5e, #1a1040);
}

.video-cat-card:hover .cat-card-image img {
    transform: scale(1.1) rotate(1deg);
}

/* ====== Videos Grid ====== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.video-item {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(53, 34, 124, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.video-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(53, 34, 124, 0.18);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1a1040;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.08);
}

/* طبقة التمرير فوق الصورة */
.video-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 16, 64, 0.85), rgba(26, 16, 64, 0.3) 50%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-item:hover .video-thumbnail-overlay {
    opacity: 1;
}

/* زر التشغيل */
.video-play-btn {
    width: 70px;
    height: 70px;
    background: #ebd697;
    color: #35227c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 4px;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(235, 214, 151, 0.5);
    position: relative;
}

.video-play-btn::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #ebd697;
    opacity: 0;
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.video-item:hover .video-play-btn {
    transform: scale(1);
}

/* شارة المدة */
.video-duration {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #ebd697;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    z-index: 2;
    transition: all 0.3s;
}

.video-item:hover .video-duration {
    background: #ebd697;
    color: #35227c;
}

/* رقم الفيديو */
.video-index {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(53, 34, 124, 0.9);
    color: #ebd697;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    backdrop-filter: blur(6px);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(53, 34, 124, 0.4);
}

/* معلومات الفيديو */
.video-info {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-info h3 {
    color: #35227c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-item:hover .video-info h3 {
    color: #281a5e;
}

/* ====== Video Lightbox ====== */
.video-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 25, 0.98);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(15px);
}

.video-lightbox.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.vl-content {
    background: #1a1040;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 1100px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(235, 214, 151, 0.15);
}

.vl-header {
    padding: 18px 25px;
    background: linear-gradient(135deg, #35227c, #281a5e);
    border-bottom: 2px solid rgba(235, 214, 151, 0.2);
}

.vl-header h3 {
    color: #ebd697;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.vl-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
}

.vl-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.vl-footer {
    padding: 15px 25px;
    background: #1a1040;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(235, 214, 151, 0.1);
}

.vl-yt-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ebd697;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    background: rgba(235, 214, 151, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid rgba(235, 214, 151, 0.2);
}

.vl-yt-link:hover {
    background: #ebd697;
    color: #35227c;
    transform: translateY(-2px);
}

/* زر إغلاق Lightbox */
.vl-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.vl-close:hover {
    background: #dc3545;
    border-color: #dc3545;
    transform: rotate(90deg) scale(1.1);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .videos-hero {
        padding: 50px 0;
    }
    
    .videos-hero h1 {
        font-size: 28px;
    }
    
    .videos-hero p {
        font-size: 15px;
    }
    
    .videos-hero-icon {
        font-size: 50px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 15px;
    }
    
    .video-play-btn {
        width: 55px;
        height: 55px;
    }
    
    .vl-close {
        width: 40px;
        height: 40px;
        top: 12px;
        left: 12px;
        font-size: 18px;
    }
    
    .vl-content {
        border-radius: 14px;
    }
    
    .vl-header {
        padding: 12px 18px;
    }
    
    .vl-header h3 {
        font-size: 15px;
    }
    
    .vl-footer {
        padding: 12px 18px;
    }
    
    .video-lightbox {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .videos-hero h1 {
        font-size: 22px;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-index {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .video-duration {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .vl-yt-link {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ====== Publications Hero ====== */
.pubs-hero {
    background: linear-gradient(135deg, #35227c 0%, #281a5e 60%, #1a1040 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pubs-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #ebd697;
    opacity: 0.08;
    border-radius: 50%;
    animation: pulseCircle 4s ease-in-out infinite;
}

.pubs-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: #ebd697;
    opacity: 0.06;
    border-radius: 50%;
    animation: pulseCircle 5s ease-in-out infinite reverse;
}

.pubs-hero-icon {
    font-size: 65px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
}

.pubs-hero h1 {
    font-size: 42px;
    color: #ebd697;
    margin-bottom: 12px;
    position: relative;
    font-weight: 800;
}

.pubs-hero p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 30px;
    position: relative;
}

.pubs-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 25px;
    position: relative;
}

/* ====== Pub Category Card ====== */
.pub-cat-card .cat-card-image {
    background: linear-gradient(135deg, #35227c, #281a5e);
}

.pub-cat-card:hover .cat-card-image img {
    transform: scale(1.1) rotate(-1deg);
}

.pub-cat-card .cat-play-icon {
    font-size: 26px;
    padding: 0;
}

/* ====== Publications Grid ====== */
.pubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.pub-item {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(53, 34, 124, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pub-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(53, 34, 124, 0.18);
}

.pub-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #35227c, #281a5e);
}

.pub-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.pub-item:hover .pub-thumbnail img {
    transform: scale(1.08);
}

/* أيقونة الملف (لغير الصور) */
.pub-file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ebd697;
    position: relative;
    background: linear-gradient(135deg, #35227c 0%, #281a5e 60%, #1a1040 100%);
}

.pub-file-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(235, 214, 151, 0.15), transparent 60%);
}

.pub-file-icon span {
    font-size: 90px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s;
}

.pub-item:hover .pub-file-icon span {
    transform: scale(1.1) rotate(-5deg);
}

.pub-file-ext {
    position: relative;
    z-index: 1;
    margin-top: 15px;
    background: #ebd697;
    color: #35227c;
    padding: 5px 18px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 2px;
}

/* ألوان خاصة لكل نوع ملف */
.pub-file-icon.pub-pdf { background: linear-gradient(135deg, #8b1a1a 0%, #6b1414 100%); }
.pub-file-icon.pub-doc,
.pub-file-icon.pub-docx { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); }
.pub-file-icon.pub-zip,
.pub-file-icon.pub-rar { background: linear-gradient(135deg, #b45309 0%, #92400e 100%); }
.pub-file-icon.pub-xls,
.pub-file-icon.pub-xlsx { background: linear-gradient(135deg, #047857 0%, #065f46 100%); }

/* طبقة التمرير */
.pub-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 16, 64, 0.9), rgba(26, 16, 64, 0.3) 50%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.pub-item:hover .pub-overlay {
    opacity: 1;
}

.pub-download-btn {
    width: 70px;
    height: 70px;
    background: #ebd697;
    color: #35227c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(235, 214, 151, 0.5);
    position: relative;
    animation: downloadBounce 1.5s ease-in-out infinite;
}

@keyframes downloadBounce {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1) translateY(-5px); }
}

.pub-item:hover .pub-download-btn {
    transform: scale(1);
}

/* رقم النشرة */
.pub-index {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(53, 34, 124, 0.9);
    color: #ebd697;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    backdrop-filter: blur(6px);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(53, 34, 124, 0.4);
}

/* المشاهدات */
.pub-views {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #ebd697;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    z-index: 2;
}

/* معلومات النشرة */
.pub-info {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.pub-info h3 {
    color: #35227c;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-item:hover .pub-info h3 {
    color: #281a5e;
}

.pub-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.pub-ext-badge {
    display: inline-block;
    background: #35227c;
    color: #ebd697;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .pubs-hero {
        padding: 50px 0;
    }
    
    .pubs-hero h1 {
        font-size: 28px;
    }
    
    .pubs-hero p {
        font-size: 15px;
    }
    
    .pubs-hero-icon {
        font-size: 50px;
    }
    
    .pubs-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .pub-file-icon span {
        font-size: 60px;
    }
    
    .pub-download-btn {
        width: 55px;
        height: 55px;
    }
    
    .pub-info {
        padding: 14px 16px;
    }
    
    .pub-info h3 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pubs-hero h1 {
        font-size: 22px;
    }
    
    .pubs-grid {
        grid-template-columns: 1fr;
    }
    
    .pub-thumbnail {
        aspect-ratio: 4 / 3;
    }
    
    .pub-index {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* ====== PDF Preview ====== */
.pdf-preview {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f8f8f8;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.pdf-preview canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    opacity: 0;
    transition: opacity 0.4s;
}

.pdf-preview.loaded canvas {
    opacity: 1;
}

/* تحسين عرض المعاينة */
.pdf-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.05));
    pointer-events: none;
}

/* لودر */
.pdf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    z-index: 2;
}

.pdf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ebd697;
    border-top-color: #35227c;
    border-radius: 50%;
    animation: pdfSpin 0.8s linear infinite;
}

@keyframes pdfSpin {
    to { transform: rotate(360deg); }
}

/* شارة PDF أعلى الصورة */
.pub-badge-pdf {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* تعديل على رقم النشرة حتى لا يتعارض */
.pub-item .pub-index {
    right: auto;
    left: 12px;
    top: auto;
    bottom: 12px;
}

/* إذا كان هناك شارة PDF، اجعل رقم النشرة في الأسفل يمين */
.pub-item:has(.pub-badge-pdf) .pub-index {
    right: 12px;
    left: auto;
    bottom: 12px;
    top: auto;
}