* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #f8f9fc;
    color: #2c3e50;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* صورة السيد - تملأ العرض كاملاً */
.top-image {
    width: 100%;
    height: auto;
    min-height: 180px;
    max-height: 280px;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    margin: 0;
    padding: 0;
}

/* للجوال */
@media (max-width: 768px) {
    .top-image {
        min-height: 120px;
        object-fit: cover;
        object-position: center 20%;
    }
}

/* للشاشات الكبيرة */
@media (min-width: 1200px) {
    .top-image {
        min-height: 220px;
    }
}
/* ========== القائمة الجانبية ========== */
.sidebar {
    position: fixed;
    top: 0;
    right: auto;
    left: -320px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.sidebar.open {
    left: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.overlay.active {
    display: block;
}

/* ========== الهيدر العلوي مع زر القائمة - اللون النيلي ========== */
.top-bar {
    background: linear-gradient(135deg, #1a2a4f, #2c3e6b);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.2);
}

.home-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 1rem;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    text-decoration: none;
}

.home-btn:hover {
    background: rgba(255,255,255,0.3);
}

.site-title {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-title i {
    font-size: 1.2rem;
}

/* ===== القوائم المنسدلة ===== */
.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: 0.2s;
    cursor: pointer;
}

.nav-item > a:hover {
    background: #f0f4fc;
    color: #2c3e6b;
}

.nav-item > a i:first-child {
    width: 28px;
    color: #2c3e6b;
}

.dropdown-icon {
    transition: transform 0.3s;
}

.nav-item.open .dropdown-icon {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fafdfa;
}

.nav-item.open .submenu {
    max-height: 500px;
}

.submenu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1.2rem 0.7rem 2rem;
    text-decoration: none;
    color: #5a6e5a;
    font-size: 0.9rem;
    transition: 0.2s;
}

.submenu li a:hover {
    background: #f0f4fc;
    color: #2c3e6b;
}

.submenu li a i {
    width: 24px;
    font-size: 0.8rem;
    color: #2c3e6b;
}

/* ========== المحتوى الرئيسي ========== */
.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
}

/* شبكة الأقسام الرئيسية - 4 أعمدة */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

/* بطاقات الأقسام - مربعة الشكل */
.card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #e8eef5;
    aspect-ratio: 1 / 0.9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #2c3e6b;
    box-shadow: 0 12px 25px rgba(44,62,107,0.1);
}

.card i {
    font-size: 2.8rem;
    color: #2c3e6b;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1a2a4f;
}

.card p {
    font-size: 0.8rem;
    color: #7a8b9e;
    line-height: 1.5;
}

/* ========== الفوتر ========== */
.footer {
    background: #1a2a4f;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.social-icons a {
    color: white;
    font-size: 1.3rem;
    transition: 0.3s;
}

.social-icons a:hover {
    color: #c2a144;
    transform: translateY(-3px);
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ========== شريط الأخبار المتحرك ========== */
.news-slider-section {
    margin: 0 0 2rem 0;
}

.slider-container {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
    aspect-ratio: 16 / 6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(26,42,79,0.95), rgba(44,62,107,0.7), transparent);
    padding: 2rem 2rem 1.5rem;
    color: white;
}

.slide-category {
    background: #c2a144;
    color: #1a2a4f;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.slide-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.slide-title a {
    color: white;
    text-decoration: none;
}

.slide-title a:hover {
    color: #c2a144;
}

.slide-date {
    font-size: 0.7rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* أزرار التنقل */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44,62,107,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: #c2a144;
    color: #1a2a4f;
}

.slider-prev {
    right: 15px;
}

.slider-next {
    left: 15px;
}

/* نقاط التنقل */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #c2a144;
    width: 25px;
    border-radius: 10px;
}

