﻿.nt-categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1px 15px;
    margin-bottom: 10px;
}

.nt-category-section {
    margin-bottom: 5px;
}

.nt-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2px;
    padding-bottom: 2px;
    /* margin-bottom: 10px;
    padding-bottom: 10px;*/
    /*  border-bottom: 2px solid #f5f5f5;*/
}

.nt-cat-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: #111;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.nt-cat-title-accent {
    display: inline-block;
    width: 6px;
    height: 26px;
    background-color: #ff173f;
    border-radius: 50px;
    box-shadow: 0 3px 8px rgba(255, 23, 63, 0.3);
}

.nt-cat-more {
    font-size: 14px;
    font-weight: 700;
    color: #555 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.25s ease-in-out;
}

.nt-cat-more-arrow {
    font-size: 18px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.nt-cat-more:hover {
    color: #ff173f !important;
    background-color: rgba(255, 23, 63, 0.05);
}

    .nt-cat-more:hover .nt-cat-more-arrow {
        transform: translateX(4px);
    }

.nt-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.nt-news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
}

    .nt-news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 20px rgba(0,0,0,0.08);
        border-color: rgba(255, 23, 63, 0.15);
    }

.nt-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f7f7f7;
}

.nt-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nt-news-card:hover .nt-card-img {
    transform: scale(1.06);
}

.nt-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
    font-size: 24px;
}

.nt-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nt-card-date {
    font-size: 11px;
    color: #888;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nt-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
    transition: color 0.2s ease;
}

.nt-news-card:hover .nt-card-title {
    color: #ff173f;
}

.nt-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 991px) and (min-width: 576px) {
    .nt-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 575px) {
    .nt-news-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .nt-news-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px 0 !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        background: transparent !important;
        box-shadow: none !important;
        width: 100% !important;
    }

    .nt-cat-header .nt-cat-title,
    section .section-title,
    .category-title h2 {
        font-size: 14px !important;
        font-weight: 800 !important;
        text-transform: uppercase;
    }

    .nt-news-card:last-child {
        border-bottom: none !important;
    }

    .nt-card-img-wrapper {
        width: 100px !important;
        height: 75px !important;
        flex-shrink: 0 !important;
        margin-bottom: 0 !important;
        border-radius: 6px !important;
        overflow: hidden !important;
    }

    .nt-card-content {
        flex: 1 !important;
        padding: 0 0 0 15px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        text-align: left !important;
    }

    .nt-card-title {
        font-size: 14px !important;
        margin-bottom: 4px !important;
        height: auto !important;
        line-height: 1.4 !important;
    }

    .nt-card-date {
        font-size: 11px !important;
        margin: 0 !important;
    }
}
/* =========================================
   1. Theme Variables
========================================= */
:root {
    --wbo-bg: #ffffff;
    --wbo-surface: #ffffff;
    --wbo-surface-secondary: #f5f5f5;
    --wbo-text: #222222;
    --wbo-text-muted: #666666;
    --wbo-border: #dddddd;
    --wbo-primary: #198754;
    --wbo-shadow: rgba(0, 0, 0, 0.12);
}

/*html[data-theme="dark"] {
    --wbo-bg: #212121;
    --wbo-surface: #181b21;
    --wbo-surface-secondary: #22262d;
    --wbo-text: #f1f3f5;
    --wbo-text-muted: #b8bec7;
    --wbo-border: #343a43;
    --wbo-primary: #45c982;
    --wbo-shadow: rgba(0, 0, 0, 0.45);
}*/

html[data-theme="dark"] {
    --wbo-bg: #212121;
    --wbo-surface: #212121;
    --wbo-surface-secondary: #1e1e1e;
    --wbo-text: #ececec;
    --wbo-text-muted: #9e9e9e;
    --wbo-border: #333333;
    --wbo-primary: #45c982;
    --wbo-shadow: rgba(0, 0, 0, 0.35);
}

