/* ========================================================
   استایل‌های اختصاصی صفحه تک مقاله (Single Article)
======================================================== */

/* --- ۱. هدر مقاله و متادیتا --- */
.rst-meta-highlight,
.rst-meta-highlight svg {
    color: #8B92E6 !important;
}

.rst-article-excerpt-new {
    background: transparent;
    border: none;
    padding: 0;
}
.rst-article-excerpt-new p {
    color: #FFFFFF !important;
    font-size: 16px;
    line-height: 2.2;
    text-align: justify;
}

.rst-article-featured-img {
    height: 450px;
    border-radius: 8px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
@media (max-width: 768px) {
    .rst-article-featured-img {
        height: 250px;
    }
}

/* --- ۲. تایپوگرافی محتوای اصلی --- */
.rst-main-content p {
    font-size: 16px;
    line-height: 2.2;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}
.rst-main-content h2, .rst-main-content h3 {
    line-height: 1.6;
}

/* --- ۳. باکس‌های محتوایی اختصاصی ویرایشگر (Blocks) --- */

/* اعمال قطعی فونت استعداد به تمام باکس‌های شورت‌کد */
.rst-editor-blue-box,
.rst-editor-blue-box *,
.rst-editor-warning-box,
.rst-editor-warning-box * {
    font-family: "Estedad", sans-serif !important;
}

.rst-editor-blue-box {
    background: linear-gradient(32.72deg, rgba(10, 9, 24, 0.1) -11.7%, #4956E2 125.21%), #C5C5C533;
    background-blend-mode: lighten;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* تایپوگرافی داخل باکس‌های آماری (اصلاح شده برای شورت‌کد جدید) */
.rst-stat-item .rst-stat-val {
    font-size: 24px;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 8px;
    display: block;
}
.rst-stat-item .rst-stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    display: block;
}

.rst-editor-warning-box {
    background: linear-gradient(90deg, rgba(226, 54, 112, 0.15) 0%, rgba(135, 26, 60, 0.4) 100%);
    backdrop-filter: blur(12px);
    border-radius: 8px !important;
    border: 1px solid rgba(226, 54, 112, 0.3);
}
.rst-warning-title {
    color: #FF4D79;
    font-size: 18px;
    font-weight: bold;
}

/* --- ۴. استایل‌های سایدبار چپ --- */
.rst-toc-box, .rst-related-box {
    background-color: #14113C;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px !important;
}

.rst-toc-list a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: block;
    padding: 4px 0;
}
.rst-toc-list a:hover {
    color: var(--rst-accent-color, #5D6CFF);
    transform: translateX(-5px);
}

.rst-mini-article {
    border-radius: 8px !important;
    transition: background 0.3s ease;
}
.rst-mini-article:hover {
    background: rgba(255, 255, 255, 0.05);
}
.rst-mini-article img {
    border-radius: 8px !important;
}

/* ========================================================
   استایل‌های حالت لایت (Light Mode) برای صفحه تک مقاله
======================================================== */

[data-bs-theme="light"] h1,
[data-bs-theme="light"] .rst-main-content p,
[data-bs-theme="light"] .rst-main-content h2,
[data-bs-theme="light"] .rst-main-content h3,
[data-bs-theme="light"] .rst-article-excerpt-new p {
    color: #1B1256 !important;
}

[data-bs-theme="light"] .rst-editor-blue-box {
    background: linear-gradient(227.67deg, #FFFFFF 33.49%, #AFB5F3 113%) !important;
    border: 1px solid rgba(27, 18, 86, 0.1) !important;
    box-shadow: 0 10px 30px rgba(27, 18, 86, 0.04) !important;
}

[data-bs-theme="light"] .rst-editor-blue-box h3,
[data-bs-theme="light"] .rst-editor-blue-box div.fs-4,
[data-bs-theme="light"] .rst-editor-blue-box p,
[data-bs-theme="light"] .rst-stat-item .rst-stat-val,
[data-bs-theme="light"] .rst-stat-item .rst-stat-label {
    color: #1B1256 !important;
}

[data-bs-theme="light"] .rst-toc-box,
[data-bs-theme="light"] .rst-related-box {
    background: #E4E5F6 !important;
    border: 1px solid rgba(27, 18, 86, 0.08) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.02) !important;
}

[data-bs-theme="light"] .rst-toc-box h4,
[data-bs-theme="light"] .rst-related-box h4,
[data-bs-theme="light"] .rst-mini-article h5 {
    color: #1B1256 !important;
}

[data-bs-theme="light"] .rst-toc-box svg,
[data-bs-theme="light"] .rst-related-box svg {
    stroke: #1B1256 !important;
}

[data-bs-theme="light"] .rst-toc-list a {
    color: rgba(27, 18, 86, 0.7) !important;
}
[data-bs-theme="light"] .rst-toc-list a:hover {
    color: var(--rst-accent-color, #4956E2) !important;
}

[data-bs-theme="light"] .rst-mini-article span {
    color: rgba(27, 18, 86, 0.6) !important;
}
[data-bs-theme="light"] .rst-mini-article:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

[data-bs-theme="light"] .rst-toc-box .border-top,
[data-bs-theme="light"] .rst-related-box .border-bottom {
    border-color: rgba(27, 18, 86, 0.1) !important;
}

[data-bs-theme="light"] .rst-editor-warning-box {
    background: linear-gradient(90deg, rgba(226, 54, 112, 0.08) 0%, rgba(226, 54, 112, 0.03) 100%) !important;
    border-color: rgba(226, 54, 112, 0.2) !important;
}
[data-bs-theme="light"] .rst-editor-warning-box p {
    color: #1B1256 !important;
}