/*
 * تصميم الموقع الإخباري الاحترافي - مانشيت
 * Custom Professional News Site Design - Mancheet
 * الألوان مستوحاة من اللوجو: ذهبي + أخضر
 * نسخة: 2.0
 */

/* ========================================
   متغيرات الألوان - من اللوجو
   ======================================== */
:root {
    /* الألوان الأساسية من اللوجو */
    --mancheet-gold: #E6A817;
    --mancheet-gold-dark: #C8920F;
    --mancheet-gold-light: #F4C744;
    --mancheet-green: #2D7D46;
    --mancheet-green-dark: #1F5A32;
    
    /* ألوان الخلفيات الداكنة */
    --news-dark-bg: #1a1a2e;
    --news-darker-bg: #0f0f1a;
    --news-header-bg: #16213e;
    
    /* ألوان النصوص */
    --news-text-light: #ffffff;
    --news-text-muted: #b0b0b0;
    --news-border-dark: rgba(255, 255, 255, 0.1);
    
    /* ألوان الموقع - استخدام الذهبي */
    --news-accent: var(--mancheet-gold);
    --news-accent-dark: var(--mancheet-gold-dark);
    --news-accent-light: var(--mancheet-gold-light);
    
    /* ظلال */
    --news-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --news-glow: 0 0 20px rgba(230, 168, 23, 0.3);
}

/* ========================================
   الهيدر الداكن الاحترافي
   ======================================== */

/* الشريط العلوي */
#site-header {
    border-top: 4px solid var(--mancheet-gold) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

#site-header [data-theme^="light"] {
    --bg-color: var(--news-dark-bg) !important;
    --light-bg: var(--news-dark-bg) !important;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%) !important;
    color: var(--news-text-light) !important;
    --link-color: var(--news-text-light) !important;
    --link-color-hover: var(--mancheet-gold) !important;
}

#site-header [data-theme^="dark"] {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%) !important;
}

/* شعار الموقع - إبراز الذهبي */
#site-header .site-logo .title {
    color: var(--mancheet-gold) !important;
    text-shadow: 0 2px 10px rgba(230, 168, 23, 0.5);
}

#site-header .site-logo img {
    filter: drop-shadow(0 2px 8px rgba(230, 168, 23, 0.4));
}

/* قائمة التصفح */
#site-header .nav-menu > ul > li > a {
    color: var(--news-text-light) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.8em 1.2em !important;
}

#site-header .nav-menu > ul > li > a:hover {
    color: var(--mancheet-gold) !important;
    background: rgba(230, 168, 23, 0.15) !important;
}

#site-header .nav-menu > ul > li.current-menu-item > a {
    color: var(--mancheet-gold) !important;
    background: rgba(230, 168, 23, 0.2) !important;
}

#site-header .nav-menu > ul > li > a::after {
    background: var(--mancheet-gold) !important;
    height: 3px !important;
}

/* أيقونة الصفحة الرئيسية */
#site-header .nav-menu > ul > li.menu-item-home > a {
    background: var(--mancheet-gold) !important;
    color: #000 !important;
    border-radius: 6px;
}

#site-header .nav-menu > ul > li.menu-item-home > a:hover {
    background: var(--mancheet-gold-light) !important;
}

/* القوائم الفرعية */
#site-header .nav-menu ul ul {
    background: var(--news-dark-bg) !important;
    border: 1px solid var(--news-border-dark);
    border-top: 3px solid var(--mancheet-gold);
    border-radius: 0 0 8px 8px;
}

#site-header .nav-menu ul ul a {
    color: var(--news-text-light) !important;
}

#site-header .nav-menu ul ul a:hover {
    background: rgba(230, 168, 23, 0.15) !important;
    color: var(--mancheet-gold) !important;
}

/* ========================================
   السلايدر الاحترافي
   ======================================== */

/* تصميم السلايدر الرئيسي */
.posts-headings .post .post-content {
    border-radius: 12px !important;
    overflow: hidden;
}

.posts-headings .post .post-thumb {
    min-height: 350px !important;
}

