/*
 * ورقة التنسيق الرئيسية - نيريو للأعمال (RTL)
 * تصميم مخصص مطابق للديمو الأصلي 100% ومتوافق بالكامل مع الهواتف الذكية والأجهزة اللوحية
 */

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

:root {
    /* ألوان الهوية البصرية لبوابة طنجة الأخبار (الأزرق الداكن والذهبي) */
    --primary: hsl(43, 100%, 47%); /* الذهبي الغني #eaaa00 */
    --primary-hover: hsl(43, 100%, 40%);
    --accent: hsl(213, 100%, 17%); /* الأزرق الداكن #002855 */
    --bg-base: hsl(0, 0%, 97%);
    --bg-card: hsl(0, 0%, 100%);
    --bg-header: hsl(0, 0%, 100%);
    --text-main: hsl(222, 20%, 12%);
    --text-muted: hsl(222, 10%, 45%);
    --border-color: hsl(210, 15%, 92%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* الوضع الداكن (Dark Mode) المخصص للبوابة */
body.dark-mode {
    --bg-base: hsl(222, 25%, 9%);
    --bg-card: hsl(222, 20%, 14%);
    --bg-header: hsl(222, 20%, 14%);
    --text-main: hsl(210, 15%, 85%);
    --text-muted: hsl(210, 10%, 60%);
    --border-color: hsl(222, 15%, 22%);
}

/* فلتر لتوضيح شعار الخط العربي الأزرق الداكن في الوضع المظلم */
body.dark-mode .logo img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
}

/* تهيئة وتصفير ومنع التمدد الأفقي تماماً */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden; /* يمنع ظهور شريط التمرير الأفقي والبيضاء الجانبية */
}

body {
    font-family: 'Cairo', 'Inter Tight', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    transition: var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
 * 1. شريط التنبيهات العلوي المطابق للنموذج (Top Bar)
 * ========================================== */
.top-bar {
    background-color: #1b1c20;
    color: #ffffff;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 0;
    font-weight: 500;
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* الجهة اليسرى: السوشيال والتاريخ */
.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-links a {
    opacity: 0.7;
    font-size: 0.85rem;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
    color: #007bff;
    transform: translateY(-1px);
}

.divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    margin: 0 2px;
}

/* ويدجت التاريخ - الزر الأزرق للديمو */
.date-badge {
    background-color: #007bff;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.calendar-icon {
    font-size: 0.9rem;
}

/* الجهة اليمنى: الطقس والتيكر */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.weather-temp-val {
    font-weight: 700;
}

.weather-loc {
    opacity: 0.8;
    margin-right: 4px;
}

/* شريط التيكر الديمو المدمج */
.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticker-content-container {
    overflow: hidden;
    height: 24px;
    position: relative;
    width: 280px;
    text-align: left;
}

.ticker-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.ticker-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.ticker-slide a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* الزر الأحمر المميز LIVE NEWS */
.ticker-label {
    background-color: var(--primary);
    color: #ffffff;
    padding: 3px 12px;
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blinking-dot {
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* ==========================================
 * 2. الرأس الرئيسي (Header) والإعلان الكبير بجانبه
 * ========================================== */
header.main-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* الجهة اليمنى: اللوجو الجذاب الجانبي */
.header-logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.logo-bold {
    color: #0d47a1;
}

body.dark-mode .logo-bold {
    color: #90caf9;
}

.logo-sub {
    color: var(--text-main);
    font-weight: 400;
    margin-right: 5px;
}

.logo-chart-icon {
    color: var(--primary);
    font-size: 1.5rem;
    margin-right: 8px;
}

/* زر الهامبرغر */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    padding: 4px;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger-btn:hover span {
    background-color: var(--primary);
}

/* الجهة اليسرى: بنر الإعلانات 728x90 الفاخر */
.header-promo-zone {
    flex: 1;
    max-width: 728px;
    margin-left: 20px;
}

/* تصميم البنر الاعلاني الافتراضي الترويجي للديمو */
.demo-promo-banner {
    background: linear-gradient(90deg, #091730 0%, #1c355e 100%);
    border-radius: var(--radius-sm);
    padding: 22px 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.demo-promo-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.demo-promo-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-family: 'Inter Tight', sans-serif;
}

.promo-sale-badge {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.promo-main-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    flex: 1;
    text-align: center;
    padding: 0 15px;
}

.promo-buy-btn {
    background-color: #ff6f00;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.4);
    transition: var(--transition);
}

.promo-buy-btn:hover {
    background-color: #e65100;
    transform: scale(1.05);
}

/* ==========================================
 * 3. شريط تصنيفات الأخبار المزدوج التخطيط (Nav Bar)
 * ========================================== */
.category-nav-bar {
    background-color: var(--accent);
    color: #ffffff;
    border-bottom: 4px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.category-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
}

/* القائمة اليسرى: التصنيفات العربية مع فواصل */
.category-nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-nav-left a {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    padding: 4px 8px;
    white-space: nowrap;
}

.category-nav-left a:hover, .category-nav-left a.active {
    color: var(--primary);
}

.menu-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
}

/* القائمة اليمنى: الأقسام الإنجليزية مع أزرار البحث والمود */
.category-nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.category-nav-right a {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.category-nav-right a:hover, .category-nav-right a.active {
    color: #007bff;
}

/* أزرار الأيقونات التفاعلية */
.nav-icon-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    color: var(--primary);
    transform: scale(1.15);
}

/* ==========================================
 * 4. تخطيط شبكة البطولة الـ 3 أعمدة (Hero Grid)
 * ========================================== */
.hero-section {
    max-width: 1200px;
    margin: 30px auto 40px;
    padding: 0 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 3.2fr 5.6fr 3.2fr;
    gap: 20px;
    align-items: stretch;
}

/* الأعمدة الجانبية (Left / Right Column Lists) */
.hero-list-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
}

.hero-list-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: var(--transition);
}

.hero-list-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* النصوص باليسار (ضمن RTL) */
.hero-list-item-text {
    flex: 1;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
}

.hero-list-item-cat {
    color: #ff9100;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hero-list-item-cat::before {
    content: '•';
    color: #ff9100;
}

.hero-list-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-list-item-title a:hover {
    color: var(--primary);
}

.hero-list-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* الصورة المصغرة اليمين الدائرية الزوايا */
.hero-list-item-img {
    width: 85px;
    height: 85px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.hero-list-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.hero-list-item:hover .hero-list-item-img img {
    transform: scale(1.05);
}

/* العمود الأوسط: السلايدر الرئيسي الكبير للخبر المميز */
.hero-slider-column {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-height: 480px;
    border: 1px solid var(--border-color);
}

.hero-slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* قناع التظليل الأسود المتدرج الفاخر */
.hero-slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 40%, rgba(15, 23, 42, 0) 100%);
    z-index: 2;
}

/* محتوى السلايدر المتداخل */
.hero-slider-content {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 40px 30px;
    z-index: 3;
    color: #ffffff;
}

.slider-cat-badge {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 12px;
}