/* =========================================
   2. Global Resets
========================================= */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: clip;
    background-color: var(--wbo-bg);
    color: var(--wbo-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* =========================================
   3. Header & Navigation
========================================= */
.site-header {
    position: relative;
    z-index: 1000;
    background-color: var(--wbo-bg);
    color: var(--wbo-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

    .site-header .container {
        max-width: 1200px;
        margin: auto;
        padding: 0 15px;
    }

.mid-header {
    padding: 2px 0;
    background-color: var(--wbo-bg);
    color: var(--wbo-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

    .mid-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0px;
    }

/*.logo img {
    height: auto;
    max-width: 350px;
    display: block;
}

.ad-banner {
    max-width: 728px;
    width: 100%;
}

    .ad-banner img {
        width: 100%;
        height: auto;
        border-radius: 4px;
    }*/

.navbar {
    background: #2b2b2b;
    position: sticky;
    top: 0;
    z-index: 9999;
    min-height: 52px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#navigation {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

    #navigation li a {
        display: block;
        padding: 17px 20px;
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        transition: 0.3s;
    }

        #navigation li a:hover {
            background: #c5a028;
            color: #ffffff;
        }

/* =========================================
   4. News Grid & Cards
========================================= */
.nt-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.nt-news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.nt-card-img-wrapper {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f7f7f7;
}

.nt-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nt-card-content {
    padding: 16px;
    flex-grow: 1;
}

.nt-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

/* =========================================
   5. Article Page
========================================= */
.article-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
}

.article-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.article-content {
    padding: 40px;
    line-height: 2;
    background-color: #f4f4f4;
    text-align: justify;
}

/* =========================================
   6. Market Ticker
========================================= */
.wbo-market-ticker {
    background: #09090b;
    color: #fff;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 14px;
}

/* =========================================
   7. Dark Mode Overrides (Must be at end)
========================================= */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .mid-header {
    background-color: var(--wbo-bg) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .nt-news-card,
html[data-theme="dark"] .article-container,
html[data-theme="dark"] .article-content,
html[data-theme="dark"] section:not(.nt-trending-section) {
    background-color: var(--wbo-surface) !important;
    color: var(--wbo-text) !important;
    border-color: var(--wbo-border) !important;
}

html[data-theme="dark"] .nt-card-title,
html[data-theme="dark"] .nt-cat-title {
    color: var(--wbo-text) !important;
}

html[data-theme="dark"] .nt-trending-section {
    background-color: transparent !important;
    --wbo-primary: #ff173f;
}

/* Utilities */
html[data-theme="dark"] .text-muted {
    color: var(--wbo-text-muted) !important;
}

.floating-search {
    position: fixed;
    bottom: 10px;
    margin-left: 5px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #f7b731;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 15px rgba(247,183,49,0.5), 0 5px 20px rgba(0,0,0,0.3);
    transition: all .3s ease;
}

    .floating-search:hover {
        background: rgba(51,51,51,0.9);
        box-shadow: 0 0 25px rgba(247,183,49,0.8);
    }

.floating-search-btn {
    position: fixed;
    bottom: 10px;
    width: 65px;
    margin-left: 5px;
    height: 65px;
    background-color: rgba(0,0,0,0.6);
    color: #f7b731;
    border: 2.5px solid #f7b731;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(247,183,49,0.6), inset 0 0 12px rgba(247,183,49,0.25);
    transition: all .35s ease;
}

    .floating-search-btn:hover {
        transform: scale(1.1);
        background-color: rgba(247,183,49,0.95);
        color: #000;
        box-shadow: 0 0 30px rgba(247,183,49,0.9);
    }

    .floating-search-btn i {
        font-size: 26px;
    }

.search-full-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: all .5s ease;
}

.search-container {
    width: 100%;
    max-width: 700px;
    text-align: center;
    padding: 20px;
}

.search-input-premium {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid #f7b731;
    color: #fff;
    font-size: 35px;
    padding: 15px;
    outline: none;
    text-align: center;
}

.close-search-btn {
    position: absolute;
    top: 40px;
    right: 50px;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    transition: .3s;
}

    .close-search-btn:hover {
        color: #f7b731;
    }

.wbo-search-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(17,17,17,0.6);
    border: 2px solid #f7b731;
    color: #f7b731;
    font-size: 22px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 18px rgba(247,183,49,0.55);
    transition: .3s ease;
}

    .wbo-search-float:hover {
        background: #f7b731;
        color: #111;
        transform: scale(1.1);
        box-shadow: 0 0 28px #f7b731;
    }

.wbo-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

    .wbo-search-overlay.active {
        display: flex;
    }

.wbo-search-box {
    width: 90%;
    max-width: 600px;
}

#wboSearchInput {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #f7b731;
    color: #fff;
    font-size: 28px;
    padding: 15px 0;
    text-align: center;
    outline: none;
}