/* ========== شبكة الفيديوهات - 4 أعمدة ========== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 4rem;
}

.video-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #2c3e6b;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #1a1a2e;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-number {
    display: inline-block;
    background: #f0f4fc;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #2c3e6b;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.video-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a2a4f;
    margin-bottom: 0.3rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 0.65rem;
    color: #7a8b9e;
    margin-bottom: 0.5rem;
}

.video-description {
    font-size: 0.7rem;
    color: #5a6e7a;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #e8eef5;
    padding-top: 0.6rem;
    margin-top: 0.5rem;
}

.video-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    border-radius: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-watch {
    background: #2c3e6b;
    color: white;
}

.btn-watch:hover {
    background: #1a2a4f;
}

.btn-share {
    background: transparent;
    border: 1px solid #2c3e6b;
    color: #2c3e6b;
}

.btn-share:hover {
    background: #2c3e6b;
    color: white;
}

/* ========== شبكة الأخبار - 4 أعمدة ========== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.news-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid #e8eef5;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.news-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(44,62,107,0.1);
}

.news-date {
    font-size: 0.7rem;
    color: #2c3e6b;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.news-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.news-summary {
    font-size: 0.75rem;
    color: #5a6e7a;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.news-link {
    color: #2c3e6b;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.news-link:hover {
    color: #1a2a4f;
    text-decoration: underline;
}

/* ========== شبكة الدروس (lessons-video-grid) - 4 أعمدة ========== */
.lessons-video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 4rem;
}

.lesson-video-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.lesson-video-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.lesson-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #1a2a4f;
}

.lesson-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lesson-video-info {
    padding: 0.8rem;
}

.lesson-video-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.lesson-video-number {
    background: #2c3e6b;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 600;
}

.lesson-video-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a2a4f;
    line-height: 1.4;
    flex: 1;
}

.lesson-video-meta {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
    color: #7a8b9e;
}

.lesson-video-meta i {
    color: #2c3e6b;
    margin-left: 4px;
}

.lesson-video-description {
    font-size: 0.7rem;
    line-height: 1.5;
    color: #5a6e7a;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lesson-video-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #e8eef5;
    padding-top: 0.6rem;
}

.lesson-video-btn {
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ========== شبكة المكتبة - 4 أعمدة ========== */
.library-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.library-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    display: block;
}

.library-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(44,62,107,0.1);
}

.library-header {
    background: linear-gradient(135deg, #f0f4fc 0%, #e8eef5 100%);
    padding: 1rem;
    border-bottom: 1px solid #e8eef5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-icon {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(44,62,107,0.1);
}

.library-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4f;
    flex: 1;
}

.library-body {
    padding: 1rem;
}

.library-description {
    font-size: 0.75rem;
    line-height: 1.5;
    color: #5a6e7a;
    margin-bottom: 1rem;
}

.library-footer {
    display: flex;
    justify-content: flex-start;
    border-top: 1px solid #e8eef5;
    padding-top: 0.8rem;
}

.library-btn {
    background: transparent;
    border: 1px solid #2c3e6b;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #2c3e6b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.library-btn:hover {
    background: #2c3e6b;
    color: white;
}

/* ========== شبكة الأرشيف - 4 أعمدة ========== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.archive-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid #e8eef5;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.archive-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(44,62,107,0.1);
}

.archive-date {
    font-size: 0.7rem;
    color: #2c3e6b;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.archive-date i {
    font-size: 0.7rem;
}

.archive-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.archive-description {
    font-size: 0.75rem;
    color: #5a6e7a;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.archive-link {
    color: #2c3e6b;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.archive-link:hover {
    color: #1a2a4f;
    text-decoration: underline;
}

/* ========== شبكة الوصايا - 4 أعمدة ========== */
.advice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.advice-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.advice-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(44,62,107,0.1);
}

.advice-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4fc 100%);
    padding: 1rem;
    border-bottom: 1px solid #e8eef5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.advice-number {
    width: 35px;
    height: 35px;
    background: #2c3e6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.advice-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4f;
    flex: 1;
}

.advice-date {
    font-size: 0.65rem;
    color: #7a8b9e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.advice-body {
    padding: 1rem;
}

.advice-content {
    font-size: 0.75rem;
    line-height: 1.6;
    color: #5a6e7a;
    text-align: justify;
    margin-bottom: 1rem;
}

.advice-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
    gap: 8px;
    flex-wrap: wrap;
}

.advice-tag {
    background: #f0f4fc;
    padding: 0.2rem 0.7rem;
    border-radius: 15px;
    font-size: 0.65rem;
    color: #2c3e6b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.advice-source {
    font-size: 0.65rem;
    color: #2c3e6b;
    font-weight: 500;
}

/* ========== شبكة السلاسل (صفحة المحاضرات) - 4 أعمدة ========== */
.series-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.series-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 100%;
}

.series-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(44,62,107,0.1);
}

.series-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4fc 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e8eef5;
}

.series-icon {
    width: 45px;
    height: 45px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(44,62,107,0.1);
    flex-shrink: 0;
}

.series-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a2a4f;
    flex: 1;
    line-height: 1.4;
}