.slider-title {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider-title a:hover {
    color: #ff9100;
}

.slider-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* أزرار السلايدر الجانبية للتنقل */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 4;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider-arrow:hover {
    background-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.arrow-right {
    right: 20px;
}

.arrow-left {
    left: 20px;
}

/* ==========================================
 * 5. بقية أجزاء التصميم وتنسيقات ويدجت
 * ========================================== */
.home-layout {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 30px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.post-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.post-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-img img {
    transform: scale(1.04);
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary);
    color: #fff;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
}

.post-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.45;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* شريط التمرير الجانبي */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background-color: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.popular-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.3;
    width: 35px;
    text-align: center;
}

.popular-item:hover .popular-num {
    opacity: 1;
    transform: scale(1.1);
}

.popular-details {
    flex: 1;
}

.popular-post-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

.popular-post-title a:hover {
    color: var(--primary);
}

/* ==========================================
 * 6. التصميم المتجاوب للهواتف والأجهزة اللوحية
 * ========================================== */

@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-list-column {
        order: 2; /* وضع القوائم الجانبية بالأسفل */
        gap: 15px;
    }
    .hero-slider-column {
        order: 1; /* إبقاء السلايدر الكبير بالأعلى */
        min-height: 380px;
    }
    .home-layout {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* شريط التنبيهات العلوي بالهواتف */
    .top-bar-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .top-bar-left, .top-bar-right {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 8px;
    }
    
    .ticker-content-container {
        width: 200px; /* تصغير عرض شريط الأخبار */
    }

    /* الهيدر الرئيسي بالهواتف */
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px 20px;
    }
    
    .header-promo-zone {
        display: block;
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
    
    .header-logo-section {
        width: 100%;
        justify-content: space-between;
    }
    
    /* شريط تصنيفات الأخبار بالهواتف */
    .category-nav-container {
        flex-direction: column;
        height: auto;
        padding: 5px 15px;
    }
    
    /* جعل التصنيفات العربية قابلة للتمرير الأفقي اللطيف بالأصابع (Swipe Bar) */
    .category-nav-left {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        gap: 15px;
        /* إخفاء شريط التمرير الافتراضي للمظهر */
        scrollbar-width: none;
    }
    
    .category-nav-left::-webkit-scrollbar {
        display: none;
    }
    
    .category-nav-left .menu-divider {
        display: none; /* إخفاء الفواصل بالشاشة الصغيرة للتمرير الأنيق */
    }
    
    /* ترتيب الجزء الإنجليزي والأزرار */
    .category-nav-right {
        width: 100%;
        justify-content: center;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        flex-wrap: wrap;
        gap: 15px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
 * 7. تذييل الصفحة (Footer)
 * ========================================== */
/* ==========================================
 * 7. تذييل الصفحة (Footer)
 * ========================================== */
footer.main-footer {
    background-color: var(--accent); /* الأزرق الداكن المطابق للرأس */
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 50px;
    border-top: 4px solid var(--primary); /* خط ذهبي أعلى الفوتر */
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

body.dark-mode footer.main-footer {
    background-color: var(--bg-card); /* في الوضع المظلم يتناسق كخلفية كروت داكنة */
    border-top: 4px solid var(--primary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2.2fr 1.5fr 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 35px;
}

.footer-col h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--primary); /* عناوين الفوتر بالذهبي */
    position: relative;
    padding-bottom: 8px;
}

.footer-info .footer-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    max-width: 450px;
}

.footer-info .footer-email {
    font-size: 0.88rem;
    color: #ffffff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-info .footer-email i {
    color: var(--primary);
}

/* الأيقونات الاجتماعية بشكل مربعات بإطار خفيف */
.footer-social-tiles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.footer-social-tiles a {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.03);
}

.footer-social-tiles a:hover {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-x-icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    transition: all 0.25s ease;
}

.footer-social-tiles a:hover .footer-x-icon {
    filter: brightness(0) invert(0); /* تصبح سوداء/داكنة عند حوم الماوس فوق الخلفية الذهبية */
}

/* روابط الموقع وتواصل معنا بشكل عمودين فرعيين */
.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.links-subcol {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.links-subcol a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
    position: relative;
    padding-right: 12px;
}

.links-subcol a::before {
    content: '‹';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.links-subcol a:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

/* غلاف النسخة الورقية */
.footer-magazine-wrapper {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-magazine-wrapper:hover {
    transform: scale(1.03) rotate(-1deg);
}

.footer-magazine-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* حقوق النشر السفلية */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom strong {
    color: #ffffff;
}

.footer-bottom a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-bottom a:hover {
    opacity: 0.85;
}

/* التجاوب للموبايل */
@media (max-width: 991px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    footer.main-footer {
        text-align: center;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .footer-info .footer-desc {
        margin: 0 auto 20px;
    }
    .footer-info .footer-email {
        justify-content: center;
    }
    .footer-social-tiles {
        justify-content: center;
    }
    .footer-links-grid {
        max-width: 300px;
        margin: 0 auto;
    }
    .links-subcol {
        text-align: right;
    }
    .footer-magazine-wrapper {
        max-width: 160px;
        margin: 0 auto;
    }
    .footer-bottom {
        flex-direction: column-reverse;
        text-align: center;
        gap: 10px;
    }
}

/* ==========================================
 * 8. Sahifa Theme Structure & Layout Enhancements
 * ========================================== */

/* Breaking News Bar (شريط عاجل) */
.breaking-news-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
body.dark-mode .breaking-news-bar {
    background-color: var(--bg-card);
}
.breaking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.breaking-title {
    background-color: #dc3545; /* الأحمر الفاقع لـ عاجل */
    color: #ffffff;
    padding: 4px 15px;
    font-weight: 800;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.breaking-dot-blink {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    animation: blink 1.2s infinite;
}
.breaking-ticker {
    flex: 1;
    overflow: hidden;
    height: 24px;
    position: relative;
}
.breaking-ticker-list {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.breaking-news-item {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    height: 24px;
    transition: var(--transition);
}
.breaking-news-item a:hover {
    color: var(--primary);
}

/* Sahifa Premium Hero Layout */
.hero-grid-sahifa {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}
@media (max-width: 991px) {
    .hero-grid-sahifa {
        grid-template-columns: 1fr;
    }
}
.hero-slider-box {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 460px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.hero-slider-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-slider-box-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 40, 85, 0.95) 0%, rgba(0, 40, 85, 0.6) 50%, rgba(0, 40, 85, 0) 100%);
    z-index: 2;
}
.hero-slider-box-content {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 30px;
    z-index: 3;
    color: #ffffff;
}
.hero-slider-box-cat {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 10px;
}
.hero-slider-box-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 12px;
}
.hero-slider-box-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Sidebar Recent vertical column next to slider */
.hero-recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 460px;
    justify-content: space-between;
}
@media (max-width: 991px) {
    .hero-recent-list {
        height: auto;
    }
}
.hero-recent-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: var(--transition);
    height: 23%;
}
@media (max-width: 991px) {
    .hero-recent-item {
        height: auto;
    }
}
.hero-recent-item:hover {
    transform: translateX(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.hero-recent-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.hero-recent-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-recent-item-details {
    flex: 1;
}
.hero-recent-item-cat {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 4px;
    display: block;
}
.hero-recent-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Blocks on Homepage */
.category-block {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}
.category-block-header {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-block-title {
    background-color: var(--accent);
    color: #ffffff;
    padding: 7px 18px;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: -2px;
    position: relative;
}
body.dark-mode .category-block-title {
    background-color: #1c355e;
}
.category-block-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}
.category-block-more-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}
.category-block-more-link:hover {
    text-decoration: underline;
}

/* Block Type 1: Split layout */
.block-split-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .block-split-container {
        grid-template-columns: 1fr;
    }
}
.block-split-featured {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}
@media (max-width: 768px) {
    .block-split-featured {
        border-left: none;
        padding-left: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 20px;
    }
}
.block-split-featured-img {
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/10;
    margin-bottom: 15px;
}
.block-split-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.block-split-featured-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}
.block-split-featured-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.block-split-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
}
.block-split-list-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
.block-split-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.block-split-list-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.block-split-list-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.block-split-list-item-details {
    flex: 1;
}
.block-split-list-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
}

/* Moroccan Sidebar Widgets */
.widget-social-follow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.social-follow-card {
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.social-follow-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.social-follow-card.facebook { background-color: #3b5998; }
.social-follow-card.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-follow-card.youtube { background-color: #cd201f; }
.social-follow-card.whatsapp { background-color: #25D366; }

.social-follow-icon {
    font-size: 1.3rem;
}
.social-follow-count {
    font-size: 0.88rem;
    font-weight: 800;
}
.social-follow-label {
    font-size: 0.68rem;
    opacity: 0.85;
}

/* Tabbed Widget */
.widget-tabs {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-card);
}
.tab-headers {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background-color: rgba(0,0,0,0.02);
}
body.dark-mode .tab-headers {
    background-color: rgba(255,255,255,0.02);
}
.tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    text-align: center;
}
.tab-btn.active {
    color: #ffffff;
    background-color: var(--accent);
}
body.dark-mode .tab-btn.active {
    background-color: #1c355e;
}
.tab-panels {
    padding: 20px;
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* Moroccan Prayer Times Widget */
.widget-prayer-times {
    background: linear-gradient(135deg, var(--accent) 0%, #0d223f 100%);
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.prayer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.prayer-title {
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prayer-loc-tag {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}
.prayer-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.prayer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background-color: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
}
.prayer-row.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* Redesigning font structures & Cairo compatibility */
.logo a, .slider-title, .post-card-title, .hero-list-item-title, .breaking-title, .widget-title, .category-block-title {
    font-family: 'Cairo', sans-serif;
}

/* Custom Inline Search Box in Navigation Bar */
.nav-search-box input:focus {
    width: 190px !important;
    background-color: #ffffff !important;
    color: #002855 !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(255, 145, 0, 0.4);
}
body.dark-mode .nav-search-box input:focus {
    background-color: var(--bg-card) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

/* ==========================================
 * 9. أزرار التواصل الاجتماعي الدائرية (Header & Footer Social Buttons)
 * ========================================== */
.footer-social-btn, .top-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-size: 0.92rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-social-btn:hover, .top-social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
}

/* ألوان الهوية الحركية عند التحويم لكل شبكة بالترتيب الدقيق */
.footer-social-btn.email:hover, .top-social-btn.email:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.footer-social-btn.whatsapp:hover, .top-social-btn.whatsapp:hover {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
}

.footer-social-btn.instagram:hover, .top-social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    border-color: transparent !important;
}

.footer-social-btn.facebook:hover, .top-social-btn.facebook:hover {
    background-color: #3b5998 !important;
    border-color: #3b5998 !important;
}

.footer-social-btn.twitter:hover, .top-social-btn.twitter:hover {
    background-color: #000000 !important;
    border-color: #ffffff !important;
}

.footer-social-btn.youtube:hover, .top-social-btn.youtube:hover {
    background-color: #cd201f !important;
    border-color: #cd201f !important;
}

.footer-social-btn.rss:hover, .top-social-btn.rss:hover {
    background-color: #ff9100 !important;
    border-color: #ff9100 !important;
}

/* ==========================================
 * 10. زر العودة إلى الأعلى التفاعلي الدائري بالتقدم (Scroll Progress Back to Top Button)
 * ========================================== */
.progress-wrap {
    position: fixed;
    right: 30px; /* تم وضعه على اليمين بناء على طلبك */
    bottom: 30px;
    height: 46px;
    width: 46px;
    cursor: pointer;
    display: block;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(0, 40, 85, 0.12); /* حدود داخلية بلون الهوية الأزرق */
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.7); /* يبدأ بحجم أصغر ويتسع مع النزول */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--bg-card); /* خلفية تتكيف مع المظهر الفاتح/المظلم */
}

.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1); /* يكبر الحجم الطبيعي عند النزول */
}

/* الأيقونة المركزية للسهم */
.progress-wrap::after {
    position: absolute;
    font-family: 'FontAwesome';
    content: '\f077'; /* رمز السهم chevron-up */
    left: 0;
    top: 0;
    height: 46px;
    width: 46px;
    text-align: center;
    line-height: 46px;
    font-size: 0.95rem;
    color: var(--accent); /* لون الهوية الأزرق */
    transition: all 0.2s ease-in-out;
    z-index: 1;
}

body.dark-mode .progress-wrap::after {
    color: #ffffff;
}

