/* ===== CSS Variables ===== */
/* @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap'); */
@import url('css/global-fonts.css');

:root {
    --primary-color: #2d5f3f;
    --primary-light: #3a7a52;
    --primary-dark: #1f4029;
    --secondary-color: #4a9d6b;
    --accent-color: #66bb6a;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8fdf9;
    --white: #ffffff;
    --shadow: rgba(45, 95, 63, 0.1);
    --shadow-hover: rgba(45, 95, 63, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    margin: 0;
    padding: 0;
    /* نضيف مسافة علوية للبانر حتى لا يختفي المحتوى خلف القائمة الثابتة */
  /*  padding-top: 260px; *//* ارتفاع البانر */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
}

/* ===== Site Banner Styles ===== */
.site-banner {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: fixed; /* البانر ثابت في الأعلى */
    top: 0;
    left: 0;
    z-index: 900; /* أقل من القائمة العلوية حتى تظهر القائمة فوقه عند التمرير */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* إخفاء البانر عند التمرير */
.site-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.site-banner img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/* ===== Global Styles ===== */
/* ===== Horizontal Navigation Bar (Fixed - يبقى ثابتاً في الأعلى) ===== */
.horizontal-navbar {
    background: linear-gradient(135deg, #2c5f2d 0%, #1e4620 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: fixed; /* ثابت في الأعلى دائماً */
    top: auto; /* تم التعديل ليتناسب مع الوضع النسبي */
    left: 0;
    width: 100%;
    z-index: 1100;
    transition: top 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

/* عند التمرير، القائمة تنتقل إلى أعلى الصفحة */
.horizontal-navbar.scrolled {
    top: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #1e4620 0%, #0f2310 100%);
}

.navbar-container {
    max-width: 100%;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    height: 70px;
}

.navbar-brand { display: flex; align-items: center; gap: 15px; color: white; text-decoration: none; flex-shrink: 0; }
.navbar-brand i { font-size: 2rem; color: #D4AF37; }
.navbar-brand-text { font-size: 1.3rem; font-weight: 700; white-space: nowrap; }
.navbar-links { display: flex; align-items: center; gap: 5px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.navbar-link-item { margin: 0; }
.navbar-link { display: flex; align-items: center; gap: 8px; padding: 12px 18px; color: white; text-decoration: none; border-radius: 8px; transition: all 0.3s ease; font-size: 0.95rem; font-weight: 500; white-space: nowrap; }
.navbar-link:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.navbar-link.active { background: rgba(212,175,55,0.3); border-bottom: 3px solid #D4AF37; font-weight: 700; }
.navbar-link i { font-size: 1.1rem; }
.navbar-toggle { display: none; background: none; border: none; color: white; font-size: 1.8rem; cursor: pointer; padding: 8px; }
.navbar-mobile-menu { display: none; background: rgba(0,0,0,0.3); padding: 0; margin: 0; border-top: 1px solid rgba(255,255,255,0.1); }
.navbar-mobile-menu.active { display: block; }
.navbar-mobile-item { margin: 0; }
.navbar-mobile-link { display: flex; align-items: center; gap: 12px; padding: 15px 30px; color: white; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.1); transition: all 0.3s ease; }
.navbar-mobile-link:hover, .navbar-mobile-link.active { background: rgba(255,255,255,0.15); padding-right: 40px; }
.navbar-mobile-link.active { border-right: 4px solid #D4AF37; font-weight: 700; }

/* Fallback Icon Styles */
.fallback-icon-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #2d5f3f;
    font-size: 3.5rem;
    z-index: 1;
}

@media (max-width: 1200px) { .navbar-links { gap: 3px; } .navbar-link { padding: 10px 12px; font-size: 0.88rem; } .navbar-brand-text { font-size: 1.15rem; } }
@media (max-width: 992px) { .navbar-link span { display: none; } .navbar-link { padding: 12px 15px; } .navbar-link i { font-size: 1.3rem; } }
@media (max-width: 768px) { 
    body {
        padding-top: 0; /* تم إزالة المسافة الزائدة */
    }
    .site-banner, 
    .site-banner img { 
        height: 120px; 
    } 
    .horizontal-navbar {
        top: auto; /* تم التعديل ليتناسب مع الوضع النسبي */
    }
    .horizontal-navbar.scrolled {
        top: 0;
    }
    .mobile-news-ticker {
        top: auto; /* تم التعديل ليتناسب مع الوضع النسبي */
    }
    .mobile-news-ticker.scrolled {
        top: 60px; /* أسفل القائمة في الموبايل */
    }
    .navbar-links { 
        display: none; 
    } 
    .navbar-toggle { 
        display: block; 
    } 
    .navbar-container { 
        height: 60px; 
        padding: 0 20px; 
    } 
    .navbar-brand-text { 
        font-size: 1.1rem; 
    } 
    .navbar-brand i { 
        font-size: 1.6rem; 
    } 
}

/* ===== News Ticker (Below Navbar) - يتحرك مع القائمة العلوية ===== */
.mobile-news-ticker {
    display: block;
    background: #1a3a1a;
    color: white;
    padding: 10px 0;
    overflow: hidden;
    border-bottom: 2px solid #D4AF37;
    position: fixed;
    top: auto; /* تم التعديل ليتناسب مع الوضع النسبي */
    width: 100%;
    z-index: 1099;
    transition: top 0.3s ease;
}

/* عند التمرير، شريط الأخبار ينتقل ليكون أسفل القائمة مباشرة */
.mobile-news-ticker.scrolled {
    top: 70px; /* أسفل القائمة العلوية فقط */
}

/* ===== Sidebar Styles - **تم التعديل ليتحرك مع الصفحة** ===== */
.site-sidebar {
    /* تم حذف كل خصائص الـ position والـ top والـ height */
    /* الآن ستتحرك القائمة بشكل طبيعي مع المحتوى */
    padding: 5px 0 0 5px; /* إضافة هوامش لتنسيق أفضل مع المحتوى المجاور */
    margin: 0;
    background: linear-gradient(180deg, #2c5f2d 0%, #1e4620 100%);
    direction: rtl; /* RTL للنصوص العربية */
    z-index: 100;
    height : 100%;
}

/* تعديل بسيط على حاوية الأعمدة لضمان المحاذاة الصحيحة */
.page-wrapper {
    display: grid;
    grid-template-columns: 75% 25%;
    gap: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    direction: ltr;
    padding-top: 0; /* تم تصفير المسافة لأن الهيدر يأخذ مساحته الطبيعية */
    align-items: flex-start; /* **مهم:** يضمن أن يبدأ العمودان من نفس النقطة العلوية */
}

.main-content-area {
    min-width: 0;
    padding: 0 20px;
    direction: rtl;
    order: 1;
}

/* إخفاء Sidebar على الموبايل */
@media (max-width: 768px) {
    .site-sidebar {
        display: none;
    }
    .page-wrapper {
        grid-template-columns: 1fr;
        padding-top: 0; /* تم تصفير المسافة في الموبايل */
    }
}

.navbar-mobile-menu.active {
    display: block;
}

.navbar-mobile-item {
    margin: 0;
}

.navbar-mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar-mobile-link:hover,
.navbar-mobile-link.active {
    background: rgba(255, 255, 255, 0.15);
    padding-right: 40px;
}

.navbar-mobile-link.active {
    border-right: 4px solid #D4AF37;
    font-weight: 700;
}

/* Responsive للشاشات المتوسطة */
@media (max-width: 1200px) {
    .navbar-links {
        gap: 3px;
    }

    .navbar-link {
        padding: 10px 12px;
        font-size: 0.88rem;
    }

    .navbar-brand-text {
        font-size: 1.15rem;
    }
}

@media (max-width: 992px) {
    .navbar-link span {
        display: none;
    }

    .navbar-link {
        padding: 12px 15px;
    }

    .navbar-link i {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {

    .site-banner,
    .site-banner img {
        height: 120px;
    }

    /* Hide Desktop Navbar Links, Show Hamburger */
    .navbar-links {
        display: none;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-container {
        height: 60px;
        padding: 0 20px;
    }

    .navbar-brand-text {
        font-size: 1.1rem;
    }

    .navbar-brand i {
        font-size: 1.6rem;
    }
}

@media (max-width: 1024px) {
    .site-banner {
        height: 180px;
    }

    .site-banner img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .site-banner {
        height: 120px;
    }

    .site-banner img {
        height: 120px;
    }

    .logo h1 {
        font-size: 1.05rem;
    }
}

@media (min-width: 1200px) {
    .main-nav a {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ===== News Slider Section ===== */
.news-slider-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    height: 450px;
}

.slider-container {
    position: relative;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.slider-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.85) 0%, rgba(74, 157, 107, 0.75) 100%);
    z-index: 1;
}

.slider-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.slider-text {
    max-width: 700px;
    color: var(--white);
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slider-category {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.slider-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slider-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.95;
}

.slider-date {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--white);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn-prev {
    right: 20px;
}

.slider-btn-next {
    left: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background-color: var(--white);
    width: 35px;
    border-radius: 10px;
}

.slider-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--white);
    font-size: 1.5rem;
}

.slider-loading i {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* ===== Content Cards for All Sections ===== */
.content-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><g transform="translate(75,75)" opacity="0.03"><circle r="70" fill="none" stroke="%232d5f3f" stroke-width="2"/><circle r="55" fill="none" stroke="%232d5f3f" stroke-width="2"/><circle r="40" fill="none" stroke="%232d5f3f" stroke-width="2"/><path d="M 0,-60 L 8,-15 L 35,-15 L 12,-3 L 20,22 L 0,8 L -20,22 L -12,-3 L -35,-15 L -8,-15 Z" fill="%232d5f3f"/></g></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
}

/* Islamic Decorative Elements - Mandala Style */
.hero-section::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 5%;
    width: 180px;
    height: 180px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g transform="translate(100,100)"><circle r="90" fill="none" stroke="white" stroke-width="1" opacity="0.15"/><circle r="75" fill="none" stroke="white" stroke-width="1" opacity="0.15"/><circle r="60" fill="none" stroke="white" stroke-width="1.5" opacity="0.2"/><circle r="45" fill="none" stroke="white" stroke-width="1" opacity="0.15"/><circle r="30" fill="none" stroke="white" stroke-width="1" opacity="0.15"/><circle r="15" fill="none" stroke="white" stroke-width="1" opacity="0.15"/><g id="petal"><path d="M 0,-60 Q 15,-75 0,-90 Q -15,-75 0,-60 Z" fill="white" opacity="0.12"/><path d="M 0,-45 Q 10,-55 0,-65 Q -10,-55 0,-45 Z" fill="white" opacity="0.15"/></g><use href="%23petal" transform="rotate(45)"/><use href="%23petal" transform="rotate(90)"/><use href="%23petal" transform="rotate(135)"/><use href="%23petal" transform="rotate(180)"/><use href="%23petal" transform="rotate(225)"/><use href="%23petal" transform="rotate(270)"/><use href="%23petal" transform="rotate(315)"/><circle r="10" fill="white" opacity="0.15"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.4;
    animation: rotate 40s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.islamic-pattern-left {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 120px;
    height: 250px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"><g fill="none" stroke="white" stroke-width="1.5" opacity="0.18"><path d="M 30,20 Q 50,20 50,40 Q 50,60 30,60 Q 50,60 50,80 Q 50,100 30,100"/><path d="M 70,20 Q 50,20 50,40 Q 50,60 70,60 Q 50,60 50,80 Q 50,100 70,100"/><circle cx="50" cy="30" r="8"/><circle cx="50" cy="50" r="8"/><circle cx="50" cy="70" r="8"/><circle cx="50" cy="90" r="8"/><path d="M 30,120 Q 50,120 50,140 Q 50,160 30,160 Q 50,160 50,180 Q 50,200 30,200"/><path d="M 70,120 Q 50,120 50,140 Q 50,160 70,160 Q 50,160 50,180 Q 50,200 70,200"/><circle cx="50" cy="130" r="8"/><circle cx="50" cy="150" r="8"/><circle cx="50" cy="170" r="8"/><circle cx="50" cy="190" r="8"/></g></svg>');
    background-repeat: repeat-y;
    opacity: 0.5;
}

.islamic-pattern-right {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 120px;
    height: 250px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"><g fill="none" stroke="white" stroke-width="1.5" opacity="0.18"><path d="M 30,20 Q 50,20 50,40 Q 50,60 30,60 Q 50,60 50,80 Q 50,100 30,100"/><path d="M 70,20 Q 50,20 50,40 Q 50,60 70,60 Q 50,60 50,80 Q 50,100 70,100"/><circle cx="50" cy="30" r="8"/><circle cx="50" cy="50" r="8"/><circle cx="50" cy="70" r="8"/><circle cx="50" cy="90" r="8"/><path d="M 30,120 Q 50,120 50,140 Q 50,160 30,160 Q 50,160 50,180 Q 50,200 30,200"/><path d="M 70,120 Q 50,120 50,140 Q 50,160 70,160 Q 50,160 50,180 Q 50,200 70,200"/><circle cx="50" cy="130" r="8"/><circle cx="50" cy="150" r="8"/><circle cx="50" cy="170" r="8"/><circle cx="50" cy="190" r="8"/></g></svg>');
    background-repeat: repeat-y;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== About Sheikh Section ===== */
.about-sheikh-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.about-sheikh-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 40px var(--shadow);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 35px;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-right: 5px solid var(--secondary-color);
}

.about-sheikh-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 10px 30px var(--shadow-hover);
    position: relative;
    z-index: 2;
}

.about-sheikh-content {
    position: relative;
    z-index: 2;
}

.about-sheikh-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.about-sheikh-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.about-sheikh-decorative {
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g transform="translate(100,100)" opacity="0.05"><circle r="90" fill="none" stroke="%232d5f3f" stroke-width="2"/><circle r="70" fill="none" stroke="%232d5f3f" stroke-width="2"/><circle r="50" fill="none" stroke="%232d5f3f" stroke-width="2"/><g id="p"><path d="M 0,-70 Q 20,-85 0,-100 Q -20,-85 0,-70 Z" fill="%232d5f3f"/></g><use href="%23p" transform="rotate(60)"/><use href="%23p" transform="rotate(120)"/><use href="%23p" transform="rotate(180)"/><use href="%23p" transform="rotate(240)"/><use href="%23p" transform="rotate(300)"/><circle r="20" fill="%232d5f3f"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 768px) {
    .about-sheikh-card {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 25px;
        text-align: center;
    }

    .about-sheikh-icon {
        width: 100px;
        height: 100px;
        font-size: 3rem;
        margin: 0 auto;
    }

    .about-sheikh-title {
        font-size: 1.5rem;
    }

    .about-sheikh-text {
        font-size: 1rem;
    }

    .about-sheikh-decorative {
        display: none;
    }
}

/* ===== Section Styles ===== */
.section {
    padding: 5px 0;
    position: relative;
    background: var(--bg-light);
}

.section::before {
    content: '';
    position: absolute;
    top: -30px;
    right: 30px;
    width: 120px;
    height: 120px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><g transform="translate(75,75)"><g id="star8"><path d="M 0,-40 L 8,-15 L 35,-15 L 12,-3 L 20,22 L 0,8 L -20,22 L -12,-3 L -35,-15 L -8,-15 Z" fill="%232d5f3f" opacity="0.06"/><circle r="35" fill="none" stroke="%232d5f3f" stroke-width="1.5" opacity="0.05"/><circle r="25" fill="none" stroke="%232d5f3f" stroke-width="1" opacity="0.05"/><circle r="15" fill="none" stroke="%232d5f3f" stroke-width="1" opacity="0.05"/><path d="M-20,-20 L-10,-10 M20,-20 L10,-10 M-20,20 L-10,10 M20,20 L10,10" stroke="%232d5f3f" stroke-width="1" opacity="0.05"/></g></g></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.7;
    pointer-events: none;
}

.section:nth-child(even)::before {
    right: auto;
    left: 30px;
    transform: rotate(45deg);
}

.section:nth-child(odd)::before {
    transform: rotate(-15deg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: var(--secondary-color);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
}

/* ===== News Grid ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
}

.news-card-content {
    padding: 20px;
}

.news-card-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.news-card-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Site News (Featured) ===== */
.site-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.featured-news-card {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px var(--shadow);
    padding: 18px;
    cursor: pointer;
}
.featured-news-card img {
    width: 220px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}
.featured-news-placeholder {
    width: 220px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 8px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.featured-news-content { flex: 1; }
.featured-news-title { font-size: 1.3rem; color: var(--text-dark); font-weight: 700; }
.featured-news-excerpt { color: var(--text-light); }
.featured-news-date { color: var(--secondary-color); font-size: 0.9rem; margin-bottom: 10px; }

/* ===== Videos Grid ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.video-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: var(--primary-dark);
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.video-card:hover .video-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--accent-color);
    color: var(--white);
}

.video-card-content {
    padding: 20px;
}

.video-card-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.video-card-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== Audio Grid ===== */
.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.audio-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
}

.audio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.audio-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.audio-card-content {
    flex: 1;
}

.audio-card-title {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 600;
}

.audio-card-duration {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== Articles & Fatwa Grid ===== */
.articles-grid,
.fatwa-grid,
.sheikh-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.article-card,
.fatwa-card,
.sheikh-news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    border-right: 4px solid var(--secondary-color);
    cursor: pointer;
}

.article-card:hover,
.fatwa-card:hover,
.sheikh-news-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
    border-right-color: var(--accent-color);
}

.article-card-header,
.fatwa-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.article-icon,
.fatwa-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.article-card-title,
.fatwa-card-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.article-card-excerpt,
.fatwa-card-question {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-card-date,
.fatwa-card-date {
    color: var(--secondary-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== Footer ===== */
.main-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 100" preserveAspectRatio="none"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,100 L0,100 Z" fill="%23f8fdf9"/></svg>') bottom center no-repeat;
    background-size: cover;
}

.main-footer::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/><circle cx="50" cy="50" r="35" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/><circle cx="50" cy="50" r="25" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/><circle cx="50" cy="50" r="15" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.3;
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a::before {
    content: '◀';
    font-size: 0.7rem;
}

.footer-section ul li a:hover {
    opacity: 1;
    transform: translateX(-5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.btn-footer {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-footer:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

/* ===== Scroll to Top Button ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.scroll-to-top.show {
    display: flex;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.skeleton-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.skeleton-text {
    padding: 20px;
}

.skeleton-text::before {
    content: '';
    display: block;
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-text::after {
    content: '';
    display: block;
    width: 60%;
    height: 15px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== Two-Column Layout (Content 75% Left + Sidebar 25% Right) ===== */
.page-wrapper {
    display: grid;
    grid-template-columns: 75% 25%;
    /* Content يسار 75%, Sidebar يمين 25% */
    gap: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    direction: ltr;
    /* LTR للتخطيط */
}

.main-content-area {
    min-width: 0;
    padding: 0 20px;
    /* هوامش صغيرة يمين ويسار */
    direction: rtl;
    /* RTL للمحتوى العربي */
    order: 1;
    /* Content يظهر أولاً (يسار) */
}

.site-sidebar {
    order: 2;
    /* Sidebar يظهر ثانياً (يمين) */
}

@media (max-width: 768px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        /* عمود واحد على الموبايل */
    }

    .main-content-area {
        padding: 0 10px;
        order: 1;
    }
}

/* ===== Sidebar Styles (25% Width, Green Background, No Margins) ===== */


/* Sidebar Navigation Menu */
.sidebar-navigation {
    background: rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.sidebar-nav-header i {
    font-size: 1.4rem;
    color: var(--accent-color);
}

.sidebar-nav-links {
    padding: 0;
    margin: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(255, 255, 255, 0.15);
    transition: width 0.3s ease;
}

.sidebar-nav-link:hover::before,
.sidebar-nav-link.active::before {
    width: 100%;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 30px;
    color: white;
}

.sidebar-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 700;
    color: white;
    border-right: 4px solid var(--accent-color);
}

.sidebar-nav-link i:first-child {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.sidebar-nav-link span {
    flex: 1;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.sidebar-nav-link .nav-arrow {
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.sidebar-nav-link:hover .nav-arrow,
.sidebar-nav-link.active .nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar Content Blocks */
.sidebar-block {
    background: rgba(255, 255, 255, 0.08);
    margin: 15px 10px;
    padding: 15px;
    border-radius: 10px;
    border-right: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.sidebar-block:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-3px);
}

.sidebar-block-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-block-title i {
    font-size: 1rem;
    color: var(--accent-color);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-link {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    padding-right: 8px;
}

.sidebar-item-title {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
}

.sidebar-link:hover .sidebar-item-title {
    color: white;
}

.sidebar-item-date {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-item-date i {
    font-size: 0.65rem;
    margin-left: 3px;
}

.sidebar-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--accent-color);
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.sidebar-view-all:hover {
    background: white;
    transform: translateX(-3px);
}

.sidebar-loading,
.sidebar-error {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px 10px;
    color: white;
}

.sidebar-loading .loading-spinner {
    width: 35px;
    height: 35px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.sidebar-error i {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.sidebar-no-data {
    text-align: center;
    padding: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ===== News Ticker (يظهر في جميع الشاشات) ===== */
.horizontal-navbar {
    background: linear-gradient(135deg, #2c5f2d 0%, #1e4620 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: -webkit-sticky;
    /* Safari support */
    position: sticky;
    top: 0;
    /*  <-- سيلتصق بأعلى نقطة في الشاشة */
    left: 0;
    width: 100%;
    z-index: 1100;
    /*  <-- طبقة علوية جداً ليكون فوق كل شيء */
    transition: box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
    /* Performance optimization */
    backface-visibility: hidden;
    /* Prevent flickering */
    -webkit-backface-visibility: hidden;
}

/* Enhanced shadow when scrolled */
.horizontal-navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #1e4620 0%, #0f2310 100%);
}

/* Ensure navbar stays above all content */
.horizontal-navbar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: transparent;
    z-index: -1;
}


/* ===== News Ticker (Below Navbar) - **تم التعديل هنا** ===== */
.mobile-news-ticker {
    display: block;
    background: #1a3a1a;
    color: white;
    padding: 10px 0;
    overflow: hidden;
    border-bottom: 2px solid #D4AF37;
    position: -webkit-sticky;
    /* <-- إضافة خاصية الالتصاق */
    position: sticky;
    /* <-- إضافة خاصية الالتصاق */
    top: 70px;
    /* <-- يلتصق على بعد 70 بكسل من الأعلى (أسفل القائمة الرئيسية) */
    z-index: 1099;
    /* <-- طبقته أقل بقليل من القائمة العلوية ليبقى أسفلها */
}

@media (max-width: 768px) {
    .mobile-news-ticker {
        top: 60px;
        /* <-- تعديل المسافة لتناسب ارتفاع القائمة في الموبايل */
    }
}

.ticker-label {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: #1a3a1a; /* لون صلب لمنع الشفافية */
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 2;
    border-left: 3px solid #D4AF37;
}

.ticker-label i {
    color: #D4AF37;
    font-size: 1.1rem;
}

.ticker-content {
    display: flex;
    gap: 40px; /* space between items */
    animation: ticker-scroll 20s linear infinite; /* تم تقليل الوقت لزيادة السرعة أكثر */
    padding-right: 0; /* start from right edge */
    will-change: transform; /* optimize animation performance */
}

.ticker-item {
    white-space: nowrap;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

/* Style ticker item links */
.ticker-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

/* Truncate long titles */
.ticker-item span {
    max-width: 50ch; /* limit width of text */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticker-item i {
    color: #D4AF37;
    font-size: 0.7rem;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .ticker-label {
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .ticker-content {
        padding-right: 0;
        gap: 25px; /* slightly smaller gap on mobile */
        animation: ticker-scroll 15s linear infinite; /* تم تقليل الوقت لزيادة السرعة أكثر */
    }

    .ticker-item {
        font-size: 0.82rem;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 1100px) {
    .page-wrapper {
        grid-template-columns: 70% 30%;
        /* Content 70% يسار, Sidebar 30% يمين */
    }

    .navbar-links {
        gap: 3px;
    }

    .navbar-link {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    /* إخفاء Sidebar وإظهار Mobile Navbar */
    .site-sidebar {
        display: none !important;
    }

    .mobile-navbar {
        display: block !important;
    }

    .page-wrapper {
        grid-template-columns: 1fr;
        /* عمود واحد */
    }

    .main-content-area {
        padding: 0 10px;
    }

    .slider-content {
        padding: 0 60px;
    }

    .slider-title {
        font-size: 2rem;
    }

    .slider-description {
        font-size: 1.1rem;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        overflow-x: visible;
    }

    .main-nav a {
        padding: 15px 20px;
        border-radius: 0;
        justify-content: flex-start;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {

    /* Hide main navigation on mobile */
    .main-nav {
        display: none !important;
    }

    /* Single column layout on mobile */
    .page-wrapper {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    /* Hide sidebar on mobile */
    .site-sidebar {
        display: none;
    }

    .news-slider-section {
        height: 400px;
    }

    .slider-content {
        padding: 0 20px;
    }

    .slider-title {
        font-size: 1.5rem;
    }

    .slider-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .slider-btn-prev {
        right: 10px;
    }

    .slider-btn-next {
        left: 10px;
    }

    .content-card {
        padding: 25px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        box-shadow: 0 5px 20px var(--shadow);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        overflow-x: visible;
    }

    .main-nav a {
        padding: 15px 20px;
        border-radius: 0;
        justify-content: flex-start;
        font-size: 1rem;
    }

    .logo h1 {
        font-size: 1.1rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-section {
        padding: 60px 0;
    }

    .hero-section::after,
    .islamic-pattern-left,
    .islamic-pattern-right {
        display: none;
    }

    .section {
        padding: 40px 0;
    }

    .news-grid,
    .videos-grid,
    .articles-grid,
    .fatwa-grid,
    .sheikh-news-grid {
        grid-template-columns: 1fr;
    }

    .audio-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .view-all {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .scroll-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .news-slider-section {
        height: 250px;
    }

    .slider-title {
        font-size: 1.2rem;
    }

    .slider-description {
        font-size: 0.9rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-clamp: 3;
    }

    .slider-category {
        font-size: 0.8rem;
        padding: 4px 15px;
    }

    .slider-dots {
        bottom: 15px;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
    }

    .slider-dot.active {
        width: 25px;
    }

    .content-card {
        padding: 20px;
    }

    .container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 50px 0;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 25px;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .logo h1 {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .section-title i {
        font-size: 1rem;
    }

    .news-card-title,
    .video-card-title,
    .article-card-title,
    .fatwa-card-title {
        font-size: 1rem;
    }
}

/* ===== Mobile Navbar Components ===== */
.mobile-nav-container {
    width: 100%;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.mobile-logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.mobile-logo span {
    font-size: 1rem;
    font-weight: 700;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

.mobile-nav-menu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    padding-right: 30px;
}

.mobile-nav-item.active {
    border-right: 4px solid var(--accent-color);
    font-weight: 700;
}

.mobile-nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.mobile-nav-item span {
    font-size: 0.95rem;
}
/* ===== Sticky Header Override (header-scrolled) ===== */

/* Ensure the header wrapper is above other content */
#site-header {
    position: relative;
    z-index: 1200;
}

/* Keep banner in normal flow by default (override earlier fixed rule) */
.site-banner {
    position: relative !important;
    width: 100%;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

/* Hide banner when header is scrolled */
.header-scrolled .site-banner {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* sticky wrapper that contains navbar + ticker */
.sticky-nav-wrapper {
    position: relative;
}

/* When header-scrolled is active, make sticky wrapper fixed at top */
.header-scrolled .sticky-nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1201;
    animation: slideDown 0.35s ease-out;
}

/* Ensure navbar and ticker use normal flow until header-scrolled is added */
.horizontal-navbar,
.mobile-news-ticker {
    position: relative !important;
    top: auto !important;
}

/* Prevent content jump: add top padding to page-wrapper only when header is scrolled */
/* Estimate: navbar 70px + ticker ~42px = 112px */
.header-scrolled + .page-wrapper {
    padding-top: 112px;
}

@media (max-width: 768px) {
    /* mobile estimates: navbar 60px + ticker 40px = 100px */
    .header-scrolled + .page-wrapper {
        padding-top: 100px;
    }
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0.9; }
    to { transform: translateY(0); opacity: 1; }
}

/* ===== ??????? ????? ??????? ???????? ===== */

/* 1. ????? ???? ?????? (??? "?????? ???????") */
.page-header {
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.1), rgba(74, 157, 107, 0.05));
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid rgba(45, 95, 63, 0.1);
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 2. ????? ???? ??????? ????? ???? (sticky) */
.sticky-filters {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: -webkit-sticky;
    position: sticky;
    /* ????? ???? ??????? ??????? ????? ??????? */
    top: 112px;
    z-index: 999;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px; /* ?????? ????? ???? ???? ??????? ???? ???? */
}

/* 3. ????? ????? ??????? ???????? */
.sidebar-content {
    padding: 20px; /* ????? padding ??????? ??????? ???? ?? ??????? */
}

/* 4. ??????? ??????? ??????? */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 20px;
        margin-top: 10px;
    }
    
    .page-title {
        font-size: 2rem;
    }

    .sticky-filters {
        /* ????? ??????? ??????? ?????? ???????? */
        top: 100px;
    }

    .search-filters-grid {
        grid-template-columns: 1fr !important; /* ???? ???? ?? ???????? */
    }
}

/* ===== Skeleton Loading Animation ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