.series-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.series-description {
    font-size: 0.75rem;
    color: #5a6e7a;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.series-meta {
    font-size: 0.65rem;
    color: #2c3e6b;
    background: #f0f4fc;
    padding: 0.2rem 0.7rem;
    border-radius: 15px;
    display: inline-block;
    align-self: flex-start;
}

/* ===== شبكة الكتب - 4 أعمدة مثل الفيديوهات ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 4rem;
}

.book-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8eef5;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #2c3e6b;
}

.book-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a2a4f;
    padding: 0.8rem 0.8rem 0 0.8rem;
    margin: 0;
    line-height: 1.4;
}

.book-author {
    font-size: 0.65rem;
    color: #7a8b9e;
    padding: 0.3rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.book-author i {
    color: #2c3e6b;
    font-size: 0.65rem;
}

.book-description {
    font-size: 0.7rem;
    color: #5a6e7a;
    line-height: 1.5;
    padding: 0 0.8rem;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    display: flex;
    gap: 0.8rem;
    padding: 0 0.8rem 0.5rem 0.8rem;
    font-size: 0.6rem;
    color: #8aa08a;
}

.book-meta i {
    color: #2c3e6b;
    margin-left: 3px;
    font-size: 0.6rem;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    border-top: 1px solid #e8eef5;
    margin-top: auto;
}

.btn {
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: #2c3e6b;
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #1a2a4f;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2c3e6b;
    color: #2c3e6b;
}

.btn-outline:hover {
    background: #2c3e6b;
    color: white;
}

/* استجابة للشاشات المختلفة */
@media (max-width: 1100px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
}
/* ========== تنسيق رابط قناة التليجرام ========== */
.channel-link {
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.channel-icon {
    width: 55px;
    height: 55px;
    background: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.8rem;
    box-shadow: 0 2px 8px rgba(44,62,107,0.1);
}

.channel-text h3 {
    font-size: 1.1rem;
    color: #1a2a4f;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.channel-text p {
    font-size: 0.8rem;
    color: #7a8b9e;
}

.channel-btn {
    background: #2c3e6b;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.channel-btn:hover {
    background: #1a2a4f;
    transform: translateY(-2px);
}

/* ===== تصميم قسم التفسير ===== */
.sura-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.sura-section {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sura-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f4fc;
}

.sura-section-title i {
    color: #2c3e6b;
    font-size: 1.4rem;
}

.sura-submenu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.sura-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.sura-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(44,62,107,0.1);
    background: #f8fafc;
}

.sura-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sura-icon {
    width: 40px;
    height: 40px;
    background: #f0f4fc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sura-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 0.2rem;
}

.sura-meta {
    font-size: 0.65rem;
    color: #7a8b9e;
}

