@font-face {
    font-family: 'KSARegular';
    src: url('../fonts/KSARegular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'UthmanTN1Ver10';
    src: url('../fonts/UthmanTN1Ver10.eot');
    /* IE9 Compat Modes */
    src: url('../fonts/UthmanTN1Ver10.eot?#iefix') format('embedded-opentype'),
        /* IE6-IE8 */
        url('../fonts/UthmanTN1Ver10.woff') format('woff'),
        /* Modern Browsers */
        url('../fonts/UthmanTN1Ver10.ttf') format('truetype');
    /* Safari, Android, iOS */
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'KSAExtra';
    src: url('../fonts/KSAExtra.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'UthmanTN1Ver10', 'Noto Naskh Arabic', 'urwdinarabic', 'Tajawal', sans-serif;
}

/* خلفية زخرفية إسلامية ناعمة للصفحة (تم تعديل اللون للبني) */
.islamic-pattern-bg {
    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%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235d4037' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.dark .islamic-pattern-bg {
    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%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d7ccc8' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* خلفية زخرفية خاصة للهيدر (تم تعديل الزخارف لتكون باللون الأبيض) */
.header-islamic-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h80v80H0V0zm40 0L0 40 40 80 80 40 40 0zm0 20L20 40l20 20 20-20-20-20z' fill='none' stroke='%23ffffff' stroke-opacity='0.1' stroke-width='1'/%3E%3Cpath d='M10 10l20 20 20-20 20 20-20 20 20 20-20-20-20 20-20-20 20-20z' fill='none' stroke='%23ffffff' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E");
}

/* كلاس جديد لخلفية الكتب في الهيدر - تم تعديل الموضع والوضوح */
.header-books-bg {
    /* صورة كتب مصفوفة في مكتبة */
    background-image: url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    /* تم تغيير الموضع إلى اليمين (right) لإظهار الكتب في الجهة اليمنى */
    background-position: right center;

    /* قناع لإخفاء الصورة تدريجياً جهة اليسار - تم توسيع المنطقة الظاهرة في اليمين */
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.3) 80%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.3) 80%, rgba(0, 0, 0, 0) 100%);

    /* تم تقليل الشفافية من 0.95 إلى 0.4 لتوضيح القائمة */
    opacity: 0.4;
    mix-blend-mode: normal;
    /* تقليل الفلتر البني (Sepia) لإظهار ألوان الكتب الحقيقية وزيادة التباين */
    filter: sepia(10%) saturate(110%) contrast(1.1) brightness(1.1);
}

.dark .header-islamic-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h80v80H0V0zm40 0L0 40 40 80 80 40 40 0zm0 20L20 40l20 20 20-20-20-20z' fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'/%3E%3Cpath d='M10 10l20 20 20-20 20 20-20 20 20 20-20-20-20 20-20-20 20-20z' fill='none' stroke='%23ffffff' stroke-opacity='0.1' stroke-width='1'/%3E%3C/svg%3E");
}

/* نقش زخرفي لترويسة الأقسام */
.section-header-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0l50 50-50 50L0 50z' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M50 10l40 40-40 40-40-40z' fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M50 20l30 30-30 30-30-30z' fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.5'/%3E%3Ccircle cx='50' cy='50' r='15' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M10 10h20v20H10zm60 0h20v20H70zM10 70h20v20H10zm60 0h20v20H70z' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

/* نقش خاص لترويسة الفيديو */
.video-header-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    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 22.5h22.5L42.5 35l7.5 22.5L30 45l-20 12.5 7.5-22.5L0 22.5h22.5z' fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.5'/%3E%3Ccircle cx='30' cy='30' r='10' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

/* شريط زخرفي (تم تعديل اللون للبني) */
.decorative-divider {
    height: 10px;
    background-color: #5d4037;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10' viewBox='0 0 20 10'%3E%3Cpath fill='%23c5a059' fill-opacity='0.4' d='M10 10L0 0h20L10 10z'/%3E%3C/svg%3E");
    background-size: 20px 10px;
}

.content-link {
    transition: all 0.2s ease;
}

.content-link:hover {
    color: #5d4037;
    padding-right: 5px;
}

.dark .content-link:hover {
    color: #d7ccc8;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* أنماط السلايدر */
.slide {
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 20;
}

.slide-overlay {
    /* تم تعديل الشفافية إلى 50% (0.50) بناءً على طلبك */
    background: rgba(40, 27, 22, 0.50);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    position: absolute;
    inset: 0;
}

/* أنماط الأيقونات الثابتة */
.fixed-social-sidebar {
    position: fixed;
    left: 0;
    bottom: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.social-icon-box {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    position: relative;
    left: 0;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}


.social-icon-box:hover {
    width: 45px;
    padding-right: 5px;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    /* gray-400 equivalent */
    border-radius: 20px;
}

.custom-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: rgba(107, 114, 128, 0.8);
    /* gray-500 equivalent */
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(75, 85, 99, 0.5);
    /* gray-600 equivalent */
}

.dark .custom-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
}