.font-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    padding: 10px 14px;
    background: #f7f7f7;
    border-radius: 10px;
    border: 1px solid #eee;
    width: fit-content;
}

.font-label {
    font-size: 13px;
    color: #666;
    margin-right: 8px;
}

.font-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

    .font-btn i {
        font-size: 14px;
    }

    .font-btn:hover {
        background: #e60023;
        color: white;
        border-color: #e60023;
        transform: translateY(-1px);
    }

    .font-btn.reset {
        background: #fafafa;
    }

/* Dark Mode: فقط Hover کارت‌های تایم‌لاین */
html[data-theme="dark"] .nt-time-item:hover {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #111111 !important;
}

    /* متن داخل کارت هنگام Hover */
    html[data-theme="dark"] .nt-time-item:hover *,
    html[data-theme="dark"] .nt-time-item:hover .nt-time-title,
    html[data-theme="dark"] .nt-time-item:hover .nt-time-date {
        color: #111111 !important;
    }

    /* فقط دات/نشانگر هنگام Hover همان کارت */
    html[data-theme="dark"] .nt-time-item:hover .nt-dot,
    html[data-theme="dark"] .nt-time-item:hover [class*="dot"],
    html[data-theme="dark"] .nt-time-item:hover [class*="marker"] {
        background-color: #ffffff !important;
        border-color: #ffffff !important;
    }

/* هیچ کارت فعالی در Dark Mode قرمز نباشد */
html[data-theme="dark"] .nt-time-item.nt-active {
    background-color: transparent !important;
    border-color: transparent !important;
    color: inherit !important;
}

    html[data-theme="dark"] .nt-time-item.nt-active * {
        color: inherit !important;
    }

/* فقط کارت زیر ماوس سفید شود */
html[data-theme="dark"] .nt-time-item:hover {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #111111 !important;
}

    html[data-theme="dark"] .nt-time-item:hover * {
        color: #111111 !important;
    }

.article-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    font-family: inherit;
}

.article-hero {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

    .article-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        background: #000;
    }

@media (min-width: 992px) {
    .article-hero {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 500px;
        position: relative;
    }

        .article-hero::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image: var(--hero-bg-img);
            background-size: cover;
            background-position: center center;
            filter: blur(20px);
            transform: scale(1.1);
            opacity: 0.6;
            z-index: 0;
        }

        .article-hero img {
            position: relative;
            z-index: 1;
            width: auto;
            height: 100%;
            max-width: 100%;
            object-fit: contain;
            filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
        }

    .hero-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 80px 40px 60px;
        background: linear-gradient(transparent, rgba(0,0,0,0.85));
        color: white;
        z-index: 10;
    }
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 80px 40px 60px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
}

.hero-category {
    background: #e60023;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-title {
    font-size: 32px;
    margin: 0;
    line-height: 1.3;
    font-weight: 800;
    font-family: inherit;
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 16px !important; /* سایز مناسب و خوانا برای موبایل */
        line-height: 1.35 !important; /* فاصله خطوط متناسب */
        margin-bottom: 6px !important; /* تنظیم فاصله تا زیرعنوان یا تاریخ */
    }
}

.article-lead-wrapper {
    padding: 0 40px;
}

.article-lead {
    width: 90% !important;
    margin: 1px auto !important;
    padding: 0 5px !important;
    display: block !important;
    text-align: left !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    position: relative !important;
    z-index: 20 !important;
    margin-top: -35px !important;
    padding-bottom: 20px;
}