.sura-badge {
    background: #2c3e6b;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== قسم نهج البلاغة - 4 أعمدة ===== */
.nahj-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.nahj-section {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.nahj-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f4fc;
}

.nahj-section-title i {
    color: #2c3e6b;
    font-size: 1.4rem;
}

.nahj-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.nahj-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.nahj-card:hover {
    border-color: #2c3e6b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(44,62,107,0.1);
    background: #f8fafc;
}

.nahj-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.nahj-icon {
    width: 40px;
    height: 40px;
    background: #f0f4fc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nahj-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 0.2rem;
}

.nahj-meta {
    font-size: 0.65rem;
    color: #7a8b9e;
}

.nahj-badge {
    background: #2c3e6b;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== أقسام السيرة الذاتية ===== */
.bio-section {
    margin-bottom: 2.5rem;
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.bio-title {
    font-size: 1.2rem;
    color: #1a2a4f;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f4fc;
    font-weight: 700;
}

.bio-title i {
    color: #2c3e6b;
    font-size: 1.3rem;
}

.bio-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #5a6e7a;
    text-align: justify;
    margin-bottom: 1rem;
}

.bio-list {
    list-style: none;
    padding-right: 0.5rem;
}

.bio-list li {
    font-size: 0.95rem;
    color: #5a6e7a;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.6rem;
    border-radius: 8px;
    transition: 0.3s;
}

.bio-list li:hover {
    background: #f8fafc;
}

.bio-list li i {
    color: #2c3e6b;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

/* ===== صفحة تواصل معنا ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.contact-info, .contact-form, .work-hours {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e8eef5;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #e8eef5;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: #f0f4fc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 0.8rem;
    color: #7a8b9e;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.contact-details p,
.contact-details a {
    font-size: 0.95rem;
    color: #1a2a4f;
    font-weight: 500;
    text-decoration: none;
}

.contact-details a:hover {
    color: #2c3e6b;
}

.form-title {
    font-size: 1.1rem;
    color: #1a2a4f;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f4fc;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e6b;
    box-shadow: 0 0 0 3px rgba(44,62,107,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: #2c3e6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.submit-btn:hover {
    background: #1a2a4f;
    transform: translateY(-2px);
}

.note {
    font-size: 0.75rem;
    color: #7a8b9e;
    margin-top: 1rem;
    text-align: center;
}

.work-hours h4 {
    color: #2c3e6b;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.work-hours p {
    font-size: 0.9rem;
    color: #1a2a4f;
    line-height: 1.6;
}

/* ===== التجاوب مع الجوال - تحويل 4 أعمدة إلى أقل ===== */
@media (max-width: 1200px) {
    .videos-grid,
    .news-grid,
    .lessons-video-grid,
    .library-grid,
    .archive-grid,
    .advice-grid,
    .series-grid,
    .books-grid,
    .sura-submenu,
    .nahj-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .videos-grid,
    .news-grid,
    .lessons-video-grid,
    .library-grid,
    .archive-grid,
    .advice-grid,
    .series-grid,
    .books-grid,
    .sura-submenu,
    .nahj-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .videos-grid,
    .news-grid,
    .lessons-video-grid,
    .library-grid,
    .archive-grid,
    .advice-grid,
    .series-grid,
    .books-grid,
    .sura-submenu,
    .nahj-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .card {
        aspect-ratio: auto;
        padding: 1rem 0.8rem;
    }
    
    .card i {
        font-size: 1.8rem;
    }
    
    .card h3 {
        font-size: 0.85rem;
    }
    
    .card p {
        font-size: 0.7rem;
    }
    
    .site-title span {
        display: none;
    }
    
    .slide {
        aspect-ratio: 16 / 9;
    }
    
    .slide-overlay {
        padding: 1rem;
    }
    
    .slide-title {
        font-size: 0.9rem;
    }
    
    .slide-category {
        font-size: 0.6rem;
    }
    
    .slide-date {
        font-size: 0.6rem;
    }
    
    .slider-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .sura-section {
        padding: 1.5rem 1.2rem;
    }
    
    .channel-link {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .channel-info {
        flex-direction: column;
    }
    
    .section-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 1.2rem 1rem;
    }
    
    .section-info {
        flex-direction: column;
    }
    
    .nahj-section {
        padding: 1.5rem 1.2rem;
    }
    
    .advice-header,
    .advice-body {
        padding: 1rem;
    }
    
    .advice-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-card {
        padding: 1rem;
    }
    
    .library-header,
    .library-body {
        padding: 1rem;
    }
    
    .archive-card {
        padding: 1rem;
    }
    
    .bio-section {
        padding: 1.5rem 1.2rem;
    }
    
    .contact-info,
    .contact-form,
    .work-hours {
        padding: 1.2rem 1rem;
    }
    
    .lesson-video-info {
        padding: 1rem;
    }
}

/* ===== قائمة الأقسام الرئيسية ===== */
.sections-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 4rem;
}

.section-card {
    background: #ffffff;
    border: 1px solid #e8eef5;
    border-radius: 16px;
    padding: 1.3rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.section-card:hover {
    border-color: #2c3e6b;
    transform: translateX(-5px);
    background: #f8fafc;
    box-shadow: 0 8px 20px rgba(44,62,107,0.1);
}

.section-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-icon {
    width: 55px;
    height: 55px;
    background: #f0f4fc;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e6b;
    font-size: 1.4rem;
}

.section-details h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 0.3rem;
}

.section-details p {
    font-size: 0.8rem;
    color: #7a8b9e;
}

.section-badge {
    background: #f0f4fc;
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #2c3e6b;
    font-weight: 600;
}

.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a2a4f;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #2c3e6b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: #2c3e6b;
    font-size: 1.3rem;
}
/* ===== شبكة الكتب - 4 أعمدة (إجبار) ===== */
.books-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.2rem !important;
    margin-bottom: 4rem !important;
}

.book-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #e8eef5 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* استجابة للشاشات المختلفة */
@media (max-width: 1100px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 800px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 500px) {
    .books-grid {
        grid-template-columns: 1fr !important;
    }
}
