/* ============================================================
   ScoreTank Page Styles - Full Fix (Sidebar & Night Mode)
   ============================================================ */

/* 1. تعريف الألوان الأساسية (الوضع النهاري) */
:root {
    --st-bg-body: #f4f4f4;
    --st-bg-box: #ffffff;
    --st-text-main: #222222;
    --st-text-meta: #777777;
    --st-border: #eeeeee;
    --st-accent: #007bff;
    --st-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 2. منطق الوضع الليلي الشامل (يغطي dark-mode و التبديل الخاص بجنه) */
body.dark-mode, 
body.dark-skin, 
body.tie-skin-inverted {
    --st-bg-body: #161616;
    --st-bg-box: #1f1f1f;
    --st-text-main: #e1e1e1;
    --st-text-meta: #999999;
    --st-border: #333333;
    --st-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* 3. تنسيق هيكل الصفحة (إصلاح العمود الجانبي) */
.scoretank-page-container {
    background-color: var(--st-bg-body);
    color: var(--st-text-main);
    direction: rtl;
    padding: 40px 0;
}

.scoretank-page-container .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* ضمان عدم تجاوز العرض 100% */
.scoretank-page-container *, .scoretank-page-container *:after, .scoretank-page-container *:before {
    box-sizing: border-box;
}

/* توزيع الأعمدة (الكمبيوتر) - تحديث لدعم العرض الكامل */
@media (min-width: 992px) {
    /* في حالة وجود السايدبار */
    .scoretank-page-container .content-area.col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
        padding: 0 15px;
    }
    
    .scoretank-page-container .sidebar.col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        padding: 0 15px;
    }

    /* ★ السطر المطلوب لإصلاح مشكلة العرض الكامل ★ */
    .scoretank-page-container .content-area.col-lg-12 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        padding: 0 15px;
    }
}

/* 4. تنسيق الصندوق الرئيسي (مثل single.css تماماً) */
.main-content-box.box {
    background: var(--st-bg-box);
    border: 1px solid var(--st-border);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--st-shadow);
    margin-bottom: 30px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--st-text-main);
}

.entry-content {
    line-height: 1.9;
    font-size: 18px;
    color: var(--st-text-main);
}

/* 5. تنسيق ويدجات العمود الجانبي (من ملف single.css) */
#sidebar.sidebar .widget {
    background: var(--st-bg-box);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--st-shadow);
}

#sidebar .widget .box-title {
    border-bottom: 2px solid var(--st-border);
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

#sidebar .widget .box-title:after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background: var(--st-accent);
}

#sidebar .widget .box-title .title {
    font-size: 19px;
    font-weight: 700;
    color: var(--st-text-main);
}

/* تنسيق قائمة المقالات في السايدبار */
.widget-single-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--st-border);
}

.widget-single-post-item:last-child { border: none; }

.widget-single-post-item .post-thumb img {
    width: 85px;
    height: 65px;
    object-fit: cover;
    border-radius: 5px;
}

.widget-single-post-item .post-data h5 a {
    color: var(--st-text-main);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.widget-single-post-item .post-data .date {
    font-size: 12px;
    color: var(--st-text-meta);
    display: block;
    margin-top: 5px;
}

/* 6. التجاوب للهواتف */
@media (max-width: 991px) {
    .scoretank-page-container .content-area,
    .scoretank-page-container .sidebar {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}