@import url('fonts.css');


/* الحاوية الرئيسية الكلية */
.category-master-wrapper {
    display: flex;
    gap: 25px;
    direction: rtl;
    width: 100%;
    margin-bottom: 40px;
    font-family: 'AlArabiya Custom', Tahoma, Arial, sans-serif; /* تفعيل الخط للمكون بأكمله */
}

/* ================= العمود الأيمن: آخر أخبار الموقع (Sidebar) ================= */
.global-sidebar {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid #e2e8f0; /* الخط الفاصل يسار العمود الأيمن */
    padding-left: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-title-box {
    border-bottom: 2px solid #0f172a;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.sidebar-title-box h2 {
    font-size: 20px;
    font-weight: 700; /* الوزن العريض المتاح */
    color: #0f172a;
    margin: 0;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-item {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-tag {
    font-size: 20px;
    color: #64748b;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.sidebar-item-title {
    font-size: 24px;
    line-height: 1.6;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.sidebar-item-title a {
    color: #1e293b;
    transition: color 0.2s;
}

.sidebar-item-title a:hover {
    color: #dc2626;
}

.sidebar-time {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400; /* الحفاظ على البيانات الوصفية بالخط الخفيف والناعم */
}

.sidebar-more-btn {
    display: block;
    text-align: center;
    border: 1px solid #0f172a;
    padding: 8px;
    margin-top: 15px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.sidebar-more-btn:hover {
    background: #0f172a;
    color: #fff;
}

/* ================= الكتلة اليسرى: أخبار وموضوعات القسم (العريضة) ================= */
.category-content-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 1. الخبر الرئيسي العلوي الكبير */
.cat-hero-news {
    display: flex;
    gap: 20px;
    background: #fff;
}

.hero-img-wrap {
    flex: 1;
    height: 380px;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #64748b;
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
}

.hero-info-wrap {
    width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5px;
}

.hero-title {
    font-size: 26px;
    font-weight: 700; /* توافق كامل مع وزن البولد المتوفر */
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.hero-title a {
    color: #0f172a;
    transition: color 0.2s;
}

.hero-title a:hover {
    color: #dc2626;
}

.hero-desc {
    color: #475569;
    font-size: 18px;
    line-height: 1.7;
    margin: 0;
    font-weight: 400; /* الوزن العادي المريح لقراءة الوصف */
}

/* 2. الثلاث أخبار المتجاورة في الوسط */
.cat-triple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

.triple-card {
    display: flex;
    flex-direction: column;
}

.triple-card .card-img-wrap {
    width: 100%;
    height: 145px;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 2px;
}

.triple-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.triple-card .card-title {
    font-size: 22px;
    line-height: 1.6;
    font-weight: 700;
}

.triple-card .card-title a {
    color: #000;
    transition: color 0.2s;
}

.triple-card .card-title a:hover {
    color: #dc2626;
}

/* 3. الشبكة السفلى الرباعية */
.cat-quad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 15px;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

.quad-card {
    display: flex;
    flex-direction: column;
}

.quad-img-wrap {
    width: 100%;
    height: 130px;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 2px;
}

.quad-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quad-title {
    font-size: 21px;
    line-height: 1.5;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.quad-title a {
    color: #000;
    transition: color 0.2s;
}

.quad-title a:hover {
    color: #dc2626;
}

.quad-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    margin-top: auto;
}

.meta-tag { color: #475569; font-weight: 700; }
.meta-time { color: #94a3b8; font-weight: 400; }

.no-articles { text-align: center; padding: 40px; color: #64748b; font-weight: 400; }

/* ================= شاشات التجاوب ودعم الهواتف ================= */
@media (max-width: 1024px) {
    .category-master-wrapper {
        flex-direction: column;
    }
    .global-sidebar {
        width: 100%;
        border-left: none;
        padding-left: 0;
        border-bottom: 2px solid #e2e8f0;
        padding-bottom: 25px;
    }
    .cat-hero-news {
        flex-direction: column;
    }
    .hero-info-wrap {
        width: 100%;
    }
    .cat-quad-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .cat-triple-grid, .cat-quad-grid {
        grid-template-columns: 1fr;
    }
    .hero-img-wrap {
        height: 240px;
    }
}