@media (min-width: 992px) {
    .posts-headings .post .post-thumb {
        min-height: 450px !important;
    }
}

/* Overlay للسلايدر - تحسين التباين */
.posts-headings .post .post-thumb::after,
.posts-loop-container .theme-dark-lg .post-thumb::after,
.posts-loop-container .theme-dark-sm .post-thumb::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 0.85) 40%, 
        transparent 100%) !important;
    pointer-events: none;
}

/* عنوان السلايدر - تحسين التباين */
.posts-headings .post .post-title {
    padding: 2em !important;
    background: transparent !important;
}

.posts-headings .post .post-title h3,
.posts-headings .post .post-title h3 a,
.posts-loop-container .theme-dark-lg .post-title h3,
.posts-loop-container .theme-dark-lg .post-title h3 a,
.posts-loop-container .theme-dark-sm .post-title h3,
.posts-loop-container .theme-dark-sm .post-title h3 a {
    font-size: 1.8em !important;
    line-height: 1.6 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1), 0 4px 12px rgba(0, 0, 0, 0.8) !important;
}

@media (min-width: 992px) {
    .posts-headings .post .post-title h3 {
        font-size: 2.2em !important;
    }
}

/* Badge التصنيف في السلايدر */
.posts-headings .post .post-meta-category a {
    background: var(--mancheet-gold) !important;
    color: #000 !important;
    padding: 8px 18px !important;
    border-radius: 5px !important;
    font-weight: 700 !important;
    font-size: 0.85em !important;
    box-shadow: 0 2px 10px rgba(230, 168, 23, 0.4);
}

/* ========================================
   شريط الأخبار العاجلة
   ======================================== */
#news-ticker {
    background: linear-gradient(90deg, 
        #b71c1c 0%, 
        #c62828 50%, 
        #b71c1c 100%) !important;
    border-top: none !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.news-ticker-label {
    background: #000 !important;
    padding: 0.6em 1.2em;
    border-radius: 5px;
    font-weight: bold;
    color: #fff !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

.news-ticker-content a {
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ========================================
   قسم أحدث الأخبار المرقمة
   ======================================== */

/* تنسيق العنوان */
.widget-header h3 {
    background: linear-gradient(90deg, var(--mancheet-gold) 0%, var(--mancheet-gold-dark) 100%) !important;
    padding: 0.9em 1.4em !important;
    border-radius: 6px !important;
    color: #000 !important;
    font-size: 1.15em !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 15px rgba(230, 168, 23, 0.3);
}

.widget-header h3::before,
.widget-header h3::after {
    display: none !important;
}

/* البطاقات المرقمة */
.posts-loop .post {
    position: relative;
}

/* الترقيم الدائري - فقط في sidebar الأساسي */
.sidebar-main .posts-loop .post {
    counter-increment: news-counter;
}

.sidebar-main .posts-loop .post::before {
    content: counter(news-counter);
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--mancheet-gold) 0%, var(--mancheet-gold-dark) 100%);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85em;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(230, 168, 23, 0.4);
}

/* إخفاء الترقيم في slider sidebar */
.posts-loop-container .posts-loop .post::before,
.sidebar-side .posts-loop .post::before {
    display: none !important;
}

.ltr .sidebar-main .posts-loop .post::before {
    right: auto;
    left: 12px;
}

/* ========================================
   بطاقات الأخبار الاحترافية
   ======================================== */
.post .post-content {
    border-radius: 10px !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.post .post-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25) !important;
}

/* صور الأخبار */
.post .post-thumb {
    position: relative;
    overflow: hidden;
}

.post .post-thumb img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post .post-content:hover .post-thumb img {
    transform: scale(1.08);
}

/* Overlay على الصور */
.post .post-thumb::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post .post-content:hover .post-thumb::after {
    opacity: 1;
}

/* عنوان الخبر */
.post .post-title {
    padding: 1.2em !important;
}

.post .post-title h3 {
    font-weight: 700 !important;
    line-height: 1.6 !important;
    transition: color 0.3s ease;
    font-size: 1.05em !important;
}

