﻿/* General Resets */
body, html {
    margin: 0;
    overflow-x: clip;
    padding: 0;
}

/* Sticky Header Wrapper */
.site-header {
    background: #fff;
    position: relative; /* از حالت sticky خارج شد */
    z-index: 1000;
}

    .site-header .container {
        max-width: 1200px;
        margin: auto;
        padding: 0 15px;
    }

/* Mid Header: Logo & Ad Banner */
.mid-header {
    padding: 2px 0;
    background: #fff;
}

    .mid-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2px;
    }

/* Logo Styling */
.logo img {
    height: auto;
    max-width: 350px;
    display: block;
    transition: all 0.3s ease;
}

/* Ad Banner */
.ad-banner {
    max-width: 728px;
    width: 100%;
}

    .ad-banner img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 4px;
    }

/* Navbar */
.navbar {
    background: #111;
    position: -webkit-sticky; /* برای پشتیبانی در مرورگرهای قدیمی‌تر Safari */
    position: sticky;
    top: 0; /* دقیقاً در بالاترین نقطه می‌چسبد */
    z-index: 9999;
    min-height: 52px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* سایه ملایم برای جدا شدن از محتوای زیرین */
}

/* Navigation (Inside Component) */
#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; /* Gold Accent */
            color: #ffffff;
        }

    /* Submenu logic */
    #navigation .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: #fff;
        display: none;
        box-shadow: 0 5px 15px rgba(0,0,0,.1);
        border-top: 3px solid #e60023;
    }

    #navigation li:hover > .submenu {
        display: block;
    }

/* Mobile Responsive */
@media (max-width: 992px) {
    .mid-header .container {
        flex-direction: column;
        text-align: center;
    }

    .logo img {
        max-width: 280px;
        margin: 0 auto;
    }

    .ad-banner {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        display: block;
        padding: 0;
    }

    #navigation {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        position: sticky;
        -webkit-overflow-scrolling: touch;
        padding-left: 10px;
        scrollbar-width: none; /* Firefox */
    }

        #navigation::-webkit-scrollbar {
            display: none; /* Chrome/Safari */
        }

        #navigation li {
            flex: 0 0 auto;
        }
}

.nt-categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1px 15px;
}

.nt-category-section {
    margin-bottom: 5px;
}

.nt-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    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;
    }
}

.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;
    }

.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;
}

    .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;
    }

/*body, html {*/
/*   overflow-x: hidden;*/
/*margin: 0;
    padding: 0;
}*/

.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;
}

.article-lead-wrapper {
    padding: 0 40px;
}

@media (max-width: 768px) {
    .article-hero img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block;
    }
}

.article-lead {
    position: relative;
    margin-top: -40px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.8;
    color: #222;
    border-right: 6px solid #e60023;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    z-index: 20;
}

.article-body {
    padding: 40px;
}

.article-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 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-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-body {
        padding: 20px 15px;
    }

    .article-content {
        font-size: 14px;
        padding: 20px;
        line-height: 2;
        color: #333;
        text-align: justify;
        background-color: #f4f4f4;
        border: none;
    }
}

/* Ticker Container */

.wbo-market-ticker {
    background: #09090b;
    border-bottom: 1px solid #1f1f23;
    overflow: hidden;
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 14px;
}

.wbo-market-track {
    display: flex;
    gap: 28px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
}

    .wbo-market-track::-webkit-scrollbar {
        display: none;
    }

.market-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex: 0 0 auto;
}

.market-label {
    color: #fff;
    font-weight: 700;
}

.market-message {
    color: #d4d4d8;
}

.market-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.market-open .market-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,.15), 0 0 10px rgba(34,197,94,.55);
}

.market-open .market-message {
    color: #86efac;
}

.market-closed .market-dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239,68,68,.12), 0 0 10px rgba(239,68,68,.45);
}

.market-closed .market-message {
    color: #fca5a5;
}

#navigation li a.home-link {
    transition: color 0.3s ease, background 0.3s ease;
}

    #navigation li a.home-link.is-home {
        color: rgba(197, 160, 40, 0.45) !important;
    }

    #navigation li a.home-link.not-home {
        color: #f7b731 !important;
        font-weight: 700;
    }