.hero-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 30px 15px 55px 15px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%) !important;
    z-index: 10 !important;
}

.hero-category {
    margin-bottom: 6px !important;
    font-size: 9.5px !important;
    padding: 3px 8px !important;
    display: inline-block !important;
}

.article-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important; /* اطمینان از پنهان شدن قسمت‌های اضافی */
}

.article-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-top: 10px;
}

.article-content {
    font-size: 16px;
    padding: 30px;
    line-height: 2;
    color: #333;
    text-align: justify;
    background-color: #f4f4f4;
    border: none;
}

@media (max-width: 768px) {
    /*.article-lead {
        width: 80% !important;*/ /* اجازه بده از لبه‌ها فاصله داشته باشه */
    /*max-width: 500px !important;*/ /* یک پهنای حداکثری تعیین کن که متن خیلی کشیده نشه */
    /*margin: 5px auto !important;*/ /* از بالا و پایین فاصله بده و خودش رو وسط قرار بده */
    /*padding: 0 15px !important;*/ /* فاصله داخلی برای اینکه متن به لبه‌ها نچسبه */
    /*display: block !important;
        text-align: left !important;*/ /* اگر می‌خوای متن وسط‌چین باشه (معمولاً برای موبایل بهتره) */
    /*font-size: 0.78rem !important;*/ /* اندازه فونت رو هم کمی تنظیم کن که متناسب باشه */
    /*line-height: 1.6 !important;*/ /* فاصله بین خطوط برای خوانایی بهتر */
    /*}*/

    .article-lead {
        width: 80% !important;
        max-width: 500px !important;
        margin: 1px auto !important;
        padding: 0 5px !important;
        display: block !important;
        text-align: left !important;
        font-size: 0.78rem !important;
        line-height: 1.6 !important;
        /* --- تغییرات جدید --- */
        position: relative !important; /* یا absolute */
        z-index: 20 !important; /* بالاتر از عکس ولی زیر/روی overlay */
        margin-top: -35px !important; /* اینو بر اساس نیاز تنظیم میکنی (شاید -25 تا -50) */
        /* ------------------- */
    }

    .article-meta {
        color: #888;
        font-size: 14px;
        margin-bottom: 10px;
        border-bottom: 1px solid #eee;
    }

    .article-hero {
        height: 350px !important;
        position: relative !important display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        overflow: hidden !important;
        background-color: #000;
    }

        .article-hero::before {
            content: "" !important;
            position: absolute !important;
            inset: 0 !important;
            background-image: var(--hero-bg-img) !important;
            background-size: cover !important;
            background-position: center center !important;
            filter: blur(20px) !important;
            transform: scale(1.2) !important;
            opacity: 0.6 !important;
            z-index: 0 !important;
        }

        .article-hero img {
            position: relative !important;
            z-index: 1 !important;
            width: auto !important;
            height: 100% !important;
            max-width: 100% !important;
            object-fit: contain !important;
            object-position: center !important;
            display: block !important;
            filter: drop-shadow(0 0 15px rgba(0,0,0,0.6));
        }

    .hero-title {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.8);
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/*@media (max-width: 768px) {
    .article-hero {
        height: 350px;
    }

    .hero-overlay {
        padding: 40px 20px 50px;
    }

    .hero-title {
        font-size: 24px;
    }

    .article-lead-wrapper {
        padding: 0 15px;
    }

    .article-lead {
        margin-top: -30px;
        padding: 20px;
        font-size: 16px;
        width: auto;
    }

    .article-content {
        font-size: 14px;
        padding: 20px;
        line-height: 2;
        color: #333;
        text-align: justify;
        background-color: #f4f4f4;
        border: none;
    }

    html[data-theme="dark"] .site-header,
    html[data-theme="dark"] .mid-header {
        background-color: var(--wbo-bg) !important;
        color: var(--wbo-text) !important;
    }
}*/

.news-tags {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    display: inline-block;
    font-family: inherit;
    background: #cfaf10;
    color: black;
    padding: 2px 10px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #fee2e2;
    font-weight: 500;
    text-transform: capitalize;
}

    .tag:hover {
        background: #d32f2f;
        color: beige;
        border-color: #d32f2f;
    }

.related-news-box {
    margin-top: 28px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    direction: rtl;
}

.related-news-title {
    margin: 0 0 14px;
    padding-right: 10px;
    border-right: 4px solid #2563eb;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
}

.related-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-news-item {
    border-bottom: 1px dashed #e5e7eb;
}

    .related-news-item:last-child {
        border-bottom: none;
    }

.related-news-link {
    display: block;
    padding: 12px 4px;
    text-decoration: none;
    color: #111827;
    font-size: 0.96rem;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================================================
   Dark Mode: Related News Links
================================================== */
html[data-theme="dark"] .related-news-link {
    color: #f1f5f9 !important; /* رنگ سفید / روشن */
}

    /* حالت هاور لینک در دارک مود (اختیاری جهت جلوه بهتر - رنگ قرمز برند یا خاکستری روشن) */
    html[data-theme="dark"] .related-news-link:hover {
        color: #ff173f !important; /* یا #ffffff در صورت تمایل به سفید خالص */
    }

.related-news-link::before {
    content: "●";
    color: #cfaf10;
    margin-left: 8px;
    font-size: 0.8rem;
    vertical-align: middle;
}

.related-news-link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
    padding-right: 12px;
}

.market-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.live-badge {
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.4);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.main-menu {
    height: 50px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

    .main-menu::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        /*background: linear-gradient( to right, rgba(0, 0, 0, 0) 0%, rgba(15, 15, 15, 0.9) 100% );*/
        background: #2b2b2b;
        z-index: 15;
    }

.nav-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

#navigation {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}

    #navigation::-webkit-scrollbar {
        display: none;
    }

    #navigation li {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        height: 100%;
    }

        #navigation li a {
            display: flex;
            align-items: center;
            height: 100%;
            text-decoration: none;
            color: whitesmoke;
            padding: 0 10px;
            cursor: pointer;
            position: relative;
            z-index: 10;
            white-space: nowrap;
        }

    /* Theme toggle item */
    /* ====================================================
           Theme Toggle Fix (Single Icon Display)
        ==================================================== */
    #navigation .theme-toggle-item {
        margin-left: auto;
        padding-left: 8px;
        padding-right: 8px;
        position: relative;
        z-index: 20;
        display: inline-flex;
        align-items: center;
    }

    /* Button Container */
    #navigation .theme-toggle {
        position: relative;
        width: 36px;
        height: 36px;
        padding: 0;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        cursor: pointer;
        overflow: hidden;
        transition: background-color .25s ease, color .25s ease, transform .25s ease, border-color .25s ease;
    }

        #navigation .theme-toggle:hover {
            background: #f7b731;
            border-color: #f7b731;
            color: #111111;
            transform: scale(1.08);
        }

        #navigation .theme-toggle:focus-visible {
            outline: 2px solid #f7b731;
            outline-offset: 3px;
        }

        /* Icons Absolute Placement */
        #navigation .theme-toggle .theme-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
            pointer-events: none;
        }

        /* ----------------------------------------------------
           Default (Light Mode): Show Moon, Hide Sun
        ---------------------------------------------------- */
        #navigation .theme-toggle .moon-icon {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%) rotate(0deg) scale(1);
        }

        #navigation .theme-toggle .sun-icon {
            opacity: 0;
            visibility: hidden;
            transform: translate(-50%, -50%) rotate(90deg) scale(0.4);
        }