.post .post-content:hover .post-title h3 {
    color: var(--mancheet-gold) !important;
}

/* ========================================
   Badges التصنيفات
   ======================================== */
.post .post-meta-category a,
.post-meta-item.post-meta-category a {
    background: var(--mancheet-gold) !important;
    color: #000 !important;
    padding: 5px 14px !important;
    border-radius: 5px !important;
    font-size: 0.75em !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(230, 168, 23, 0.3);
}

.post .post-meta-category a:hover,
.post-meta-item.post-meta-category a:hover {
    background: var(--mancheet-gold-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 168, 23, 0.4);
}

/* ========================================
   التصنيفات بألوان مختلفة
   ======================================== */
.post-meta-category a[href*="رياضة"],
.post-meta-category a[href*="sport"],
.post-meta-category a[href*="رياضه"] {
    background: #27ae60 !important;
    color: #fff !important;
}

.post-meta-category a[href*="عاجل"],
.post-meta-category a[href*="urgent"],
.post-meta-category a[href*="breaking"] {
    background: #c41e3a !important;
    color: #fff !important;
    animation: pulse 1.5s infinite;
}

.post-meta-category a[href*="تجارة"],
.post-meta-category a[href*="اقتصاد"],
.post-meta-category a[href*="business"] {
    background: #3498db !important;
    color: #fff !important;
}

.post-meta-category a[href*="تقنية"],
.post-meta-category a[href*="تكنولوجيا"],
.post-meta-category a[href*="tech"] {
    background: #9b59b6 !important;
    color: #fff !important;
}

.post-meta-category a[href*="ترفيه"],
.post-meta-category a[href*="فن"],
.post-meta-category a[href*="entertainment"] {
    background: #e67e22 !important;
    color: #fff !important;
}

.post-meta-category a[href*="صحة"],
.post-meta-category a[href*="health"] {
    background: #16a085 !important;
    color: #fff !important;
}

/* ========================================
   الوضع الداكن للبطاقات الكبيرة
   ======================================== */
.posts-loop-container .theme-dark-lg .post-title,
.posts-loop-container .theme-dark-sm .post-title {
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.98) 0%, 
        rgba(0, 0, 0, 0.8) 50%, 
        transparent 100%) !important;
}

.posts-loop-container .theme-dark-lg .post-title h3,
.posts-loop-container .theme-dark-sm .post-title h3 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* ========================================
   قسم الأكثر قراءة
   ======================================== */
.widget[class*="popular"] .widget-header h3,
.widget[class*="trending"] .widget-header h3 {
    background: linear-gradient(90deg, #c41e3a 0%, #a01830 100%) !important;
    color: #fff !important;
}

/* ========================================
   الفوتر
   ======================================== */
#site-footer [data-theme^="light"] {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%) !important;
    color: var(--news-text-light) !important;
    --link-color: var(--news-text-muted) !important;
    --link-color-hover: var(--mancheet-gold) !important;
}

#site-footer {
    border-bottom: 4px solid var(--mancheet-gold) !important;
}

#site-footer .widget-header h3 {
    background: transparent !important;
    color: var(--mancheet-gold) !important;
    border-bottom: 2px solid var(--mancheet-gold);
    border-radius: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* ========================================
   شريط التوقيت والعداد
   ======================================== */
.time-now {
    background: rgba(230, 168, 23, 0.15);
    padding: 0.5em 1em;
    border-radius: 5px;
    color: var(--mancheet-gold);
    font-weight: 600;
}

/* ========================================
   أزرار البحث والقوائم
   ======================================== */
.open-btn {
    color: var(--news-text-light) !important;
    transition: all 0.3s ease;
}

.open-btn:hover {
    color: var(--mancheet-gold) !important;
    background: rgba(230, 168, 23, 0.15) !important;
}

/* ========================================
   تحسينات عامة
   ======================================== */