.progress-wrap:hover::after {
    color: var(--primary); /* يتحول للذهبي البراق عند التحويم */
    transform: translateY(-2px);
}

/* رسم خط التقدم الدائري المتفاعل مع التمرير */
.progress-wrap svg.progress-circle path {
    fill: none;
    stroke: var(--primary); /* لون خط التقدم بالذهبي الفاخر للهوية */
    stroke-width: 4;
    box-sizing: border-box;
    transition: all 10ms linear;
}

/* ==========================================
 * 11. شريط التنقل اللاصق الديناميكي (Dynamic Sticky Navigation Bar)
 * ========================================== */
.category-nav-bar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0, 40, 85, 0.18);
    border-bottom: 4px solid var(--primary);
    animation: slideDownSticky 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDownSticky {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ==========================================
 * 12. تنسيقات إضافية للبلوكات الجديدة والسايدبار الأيسر (Home Layout Grid & Sidebars)
 * ========================================== */
.home-block-grid-3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 35px;
    align-items: stretch;
}
.home-block-grid-3cols .col-span-2 {
    grid-column: span 2;
}

@media (max-width: 991px) {
    .home-block-grid-3cols {
        grid-template-columns: 1fr;
    }
    .home-block-grid-3cols .col-span-2 {
        grid-column: span 1;
    }
    .regions-row-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .tech-grid-3x2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .regions-row-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .regions-row-container {
        grid-template-columns: 1fr !important;
    }
    .tech-grid-3x2 {
        grid-template-columns: 1fr !important;
    }
}

/* تأثيرات تحويم الكروت والـ Badges للجهات */
.region-card-badge:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #ff9100 !important;
}
.region-card-badge:hover img {
    transform: scale(1.06);
}

/* عالم الأسرة تأثير التحويم والمؤشر */
.block-split-featured-img:hover img, .block-split-list-item-img:hover img {
    transform: scale(1.05);
    transition: var(--transition);
}

/* ==========================================
 * 13. تخصيص الهيدر وعرض حاويات الموقع بالكامل إلى 1260 بكسل بدقة
 * ========================================== */
.top-bar-container, 
header.main-header .header-container, 
.category-nav-container, 
.breaking-container, 
.main-content, 
.footer-container, 
.footer-bottom {
    max-width: 1260px !important;
}

/* 1. تخصيص شريط التنبيهات والشبكات العلوي */
.top-bar {
    background-color: #012758 !important;
    padding: 8px 0;
}
.top-date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.82rem;
}
.top-date-badge .calendar-icon {
    font-size: 1rem;
    color: #ffffff;
    opacity: 0.95;
}

/* تصميم أيقونات السوشيال ميديا المربعةcontouré والشفافة */
.top-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px !important;
    background-color: transparent !important;
    color: #ffffff !important;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-social-btn:hover {
    background-color: #ffffff !important;
    color: #012758 !important;
    border-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* 2. تخصيص الهيدر ومساحة الشعار */
header.main-header {
    padding: 4px 0 !important;
    background-color: #ffffff;
    transition: var(--transition);
}
body.dark-mode header.main-header {
    background-color: var(--bg-card) !important;
}
.logo img {
    max-height: 145px !important; /* تكبير الشعار بناء على طلب المستخدم */
    width: auto;
    display: block;
    transition: var(--transition);
}
body.dark-mode .logo-light {
    display: none !important;
}
body.dark-mode .logo-dark {
    display: block !important;
}

/* بنر إعلاني مخصص مضغوط */
.header-promo-placeholder {
    background: linear-gradient(135deg, var(--accent) 0%, #0c203b 100%);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: #ffffff;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
}
.header-promo-badge {
    background-color: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 700;
    margin-left: 8px;
}
.header-promo-text {
    font-weight: 700;
    font-size: 0.88rem;
}

/* 3. شريط التنقل الرئيسي وrubrics نشطة */
.category-nav-bar {
    background-color: #002855;
    border-bottom: 4px solid var(--primary);
}
.category-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 52px;
}
.category-nav-right-aligned {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-item-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    padding: 14px 12px;
    display: inline-block;
    position: relative;
    font-family: 'Cairo', sans-serif;
}
.nav-item-link:hover, .nav-item-link.active {
    color: #eaaa00 !important;
}
.nav-item-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    background-color: #eaaa00;
}

/* أزرار التحكم باليسار المجمعة */
.category-nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* زر الأدمن */
.nav-admin-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.nav-admin-btn:hover {
    color: #eaaa00;
    transform: scale(1.1);
}

/* زر إنتروبتور تغيير المظهر */
.mode-toggle-switch {
    position: relative;
    width: 52px;
    height: 25px;
    border-radius: 13px;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    outline: none;
    transition: all 0.3s ease;
}
.toggle-knob {
    position: absolute;
    top: 2.5px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    left: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
}
body.dark-mode .toggle-icon {
    left: auto;
    right: 8px;
    color: #eaaa00 !important;
}
body.dark-mode .toggle-knob {
    right: calc(100% - 21px);
}
body.dark-mode .mode-toggle-switch {
    background-color: rgba(234, 170, 0, 0.2);
    border-color: #eaaa00;
}

/* بوكس البحث الفاخر pilule */
.nav-search-input {
    width: 125px;
    height: 28px;
    padding: 4px 10px 4px 30px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.2);
    background-color: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 0.8rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    text-align: right;
}
.nav-search-submit {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.nav-search-submit:hover {
    color: #eaaa00;
}
.nav-search-input:focus {
    width: 165px;
    background-color: #ffffff;
    color: #012758;
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(234, 170, 0, 0.35);
}
body.dark-mode .nav-search-input:focus {
    background-color: var(--bg-card);
    color: #ffffff;
}

/* 4. شريط عاجل المنسق */
.breaking-news-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    margin-bottom: 25px;
}
body.dark-mode .breaking-news-bar {
    background-color: var(--bg-card);
}
.breaking-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.breaking-title {
    background-color: #eaaa00 !important;
    color: #012758 !important;
    padding: 5px 15px;
    font-weight: 800;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.breaking-dot-blink {
    width: 8px;
    height: 8px;
    background-color: #012758;
    border-radius: 50%;
    animation: blink 1.2s infinite;
}

/* ==========================================
 * 14. التجاوب الكامل للهواتف الذكية والأجهزة اللوحية (Mobile / Tablet Responsive Optimization)
 * ========================================== */
@media (max-width: 991px) {
    /* تجاوب الهيدر */
    header.main-header {
        padding: 12px 0 !important;
    }
    header.main-header .header-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .header-logo-section {
        justify-content: center;
        width: 100%;
    }
    .logo img {
        max-height: 110px !important; /* تكبير الشعار بالهاتف للتناسق */
    }
    .header-promo-zone {
        display: block !important; /* إظهار الإعلانات وتعديل الحجم للهواتف */
        width: 100%;
        margin-left: 0 !important;
        margin-top: 15px !important;
        text-align: center;
    }
    .header-promo-zone .promo-wrapper {
        margin: 10px 0 !important;
    }

    /* تجاوب شريط التصنيفات والبحث والمظهر */
    .category-nav-container {
        flex-direction: column !important;
        height: auto !important;
        padding: 8px 15px !important;
        gap: 10px;
    }
    
    /* تفعيل شريط التمرير السريع السلس للأصابع (Swipe Nav Rubrics Bar) بدون فواصل وبدون التفاف */
    .category-nav-right-aligned {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 15px !important;
        padding: 5px 0 10px 0 !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* إخفاء شريط التمرير على Firefox */
    }
    .category-nav-right-aligned::-webkit-scrollbar {
        display: none !important; /* إخفاء شريط التمرير على Chrome/Safari */
    }
    .nav-item-link {
        padding: 6px 4px !important;
        font-size: 0.88rem !important;
        flex-shrink: 0 !important;
    }

    /* صف أدوات التحكم باليسار */
    .category-nav-controls {
        width: 100% !important;
        justify-content: space-between !important;
        padding-top: 8px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        gap: 10px !important;
    }
    .nav-search-box {
        flex: 1 !important;
    }
    .nav-search-input {
        width: 100% !important; /* search input expands to fill space */
    }
    .nav-search-input:focus {
        width: 100% !important;
    }

    /* تجاوب شريط الأخبار الحصرية التيكر */
    .breaking-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 6px 15px !important;
    }
    .breaking-title {
        align-self: flex-start !important;
        padding: 4px 10px !important;
        font-size: 0.76rem !important;
    }
    .breaking-ticker {
        width: 100% !important;
        height: auto !important;
    }
    .breaking-news-item {
        font-size: 0.8rem !important;
        white-space: normal !important; /* allow multi-line scrolling if needed, or keep nowrap with marquee */
        height: auto !important;
        line-height: 1.4 !important;
    }
}

/* تنسيق أيقونة إكس الجديدة لتلائم حجم شبكات التواصل الاجتماعي */
.x-social-icon {
    height: 14px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}
.footer-social-btn .x-social-icon {
    height: 16px;
}

/* ==========================================
 * 15. Homepage Phase 2 Blocks, Slider & Tabs
 * ========================================== */

/* Main Hero Grid Layout */
.hero-grid-sahifa {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

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

/* Stacking and transition for my-slide */
.my-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.my-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}
.my-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: scale(1.03);
    transition: transform 6s cubic-bezier(0.1, 1, 0.1, 1);
}
.my-slide.active img {
    transform: scale(1);
}

/* Slider Title styling */
.hero-slider-box-title {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-family: 'Cairo', sans-serif;
    margin-bottom: 12px;
}

/* Slider Nav Arrows */
.slider-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    font-weight: 700;
    user-select: none;
    transition: all 0.3s ease;
}
.slider-nav-arrow:hover {
    background-color: var(--primary);
    color: #002855;
}
.slider-nav-arrow.prev-slide {
    right: 15px;
}
.slider-nav-arrow.next-slide {
    left: 15px;
}