/* ----------------------------------------------------
           Dark Mode: Show Sun, Hide Moon
        ---------------------------------------------------- */
html[data-theme="dark"] #navigation .theme-toggle {
    background: #f7b731;
    border-color: #f7b731;
    color: #111111;
}

    html[data-theme="dark"] #navigation .theme-toggle:hover {
        background: #ffffff;
        border-color: #ffffff;
        color: #111111;
    }

    html[data-theme="dark"] #navigation .theme-toggle .moon-icon {
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -50%) rotate(-90deg) scale(0.4);
    }

    html[data-theme="dark"] #navigation .theme-toggle .sun-icon {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

/* =========================================
   Mobile Hero Fix (Full Coverage)
========================================= */
/*@media (max-width: 768px) {
    .article-hero {
        height: 280px !important;*/ /* یا 320px بسته به سلیقه برای نمایش خوب عکس و تیتر */
/*position: relative !important;
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
    }

        .article-hero img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;*/ /* پر کردن کامل قالب بدون دفرمه شدن */
/*object-position: center !important;
            display: block !important;
        }

    .hero-overlay {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 30px 15px 15px 15px !important;*/ /* پدینگ بهینه برای موبایل */
/*background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%) !important;
        z-index: 10 !important;
    }

    .hero-category {
        margin-bottom: 6px !important;
        font-size: 9px !important;
        padding: 3px 8px !important;
    }

    .hero-title {
        font-size: 17px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        color: #ffffff !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    }
}*/