/* تنعيم الحركات */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* تحسين الخطوط */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* الأزرار الرئيسية */
.btn-primary {
    background: linear-gradient(135deg, var(--mancheet-gold) 0%, var(--mancheet-gold-dark) 100%) !important;
    border: none !important;
    color: #000 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(230, 168, 23, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--mancheet-gold-light) 0%, var(--mancheet-gold) 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 168, 23, 0.5);
}

/* لون الموقع العام */
.site-color {
    color: var(--mancheet-gold) !important;
}

/* ========================================
   Scrollbar مخصص
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--news-darker-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--mancheet-gold) 0%, var(--mancheet-gold-dark) 100%);
    border-radius: 6px;
    border: 2px solid var(--news-darker-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mancheet-gold-light);
}

/* ========================================
   البحث
   ======================================== */
#search-overlay {
    background: var(--news-dark-bg) !important;
    border-color: var(--mancheet-gold) !important;
}

#search-overlay .search-field {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid var(--mancheet-gold) !important;
    color: #fff !important;
    border-radius: 8px;
}

#search-overlay .search-field:focus {
    box-shadow: 0 0 0 4px rgba(230, 168, 23, 0.3) !important;
}

/* ========================================
   القائمة الجانبية - جميع الصفحات
   ======================================== */
#side-menu,
#side-menu[data-theme="dark"],
#side-menu[data-theme="light"],
#side-menu [data-theme="dark"],
#side-menu [data-theme="light"] {
    background: #ffffff !important;
    --bg-color: #ffffff !important;
    --light-bg: #ffffff !important;
    border-color: var(--mancheet-gold) !important;
}

#side-menu,
#side-menu *,
#side-menu [data-theme="dark"],
#side-menu [data-theme="dark"] *,
#side-menu [data-theme="light"],
#side-menu [data-theme="light"] * {
    --link-color: #000000 !important;
    --text-color: #000000 !important;
    color: #000000 !important;
}

#side-menu a,
#side-menu li a,
#side-menu .nav-menu a,
#side-menu .nav-menu li a,
#side-menu .nav-menu ul li a,
#side-menu [data-layout] a,
#side-menu [data-layout="side_menu_layout"] a,
#side-menu [data-layout="side_menu_layout"] li a,
#side-menu [data-layout="side_menu_layout"] .nav-menu a,
#side-menu [data-layout="side_menu_layout"] .nav-menu li a,
#side-menu [data-layout="side_menu_layout"] .nav-menu ul li a,
#side-menu [data-layout="side_menu_layout"] > .nav-menu > ul > li > a,
#side-menu [data-theme] a,
#side-menu [data-theme="dark"] a,
#side-menu [data-theme="light"] a,
body #side-menu a,
body.single #side-menu a,
body.archive #side-menu a,
body.page #side-menu a,
body.category #side-menu a {
    color: #000000 !important;
    border-color: #e5e7eb !important;
}

#side-menu a:hover,
#side-menu li a:hover,
#side-menu [data-layout="side_menu_layout"] a:hover,
#side-menu [data-theme] a:hover,
body #side-menu a:hover {
    background: rgba(230, 168, 23, 0.15) !important;
    border-color: var(--mancheet-gold) !important;
    color: var(--mancheet-gold) !important;
}

/* ========================================
   روابط المقالات
   ======================================== */
.entry-content a {
    color: var(--mancheet-gold) !important;
    text-decoration-color: rgba(230, 168, 23, 0.5) !important;
}

.entry-content a:hover {
    text-decoration-color: var(--mancheet-gold) !important;
}

/* ========================================
   جدول المحتويات
   ======================================== */
#toc_container .toc_title,
#ez-toc-container .ez-toc-title {
    border-bottom-color: var(--mancheet-gold) !important;
}

/* ========================================
   التصميم المتجاوب
   ======================================== */
@media (max-width: 991px) {
    .sidebar-main .posts-loop .post::before {
        width: 24px;
        height: 24px;
        font-size: 0.75em;
    }
    
    .posts-headings .post .post-title h3 {
        font-size: 1.4em !important;
    }
    
    .posts-headings .post .post-thumb {
        min-height: 280px !important;
    }
}

