/**
 * Theme Name: Jarida Theme
 * File: Main Stylesheet (Final Fixed Version)
 */

/* =====================================================
   1. الأساسيات وتوسيط الصفحة
===================================================== */
:root {
    --jarida-primary: #7c3aed;
    --jarida-bg: #f8fafc;
    --jarida-white: #ffffff;
    --jarida-text: #111827;
    --jarida-border: #e2e8f0;
    --jarida-radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: "Cairo", sans-serif;
    background: var(--jarida-bg);
    color: var(--jarida-text);
    direction: rtl;
    text-align: right;
}

/* إصلاح الحاوية لضمان عدم خروج المحتوى أو التصاقه */
.jarida-container {
    width: 100%;
    max-width: 1320px; /* العرض المثالي للمجلات الإخبارية */
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
}

/* =====================================================
   2. شريط الأخبار العاجلة (Ticker)
===================================================== */
.jg-news-ticker {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--jarida-border);
    border-radius: 50px;
    margin: 20px 0;
    overflow: hidden;
}

.jg-ticker-label {
    background: #e11d48;
    color: #fff;
    padding: 8px 20px;
    font-weight: 900;
    white-space: nowrap;
}

/* =====================================================
   3. شبكة المجلة (إصلاح الـ Grid الظاهر في الصورة)
===================================================== */
.jg-magazine-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* جعل الخبر الرئيسي يسيطر على المساحة */
    gap: 25px; /* مسافة واضحة بين العناصر */
    margin-bottom: 40px;
}

/* الخبر الرئيسي الكبير */
.jg-mag-main-block {
    position: relative;
    border-radius: var(--jarida-radius);
    overflow: hidden;
    height: 480px;
}

.jg-mag-main-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jg-mag-overlay-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: #fff;
}

.jg-mag-overlay-content h2 {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 10px;
    line-height: 1.5;
}

/* الأخبار الجانبية الصغيرة */
.jg-mag-sub-blocks-wrap {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.jg-mag-sub-item {
    background: #fff;
    border: 1px solid var(--jarida-border);
    border-radius: 15px;
    padding: 10px;
    transition: 0.3s ease;
}

.jg-mag-sub-item a {
    display: flex;
    gap: 15px;
    align-items: center;
}

.jg-mag-sub-item img {
    width: 100px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.jg-mag-sub-info h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.6;
}

/* =====================================================
   4. الهيدر والمنيو (Header Fix)
===================================================== */
.jg-site-header {
    background: #fff;
    border-bottom: 1px solid var(--jarida-border);
    padding: 15px 0;
}

.jg-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jg-logo-text {
    font-size: 26px;
    font-weight: 900;
    color: var(--jarida-primary);
}

.jg-main-navigation ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0; padding: 0;
}

.jg-main-navigation a {
    font-weight: 700;
    font-size: 15px;
}

/* =====================================================
   5. كروت المقالات الأسفل (Index Cards)
===================================================== */
.jg-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.jg-index-card {
    background: #fff;
    border-radius: 15px;
    border: 1px solid var(--jarida-border);
    overflow: hidden;
}