/* Slider Indicator Dots */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slider-dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}
.slider-dot.active {
    background-color: #ffffff !important;
    transform: scale(1.25);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}
.slider-empty {
    padding: 100px 30px;
    text-align: center;
    color: var(--text-muted);
}

/* Sidebar Tabbed Widget */
.hero-sidebar-tabbed-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 460px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 991px) {
    .hero-sidebar-tabbed-widget {
        margin-top: 15px;
    }
}

.tab-headers-row {
    display: flex;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
}
body.dark-mode .tab-headers-row {
    background-color: rgba(255, 255, 255, 0.02);
}

.hero-tab-btn {
    flex: 1;
    border: none;
    padding: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    background-color: transparent;
    color: var(--text-muted);
    text-align: center;
}
.hero-tab-btn.active {
    background-color: #002855 !important;
    color: #ffffff !important;
}
body.dark-mode .hero-tab-btn.active {
    background-color: #1c355e !important;
    color: #ffffff !important;
}

.tab-panels-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-tab-panel {
    display: none !important;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    justify-content: space-between;
}
.hero-tab-panel.active {
    display: flex !important;
}

.tab-post-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 8px;
    transition: all 0.2s ease;
}
.tab-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.tab-post-item:hover {
    padding-right: 5px;
}
.tab-post-item:hover .tab-post-num {
    opacity: 0.8 !important;
    transform: scale(1.1);
}

.tab-post-details {
    flex: 1;
}

.tab-post-title {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
    font-family: 'Cairo', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

.tab-post-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #eaaa00;
    opacity: 0.25;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px; /* Adds margin on the left since it is placed first in RTL flow */
}
.tab-empty-text {
    text-align: center;
    color: var(--text-muted);
    padding-top: 50px;
}

/* Politics Category Block Layout Updates & Dynamic Height Stretching */
.home-block-grid-3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 35px;
    align-items: stretch; /* Stretches blocks dynamically */
}
.home-block-grid-3cols .block-main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.home-block-grid-3cols .block-main-content .category-block {
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}
.home-block-grid-3cols .block-main-content .category-block .block-split-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 20px;
}
.home-block-grid-3cols .block-main-content .category-block .block-split-featured,
.home-block-grid-3cols .block-main-content .category-block .block-split-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Sidebar skyscraper image stretching */
.block-left-sidebar {
    height: 100%;
}
.widget-promo-skyscraper {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.widget-promo-skyscraper a {
    display: block;
    width: 100%;
    height: 100%;
}
.widget-promo-skyscraper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: all 0.4s ease;
}
.widget-promo-skyscraper img:hover {
    transform: scale(1.02);
}
.promo-label-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 700;
    z-index: 5;
    letter-spacing: 0.5px;
}

