/* ===================================== */
/* Homepage CSS - جميع ملفات CSS للصفحة الرئيسية */
/* @package Kora_Plus_Pro */
/* @version 25.8 */
/* يشمل: Professional Widgets + Latest News + Trending Words + Widget Icons */
/* ===================================== */

/* ✅ إخفاء time badges في الصفحة الرئيسية فقط */
body.home .time-badge-on-img,
body.home .grid-date-overlay,
body.home .magazine-main-date-overlay,
body.home .magazine-side-date-overlay,
body.home .card-date-overlay,
body.home .post-time-badge,
body.home .post-date-badge,
body.home .time-badge-big,
body.home .cnn-main-date,
body.home .cnn-side-date {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ✅ إظهار time badges في صفحات أخرى (غير الصفحة الرئيسية) */
body:not(.home) .time-badge-on-img,
body:not(.home) .post-time-badge,
body:not(.home) .time-badge-big,
body:not(.home) .grid-date-overlay,
body:not(.home) .magazine-main-date-overlay,
body:not(.home) .magazine-side-date-overlay,
body:not(.home) .card-date-overlay,
body:not(.home) .post-date-badge,
body:not(.home) .cnn-main-date,
body:not(.home) .cnn-side-date {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===================================== */
/* Desktop Enhancements - تحسينات الديسكتوب */
/* ===================================== */
@media (min-width: 769px) {
    .widget-header {
        padding: 10px !important;
    }
}

/* ✅ الكون الرئيسي - Main Container - بدون فراغات */
.professional-widgets-container {
    max-width: 1400px;
    margin: 0 auto !important;
    padding: 0 !important;
    outline: 2px solid rgba(0,168,89,0.12);
    outline-offset: 6px;
    border-radius: 14px;
}

/* ✅ إزالة الفراغات من الويدجتات */
.professional-widget {
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.professional-widget + .professional-widget {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* إخفاء الويدجتات المعطلة تماماً */
.professional-widget.disabled {
    display: none !important;
}

.professional-widget.hidden {
    display: none !important;
}

.professional-widget {
    background: var(--widget-bg, #ffffff);
    margin-bottom: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    contain: layout style;
}

/* ===================================== */
/* رأس الويدجت - Widget Header */
/* ===================================== */
.widget-header {
    background: var(--header-bg, #f8f9fa);
    padding: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.widget-title {
    font-size: var(--title-size, 26px) !important;
    font-weight: 600;
    color: var(--text-color, #212529);
    margin: 0;
    text-align: center;
}

/* تحسين العنوان الرئيسي */
.professional-widget .widget-title {
    font-size: var(--title-size, 26px) !important;
}

/* تحسين العنوان الرئيسي للويدجتات المختلفة */
.professional-widget-1 .widget-title,
.professional-widget-2 .widget-title,
.professional-widget-3 .widget-title,
.professional-widget-4 .widget-title,
.professional-widget-5 .widget-title {
    font-size: var(--title-size, 26px) !important;
}

/* تحسين العنوان الرئيسي للويدجتات الديناميكية */
[class*="professional-widget-"] .widget-title {
    font-size: var(--title-size, 26px) !important;
}

/* ===================================== */
/* النموذج الأول: CNN Style */
/* ===================================== */
.cnn-model {
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.cnn-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.cnn-main {
    background: #ffffff;
    padding: 0;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.cnn-main-content {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.cnn-main-image {
    flex: 0 0 180px;
    height: 140px;
    position: relative;
    overflow: hidden;
}

.cnn-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cnn-main-text {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cnn-main-title {
    font-size: var(--cnn-title-size, 16px) !important;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.cnn-main-title a {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 10px 15px;
    margin: -10px -15px;
    border-radius: 8px;
    background-color: rgba(0, 123, 255, 0.05) !important;
    -webkit-text-fill-color: #007bff !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.cnn-main-title a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cnn-main-title a:hover::after {
    transform: scaleX(1);
}

.cnn-main-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.cnn-sidebar {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cnn-side-item {
    padding: 0;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

.cnn-side-image {
    flex: 0 0 100px;
    height: 100px;
    overflow: hidden;
}

.cnn-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cnn-side-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cnn-side-title {
    font-size: var(--cnn-side-title-size, 13px) !important;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.cnn-side-title a {
    background: linear-gradient(135deg, #ff9500 0%, #ff7a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 6px;
    background-color: rgba(255, 149, 0, 0.05) !important;
    -webkit-text-fill-color: #ff9500 !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.cnn-side-title a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(135deg, #ff9500 0%, #ff7a00 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cnn-side-title a:hover::after {
    transform: scaleX(1);
}

.cnn-side-date {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

/* ===================================== */
/* النموذج الثاني: Grid Style */
/* ===================================== */
.grid-model {
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.grid-layout {
    display: grid;
    gap: 10px;
}

.grid-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    contain: layout;
    position: relative;
}

.grid-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-date-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.grid-content {
    padding: 12px;
}

.grid-title {
    font-size: var(--grid-title-size, 14px) !important;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.grid-title a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 10px 15px;
    margin: -10px -15px;
    border-radius: 8px;
    background-color: rgba(102, 126, 234, 0.05) !important;
    -webkit-text-fill-color: #667eea !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.grid-title a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.grid-title a:hover::after {
    transform: scaleX(1);
}

/* ===================================== */
/* النموذج الثالث: Magazine Style */
/* ===================================== */
.magazine-model {
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.magazine-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* المقالات الرئيسية - الشمال (6 مقالات كبيرة) */
.magazine-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.magazine-main-item {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    padding: 0;
    border-radius: 8px;
    contain: layout;
    position: relative;
    overflow: hidden;
}

.magazine-main-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.magazine-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-main-date-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.magazine-main-content {
    padding: 12px;
}

.magazine-main-title {
    font-size: var(--magazine-main-title-size, 15px) !important;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.magazine-main-title a {
    background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 10px 15px;
    margin: -10px -15px;
    border-radius: 8px;
    background-color: rgba(33, 150, 243, 0.05) !important;
    -webkit-text-fill-color: #2196f3 !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.magazine-main-title a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.magazine-main-title a:hover::after {
    transform: scaleX(1);
}

/* الصور الجانبية - اليمين */
.magazine-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.magazine-side-item {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    padding: 0;
    border-radius: 8px;
    contain: layout;
    position: relative;
    overflow: hidden;
}

.magazine-side-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
}

.magazine-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-side-date-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.magazine-side-content {
    padding: 12px;
}

.magazine-side-title {
    font-size: var(--magazine-side-title-size, 13px) !important;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.magazine-side-title a {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 6px;
    background-color: rgba(66, 165, 245, 0.05) !important;
    -webkit-text-fill-color: #42a5f5 !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.magazine-side-title a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.magazine-side-title a:hover::after {
    transform: scaleX(1);
}

/* ===================================== */
/* النموذج الرابع: Minimal Style */
/* ===================================== */
.minimal-model {
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.minimal-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.minimal-item {
    display: flex;
    gap: 10px;
    align-items: stretch;
    padding: 0;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    contain: layout;
    background: #ffffff;
    overflow: hidden;
}

.minimal-image {
    flex: 0 0 120px;
    height: 100px;
    overflow: hidden;
}

.minimal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.minimal-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.minimal-title {
    font-size: var(--minimal-title-size, 14px) !important;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.minimal-title a {
    background: linear-gradient(135deg, #757575 0%, #424242 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 10px 15px;
    margin: -10px -15px;
    border-radius: 8px;
    background-color: rgba(117, 117, 117, 0.05) !important;
    -webkit-text-fill-color: #757575 !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.minimal-title a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(135deg, #757575 0%, #424242 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.minimal-title a:hover::after {
    transform: scaleX(1);
}

/* ===================================== */
/* النموذج الخامس: Card Style */
/* ===================================== */
.card-model {
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.card-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.card-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    contain: layout;
    position: relative;
}

.card-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-date-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-content {
    padding: 12px;
}

.card-title {
    font-size: var(--card-title-size, 14px) !important;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.card-title a {
    background: linear-gradient(135deg, #212529 0%, #000000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: block;
    position: relative;
    padding: 10px 15px;
    margin: -10px -15px;
    border-radius: 8px;
    background-color: rgba(33, 37, 41, 0.05) !important;
    -webkit-text-fill-color: #212529 !important;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.card-title a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(135deg, #212529 0%, #000000 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-title a:hover::after {
    transform: scaleX(1);
}

.card-item.card-blue {
    border-left: 3px solid #667eea;
}

.card-item.card-green {
    border-left: 3px solid #38ef7d;
}

.card-item.card-purple {
    border-left: 3px solid #764ba2;
}

.card-item.card-orange {
    border-left: 3px solid #f5576c;
}

.card-item.card-red {
    border-left: 3px solid #ff3b30;
}

.card-item.card-teal {
    border-left: 3px solid #38f9d7;
}

/* ===================================== */
/* أيقونات احترافية */
/* ===================================== */
.news-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
    font-size: 14px;
}

.news-icon::before {
    content: "📰";
    font-size: 14px;
}

.time-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 3px;
    vertical-align: middle;
    font-size: 12px;
}

.time-icon::before {
    content: "🕒";
    font-size: 12px;
}

/* ===================================== */
/* رسائل فارغة - Empty Messages */
/* ===================================== */
.no-widgets-message,
.no-posts-message {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    margin: 5px 0;
    border-radius: 8px;
}

.no-widgets-message h3,
.no-posts-message h3 {
    color: #666;
    margin: 0 0 5px 0;
    font-size: 16px;
}

.no-widgets-message p,
.no-posts-message p {
    color: #999;
    margin: 0;
    font-size: 14px;
}

/* ===================================== */
/* التجاوب - Responsive Design */
/* ===================================== */
@media (max-width: 768px) {
    .professional-widgets-container {
        padding: 5px;
    }
    
    .widget-header {
        padding: 10px 5px !important;
        margin: 0 !important;
    }
    
    .widget-title {
        padding: 10px 0 !important;
        margin: 10px 0 !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .professional-widget .widget-header {
        padding: 10px 5px !important;
        margin: 0 !important;
    }
    
    .professional-widget .widget-title {
        padding: 10px 0 !important;
        margin: 10px 0 !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .cnn-layout {
        grid-template-columns: 1fr;
    }
    
    .cnn-main-content {
        flex-direction: column;
    }
    
    .cnn-main-image {
        flex: none;
    }
    
    .cnn-main-image img {
        height: 120px;
    }
    
    .magazine-layout {
        grid-template-columns: 1fr;
    }
    
    .magazine-sidebar {
        flex-direction: row;
        height: auto;
    }
    
    .magazine-side-item {
        flex: 1;
    }
    
    .magazine-side-image {
        height: 60px;
    }
    
    .minimal-item {
        flex-direction: column;
        text-align: center;
    }
    
    .minimal-image {
        flex: none;
    }
    
    .card-layout {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-layout {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .grid-layout {
        grid-template-columns: 1fr !important;
    }
    
    .cnn-side-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cnn-side-image {
        flex: none;
    }
    
    .magazine-sidebar {
        flex-direction: column;
    }
    
    .magazine-side-item {
        height: auto;
    }
    
    .magazine-side-image {
        height: 80px;
    }
    
    .card-layout {
        grid-template-columns: 1fr;
    }
}

/* ===================================== */
/* Latest News - Complete CSS */
/* ===================================== */
/* Latest News - Complete CSS */
.news-section-wrapper { 
    margin: 50px 0; 
    padding: 40px; 
    background: linear-gradient(to bottom, #f8f9fa, #ffffff); 
    border-radius: 15px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); 
}

.news-main-title { 
    font-size: 28px; 
    font-weight: 900; 
    color: #fff; 
    text-align: center; 
    padding: 18px 50px; 
    background: linear-gradient(135deg, var(--primary, #00A859), var(--primary-light, #00c46e)); 
    border-radius: 50px; 
    margin: 0 auto 40px; 
    display: table; 
    box-shadow: 0 8px 25px rgba(0,168,89,0.3); 
    position: relative; 
    overflow: hidden; 
}

.news-main-title::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent); 
}

.lazy-latest-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    background: #e5e5e5; 
}

/* STYLE 1 */
.section-style1 { 
    background: linear-gradient(135deg, #f0f4f8, #e8eef5); 
}

.grid-three-cols { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 35px !important; 
}

.col-item-vertical { 
    background: #fff; 
    border: 3px solid #dce4ec; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}


.vertical-card-link { 
    display: block; 
    text-decoration: none; 
    color: inherit; 
}

.img-top-wrapper { 
    width: 100%; 
    height: 0; 
    padding-bottom: 60%; /* نسبة ثابتة لمنع CLS */
    position: relative; 
    overflow: hidden; 
    background: #f5f5f5;
}

.img-top-wrapper img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important;
    object-position: center center !important;
}

.time-badge-on-img { 
    position: absolute; 
    bottom: 10px; 
    right: 10px; 
    background: linear-gradient(135deg, var(--primary, #00A859), var(--primary-light, #00c46e)); 
    color: #fff; 
    padding: 8px 18px; 
    font-size: 12px; 
    font-weight: 800; 
    border-radius: 25px; 
    box-shadow: 0 4px 15px rgba(0,168,89,0.6); 
    border: 2px solid #fff; 
}

.text-below-img { 
    padding: 16px; 
    background: #f9f9f9; 
}

.text-below-img h4 { 
    margin: 0; 
    font-size: 15px !important; 
    font-weight: 800; 
    line-height: 1.5; 
    color: #1a1a1a; 
}


/* STYLE 2 - العنوان يمين والصورة شمال */
.section-style2 { 
    background: linear-gradient(to right, #fef6f8, #ffe8f0); 
}

.grid-two-cols { 
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 35px !important; 
}

.row-item-horizontal { 
    background: #fff; 
    border: 3px solid #f5d0df; 
    border-radius: 15px; 
    box-shadow: 0 4px 16px rgba(240,147,251,0.15); 
    height: 150px; 
}


.horizontal-row-link { 
    display: flex !important; 
    align-items: stretch !important; 
    height: 100%; 
    text-decoration: none; 
    color: inherit; 
}

.content-right-side { 
    width: 55%; 
    padding: 16px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    order: 2; 
}

.content-right-side h4 { 
    margin: 0 0 10px; 
    font-size: 14px !important; 
    font-weight: 800; 
    line-height: 1.4; 
    color: #1a1a1a; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}


.time-text { 
    margin: 0; 
    font-size: 12px; 
    color: #888; 
    font-weight: 700; 
}

.img-left-side { 
    width: 45%; 
    height: 0;
    padding-bottom: 60%; /* نسبة ثابتة لمنع CLS */
    flex-shrink: 0; 
    order: 1; 
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.img-left-side img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important;
    object-position: center center !important;
}

/* STYLE 3 - 2 فوق + 4 تحت */
.section-style3 { 
    background: linear-gradient(135deg, #e8f4f8, #d4e9f7); 
}

.featured-plus-small { 
    display: block; 
}

.big-featured-box { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 35px; 
    margin-bottom: 35px; 
}

.big-featured-box > div { 
    background: #fff; 
    border: 3px solid #b8d4e8; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 4px 18px rgba(0,0,0,0.12); 
}


.featured-link { 
    display: block; 
    text-decoration: none; 
    color: inherit; 
}

.featured-img-left { 
    width: 100%; 
    height: 0;
    padding-bottom: 60%; /* نسبة ثابتة لمنع CLS */
    position: relative; 
    overflow: hidden;
    background: #f5f5f5;
}

.featured-img-left img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important;
    object-position: center center !important;
}

.time-badge-big { 
    position: absolute; 
    top: 12px; 
    right: 12px; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    color: #fff; 
    padding: 10px 20px; 
    font-size: 13px; 
    font-weight: 800; 
    border-radius: 25px; 
    box-shadow: 0 5px 18px rgba(102,126,234,0.6); 
    border: 2px solid #fff; 
}

.featured-text-right { 
    padding: 18px; 
    background: #f9f9f9; 
}

.featured-text-right h3 { 
    margin: 0; 
    font-size: 16px !important; 
    font-weight: 900; 
    line-height: 1.4; 
    color: #1a1a1a; 
}

.small-horizontal-strip { 
    display: grid !important; 
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 35px !important; 
}

.small-box-item { 
    background: #fff; 
    border: 3px solid #c8e0f0; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 3px 12px rgba(0,0,0,0.1); 
}


.small-link { 
    display: block; 
    text-decoration: none; 
    color: inherit; 
}

.small-img-top { 
    width: 100%; 
    height: 0;
    padding-bottom: 60%; /* نسبة ثابتة لمنع CLS */
    position: relative; 
    overflow: hidden;
    background: #f5f5f5;
}

.small-img-top img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important;
    object-position: center center !important;
}

.time-small { 
    position: absolute; 
    bottom: 8px; 
    right: 8px; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    color: #fff; 
    padding: 6px 14px; 
    font-size: 11px; 
    font-weight: 800; 
    border-radius: 18px; 
    box-shadow: 0 3px 12px rgba(102,126,234,0.5); 
    border: 2px solid #fff; 
}

.small-text { 
    padding: 14px; 
    background: #f9f9f9; 
}

.small-text h5 { 
    margin: 0; 
    font-size: 13px !important; 
    font-weight: 800; 
    line-height: 1.4; 
    color: #1a1a1a; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}


/* Latest News Mobile Overrides */
@media (max-width: 768px) {
    .news-section-wrapper { 
        padding: 22px 15px; 
    }
    
    .news-main-title { 
        font-size: 20px; 
        padding: 14px 30px; 
    }
    
    .grid-three-cols { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important; 
    }
    
    .img-top-wrapper { 
        height: 140px; 
    }
    
    .text-below-img { 
        padding: 12px; 
    }
    
    .text-below-img h4 { 
        font-size: 14px; 
    }
    
    .grid-two-cols { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important; 
    }
    
    .row-item-horizontal { 
        flex-direction: column; 
        height: auto; 
    }
    
    .content-right-side, 
    .img-left-side { 
        width: 100%; 
        order: unset; 
    }
    
    .img-left-side { 
        height: 130px; 
    }
    
    .content-right-side { 
        padding: 12px; 
    }
    
    .content-right-side h4 { 
        font-size: 13px; 
    }
    
    .big-featured-box { 
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    .featured-img-left { 
        height: 160px; 
    }
    
    .featured-img-left img { 
        min-height: 160px; 
    }
    
    .featured-text-right { 
        padding: 15px; 
    }
    
    .featured-text-right h3 { 
        font-size: 16px; 
    }
    
    .small-horizontal-strip { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important; 
    }
    
    .small-img-top { 
        height: 100px; 
    }
    
    .small-text h5 { 
        font-size: 12px; 
    }
    
    /* Latest News Mobile Overrides */
    .news-section-wrapper { 
        padding: 5px !important; 
        margin: 5px 0 !important; 
    }
    
    .news-main-title { 
        font-size: 20px !important; 
        padding: 14px 30px !important; 
        margin-bottom: 5px !important; 
    }
    
    .grid-three-cols { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 5px !important; 
    }
    
    .col-item-vertical {
        border-radius: 8px !important;
    }
    
    .img-top-wrapper { 
        height: 120px !important; 
    }
    
    .text-below-img { 
        padding: 5px !important; 
    }
    
    .text-below-img h4 { 
        font-size: 13px !important; 
    }
    
    .grid-two-cols { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 5px !important; 
    }
    
    .row-item-horizontal { 
        flex-direction: column !important; 
        height: auto !important; 
    }
    
    .content-right-side, 
    .img-left-side { 
        width: 100% !important; 
        order: unset !important; 
    }
    
    .img-left-side { 
        height: 120px !important; 
    }
    
    .content-right-side { 
        padding: 5px !important; 
    }
    
    .content-right-side h4 { 
        font-size: 13px !important; 
    }
    
    .big-featured-box { 
        grid-template-columns: 1fr !important; 
        gap: 5px !important; 
    }
    
    .featured-img-left { 
        height: 120px !important; 
    }
    
    .featured-img-left img { 
        min-height: 120px !important; 
    }
    
    .featured-text-right { 
        padding: 5px !important; 
    }
    
    .featured-text-right h3 { 
        font-size: 15px !important; 
    }
    
    .small-horizontal-strip { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 5px !important; 
    }
    
    .small-box-item {
        border-radius: 8px !important;
    }
    
    .small-img-top { 
        height: 90px !important; 
    }
    
    .small-text { 
        padding: 5px !important; 
    }
    
    .small-text h5 { 
        font-size: 12px !important; 
    }
}

/* ===================================== */
/* Latest News Desktop Enhancements */
/* ===================================== */
@media (min-width: 769px) {
    /* زيادة ارتفاع الصور */
    .img-top-wrapper {
        padding-bottom: 70% !important; /* من 60% */
    }
    
    .img-left-side,
    .featured-img-left {
        padding-bottom: 70% !important; /* من 60% */
    }
    
    /* تقليل الفراغات إلى 10px */
    .grid-three-cols,
    .grid-two-cols,
    .big-featured-box,
    .small-horizontal-strip {
        gap: 10px !important; /* من 35px */
    }
    
    .col-item-vertical,
    .row-item-horizontal,
    .big-featured-box > div {
        border: 1px solid #e0e0e0 !important; /* من 3px */
        padding: 10px !important;
    }
    
    .text-below-img,
    .content-right-side,
    .featured-text-right,
    .small-text {
        padding: 10px !important;
    }
}

/* ===================================== */
/* Trending Words - Complete CSS */
/* ===================================== */
/* خط فاصل بين الهيدر الأساسي والهيدر 2 */
.header-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        #e0e0e0, 
        #d0d0d0, 
        #e0e0e0, 
        transparent
    );
    margin: 0;
    border: none;
}

/* تصميم الكلمات الرائجة الاحترافي */
.trending-words-section {
    margin: 0;
    padding: 0;
    background: transparent;
}

.trending-words-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: visible !important;
}

/* تأثير الشيمر العلوي البسيط */
.trending-words-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        transparent
    );
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* العنوان الرئيسي */
.trending-title {
    text-align: center;
    margin-bottom: 20px;
    color: white;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

.trending-title h2 {
    font-size: 1.8em !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    line-height: normal !important;
    white-space: nowrap !important;
}

.trending-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.trending-subtitle {
    font-size: 0.9em;
    opacity: 0.9;
    margin: 0;
    font-weight: 300;
    display: block !important;
    visibility: visible !important;
}

/* حاوية الكلمات */
.trending-words-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
}

/* الكلمات الفردية */
.trending-word {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}


/* تصميم متجاوب */
@media (max-width: 768px) {
    .trending-words-section {
        margin-top: 45px !important;
    }
    
    .trending-words-container {
        padding: 20px 25px;
        border-radius: 15px;
    }
    
    .trending-title {
        margin-bottom: 15px !important;
    }
    
    .trending-title h2 {
        font-size: 1.5em !important;
        gap: 8px !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    .trending-subtitle {
        font-size: 0.8em;
    }
    
    .trending-words-grid {
        gap: 10px;
    }
    
    .trending-word {
        padding: 8px 15px;
        font-size: 13px;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .trending-words-container {
        padding: 15px 20px;
        border-radius: 12px;
    }
    
    .trending-title h2 {
        font-size: 1.3em;
        gap: 6px;
    }
    
    .trending-subtitle {
        font-size: 0.75em;
    }
    
    .trending-words-grid {
        gap: 8px;
    }
    
    .trending-word {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 18px;
    }
}

/* تحسينات الأداء */
.trending-word {
    will-change: transform, background-color;
    contain: layout style paint;
}

.trending-words-container {
    contain: layout style paint;
}

/* تأثيرات الحركة */
.trending-words-grid.animation-fade .trending-word {
    transition: opacity var(--animation-duration, 500ms) ease-in-out;
}

.trending-words-grid.animation-slide .trending-word {
    transition: transform var(--animation-duration, 500ms) ease-in-out;
}

.trending-words-grid.animation-bounce .trending-word {
    transition: all var(--animation-duration, 500ms) ease-in-out;
}

.trending-words-grid.animation-glow .trending-word {
    transition: all var(--animation-duration, 500ms) ease-in-out;
}

/* تأثيرات خاصة للحركات */
.trending-word.glow-out {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.trending-word.glow-in {
    box-shadow: 0 0 30px rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

/* تحسينات الأداء */
.trending-word {
    contain: layout style paint;
}

/* تأثيرات خاصة للوضع الليلي */
@media (prefers-color-scheme: dark) {
    .trending-word.glow-out {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    }
    
    .trending-word.glow-in {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    }
}

/* تحسينات إضافية للوضوح */
.trending-word {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* تأثيرات خاصة للكلمات الساخنة */
.trending-word.hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

/* تأثيرات خاصة للكلمات الجديدة */
.trending-word.new {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

/* تأثيرات خاصة للكلمات الترندية */
.trending-word.trending {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===================================== */
/* Widget Icons - Complete CSS */
/* ===================================== */
/* أيقونة الأخبار */
.news-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    color: inherit;
}

/* أيقونة الوقت */
.time-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 3px;
    vertical-align: middle;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    color: inherit;
}

/* تحسين عرض الأيقونات على الشاشات المختلفة */
@media (max-width: 768px) {
    .news-icon {
        font-size: 12px;
        width: 14px;
        height: 14px;
    }
    
    .time-icon {
        font-size: 10px;
        width: 10px;
        height: 10px;
    }
}

/* دعم أفضل للخطوط والأيقونات */
.news-icon, .time-icon {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تحسين الوصولية */
.news-icon, .time-icon {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* تحسين الأداء */
.news-icon, .time-icon {
    contain: layout style paint;
}