@media (max-width: 575px) {
    .widget-header h3 {
        font-size: 1em !important;
        padding: 0.7em 1em !important;
    }
    
    .post .post-title {
        padding: 1em !important;
    }
    
    .post .post-title h3 {
        font-size: 0.95em !important;
    }
    
    .posts-headings .post .post-title h3 {
        font-size: 1.2em !important;
    }
    
    .posts-headings .post .post-thumb {
        min-height: 220px !important;
    }
}

/* ========================================
   تحسينات إضافية للمظهر الاحترافي
   ======================================== */

/* تأثير التوهج للعناصر المهمة */
.widget-header h3,
.posts-headings .post .post-meta-category a,
.btn-primary {
    transition: box-shadow 0.3s ease;
}

.widget-header h3:hover {
    box-shadow: 0 5px 20px rgba(230, 168, 23, 0.4);
}

/* خط فاصل مميز */
hr {
    border-color: rgba(230, 168, 23, 0.3);
}

/* تحسين مظهر الاقتباسات */
.entry-content blockquote {
    border-color: var(--mancheet-gold) !important;
    background: linear-gradient(90deg, rgba(230, 168, 23, 0.1) 0%, transparent 100%);
}

/* تحسين العناوين في المقالات */
.entry-content h1:not(.unstyled),
.entry-content h2:not(.unstyled),
.entry-content h3:not(.unstyled) {
    border-top-color: var(--mancheet-gold) !important;
    background: linear-gradient(to bottom, rgba(230, 168, 23, 0.1), transparent) !important;
}

/* ========================================
   إصلاحات تخطيط الـ Widgets
   ======================================== */

/* إصلاح شبكة المقالات */
.posts-loop {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.posts-loop .post {
    padding: 0 !important;
    margin: 0 !important;
}

/* إصلاح حجم الصور */
.post .post-thumb img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    display: block;
}

/* الصور في المقالات البارزة */
.posts-headings .post .post-thumb img {
    height: 100% !important;
    min-height: 350px;
}

/* إصلاح بطاقات الأخبار */
.post .post-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    background: #fff !important;
}

.post .post-thumb {
    flex-shrink: 0;
    height: 200px;
}

.post .post-title {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* إصلاح container الـ widgets */
.posts-loop-container {
    display: flex !important;
    flex-wrap: wrap;
    gap: 20px;
}

.posts-loop-container.headings-side {
    flex-direction: row !important;
}

.posts-loop-container .posts-headings {
    flex: 1 1 400px;
    min-width: 300px;
}

.posts-loop-container .posts-loop {
    flex: 2 1 500px;
}

/* Widgets جنباً إلى جنب */
.sidebar .widget.col-lg-6 {
    width: 50% !important;
    float: right;
}

/* تنظيف بعد الـ widgets */
.sidebar-content::after {
    content: "";
    display: table;
    clear: both;
}

/* إصلاح عرض الـ sidebar */
.sidebar .sidebar-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sidebar .widget {
    flex: 1 1 100%;
}

.sidebar .widget.col-lg-6 {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
}

/* ========================================
   تحسين Layout الصفحة الرئيسية
   ======================================== */

/* Container رئيسي */
#site-main .sidebar {
    padding: 20px 0;
}

/* الويدجت بعرض كامل */
.widget.col-lg-12 {
    width: 100% !important;
}

/* إصلاح home sidebars */
#sidebar-home_1,
#sidebar-home_2,
#sidebar-home_3,
#sidebar-home_4,
#sidebar-home_5 {
    margin-bottom: 30px;
}

/* ========================================
   المقالات في وضع row
   ======================================== */
.posts-loop.style-lg-row .post .post-link,
.posts-loop.style-sm-row .post .post-link {
    flex-direction: row !important;
}

.posts-loop.style-lg-row .post .post-thumb,
.posts-loop.style-sm-row .post .post-thumb {
    width: 120px !important;
    min-width: 120px;
    height: auto !important;
}