/* Beautiful custom blue gradient ad space styles */
.widget-promo-skyscraper-blue {
    background: linear-gradient(135deg, var(--accent) 0%, #081a33 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 28px 20px;
    text-align: center;
    color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.widget-promo-skyscraper-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}
.widget-promo-skyscraper-blue:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.promo-skyscraper-badge {
    font-size: 0.68rem;
    background: var(--primary);
    color: #012758 !important;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 800;
    margin-bottom: 15px;
    display: inline-block;
    letter-spacing: 0.5px;
    font-family: 'Cairo', sans-serif;
}
.promo-skyscraper-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.promo-skyscraper-desc {
    font-size: 0.78rem;
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
}
.promo-skyscraper-dashed-box {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    width: 100%;
    margin-bottom: 25px;
    padding: 22px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}
.widget-promo-skyscraper-blue:hover .promo-skyscraper-dashed-box {
    border-color: rgba(234, 170, 0, 0.4);
    background-color: rgba(234, 170, 0, 0.02);
}
.promo-skyscraper-btn {
    font-size: 0.8rem;
    background-color: var(--primary);
    color: #012758 !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 800;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(234, 170, 0, 0.25);
    font-family: 'Cairo', sans-serif;
}
.promo-skyscraper-btn:hover {
    background-color: #ffffff;
    color: #012758 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Phase 3: Writers & Opinions (كتاب و آراء) Section & Author Profile Page
   ========================================================================== */

.writers-opinions-section {
    position: relative;
    overflow: hidden;
}

.writers-carousel-viewport {
    overflow: hidden; /* Hide scrollbars and prevent browser manual dragging */
    width: 100%;
}

.writer-card-badge {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 20px 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    position: relative;
    width: calc((100% - 80px) / 5) !important; /* Exactly 5 cards on desktop */
}

@media (max-width: 768px) {
    .writer-card-badge {
        width: calc((100% - 40px) / 3) !important; /* 3 cards on mobile landscape/tablet vertical */
    }
}

@media (max-width: 480px) {
    .writer-card-badge {
        width: calc((100% - 20px) / 2) !important; /* 2 cards on mobile portrait */
    }
}

.writer-card-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.writer-avatar-wrapper {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 190px !important;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.writer-card-badge:hover .writer-avatar-wrapper {
    border-color: var(--primary);
}

.writer-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.writer-card-badge:hover .writer-avatar-wrapper img {
    transform: scale(1.08);
}

.writer-name {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0c203b !important;
    margin: 0 0 12px 0;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.writer-card-badge:hover .writer-name {
    color: var(--primary) !important;
}

.writer-arrow-link {
    width: 32px;
    height: 32px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0c203b;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
    text-decoration: none;
}

.writer-card-badge:hover .writer-arrow-link {
    background-color: var(--primary);
    color: #012758;
    border-color: var(--primary);
    transform: translateX(-3px);
}

.writer-arrow-btn {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0c203b;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.writer-arrow-btn:hover {
    background-color: var(--primary);
    color: #012758;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Dark Mode styles for Carousel */
body.dark-mode .writers-opinions-section {
    background-color: #172439 !important;
    border-color: #1f304c !important;
}

body.dark-mode .writers-opinions-title {
    color: #ffffff !important;
}

body.dark-mode .writer-card-badge {
    background-color: #1e2e46 !important;
    border-color: #2b3d58 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

body.dark-mode .writer-card-badge:hover {
    border-color: var(--primary) !important;
}

body.dark-mode .writer-avatar-wrapper {
    background-color: #1a273a !important;
    border-color: #2b3d58 !important;
}

body.dark-mode .writer-name {
    color: #ffffff !important;
}

body.dark-mode .writer-card-badge:hover .writer-name {
    color: var(--primary) !important;
}

body.dark-mode .writer-arrow-link {
    background-color: #1a273a !important;
    border-color: #2b3d58 !important;
    color: #ffffff;
}

body.dark-mode .writer-card-badge:hover .writer-arrow-link {
    background-color: var(--primary) !important;
    color: #012758 !important;
    border-color: var(--primary) !important;
}

body.dark-mode .writer-arrow-btn {
    background-color: #1e2e46 !important;
    border-color: #2b3d58 !important;
    color: #ffffff;
}

body.dark-mode .writer-arrow-btn:hover {
    background-color: var(--primary) !important;
    color: #012758 !important;
    border-color: var(--primary) !important;
}

/* Author Profile Page styling (author.php) */
.author-profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 30px;
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    direction: rtl;
}

.author-profile-avatar {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
    background-color: #f8fafc;
}

.author-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-profile-name {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: #0c203b;
    margin: 0 0 5px 0;
}

.author-profile-role {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    background-color: rgba(234, 170, 0, 0.1);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 15px;
}

.author-profile-bio {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* Dark Mode for Author Profile */
body.dark-mode .author-profile-card {
    background: #1e2e46 !important;
    border-color: #2b3d58 !important;
}

body.dark-mode .author-profile-avatar {
    border-color: #2b3d58 !important;
}

body.dark-mode .author-profile-name {
    color: #ffffff !important;
}

body.dark-mode .author-profile-role {
    background-color: rgba(234, 170, 0, 0.15) !important;
}

body.dark-mode .author-profile-bio {
    color: #abbbcf !important;
}

@media (max-width: 768px) {
    .author-profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .author-profile-role {
        align-self: center;
    }
}

/* ==========================================================================
   Phase 4: Premium Social Media Grid Widget Styles
   ========================================================================== */

.social-follow-card-new {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.social-follow-card-new:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    filter: brightness(1.08);
}

/* Responsive grid layout adjustments for social follow widget on smaller mobile screens */
@media (max-width: 480px) {
    .widget-social-follow {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

/* ==========================================================================
   Phase 4: Premium Horizontal Blue Advertisement Banner
   ========================================================================== */

.widget-promo-horizontal-blue {
    background: linear-gradient(135deg, var(--accent) 0%, #081a33 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 22px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-grow: 1;
}

.widget-promo-horizontal-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.widget-promo-horizontal-blue:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.widget-promo-horizontal-blue .promo-horizontal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.widget-promo-horizontal-blue .promo-horizontal-dashed-box {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(255, 255, 255, 0.02);
    flex: 1;
    margin: 0 35px;
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.widget-promo-horizontal-blue:hover .promo-horizontal-dashed-box {
    border-color: rgba(234, 170, 0, 0.4);
    background-color: rgba(234, 170, 0, 0.02);
}

@media (max-width: 768px) {
    .widget-promo-horizontal-blue {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    .widget-promo-horizontal-blue .promo-horizontal-info {
        align-items: center;
    }
    .widget-promo-horizontal-blue .promo-horizontal-dashed-box {
        margin: 10px 0;
        width: 100%;
        white-space: normal;
    }
    .widget-promo-horizontal-blue .promo-skyscraper-btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Phase 5: Voice & Image (صوت وصورة) Videos Section Styles
   ========================================================================== */

.videos-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 25px;
}

.featured-video-card {
    width: 100%;
}

.featured-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    background-color: #000000;
}

.featured-video-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-player-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 2;
}

.video-featured-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.45;
}

.video-featured-title a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.video-featured-title a:hover {
    color: var(--primary) !important;
}

.video-play-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.75);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0; /* Hidden by default when video is playing to avoid duplicate controls visual clutter */
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Show the button overlay when hovering the player area while video is playing */
.featured-video-player:hover .video-play-pulse {
    opacity: 1;
    pointer-events: auto;
}

.video-play-pulse:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: #ffffff;
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.list-videos-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
}

.video-sidebar-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.video-sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.video-thumbnail-container {
    width: 110px;
    height: 85px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-thumbnail-container:hover img {
    transform: scale(1.05);
}

.video-thumb-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-thumbnail-container:hover .video-thumb-play-overlay {
    background: rgba(0, 0, 0, 0.25);
}

.video-thumb-play-btn {
    background-color: #ff0000;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.62rem;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.video-thumbnail-container:hover .video-thumb-play-btn {
    transform: scale(1.1);
}

.video-sidebar-details {
    flex: 1;
}

.video-sidebar-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #ffffff;
    margin: 0;
}

.video-sidebar-title a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.video-sidebar-title a:hover {
    color: var(--primary) !important;
}

.video-sidebar-meta {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    .featured-video-player {
        height: auto !important;
    }
    .video-thumbnail-container {
        width: 100px !important;
        height: 75px !important;
    }
}

/* Colored categories (بنقرة واحدة) list with background images and overlays */
.category-colored-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-colored-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    border-radius: var(--radius-sm);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 1.05rem;
    transition: var(--transition);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.category-colored-item:hover {
    transform: scale(1.02) translateX(-5px);
    box-shadow: var(--shadow-md);
}

.category-colored-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--cat-overlay-color);
    z-index: -1;
    transition: var(--transition);
}

.category-colored-item:hover::before {
    background-color: var(--cat-overlay-color-hover);
}

.category-colored-item .cat-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.category-colored-item:hover .cat-arrow {
    background-color: rgba(255, 255, 255, 0.35);
}

/* Center and align all main page containers to 1260px matching header and footer */
.main-content {
    margin: 0 auto !important;
}

.about-page-container,
.static-page-container,
.article-page-container,
.author-page-container,
.category-page-container,
.search-page-container {
    max-width: 1260px !important;
    margin: 0 auto !important;
}

/* ==========================================================================
   Phase 9: Premium Video Lightbox Pop-up Styles
   ========================================================================== */
.video-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 15, 35, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    padding: 20px;
}
.video-lightbox-overlay.active {
    opacity: 1;
}
.video-lightbox-container {
    background: #0c203b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 850px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
}
.video-lightbox-overlay.active .video-lightbox-container {
    transform: scale(1);
}
.video-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.video-lightbox-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary, #eaaa00);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
    font-family: 'Cairo', sans-serif;
}
.video-lightbox-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.video-lightbox-close:hover {
    color: #ffffff;
    transform: rotate(90deg);
}
.video-lightbox-body {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}
.video-lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #071527;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}
.video-lightbox-source {
    font-weight: 700;
    color: var(--primary, #eaaa00);
}

/* Home Featured Video Corner Expand Button */
.video-expand-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.video-expand-btn:hover {
    background: var(--primary, #eaaa00);
    color: #0c203b !important;
    transform: scale(1.1);
    border-color: var(--primary, #eaaa00);
}

/* Adjustments for pause status styling - Keep it purely white/neutral with pulse animation to draw attention */
.video-play-pulse.paused-state {
    opacity: 1 !important;
    pointer-events: auto !important;
    animation: pulse 2s infinite;
    background-color: rgba(0, 0, 0, 0.55);
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.video-play-pulse.paused-state:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    color: #ffffff;
}

/* التنسيق التلقائي للصور المدرجة داخل نص المقال (بين الفقرات) */
.article-body-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto; /* ترك مسافة كافية وتوسيط الصورة تلقائياً */
    border-radius: 8px; /* حواف دائرية ناعمة تتطابق مع المظهر المميز */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* ظل خفيف وناعم للمظهر الفاخر */
}

/* حماية المحتوى: منع تحديد النص وسحب الصور */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    user-drag: none;
}

/* ==========================================================================
   Responsive Overrides for Mobile Layout Issues (Homepage Improvements)
   ========================================================================== */
@media (max-width: 991px) {
    /* Stack homepage blocks vertically and prevent squeezed layout columns */
    .home-block-grid-3cols {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    .home-block-grid-3cols .col-span-2 {
        grid-column: span 1 !important;
    }
    
    .block-left-sidebar {
        height: auto !important;
        margin-top: 10px !important;
    }
    
    .block-left-sidebar .widget-promo-skyscraper-blue {
        height: auto !important;
        min-height: 250px !important;
        padding: 25px 20px !important;
    }
}

@media (max-width: 768px) {
    /* Category Grid Blocks - Force Stacking on Mobile Screens */
    .home-block-grid-3cols .block-main-content .category-block .block-split-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .home-block-grid-3cols .block-main-content .category-block .block-split-featured {
        border-left: none !important;
        padding-left: 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding-bottom: 20px !important;
        margin-bottom: 15px !important;
    }

    /* Hero Slider Mobile Sizing & Typography */
    .hero-slider-box {
        height: 320px !important;
    }
    .hero-slider-box-content {
        padding: 20px !important;
    }
    .hero-slider-box-title {
        font-size: 1.25rem !important;
        line-height: 1.35 !important;
    }
    .hero-slider-box-meta {
        flex-wrap: wrap !important;
        gap: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Category Block Header Sizing - Prevent Collision */
    .category-block-title {
        font-size: 0.95rem !important;
        padding: 6px 12px !important;
    }
    .category-block-more-link {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Hero Slider Mobile Sizing for small screens */
    .hero-slider-box {
        height: 260px !important;
    }
    .hero-slider-box-title {
        font-size: 1.1rem !important;
    }
    
    /* Writers & Opinions Carousel Card Scaling - Fix Overlap */
    .writer-avatar-wrapper {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        max-width: 120px !important;
        margin-bottom: 10px !important;
    }
    
    .writer-card-badge {
        padding: 12px 10px !important;
        width: calc((100% - 15px) / 2) !important;
    }
    
    .writer-name {
        font-size: 0.75rem !important;
    }

    /* Category Block Header Sizing for small screens */
    .category-block-title {
        font-size: 0.88rem !important;
        padding: 5px 10px !important;
    }
}

/* ==========================================================================
   Progressive Web App (PWA) & Mobile Interface Styles
   ========================================================================== */

/* Ajustement de la marge inférieure sur mobile pour laisser la place à la barre de navigation (Uniquement en mode PWA application) */
@media (max-width: 767px) and (display-mode: standalone) {
    body {
        padding-bottom: 70px !important;
    }
}
body.pwa-standalone {
    padding-bottom: 70px !important;
}

/* Barre de navigation mobile basse */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(1, 39, 88, 0.92); /* Bleu nuit classique */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(234, 170, 0, 0.3); /* Bordure dorée transparente */
    z-index: 9999;
    direction: rtl;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 0 10px;
}

body.dark-mode .mobile-bottom-nav {
    background: rgba(14, 22, 35, 0.92);
    border-top: 1px solid rgba(234, 170, 0, 0.2);
}

@media (max-width: 767px) and (display-mode: standalone) {
    .mobile-bottom-nav {
        display: flex;
    }
}
body.pwa-standalone .mobile-bottom-nav {
    display: flex !important;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    width: 20%;
    height: 100%;
    transition: var(--transition);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
    transition: var(--transition);
}

.mobile-bottom-nav .nav-item.active {
    color: #eaaa00; /* Or */
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item:active {
    color: #eaaa00;
}

/* Cache du lien d'accueil redondant dans la barre de navigation sur mobile uniquement en mode application */
@media (max-width: 767px) and (display-mode: standalone) {
    .category-nav-right-aligned a:first-child {
        display: none !important;
    }
}
body.pwa-standalone .category-nav-right-aligned a:first-child {
    display: none !important;
}

/* Styles pour la page des favoris (Bookmarks) */
.bookmarks-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
    min-height: 400px;
}

.bookmarks-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.bookmarks-placeholder i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.bookmarks-placeholder h3 {
    font-family: 'Cairo', sans-serif;
    color: var(--text-main);
    margin-bottom: 10px;
}

.bookmarks-placeholder p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Styles pour la page des paramètres (Settings) */
.settings-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 15px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 20px;
}

.settings-section-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

body.dark-mode .settings-section-title {
    color: #eaaa00;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-label {
    display: flex;
    flex-direction: column;
}

.settings-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.settings-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Switcher basculeur de thème */
.switch-control {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: #012758;
}

body.dark-mode input:checked + .switch-slider {
    background-color: #eaaa00;
}

input:checked + .switch-slider:before {
    transform: translateX(24px);
}

/* Contrôle de la taille du texte */
.font-size-control {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.font-size-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.font-size-slider {
    flex-grow: 1;
    height: 6px;
    background: var(--border-color);
    outline: none;
    border-radius: 3px;
}

.font-size-indicator {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    min-width: 40px;
    text-align: center;
}

/* Ajusteur de police dynamique pour les articles */
.article-text-body p {
    font-size: var(--article-font-size, 1.15rem) !important;
    line-height: 1.8 !important;
}

/* Bouton de sauvegarde d'article */
.bookmark-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.35rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
    vertical-align: middle;
}

.bookmark-btn:hover {
    color: #eaaa00;
}

.bookmark-btn.saved {
    color: #eaaa00;
}

/* Boutons de réglages génériques */
.btn-settings-action {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

body.dark-mode .btn-settings-action {
    background: #eaaa00;
    color: #0c203b;
}

.btn-settings-action:hover {
    opacity: 0.9;
}

/* ==========================================================================
   PWA Installation Banner & iOS Guide Modal Styles
   ========================================================================== */

/* Ajustement de la marge inférieure sur mobile si la bannière d'installation est affichée */
@media (max-width: 767px) {
    body.has-pwa-banner {
        padding-bottom: 105px !important;
    }
}

/* Bannière d'installation personnalisée */
.pwa-install-banner {
    display: none; /* Masquée par défaut, gérée par JS */
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(1, 39, 88, 0.96); /* Bleu nuit de la marque */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(234, 170, 0, 0.4); /* Bordure dorée semi-transparente */
    border-radius: 16px;
    padding: 12px 18px;
    z-index: 10000;
    direction: rtl;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    gap: 15px;
    animation: pwaSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSlideUp {
    from {
        transform: translateY(120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.dark-mode .pwa-install-banner {
    background: rgba(14, 22, 35, 0.96);
    border-color: rgba(234, 170, 0, 0.25);
}

.pwa-banner-close {
    position: absolute;
    top: -8px;
    left: -8px;
    color: #ffffff;
    background: #dc2626; /* Rouge vif pour fermer */
    font-size: 0.9rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
    z-index: 10;
}

.pwa-banner-close:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.pwa-banner-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pwa-banner-text {
    text-align: right;
}

.pwa-banner-text h4 {
    margin: 0;
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
}

.pwa-banner-text p {
    margin: 2px 0 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Cairo', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
}

.pwa-banner-btn {
    background: #eaaa00; /* Or */
    color: #012758; /* Bleu nuit */
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(234, 170, 0, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(234, 170, 0, 0.35);
    background: #f5b800;
}

/* Modal d'instructions pour iOS Safari */
.pwa-ios-modal {
    display: none; /* Géré par JS */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 40, 85, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100001;
    align-items: center;
    justify-content: center;
    direction: rtl;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pwa-ios-modal.active {
    display: flex;
    opacity: 1;
}

.pwa-ios-modal-content {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, rgba(0, 40, 85, 0.12));
    border-radius: 20px;
    padding: 25px 20px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-ios-modal.active .pwa-ios-modal-content {
    transform: scale(1);
}

body.dark-mode .pwa-ios-modal-content {
    background: #0c203b;
    border-color: rgba(255, 255, 255, 0.08);
}

.pwa-ios-modal-close {
    position: absolute;
    top: 12px;
    left: 15px;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted, #64748b);
    transition: var(--transition);
    line-height: 1;
    padding: 5px;
}

.pwa-ios-modal-close:hover {
    color: #dc2626;
}

.pwa-ios-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.pwa-ios-logo {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 40, 85, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

body.dark-mode .pwa-ios-logo {
    border-color: rgba(255, 255, 255, 0.1);
}

.pwa-ios-modal-header h3 {
    margin: 0;
    color: var(--primary, #eaaa00);
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 40, 85, 0.03);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 40, 85, 0.05);
}

body.dark-mode .pwa-ios-step {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

.pwa-ios-step-number {
    width: 26px;
    height: 26px;
    background: var(--primary, #eaaa00);
    color: #012758;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

.pwa-ios-step-text {
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
    text-align: right;
}

.pwa-ios-step-text i {
    color: var(--primary, #eaaa00);
    font-size: 1rem;
    margin: 0 2px;
}

/* ==========================================================================
   PWA App Shell Mode Overrides (Mockup Design)
   ========================================================================== */

/* En-tête PWA - Masqué par défaut sur le site classique */
.pwa-header-bar {
    display: none;
    height: 60px;
    background-color: #012758;
    border-bottom: 1px solid rgba(234, 170, 0, 0.35);
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    direction: rtl;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.pwa-header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pwa-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Logo entièrement blanc pour se détacher du fond */
}

.pwa-header-left, .pwa-header-right {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.pwa-header-left:hover, .pwa-header-right:hover {
    color: #eaaa00;
}

.pwa-bell-wrapper {
    position: relative;
    display: inline-block;
}

.pwa-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menu Burger Déroulant PWA */
.pwa-menu-dropdown {
    display: none;
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    background: rgba(1, 39, 88, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid #eaaa00;
    z-index: 9999;
    direction: rtl;
    padding: 15px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: pwaSlideDown 0.3s ease-out forwards;
}

@keyframes pwaSlideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-menu-dropdown.active {
    display: block;
}

.pwa-dropdown-header {
    padding: 5px 20px 10px 20px;
    color: #eaaa00;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    text-align: right;
}

.pwa-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    transition: var(--transition);
    text-align: right;
}

.pwa-dropdown-link:hover {
    background: rgba(234, 170, 0, 0.1);
    color: #eaaa00;
}

.pwa-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 20px;
}

/* Bouton PWA dans la barre latérale (Sidebar Widget) */
.pwa-sidebar-install-container {
    margin-bottom: 15px;
    width: 100%;
}

.pwa-sidebar-install-btn {
    width: 100%;
    background: #eaaa00; /* Or */
    color: #012758; /* Bleu nuit */
    border: none;
    border-radius: var(--radius-sm, 4px);
    padding: 10px 15px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(234, 170, 0, 0.2);
    transition: all 0.2s ease;
}

.pwa-sidebar-install-btn:hover {
    background: #f5b800;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(234, 170, 0, 0.35);
}

.pwa-sidebar-install-btn i {
    font-size: 0.95rem;
}

body.dark-mode .pwa-sidebar-install-btn {
    background: #eaaa00;
    color: #0c203b;
}

/* Overrides appliqués uniquement en mode standalone (Application) */
@media (max-width: 767px) and (display-mode: standalone) {
    /* Cache des éléments du site web */
    .top-bar, .main-header, .main-footer, .footer-bottom, .block-left-sidebar, #back-to-top, .breaking-news-bar {
        display: none !important;
    }
    
    /* Afficher le header d'application */
    .pwa-header-bar {
        display: flex !important;
    }
    
    /* Variables de couleurs de l'application (Thème sombre Bleu Nuit & Or Mockup) */
    body, body.dark-mode {
        --bg-base: #061325 !important;
        --bg-card: #0c203b !important;
        --bg-header: #012758 !important;
        --text-main: #ffffff !important;
        --text-muted: #94a3b8 !important;
        --border-color: rgba(255, 255, 255, 0.08) !important;
        --primary: #eaaa00 !important;
        --accent: #012758 !important;
        
        padding-top: 110px !important;
        padding-bottom: 70px !important;
        background-color: #061325 !important;
        color: #ffffff !important;
    }
    
    /* Couleur des icônes d'en-tête (Doré de la marque) */
    .pwa-header-left, .pwa-header-right {
        color: #eaaa00 !important;
    }
    
    /* Conteneur principal */
    .main-content, .layout-container {
        background-color: #061325 !important;
    }
    
    /* Rendre la section principale 100% de la largeur */
    .block-main-content {
        grid-column: span 3 / span 3 !important;
        width: 100% !important;
    }
    
    /* Cacher le reste des contrôles du nav */
    .category-nav-controls {
        display: none !important;
    }
    
    /* Barre de catégories en pilules dorées */
    .category-nav-bar {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        background-color: #012758 !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
        z-index: 9998 !important;
        padding: 5px 0 !important;
        margin-top: 0 !important;
    }
    
    .category-nav-container {
        padding: 0 !important;
    }
    
    .category-nav-right-aligned {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 10px !important;
        padding: 4px 15px !important;
        scrollbar-width: none !important;
    }
    
    .category-nav-right-aligned::-webkit-scrollbar {
        display: none !important;
    }
    
    .category-nav-right-aligned a.nav-item-link {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid rgba(234, 170, 0, 0.35) !important; /* Doré très fin */
        color: #ffffff !important;
        border-radius: 20px !important;
        padding: 5px 14px !important;
        font-size: 0.78rem !important;
        font-weight: 700 !important;
    }
    
    .category-nav-right-aligned a.nav-item-link.active {
        background: rgba(234, 170, 0, 0.12) !important;
        border-color: #eaaa00 !important;
        color: #eaaa00 !important;
    }
    
    /* Slider principal (Swipeable Cards) */
    .hero-grid-sahifa > *:not(.hero-slider-box) {
        display: none !important;
    }
    
    .hero-slider-box {
        width: 100% !important;
        grid-column: span 3 / span 3 !important;
        height: auto !important;
        border: none !important;
        border-radius: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        display: flex !important;
        flex-direction: row !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 15px !important;
        padding: 10px 15px !important;
        margin-bottom: 10px !important;
        box-shadow: none !important;
        direction: rtl !important;
    }
    
    .hero-slider-box::-webkit-scrollbar {
        display: none !important;
    }
    
    .hero-slider-box .my-slide {
        display: block !important;
        flex: 0 0 82% !important;
        width: 82% !important;
        height: 200px !important;
        border: 1px solid rgba(234, 170, 0, 0.5) !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        position: relative !important;
        scroll-snap-align: center !important;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25) !important;
    }
    
    .hero-slider-box .slider-nav-arrow {
        display: none !important;
    }
    
    .hero-slider-box img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* Badge de catégorie (Pillule en doré dégradé) */
    .hero-slider-box-cat {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        background: linear-gradient(135deg, #f5b800 0%, #eaaa00 50%, #c18c00 100%) !important;
        color: #012758 !important;
        font-weight: 800 !important;
        font-size: 0.75rem !important;
        padding: 4px 14px !important;
        border-radius: 20px !important; /* Pillule */
        box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
        z-index: 10 !important;
        text-shadow: none !important;
    }
    
    .hero-slider-box-overlay {
        background: linear-gradient(to top, rgba(6, 19, 37, 0.95) 0%, rgba(6, 19, 37, 0.5) 50%, rgba(6, 19, 37, 0) 100%) !important;
    }
    
    .hero-slider-box-content {
        padding: 15px 12px !important;
    }
    
    /* Titre du slide réduit */
    .hero-slider-box-title {
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        color: #ffffff !important;
        margin-bottom: 4px !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .hero-slider-box-meta {
        font-size: 0.7rem !important;
        color: rgba(255, 255, 255, 0.6) !important;
    }
    
    /* Indicateurs de défilement (Slider dots) */
    .slider-dots {
        position: relative !important;
        bottom: 0 !important;
        left: auto !important;
        transform: none !important;
        justify-content: center !important;
        margin: 10px 0 20px 0 !important;
        gap: 8px !important;
    }
    
    .slider-dot {
        background-color: rgba(234, 170, 0, 0.3) !important;
        width: 14px !important;
        height: 4px !important;
        border-radius: 2px !important;
        box-shadow: none !important;
    }
    
    .slider-dot.active {
        background-color: #eaaa00 !important;
        width: 25px !important;
        transform: none !important;
        box-shadow: 0 0 6px rgba(234, 170, 0, 0.6) !important;
    }
    
    /* En-têtes de rubriques unifiés en doré */
    .category-block-header {
        border-bottom: 2px solid #eaaa00 !important;
        margin-bottom: 15px !important;
        background: transparent !important;
    }
    
    .category-block-title {
        background: transparent !important;
        color: #eaaa00 !important;
        padding: 5px 0 !important;
        margin: 0 !important;
        border: none !important;
        font-size: 1.1rem !important;
        font-weight: 800 !important;
    }
    
    .section-title, .category-header, .page-title {
        color: #eaaa00 !important;
        border-bottom: 2px solid #eaaa00 !important;
        background: transparent !important;
    }
    
    /* Grilles et colonnes d'articles réorganisées en liste verticale */
    .articles-grid, .block-split-container, .variety-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }
    
    /* Suppression des éléments secondaires sur mobile standalone */
    .block-split-featured-excerpt, .variety-card-excerpt {
        display: none !important;
    }
    
    /* Cartes de nouvelles unifiées (Design horizontal de la maquette) */
    .block-split-list-item, .variety-card, .category-block-list-item, .tab-post-item {
        background-color: #0c203b !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        padding: 12px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        display: flex !important;
        flex-direction: row-reverse !important; /* Image à droite, texte à gauche en RTL */
        gap: 12px !important;
        align-items: center !important;
    }
    
    /* Reformater l'article vedette pour ressembler à un item de liste horizontal */
    .block-split-featured {
        background-color: #0c203b !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        padding: 12px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        display: grid !important;
        grid-template-columns: 1fr 90px !important;
        grid-template-rows: auto auto !important;
        gap: 8px 12px !important;
        align-items: center !important;
        flex-direction: unset !important;
    }
    
    /* Miniatures à droite */
    .block-split-list-item-img, .variety-card-img-wrapper, .category-block-list-item > div:first-child {
        width: 90px !important;
        height: 90px !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        margin: 0 !important;
    }
    
    .block-split-featured-img {
        grid-column: 2 / 3 !important;
        grid-row: 1 / 3 !important;
        width: 90px !important;
        height: 90px !important;
        margin: 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    .block-split-list-item-img img, .variety-card-img-wrapper img, .category-block-list-item img, .block-split-featured-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* Conteneur de détails textuels à gauche */
    .block-split-list-item-details, .variety-card-details, .category-block-list-item > div:nth-child(2) {
        flex-grow: 1 !important;
        padding: 0 !important;
        text-align: right !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-height: 80px !important;
    }
    
    /* Titres des articles */
    .block-split-list-item-title, .variety-card-title, .category-block-list-item h4 {
        font-family: 'Cairo', sans-serif !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        margin: 0 0 4px 0 !important;
    }
    
    .block-split-featured-title {
        grid-column: 1 / 2 !important;
        grid-row: 1 / 2 !important;
        font-family: 'Cairo', sans-serif !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    .block-split-list-item-title a, .variety-card-title a, .category-block-list-item h4 a, .block-split-featured-title a {
        color: #ffffff !important;
    }
    
    .block-split-featured > div[style*="font-size"] {
        grid-column: 1 / 2 !important;
        grid-row: 2 / 3 !important;
        margin: 0 !important;
        font-size: 0.72rem !important;
        color: #94a3b8 !important;
    }
    
    /* Métadonnées */
    .post-meta, .category-block-list-item span {
        font-size: 0.72rem !important;
        color: #94a3b8 !important;
    }
    
    /* Action de like/partage sous chaque carte (Bottom-left) */
    .pwa-card-actions {
        display: flex !important;
        gap: 15px !important;
        margin-top: 8px !important;
        margin-right: auto !important; /* Pousse à gauche dans le sens RTL */
        color: rgba(255, 255, 255, 0.45) !important;
        font-size: 0.95rem !important;
        align-items: center !important;
    }
    
    .pwa-card-actions i {
        cursor: pointer !important;
        transition: var(--transition) !important;
        padding: 3px !important;
    }
    
    .pwa-card-actions i:hover {
        color: #eaaa00 !important;
    }
}

/* Appliquer les mêmes styles si la classe pwa-standalone est injectée par JS */
body.pwa-standalone {
    padding-top: 110px !important;
    padding-bottom: 70px !important;
    background-color: #061325 !important;
    color: #ffffff !important;
}

body.pwa-standalone .top-bar, 
body.pwa-standalone .main-header, 
body.pwa-standalone .main-footer, 
body.pwa-standalone .footer-bottom,
body.pwa-standalone .block-left-sidebar,
body.pwa-standalone #back-to-top,
body.pwa-standalone .breaking-news-bar {
    display: none !important;
}

body.pwa-standalone .pwa-header-bar {
    display: flex !important;
}

body.pwa-standalone .pwa-header-left,
body.pwa-standalone .pwa-header-right {
    color: #eaaa00 !important;
}

body.pwa-standalone .category-nav-bar {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    background-color: #012758 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    z-index: 9998 !important;
    padding: 5px 0 !important;
}

body.pwa-standalone .category-nav-right-aligned {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 10px !important;
    padding: 4px 15px !important;
}

body.pwa-standalone .category-nav-right-aligned a.nav-item-link {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(234, 170, 0, 0.35) !important; /* Doré très fin */
    color: #ffffff !important;
    border-radius: 20px !important;
    padding: 5px 14px !important;
}

body.pwa-standalone .category-nav-right-aligned a.nav-item-link.active {
    background: rgba(234, 170, 0, 0.12) !important;
    border-color: #eaaa00 !important;
    color: #eaaa00 !important;
}

body.pwa-standalone .category-nav-controls {
    display: none !important;
}

body.pwa-standalone .block-main-content {
    grid-column: span 3 / span 3 !important;
    width: 100% !important;
}

body.pwa-standalone .hero-grid-sahifa > *:not(.hero-slider-box) {
    display: none !important;
}

body.pwa-standalone .hero-slider-box {
    width: 100% !important;
    grid-column: span 3 / span 3 !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: row !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 15px !important;
    padding: 10px 15px !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    direction: rtl !important;
}

body.pwa-standalone .hero-slider-box::-webkit-scrollbar {
    display: none !important;
}

body.pwa-standalone .hero-slider-box .my-slide {
    display: block !important;
    flex: 0 0 82% !important;
    width: 82% !important;
    height: 200px !important;
    border: 1px solid rgba(234, 170, 0, 0.5) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
    scroll-snap-align: center !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25) !important;
}

body.pwa-standalone .hero-slider-box .slider-nav-arrow {
    display: none !important;
}

body.pwa-standalone .hero-slider-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

body.pwa-standalone .hero-slider-box-cat {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: linear-gradient(135deg, #f5b800 0%, #eaaa00 50%, #c18c00 100%) !important;
    color: #012758 !important;
    font-weight: 800 !important;
    font-size: 0.75rem !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    z-index: 10 !important;
    text-shadow: none !important;
}

body.pwa-standalone .hero-slider-box-overlay {
    background: linear-gradient(to top, rgba(6, 19, 37, 0.95) 0%, rgba(6, 19, 37, 0.5) 50%, rgba(6, 19, 37, 0) 100%) !important;
}

body.pwa-standalone .hero-slider-box-content {
    padding: 15px 12px !important;
}

body.pwa-standalone .hero-slider-box-title {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #ffffff !important;
    margin-bottom: 4px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

body.pwa-standalone .hero-slider-box-meta {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

body.pwa-standalone .slider-dots {
    position: relative !important;
    bottom: 0 !important;
    left: auto !important;
    transform: none !important;
    justify-content: center !important;
    margin: 10px 0 20px 0 !important;
    gap: 8px !important;
}

body.pwa-standalone .slider-dot {
    background-color: rgba(234, 170, 0, 0.3) !important;
    width: 14px !important;
    height: 4px !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

body.pwa-standalone .slider-dot.active {
    background-color: #eaaa00 !important;
    width: 25px !important;
    transform: none !important;
    box-shadow: 0 0 6px rgba(234, 170, 0, 0.6) !important;
}

/* En-têtes de rubriques unifiés en doré */
body.pwa-standalone .category-block-header {
    border-bottom: 2px solid #eaaa00 !important;
    margin-bottom: 15px !important;
    background: transparent !important;
}

body.pwa-standalone .category-block-title {
    background: transparent !important;
    color: #eaaa00 !important;
    padding: 5px 0 !important;
    margin: 0 !important;
    border: none !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
}

body.pwa-standalone .section-title, 
body.pwa-standalone .category-header, 
body.pwa-standalone .page-title {
    color: #eaaa00 !important;
    border-bottom: 2px solid #eaaa00 !important;
    background: transparent !important;
}

body.pwa-standalone .articles-grid, 
body.pwa-standalone .block-split-container, 
body.pwa-standalone .variety-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

body.pwa-standalone .block-split-featured-excerpt, 
body.pwa-standalone .variety-card-excerpt {
    display: none !important;
}

body.pwa-standalone .block-split-list-item, 
body.pwa-standalone .variety-card, 
body.pwa-standalone .category-block-list-item, 
body.pwa-standalone .tab-post-item {
    background-color: #0c203b !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-direction: row-reverse !important;
    gap: 12px !important;
    align-items: center !important;
}

body.pwa-standalone .block-split-featured {
    background-color: #0c203b !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    display: grid !important;
    grid-template-columns: 1fr 90px !important;
    grid-template-rows: auto auto !important;
    gap: 8px 12px !important;
    align-items: center !important;
    flex-direction: unset !important;
}

body.pwa-standalone .block-split-list-item-img, 
body.pwa-standalone .variety-card-img-wrapper, 
body.pwa-standalone .category-block-list-item > div:first-child {
    width: 90px !important;
    height: 90px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin: 0 !important;
}

body.pwa-standalone .block-split-featured-img {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 3 !important;
    width: 90px !important;
    height: 90px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

body.pwa-standalone .block-split-list-item-img img, 
body.pwa-standalone .variety-card-img-wrapper img, 
body.pwa-standalone .category-block-list-item img,
body.pwa-standalone .block-split-featured-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

body.pwa-standalone .block-split-list-item-details, 
body.pwa-standalone .variety-card-details, 
body.pwa-standalone .category-block-list-item > div:nth-child(2) {
    flex-grow: 1 !important;
    padding: 0 !important;
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 80px !important;
}

body.pwa-standalone .block-split-list-item-title, 
body.pwa-standalone .variety-card-title, 
body.pwa-standalone .category-block-list-item h4 {
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
}

body.pwa-standalone .block-split-featured-title {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

body.pwa-standalone .block-split-list-item-title a, 
body.pwa-standalone .variety-card-title a, 
body.pwa-standalone .category-block-list-item h4 a,
body.pwa-standalone .block-split-featured-title a {
    color: #ffffff !important;
}

body.pwa-standalone .block-split-featured > div[style*="font-size"] {
    grid-column: 1 / 2 !important;
    grid-row: 2 / 3 !important;
    margin: 0 !important;
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
}

body.pwa-standalone .post-meta, 
body.pwa-standalone .category-block-list-item span {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
}

body.pwa-standalone .pwa-card-actions {
    display: flex !important;
    gap: 15px !important;
    margin-top: 8px !important;
    margin-right: auto !important;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.95rem !important;
    align-items: center !important;
}

body.pwa-standalone .pwa-card-actions i {
    cursor: pointer !important;
    transition: var(--transition) !important;
    padding: 3px !important;
}

body.pwa-standalone .pwa-card-actions i:hover {
    color: #eaaa00 !important;
}

/* Personnalisation de la barre de navigation mobile basse en mode standalone (Effet de verre poli de la maquette) */
body.pwa-standalone .mobile-bottom-nav,
@media (max-width: 767px) and (display-mode: standalone) {
    .mobile-bottom-nav {
        background: rgba(6, 19, 37, 0.75) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(234, 170, 0, 0.4) !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Bouton favoris de la barre de navigation du site classique */
.nav-bookmark-btn {
    color: var(--text-main, #0c203b);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    transition: var(--transition);
    text-decoration: none;
    margin-left: 10px;
}
.nav-bookmark-btn:hover {
    color: var(--primary, #eaaa00) !important;
    transform: translateY(-2px);
}
body.dark-mode .nav-bookmark-btn {
    color: #ffffff;
}
/* Cacher le bouton de favoris classique sur le mode standalone de la PWA (car déjà dans la barre basse) */
body.pwa-standalone .nav-bookmark-btn {
    display: none !important;
}
@media (max-width: 767px) and (display-mode: standalone) {
    .nav-bookmark-btn {
        display: none !important;
    }
}

/* Par défaut, cacher la mise en page PWA de la page d'accueil */
.pwa-homepage-layout {
    display: none !important;
}

/* En mode PWA standalone, afficher le flux PWA et cacher le flux classique */
body.pwa-standalone .standard-homepage-layout {
    display: none !important;
}
body.pwa-standalone .pwa-homepage-layout {
    display: block !important;
}

@media (max-width: 767px) and (display-mode: standalone) {
    .standard-homepage-layout {
        display: none !important;
    }
    .pwa-homepage-layout {
        display: block !important;
    }
}

/* Styles pour la page d'accueil de la PWA (Flux d'actualités avec fond bleu) */
body.pwa-standalone .pwa-homepage-layout,
@media (max-width: 767px) and (display-mode: standalone) {
    .pwa-homepage-layout {
        background-color: #012758 !important; /* Fond bleu nuit magnifique */
        padding: 10px 0 !important;
        min-height: 100vh;
    }
    
    .pwa-homepage-layout .category-page-container {
        padding: 5px 0 !important;
    }
    
    /* Style des cartes articles en mode PWA */
    .pwa-homepage-layout .post-card {
        background: var(--bg-card, #ffffff) !important;
        border: 1px solid var(--primary, #eaaa00) !important; /* Fine bordure dorée */
        border-radius: 12px !important;
        margin: 15px 12px !important; /* Petit espace tout autour des 4 côtés */
        padding: 0 !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
        overflow: hidden !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Assurer que le titre de l'article est lisible (couleur foncée sur carte blanche) */
    .pwa-homepage-layout .post-card-title a {
        color: #012758 !important; /* Bleu nuit en mode clair */
        font-weight: 800 !important;
        font-size: 1.05rem !important;
        line-height: 1.45 !important;
    }
    
    /* En mode sombre, le titre devient blanc */
    body.dark-mode .pwa-homepage-layout .post-card-title a {
        color: #ffffff !important;
    }
    
    /* Texte de l'extrait */
    .pwa-homepage-layout .post-card-excerpt {
        color: var(--text-muted, #4b5563) !important;
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-top: 8px !important;
    }
    
    /* Métadonnées de l'article (date, vues) */
    .pwa-homepage-layout .post-meta {
        color: var(--text-muted, #94a3b8) !important;
        font-size: 0.72rem !important;
        display: flex !important;
        gap: 12px !important;
        margin-bottom: 6px !important;
    }
    
    /* Badge de catégorie de l'article */
    .pwa-homepage-layout .category-badge {
        background: linear-gradient(135deg, #f5b800 0%, #eaaa00 50%, #c18c00 100%) !important;
        color: #012758 !important;
        font-weight: 800 !important;
        border-radius: 4px !important;
        padding: 3px 8px !important;
        font-size: 0.7rem !important;
    }
    
    /* Encarts publicitaires et réseaux sociaux */
    .pwa-homepage-layout .pwa-home-ad-wrapper,
    .pwa-homepage-layout .pwa-home-social-wrapper {
        margin: 15px 12px !important;
    }
    
    .pwa-homepage-layout .category-social-widget {
        border: 1px solid var(--primary, #eaaa00) !important;
        border-radius: 12px !important;
        background: var(--bg-card, #ffffff) !important;
    }
    
    /* Bouton d'affichage du reste de la liste */
    .pwa-homepage-layout .load-more-container {
        margin: 25px 12px !important;
        text-align: center !important;
    }
    
    .pwa-homepage-layout .load-more-btn {
        display: block !important;
        width: 100% !important;
        background-color: var(--primary, #eaaa00) !important;
        color: #ffffff !important;
        border: none !important;
        padding: 13px 0 !important;
        font-family: 'Cairo', sans-serif !important;
        font-weight: 700 !important;
        font-size: 1.05rem !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        box-shadow: 0 4px 10px rgba(234, 170, 0, 0.25) !important;
        transition: all 0.2s ease-in-out !important;
        text-align: center !important;
    }
    
    .pwa-homepage-layout .load-more-btn:hover,
    .pwa-homepage-layout .load-more-btn:active {
        background-color: #002855 !important;
        color: #ffffff !important;
        box-shadow: 0 6px 15px rgba(0, 40, 85, 0.35) !important;
        transform: translateY(-2px) !important;
    }
}

/* ==========================================================================
   Bandeau de Gestion des Cookies (RGPD / AdSense / CNDP 09-08)
   ========================================================================== */
.cookie-banner-container {
    position: fixed;
    bottom: -200px;
    left: 20px;
    right: 20px;
    z-index: 999999;
    max-width: 550px;
    margin: 0 auto;
    direction: rtl;
    transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.cookie-banner-container.active {
    bottom: 25px;
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner-card {
    background: rgba(1, 39, 88, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--primary, #eaaa00);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.cookie-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.cookie-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(234, 170, 0, 0.15);
    border: 1px solid rgba(234, 170, 0, 0.3);
    color: var(--primary, #eaaa00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cookie-banner-text h4 {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary, #eaaa00);
    margin: 0 0 4px 0;
}

.cookie-banner-text p {
    font-family: 'Cairo', sans-serif;
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text p a {
    color: var(--primary, #eaaa00);
    text-decoration: underline;
    font-weight: 700;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #f5b800 0%, #eaaa00 100%);
    color: #012758;
    box-shadow: 0 4px 12px rgba(234, 170, 0, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234, 170, 0, 0.45);
}

.cookie-btn-decline {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

@media (max-width: 576px) {
    .cookie-banner-container {
        left: 12px;
        right: 12px;
    }
    .cookie-banner-container.active {
        bottom: 75px;
    }
    .cookie-banner-actions {
        flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}