/*@media (max-width: 768px) {*/
/* 1. ساختار هیرو و عکس */
/*.article-hero {
        height: 260px !important;
        position: relative !important;
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        margin-bottom: 0 !important;
    }

        .article-hero img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            object-position: center top !important;
            display: block !important;
        }*/

/* 2. تایتل و رده‌بندی روی عکس (انتهای عکس) */
/*.hero-overlay {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 30px 14px 12px 14px !important;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 70%, transparent 100%) !important;
        z-index: 2 !important;
    }

    .hero-category {
        margin-bottom: 5px !important;
        font-size: 9.5px !important;
        padding: 2px 7px !important;
        display: inline-block !important;
    }

    .hero-title {
        font-size: 15px !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    }*/

/* 3. لغوش کامل حالت Overlap / Hoverly برای متن لید */
/*.article-lead-wrapper {
        position: relative !important;
        top: 0 !important;
        margin: 0 !important;
        padding: 12px 14px 0 14px !important;
        z-index: 1 !important;
    }

    .article-lead {
        position: relative !important;
        margin-top: 0 !important;*/ /* حذف منفی بودن برای لغو Overlap */
/*top: 0 !important;
        padding: 14px 16px !important;
        font-size: 13.5px !important;
        line-height: 1.6 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    }*/

/* 4. بدنه اصلی خبر */
/*}*/

