@charset "UTF-8";

/* ================== استایل‌های پایه ================== */
body { font-family: 'Vazirmatn', sans-serif; background-color: #f4f6f9; margin: 0; padding: 0; transition: all 0.3s ease; }

/* ================== هدر و منو ================== */
.top-bar { background-color: #f8f9fa; border-bottom: 1px solid #e9ecef; font-size: 0.8rem; color: #6c757d; }
.top-bar a.social-link { color: #6c757d; text-decoration: none; transition: color 0.3s; }
.top-bar a.social-link:hover { color: #007bb5; }

.middle-header { background-color: #ffffff; padding: 25px 0; }
.site-logo { max-height: 85px; width: auto; object-fit: contain; }
.brand-subtitle { font-size: 1rem; color: #555; font-weight: 600; border-right: 2px solid #e2e8f0; padding-right: 20px; margin-right: 20px; line-height: 1.6; text-align: right; }

.search-box { max-width: 400px; width: 100%; }
.search-box .form-control { border-radius: 0 5px 5px 0; border: 2px solid #f1f3f5; background-color: #f1f3f5; box-shadow: none; font-size: 0.9rem; }
.search-box .form-control:focus { border-color: #007bb5; background-color: #ffffff; }
.search-box .btn { border-radius: 5px 0 0 5px; background-color: #007bb5; color: white; border: 2px solid #007bb5; transition: background-color 0.3s; }
.search-box .btn:hover { background-color: #005f8c; border-color: #005f8c; }

.custom-navbar { background-color: #008ecc; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); }
.custom-navbar .nav-link { color: rgba(255, 255, 255, 0.9) !important; font-weight: 600; font-size: 0.95rem; padding: 15px 20px !important; transition: all 0.3s ease; position: relative; }

@media (min-width: 992px) {
    .custom-navbar .nav-link::after { content: ''; position: absolute; bottom: 0; right: 0; width: 0; height: 3px; background-color: #ffffff; transition: width 0.3s ease; }
    .custom-navbar .nav-link:hover::after, .custom-navbar .nav-link.active::after { width: 100%; }
    .custom-navbar .nav-link:hover, .custom-navbar .nav-link.active { color: #ffffff !important; background-color: rgba(255, 255, 255, 0.05); }
}

/* --- پاپ‌آپ ورود --- */
.login-divider { border-left: 1px solid #e9ecef; }
.nikchat-brand { color: #008ecc; font-weight: 900; background: rgba(0, 142, 204, 0.1); padding: 2px 8px; border-radius: 6px; }

/* ================== صفحه اصلی (Index) ================== */
.hero-card { position: relative; border-radius: 12px; overflow: hidden; height: 100%; min-height: 250px; display: block; text-decoration: none !important; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hero-card:hover img { transform: scale(1.05); }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%); padding: 20px; color: white; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hero-category { background-color: #008ecc; color: white; font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; align-self: flex-start; margin-bottom: 10px; font-weight: bold; }
.hero-title { font-size: 1.2rem; font-weight: 700; margin: 0; line-height: 1.5; color: white; }

.news-list-card { border: none; border-bottom: 1px solid #e9ecef; border-radius: 0; padding-bottom: 15px; margin-bottom: 15px; background-color: transparent; }
.news-list-card img { border-radius: 8px; width: 100%; height: 150px; object-fit: cover; }
.news-list-title { font-size: 1.1rem; font-weight: bold; color: #333; text-decoration: none; transition: color 0.3s; }
.news-list-title:hover { color: #008ecc; }

/* کامنت‌های صفحه اصلی */
.comment-box { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 20px; transition: transform 0.3s, box-shadow 0.3s; }
.comment-box:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important; }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.user-avatar { width: 45px; height: 45px; background: #f1f3f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #6c757d; font-size: 1.2rem; flex-shrink: 0; }
.star-rating { direction: ltr; }
.star-rating i { color: #e2e8f0; font-size: 0.85rem;}
.star-rating i.active { color: #ffc107; }
.comment-post-title { background-color: #f8f9fa; padding: 5px 10px; border-radius: 6px; font-size: 0.75rem; color: #555; display: inline-block; margin-bottom: 15px; border: 1px solid #e9ecef; }
.comment-post-title a { color: #008ecc; text-decoration: none; font-weight: bold; }

/* ================== صفحه مقاله (Post) ================== */
.article-container { background: #fff; border-radius: 12px; padding: 35px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.breadcrumb-item a { color: #6c757d; text-decoration: none; font-size: 0.85rem; }
.breadcrumb-item a:hover { color: #008ecc; }
.breadcrumb-item.active { font-size: 0.85rem; color: #adb5bd; }

.article-title { font-size: 2rem; font-weight: 900; line-height: 1.6; color: #1a1e23; margin-bottom: 20px; }
.article-meta { font-size: 0.85rem; color: #6c757d; border-bottom: 1px solid #e9ecef; padding-bottom: 15px; margin-bottom: 25px; }
.article-meta i { color: #008ecc; }
.article-featured-img { width: 100%; border-radius: 12px; margin-bottom: 30px; object-fit: cover; max-height: 500px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }

.article-content { font-size: 1.1rem; line-height: 2.2; color: #333; text-align: justify; }
.article-content h2, .article-content h3 { margin-top: 2.5rem; margin-bottom: 1.2rem; font-weight: 800; color: #111; line-height: 1.5; scroll-margin-top: 90px; }
.article-content h2 { font-size: 1.5rem; border-right: 4px solid #008ecc; padding-right: 12px; }
.article-content h3 { font-size: 1.3rem; color: #004d73; }
.article-content p { margin-bottom: 1.5rem; }
.article-content img { border-radius: 8px; margin: 25px 0; max-width: 100%; height: auto; display: block; }
.article-content a { color: #008ecc; text-decoration: none; font-weight: 700; border-bottom: 1px dashed #008ecc; transition: all 0.3s; }
.article-content a:hover { color: #005f8c; border-bottom-style: solid; }

.article-blockquote { background: #f8f9fa; border-right: 4px solid #ff4757; padding: 20px 25px; font-style: italic; border-radius: 8px; margin: 30px 0; color: #444; font-size: 1.15rem; line-height: 2; position: relative; }
.article-blockquote::before { content: '\f10e'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 20px; top: 15px; font-size: 2rem; color: #e9ecef; }

/* فهرست مطالب (TOC) */
.toc-container { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 10px; padding: 15px 20px; margin: 25px 0 30px 0; }
.toc-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.toc-title { font-weight: bold; font-size: 1.1rem; color: #1a1e23; margin: 0; }
.toc-list { list-style-type: none; padding-right: 0; margin: 15px 0 0 0; border-top: 1px solid #e9ecef; padding-top: 15px; display: block; overflow: hidden; transition: max-height 0.3s ease-out; }
.toc-list.collapsed { display: none; }
.toc-list li { margin-bottom: 10px; }
.toc-list a { color: #495057; text-decoration: none; font-size: 0.95rem; font-weight: 600; display: block; padding-right: 5px; border-right: 2px solid transparent; transition: all 0.2s; border-bottom: none !important; }
.toc-list a:hover { color: #008ecc; border-right-color: #008ecc; padding-right: 10px; }
.toc-h3 { padding-right: 20px !important; font-size: 0.9rem !important; color: #6c757d !important; font-weight: normal !important; border: none !important;}
.toc-h3::before { content: '- '; color: #adb5bd; }

/* جداول داخل مقاله */
.custom-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 30px 0; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.04); border: 1px solid #e9ecef; }
.article-content table.custom-table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: right; background: #fff; margin: 0; }
.article-content table.custom-table th { background-color: #008ecc; color: #fff; padding: 16px; font-weight: bold; font-size: 1rem; border-bottom: 2px solid #005f8c; white-space: nowrap; }
.article-content table.custom-table td { padding: 14px 16px; border-bottom: 1px solid #f1f3f5; color: #495057; font-size: 0.95rem; vertical-align: middle; }
.article-content table.custom-table tbody tr:nth-of-type(even) { background-color: #f8f9fa; }

/* تگ‌ها، نویسنده و مطالب مرتبط */
.tag-pill { background-color: #f1f3f5; color: #495057; text-decoration: none; padding: 6px 14px; border-radius: 50rem; font-size: 0.85rem; transition: all 0.3s; display: inline-block; margin-bottom: 5px; border: 1px solid transparent; }
.tag-pill:hover { background-color: #e2e8f0; border-color: #cbd5e1; }
.share-btn { width: 40px; height: 40px; display: inline-flex; justify-content: center; align-items: center; border-radius: 50%; color: #fff; text-decoration: none; transition: transform 0.3s; font-size: 1.1rem; }
.share-btn:hover { transform: translateY(-3px); color: #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.share-tg { background-color: #0088cc; } .share-tw { background-color: #000000; } .share-wa { background-color: #25d366; }

.author-box { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 12px; padding: 25px; margin-top: 40px; display: flex; align-items: center; gap: 20px; transition: transform 0.3s; }
.author-box:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.related-card { text-decoration: none; color: inherit; display: block; transition: transform 0.3s; height: 100%; }
.related-card:hover { transform: translateY(-5px); }
.related-card img { border-radius: 8px; width: 100%; height: 150px; object-fit: cover; margin-bottom: 12px; }
.related-card h6 { font-size: 0.95rem; font-weight: bold; line-height: 1.6; color: #333; transition: color 0.3s; }
.related-card:hover h6 { color: #008ecc; }

/* سیستم نظرات تو در تو */
.comment-item { padding-top: 20px; }
.comment-item:not(:last-child) { border-bottom: 1px solid #e9ecef; padding-bottom: 20px; }
.comment-avatar { width: 55px; height: 55px; border-radius: 50%; background: #e9ecef; display: flex; align-items: center; justify-content: center; color: #6c757d; font-size: 1.5rem; flex-shrink: 0; }
.comment-body { background: #f8f9fa; padding: 15px; border-radius: 0 12px 12px 12px; width: 100%; }
.comment-reply-btn { font-size: 0.8rem; font-weight: bold; padding: 2px 10px; border-radius: 50rem; transition: all 0.3s; }
.comment-reply-btn:hover { background-color: #008ecc; color: white !important; }
.comment-replies { margin-right: 3rem; margin-top: 15px; border-right: 2px solid #dee2e6; padding-right: 15px; }
.comment-replies .comment-avatar { width: 45px; height: 45px; font-size: 1.2rem; }
.interactive-stars i { cursor: pointer; color: #e2e8f0; font-size: 1.2rem; transition: color 0.2s; }
.interactive-stars i.active, .interactive-stars i.hovered { color: #ffc107; }

/* ================== سایدبار ================== */
.sidebar-title { border-bottom: 2px solid #008ecc; padding-bottom: 10px; margin-bottom: 20px; font-size: 1.2rem; font-weight: 900; display: inline-block; }
.fire-icon { display: inline-block; font-size: 1.3rem; margin-left: 5px; background: linear-gradient(to top, #ff2a00, #ff7b00, #ffce00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: realisticFlicker 1.2s infinite alternate ease-in-out; }
@keyframes realisticFlicker { 0% { transform: scaleY(1) rotate(0deg); opacity: 0.9; } 20% { transform: scaleY(1.1) rotate(-2deg); opacity: 1; } 40% { transform: scaleY(0.95) rotate(2deg); opacity: 0.8; } 60% { transform: scaleY(1.05) rotate(-1deg); opacity: 1; } 80% { transform: scaleY(0.9) rotate(1deg); opacity: 0.9; } 100% { transform: scaleY(1) rotate(0deg); opacity: 1; } }
.trending-item { display: flex; align-items: center; margin-bottom: 15px; }
.trending-number { font-size: 2rem; font-weight: 900; color: #e2e8f0; margin-left: 15px; line-height: 1; }
.trending-link { font-size: 0.95rem; font-weight: 600; color: #444; text-decoration: none; line-height: 1.5; transition: color 0.3s; }
.trending-link:hover { color: #008ecc; }

/* ================== فوتر ================== */
.site-footer { background-color: #1a1e23; color: #a1aab3; padding-top: 50px; font-size: 0.9rem; margin-top: 50px; }
.footer-title { color: #ffffff; font-weight: bold; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-title::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background-color: #008ecc; }
.footer-link { color: #a1aab3; text-decoration: none; display: block; margin-bottom: 10px; transition: color 0.3s, transform 0.3s; }
.footer-link:hover { color: #ffffff; transform: translateX(-5px); }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; background-color: rgba(255,255,255,0.1); color: #fff; border-radius: 50%; margin-left: 10px; transition: background 0.3s; text-decoration: none; }
.social-icons a:hover { background-color: #008ecc; }
.footer-bottom { background-color: #121519; padding: 15px 0; margin-top: 40px; font-size: 0.8rem; }

/* ================== دسترس‌پذیری و دکمه‌های شناور ================== */
.a11y-floating-btn { position: fixed; bottom: 25px; left: 25px; width: 55px; height: 55px; background-color: #004d73; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); z-index: 1050; cursor: pointer; border: none; transition: transform 0.3s ease; }
.a11y-floating-btn:hover { transform: scale(1.1); background-color: #003652; }
.back-to-top-btn { position: fixed; bottom: 90px; left: 25px; width: 45px; height: 45px; background-color: #6c757d; color: white; border-radius: 50%; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); z-index: 1040; cursor: pointer; border: none; transition: background-color 0.3s ease; }
.back-to-top-btn:hover { background-color: #5a6268; }

html.a11y-grayscale { filter: grayscale(100%) !important; }
body.a11y-large-text { font-size: 115% !important; }
body.a11y-highlight-links a { background-color: #ffeb3b !important; color: #000 !important; text-decoration: underline !important; font-weight: bold !important; }
body.a11y-high-contrast { background-color: #000000 !important; color: #ffffff !important; }
body.a11y-high-contrast .bg-white, body.a11y-high-contrast .card, body.a11y-high-contrast .middle-header, body.a11y-high-contrast .top-bar, body.a11y-high-contrast .offcanvas, body.a11y-high-contrast .article-container, body.a11y-high-contrast .comment-box, body.a11y-high-contrast .site-footer, body.a11y-high-contrast .modal-content, body.a11y-high-contrast .toc-container { background-color: #000000 !important; border: 1px solid #ffff00 !important; color: #ffffff !important; }
body.a11y-high-contrast * { color: #ffffff !important; }
body.a11y-high-contrast a, body.a11y-high-contrast .nav-link, body.a11y-high-contrast .footer-link { color: #ffff00 !important; text-decoration: underline !important; }
body.a11y-high-contrast .a11y-floating-btn, body.a11y-high-contrast .back-to-top-btn { background-color: #ffff00 !important; color: #000000 !important; border: 2px solid #ffffff !important; }
body.a11y-high-contrast .fire-icon { background: none !important; -webkit-text-fill-color: #ffff00 !important; color: #ffff00 !important; filter: none !important; }
body.a11y-warm-theme { background-color: #fdf6e3 !important; color: #4b4231 !important; }
body.a11y-warm-theme .bg-white, body.a11y-warm-theme .card, body.a11y-warm-theme .middle-header, body.a11y-warm-theme .offcanvas, body.a11y-warm-theme .article-container, body.a11y-warm-theme .comment-box, body.a11y-warm-theme .comment-post-title, body.a11y-warm-theme .modal-content, body.a11y-warm-theme .toc-container { background-color: #fcf1d8 !important; border-color: #e5d8b8 !important; color: #4b4231 !important; }
body.a11y-warm-theme * { color: #4b4231 !important; }
body.a11y-warm-theme a { color: #a05a00 !important; } 
body.a11y-warm-theme .a11y-floating-btn { background-color: #8a6c3f !important; }

/* ================== ریسپانسیو موبایل ================== */
@media (max-width: 768px) {
    .middle-header { padding: 15px 0; }
    .site-logo { max-height: 65px; }
    .brand-subtitle { font-size: 0.85rem; padding-right: 12px; margin-right: 12px; }
    .hero-card { min-height: 200px; margin-bottom: 15px; }
    .news-list-card img { height: 180px; margin-bottom: 10px; }
    .article-container { padding: 20px; }
    .article-title { font-size: 1.5rem; }
    .author-box { flex-direction: column; text-align: center; }
    .login-divider { border-left: none; border-bottom: 1px solid #e9ecef; padding-bottom: 2rem; margin-bottom: 2rem; }
    .comment-replies { margin-right: 1rem; padding-right: 10px; }
}

/* افکت چشمک‌زن برای نشانگر تایپ در هدر */
.type-cursor {
    animation: blinkCursor 0.8s infinite;
    font-size: 1.1rem;
    line-height: 1;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ================== جدول پخش اختصاصی ================== */
.live-countdown {
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.live-pulse {
    animation: livePulsate 1s infinite alternate;
}

@keyframes livePulsate {
    0% { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.1); }
}

#langToggleBtn {
    transition: all 0.3s ease;
}
#langToggleBtn:hover {
    background-color: #008ecc;
    color: white !important;
}
#langToggleBtn:hover i {
    color: white !important;
}