.posts-loop.style-lg-row .post .post-thumb img,
.posts-loop.style-sm-row .post .post-thumb img {
    height: 100% !important;
    min-height: 100px;
}

/* ========================================
   إصلاح المقالات البارزة (Headings)
   ======================================== */
.posts-headings {
    display: flex !important;
    flex-wrap: wrap;
    gap: 15px;
}

.posts-headings .post {
    flex: 1 1 100%;
    padding: 0 !important;
}

.posts-headings .post .post-content {
    height: 100%;
    min-height: 300px;
}

.posts-headings .post .post-link {
    height: 100%;
    flex-direction: column !important;
}

.posts-headings .post .post-thumb {
    flex-grow: 1;
    height: auto !important;
    min-height: 250px;
}

.posts-headings .post .post-title {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%) !important;
    color: #fff;
}

.posts-headings .post .post-title h3 {
    color: #fff !important;
}

/* ========================================
   تحسينات للموبايل
   ======================================== */
@media (max-width: 767px) {
    .sidebar .widget.col-lg-6 {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .posts-loop {
        grid-template-columns: 1fr !important;
    }
    
    .posts-loop-container .posts-headings,
    .posts-loop-container .posts-loop {
        flex: 1 1 100%;
    }
    
    .posts-headings .post .post-thumb {
        min-height: 200px;
    }
}

/* ========================================
   إخفاء العناصر المكررة
   ======================================== */
.post.has-no-thumb .post-thumb {
    display: block !important;
}

/* ضمان ظهور الصور */
.post .post-thumb picture,
.post .post-thumb img {
    display: block !important;
}

/* ========================================
   تحسين التباعد
   ======================================== */
.widget-inner {
    margin-bottom: 0 !important;
}

.widget-content {
    padding: 0;
}

.widget-header {
    margin-bottom: 20px !important;
}

/* المقالات الصغيرة تحت بعض - عمود واحد */
.posts-loop,
.posts-loop.style-grid,
.posts-loop-container .posts-loop,
.widget .posts-loop {
    display: block !important;
    grid-template-columns: 1fr !important;
    column-count: 1 !important;
}

.posts-loop .post,
.posts-loop-container .posts-loop .post {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-bottom: 15px !important;
}

/* ========================================
   تحسينات الوصولية - Read Also
   ======================================== */
.read-also-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border: 2px solid var(--mancheet-gold);
    border-radius: 10px;
    padding: 20px 25px;
    margin: 25px 0;
}

.read-also-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #1a1a2e !important;
    margin: 0 0 15px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.read-also-title::before {
    content: '📖';
    font-size: 18px;
}

.read-also-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.read-also-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
    position: relative;
    padding-right: 18px;
}

.read-also-list li:last-child {
    border-bottom: none;
}

.read-also-list li::before {
    content: '◀';
    position: absolute;
    right: 0;
    color: var(--mancheet-gold);
    font-size: 10px;
}

.read-also-list a {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #b91c1c !important;
    text-decoration: none;
}

.read-also-list a:hover {
    color: var(--mancheet-gold) !important;
}

/* تحسين تباين النص في entry-content */
.entry-content-inner-2,
.primary-content-inner-2 {
    color: #1a1a2e !important;
}

.entry-content-inner-2 a,
.primary-content-inner-2 a {
    color: #1a4d8c !important;
    text-decoration: underline;
}

/* ========================================
   إصلاح CLS - Layout Shift
   ======================================== */

/* منع تغيير الارتفاع في entry-content */
.primary-content-inner-4.entry-content {
    min-height: 200px;
    contain: layout style;
}

/* تثبيت أبعاد صورة Google News */
.google-news-banner img,
.telegram-banner img {
    width: 40px !important;
    height: 40px !important;
    aspect-ratio: 1/1;
    display: inline-block;
    vertical-align: middle;
}

/* تثبيت ارتفاع البانرات */
.google-news-banner,
.telegram-banner {
    min-height: 70px;
    contain: layout;
}

/* تحسين أداء الصور */
.entry-content img {
    content-visibility: auto;
    contain-intrinsic-size: 100vw 300px;
}
