@import url('fonts.css');
/* اصلاح الهيكل العام ومنع التبعثر */
body { margin: 0; padding: 0; overflow-x: hidden; }
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
    width: 100%; 
    box-sizing: border-box; 
}
.main-header, .main-navbar, .breaking-news { width: 100%; }

/* التنسيقات العامة للموقع */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'AlArabiya Custom', Tahoma, Arial, sans-serif; /* تعيين الخط المستدعى خارجياً 

}
body { 
    background-color: #f8f9fa; 
    color: #333; 
    font-weight: 400;
}
.container { width: 85%; margin: 0 auto; max-width: 1200px; }
a { text-decoration: none; color: inherit; }

/* Header & Navbar */
.main-header { background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; padding: 20px 0; }
.header-top { display: flex; justify-content: space-between; align-items: center; }
.logo h1 { font-weight: 700; font-size: 28px; } 
.logo span { color: #dc2626; margin: 0 5px; }

.main-navbar { background-color: #dc2626; }
.main-navbar ul { display: flex; list-style: none; }
.main-navbar ul li a { display: block; padding: 15px 20px; color: #fff; font-weight: 700; transition: 0.3s; }
.main-navbar ul li a:hover { background-color: #b91c1c; }

/* Breaking News */
.breaking-news { background-color: #111; color: #fff; padding: 10px 0; display: flex; align-items: center; }
.breaking-news .badge { background-color: #dc2626; padding: 5px 15px; font-weight: 700; margin-left: 15px; }

/* ================= قسم السلايدر الاحترافي المطور ================= */
.news-slider-wrapper {
    margin: 25px 0;
    direction: rtl;
}

.slider-grid-container {
    display: grid;
    grid-template-columns: 1fr 400px; 
    gap: 0; 
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* القائمة الجانبية اليسرى للسلايدر */
.slider-thumbnails-sidebar {
    display: flex;
    flex-direction: column;
    background: #f1f5f9; 
    gap: 4px; 
    border-right: 1px solid #e2e8f0;
}

.thumb-item {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    background: #fff; 
    height: 95px; 
}

.thumb-item:hover, .thumb-item.active {
    background: #f8fafc;
}

.thumb-item.active .thumb-title h3 {
    color: #dc2626; 
    font-weight: 900;
}

.thumb-img {
    width: 110px; 
    height: 75px;
    flex-shrink: 0;
}

.thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.thumb-title {
    flex: 1; 
}

.thumb-title h3 {
    font-size: 20px;
    line-height: 1.6;
    margin: 0;
    color: #334155;
    font-weight: 700;
    display: block; 
    overflow: visible;
}

/* العارض الرئيسي الأيمن للصور الكبيرة */
.main-slider-viewport {
    position: relative;
    height: 380px;
    background: #000;
}

.main-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.main-slide-item.active {
    opacity: 1;
    visibility: visible;
}

.slide-big-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* شريط العنوان السفلي والتحكم الترقيمي */
.slide-caption-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.85); 
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.caption-content {
    flex: 1;
    border-right: 4px solid #dc2626; 
    padding-right: 15px;
}

.slide-title-link {
    color: #ffffff;
    font-size: 40px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

/* لوحة التحكم الرقمية التفاعلية */
.slide-numeric-controls {
    display: flex;
    gap: 6px;
    direction: ltr; 
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.control-btn.active {
    background: #ffffff;
    color: #0f172a;
}

/* ================= التنسيقات للبلوكات المتجاورة (الرياضة والاقتصاد) ================= */
.two-columns-block {
    width: 100%;
    margin: 30px 0;
    direction: rtl;
}

.two-columns-block .block-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ترويسة البلوك الجانبي */
.category-column .column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.category-column .column-header h2 {
    font-size: 30px;
    margin: 0;
}

.category-column .column-header h2 a {
    color: #0f172a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-column .column-header .chevron-icon {
    font-style: normal;
    font-size: 20px;
    color: #64748b;
}

/* العلامات اللونية بجانب الترويسات */
.column-header .header-tag {
    width: 10px;
    height: 24px;
    display: inline-block;
}
.column-header .sports-tag { background-color: #27ae60; }
.column-header .economy-tag { background-color: #1e3a8a; }

/* الأخبار الرئيسية العليا داخل البلوك */
.top-main-news {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.main-news-item {
    display: flex;
    flex-direction: column;
}

.main-news-item .item-img {
    width: 100%;
    height: 155px;
    overflow: hidden;
    border-radius: 2px;
}

.main-news-item .item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-news-item .item-title {
    font-size: 24px;
    line-height: 1.6;
    margin-top: 12px;
    font-weight: 700;
}

.main-news-item .item-title a {
    color: #000;
    transition: color 0.2s;
}

.main-news-item .item-title a:hover {
    color: #dc2626;
}

/* الأخبار الفرعية السفلى ذات الاتجاه الأفقي */
.bottom-sub-news {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.sub-news-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.sub-news-item .sub-item-title {
    flex: 1;
    font-size: 20px;
    line-height: 1.6;
    margin: 0;
    font-weight: 700;
}

.sub-news-item .sub-item-title a {
    color: #000;
}

.sub-news-item .sub-item-title a:hover {
    color: #dc2626;
}

.sub-news-item .sub-item-img {
    width: 110px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
}

.sub-news-item .sub-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* زر المزيد أسفل البلوك المائل لليسار */
.category-column .more-btn-wrapper {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    margin-top: 20px;
}

.category-column .btn-more {
    display: inline-flex;
    align-items: center;
    border: 1px solid #0f172a;
    padding: 6px 20px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.category-column .btn-more:hover {
    background: #0f172a;
    color: #fff;
}

/* ================= تفاصيل قسم الأخبار الجديد ================= */
.main-layout { display: block; margin: 30px 0; }
.grid-full-width { width: 100%; }

.section-main-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-accent-block {
    width: 10px;
    height: 24px;
    background-color: #64748b; 
    display: inline-block;
}

.section-main-title {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-main-title .chevron-left {
    font-size: 20px;
    color: #64748b;
}

/* شبكة العرض المحدثة: 4 أعمدة متساوية للبطاقات الإخبارية */
.news-main-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px; 
    margin-bottom: 35px;
}

.news-grid-card {
    display: flex;
    flex-direction: column;
    background: transparent;
}

.card-img-link {
    width: 100%;
    height: 165px;
    overflow: hidden;
    display: block;
    margin-bottom: 12px;
    border-radius: 2px;
}

.card-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-grid-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-grid-title {
    font-size: 20px;
    line-height: 1.6;
    font-weight: 700;
    color: #000000;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-grid-title a {
    color: #000000;
    transition: color 0.2s;
}

.card-grid-title a:hover {
    color: #dc2626;
}

.card-grid-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; 
    font-size: 18px;
    font-weight: 400; 
}

.meta-category { color: #475569; }
.meta-time { color: #94a3b8; }

.more-btn-wrapper {
    display: flex;
    justify-content: flex-end; 
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
    margin-top: 20px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #0f172a;
    padding: 8px 24px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    background: #fff;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-load-more .chevron-left { font-style: normal; font-size: 16px; }
.btn-load-more:hover { background: #0f172a; color: #fff; }

/* ================= قسم المنوعات والمجلات (طراز ليالينا) ================= */
.lifestyle-magazine-section {
    width: 100%;
    margin: 40px 0;
    direction: rtl;
}

.magazine-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr; 
    gap: 20px;
    align-items: stretch;
}

.magazine-side-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.magazine-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    position: relative;
}

.magazine-card .card-media {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 2px;
}

.magazine-card .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-card .card-info {
    background: #fff;
    padding: 15px;
    margin: -30px 20px 0 20px; 
    position: relative;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    border-radius: 2px;
}

.magazine-featured-column {
    display: flex;
}

.featured-cover-card {
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 2px;
    overflow: hidden;
    min-height: 490px;
}

.cover-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.6));
    z-index: 1;
}

.featured-cover-card .card-info {
    background: #fff;
    padding: 20px;
    margin: 0 25px 25px 25px;
    position: relative;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    border-radius: 2px;
}

.sub-cat-tag {
    display: block;
    font-size: 24px;
    color: #b11f67; 
    font-weight: 700;
    margin-bottom: 8px;
}

.magazine-card .card-title { font-size: 20px; line-height: 1.5; font-weight: 700; margin: 0; }
.featured-cover-card .card-title { font-size: 24px; line-height: 1.6; font-weight: 700; margin: 0; }
.magazine-grid .card-title a { color: #222; transition: color 0.2s; }
.magazine-grid .card-title a:hover { color: #b11f67; }

/* القوالب القديمة والاحتياطية */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card { background: #fff; border-bottom: 4px solid #dc2626; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-card .card-body { padding: 15px; }
.news-card h3 { font-size: 16px; line-height: 1.6; color: #1e293b; font-weight: 700; }
.sidebar-box { background: #fff; padding: 20px; margin-bottom: 20px; border-top: 4px solid #0f172a; }

/* Footer */
.main-footer { background-color: #0f172a; color: #94a3b8; text-align: center; padding: 20px 0; margin-top: 40px; }

/* متجاوب: دعم شاشات العرض المتوسطة والصغيرة الهواتف */
@media (max-width: 1199px) {
    .news-main-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .slider-grid-container { grid-template-columns: 1fr; }
    .slider-thumbnails-sidebar { order: 2; }
    .main-slider-viewport { height: 280px; }
    .slide-title-link { font-size: 18px; }
    .news-main-grid { grid-template-columns: repeat(2, 1fr); }
    .two-columns-block .block-container { grid-template-columns: 1fr; gap: 30px; }
    .magazine-grid { grid-template-columns: 1fr 1fr; }
    .magazine-featured-column { grid-column: span 2; order: -1; }
}

@media (max-width: 640px) {
    .news-main-grid, .magazine-grid { grid-template-columns: 1fr; }
    .magazine-featured-column { grid-column: span 1; }
    .magazine-card .card-info { margin: -20px 10px 0 10px; }
    .more-btn-wrapper, .category-column .more-btn-wrapper { justify-content: center; }
}

/* إزالة الخط السفلي من جميع الروابط في كامل الموقع */
a {
    text-decoration: none !important;
}