/* تنظیم کامل Article Lead با بردر قرمز فقط سمت راست */
.article-lead {
    background-color: var(--wbo-surface, #ffffff) !important;
    color: var(--wbo-text, #212529) !important;
    border: none !important;
    border-right: 5px solid #e60023 !important; /* فقط سمت راست قرمز */
    box-shadow: 0 4px 15px var(--wbo-shadow, rgba(0, 0, 0, 0.05)) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html[data-theme="dark"] .article-lead {
    background-color: var(--wbo-surface-secondary, #1e1e1e) !important;
    color: var(--wbo-text, #ececec) !important;
    border: none !important;
    border-right: 5px solid #e60023 !important; /* سمت راست قرمز در دارک مود */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

    html[data-theme="dark"] .article-lead p,
    html[data-theme="dark"] .article-lead span {
        color: var(--wbo-text, #ececec) !important;
    }

/* ==================================================

================================================== */
html[data-theme="dark"] .article-container {
    background-color: var(--wbo-bg, #212121) !important;
}

html[data-theme="dark"] .article-body,
html[data-theme="dark"] .article-content {
    background-color: var(--wbo-surface-secondary, #2b2b2b) !important;
    color: var(--wbo-text, #ececec) !important;
    border-color: var(--wbo-border, #333333) !important;
}

    html[data-theme="dark"] .article-content *,
    html[data-theme="dark"] .article-content p,
    html[data-theme="dark"] .article-content span,
    html[data-theme="dark"] .article-content div,
    html[data-theme="dark"] .article-content li {
        color: var(--wbo-text, #ececec) !important;
    }

html[data-theme="dark"] .article-meta {
    color: var(--wbo-text-muted, #9e9e9e) !important;
    border-bottom-color: var(--wbo-border, #333333) !important;
}

html[data-theme="dark"] .font-controls {
    background: var(--wbo-surface-secondary, #1e1e1e) !important;
    border-color: var(--wbo-border, #333333) !important;
}

html[data-theme="dark"] .font-btn {
    background: #2b2b2b !important;
    color: #ececec !important;
    border-color: #444444 !important;
}

    html[data-theme="dark"] .font-btn:hover {
        background: #e60023 !important;
        color: #ffffff !important;
        border-color: #e60023 !important;
    }

html[data-theme="dark"] .article-body,
html[data-theme="dark"] .article-content,
html[data-theme="dark"] main .article-container,
html[data-theme="dark"] main section,
html[data-theme="dark"] .details-article {
    background-color: #262626 !important;
    color: #ececec !important;
    border-color: #383838 !important;
}

/* WBO Times Dark Mode CSS Adjustments */

/* Theme Variables */
html[data-theme="dark"] {
    --wbo-bg: #212121;
    --wbo-surface: #212121;
    --wbo-surface-secondary: #1e1e1e;
    --wbo-text: #ececec;
    --wbo-text-muted: #9e9e9e;
    --wbo-border: #333333;
}

    /* Article Lead Dark Mode */
    html[data-theme="dark"] .article-lead {
        background-color: var(--wbo-surface-secondary, #1e1e1e) !important;
        color: var(--wbo-text, #ececec) !important;
        border-right: 5px solid #e60023 !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    }

        html[data-theme="dark"] .article-lead p,
        html[data-theme="dark"] .article-lead span {
            color: var(--wbo-text, #ececec) !important;
        }

    /* Article Body & Content Dark Mode */
    html[data-theme="dark"] .article-container {
        background-color: var(--wbo-bg, #212121) !important;
    }

    html[data-theme="dark"] .article-body {
        background-color: #262626 !important;
        border-radius: 8px;
        margin: 10px auto;
        padding: 20px; /* Added padding for spacing within the darker body */
    }

    html[data-theme="dark"] .article-content {
        background-color: transparent !important;
        color: #ececec !important;
        padding: 0 !important; /* Removed padding as it's now within article-body */
        line-height: 2;
        text-align: justify;
    }

    html[data-theme="dark"] .article-meta {
        color: var(--wbo-text-muted, #9e9e9e) !important;
        border-bottom-color: var(--wbo-border, #333333) !important;
        /*margin-bottom: 20px;
        padding-bottom: 10px;*/
    }

    /* Font Controls Dark Mode */
    html[data-theme="dark"] .font-controls {
        background: var(--wbo-surface-secondary, #1e1e1e) !important;
        border-color: var(--wbo-border, #333333) !important;
        border-radius: 8px; /* Match article-body */
        padding: 10px 14px;
    }

    html[data-theme="dark"] .font-label {
        color: var(--wbo-text, #ececec) !important;
    }

    html[data-theme="dark"] .font-btn {
        background: #2b2b2b !important;
        color: #ececec !important;
        border-color: #444444 !important;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all .2s ease;
    }

        html[data-theme="dark"] .font-btn:hover {
            background: #e60023 !important;
            color: #ffffff !important;
            border-color: #e60023 !important;
        }

/* Responsive Adjustments (Example for Mobile) */
@media (max-width: 768px) {
    html[data-theme="dark"] .article-body {
        margin-top: 10px; /* Adjust margin for mobile */
        margin-bottom: 10px;
        padding: 10px; /* Slightly reduced padding for mobile */
    }

    html[data-theme="dark"] .article-content {
        padding: 0 !important; /* Ensure no extra padding */
    }

    html[data-theme="dark"] .font-controls {
        margin-top: 10px; /* Space above controls */
    }
}

@media (max-width: 768px) {
    .article-lead-wrapper {
        /*padding: 0 15px !important;*/
    }

    .article-body {
        padding: 20px 5px;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .article-content {
        padding: 2px !important;
        padding-top: 0;
        line-height: 1.8;
    }

    html[data-theme="dark"] .article-body {
        margin: 0 !important;
        /*  padding: 20px 15px !important;*/
        border-radius: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    html[data-theme="dark"] .article-content {
        padding: 5px !important;
    }
}

footer, .footer {
    flex-shrink: 0;
}