/* Reset و تنظیمات پایه */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazir', sans-serif;
    background-color: #0A192F;
    color: #F8FAFC;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Grid System رسپانسیو */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.main-content {
    flex: 3;
    min-width: 0;
}

.sidebar {
    flex: 1;
    min-width: 0;
}

/* کارت‌ها */
.card {
    background: #112240;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(29, 78, 216, 0.3);
}

.card img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* تایپوگرافی */
h1, h2, h3, h4 {
    margin: 0 0 15px;
    color: #F8FAFC;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

p {
    margin: 0 0 15px;
    color: #CBD5E1;
    line-height: 1.8;
}

/* دکمه‌ها */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #F59E0B;
    color: #0F172A;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.btn:hover {
    background: #D97706;
    transform: translateY(-2px);
}

/* FAQ */
.faq-section {
    margin-top: 30px;
    border-top: 1px solid rgba(29, 78, 216, 0.3);
    padding-top: 20px;
}

.faq-item {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    cursor: pointer;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #112240;
    border: 1px solid rgba(29, 78, 216, 0.3);
    transition: background 0.3s;
    color: #F8FAFC;
}

.faq-question:hover {
    background: rgba(29, 78, 216, 0.2);
}

.faq-answer {
    display: none;
    padding: 10px 15px;
    background: #0A192F;
    color: #CBD5E1;
}

.faq-answer.active {
    display: block;
}

/* فهرست مطالب */
.toc {
    position: sticky;
    top: 20px;
}

.toc a {
    display: block;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #112240;
    color: #CBD5E1;
    text-decoration: none;
    border-radius: 8px;
    border-right: 3px solid transparent;
    transition: all 0.3s;
}

.toc a:hover, .toc a.active {
    background: rgba(29, 78, 216, 0.2);
    color: #F59E0B;
    border-right-color: #F59E0B;
}

/* تگ‌ها */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag {
    display: inline-block;
    background: rgba(29, 78, 216, 0.2);
    color: #1D4ED8;
    padding: 6px 12px;
    border-radius: 8px;
    margin: 2px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.3s;
    border: 1px solid rgba(29, 78, 216, 0.3);
}

.tag:hover {
    background: rgba(29, 78, 216, 0.3);
    color: #F59E0B;
}

/* نظرات */
.comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(29, 78, 216, 0.3);
}

.comment {
    padding: 15px;
    border-bottom: 1px solid rgba(29, 78, 216, 0.2);
    margin-bottom: 15px;
    background: #112240;
    border-radius: 10px;
}

.comment:last-child {
    border-bottom: none;
}

.comment .author {
    font-weight: bold;
    color: #F59E0B;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment .date {
    color: #CBD5E1;
    font-size: 12px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(29, 78, 216, 0.3);
    margin-bottom: 15px;
    font-family: 'Vazir', sans-serif;
    resize: vertical;
    min-height: 100px;
    background: #112240;
    color: #F8FAFC;
}

.comment-form textarea::placeholder {
    color: #CBD5E1;
}

/* اشتراک گذاری */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.share-btn {
    display: inline-block;
    padding: 8px 15px;
    background: #112240;
    color: #F8FAFC;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(29, 78, 216, 0.3);
    font-size: 14px;
}

.share-btn:hover {
    background: rgba(29, 78, 216, 0.2);
    transform: translateY(-2px);
    border-color: #1D4ED8;
}

/* متادیتا مقاله */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(29, 78, 216, 0.3);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #CBD5E1;
    font-size: 14px;
}

.category-badge {
    background: rgba(29, 78, 216, 0.2);
    color: #1D4ED8;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgba(29, 78, 216, 0.3);
}

.category-badge:hover {
    background: rgba(29, 78, 216, 0.3);
    color: #F59E0B;
}

/* مقالات مرتبط */
.related-articles {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(29, 78, 216, 0.3);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.related-article {
    background: #112240;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.related-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(29, 78, 216, 0.3);
    border-color: #1D4ED8;
}

.related-article h4 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    color: #F8FAFC;
}

.related-article p {
    padding: 0 15px 15px;
    font-size: 14px;
    color: #CBD5E1;
}

/* ویدیو */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 10px;
    border: 1px solid rgba(29, 78, 216, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .grid {
        flex-direction: column;
    }
    
    .main-content, .sidebar {
        width: 100%;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .article-meta {
        gap: 10px;
        font-size: 13px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .toc {
        position: static;
    }
    
    .faq-question {
        padding: 12px;
    }
    
    .comment-form textarea {
        padding: 12px;
    }
    
    .btn {
        padding: 8px 16px;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tags-container {
        gap: 5px;
    }
    
    .tag {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .comment .author {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-content {
    animation: fadeIn 0.5s ease-out;
}

/* اسکرول نرم برای لینک‌های هدر */
html {
    scroll-behavior: smooth;
}

/* استایل بخش مقالات ویژه در سایدبار */
.featured-sidebar-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.featured-sidebar-title {
    color: #F59E0B;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(17, 34, 64, 0.6);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.featured-item:hover {
    background: rgba(29, 78, 216, 0.2);
    transform: translateY(-2px);
    border-color: #1D4ED8;
}

.featured-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.featured-item-content {
    flex: 1;
}

.featured-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #F8FAFC;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-item-stats {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: #CBD5E1;
}

.featured-view-all {
    display: block;
    text-align: center;
    padding: 8px;
    background: #F59E0B;
    color: #0F172A;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 5px;
    transition: all 0.3s;
}

.featured-view-all:hover {
    background: #D97706;
}
/* پایان استایل بخش مقالات ویژه در سایدبار */

/* کارت کارشناس */
.expert-box {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: #112240;
    border: 1px solid rgba(29, 78, 216, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 25px 0;
}

.expert-box-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.expert-box-info {
    flex: 1;
}

.expert-box-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
    color: #F8FAFC;
}

.expert-verified {
    background: #F59E0B;
    color: #0F172A;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 6px;
    font-weight: 600;
}

.expert-box-bio {
    font-size: 14px;
    color: #CBD5E1;
    line-height: 1.8;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.expert-profile-btn {
    display: inline-block;
    background: #1D4ED8;
    color: #F8FAFC;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.expert-profile-btn:hover {
    background: #F59E0B;
    color: #0F172A;
}

.expert-box-badges {
    margin-bottom: 10px;
}

.expert-badge {
    display: inline-block;
    background: rgba(29, 78, 216, 0.2);
    color: #1D4ED8;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 6px;
    border: 1px solid rgba(29, 78, 216, 0.3);
}

.expert-box-avatar {
    position: relative;
}

.expert-box-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #F59E0B;
    transition: all 0.3s ease;
}

.expert-box-avatar img:hover {
    border-color: #1D4ED8;
    transform: scale(1.05);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.2);
}

.expert-badge.primary {
    background: #F59E0B;
    color: #0F172A;
    font-weight: 600;
}
/* پایان کارت کارشناس */




/* =========================================================
   استایل تیترهای محتوای مقاله - لایت مود (پیش‌فرض)
========================================================= */

/* لایت مود - آبی */
.article-content h1,
.article-content h2,
.article-content h3 {
    color: #1D4ED8 !important;  /* آبی سلطنتی */
    font-weight: 700;
    line-height: 1.4;
    margin: 1.5em 0 0.8em;
    transition: color 0.3s ease;
}

.article-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid rgba(29, 78, 216, 0.2);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.6rem;
    border-right: 4px solid #1D4ED8;
    padding-right: 12px;
}

.article-content h3 {
    font-size: 1.3rem;
    padding-right: 8px;
    border-right: 3px solid rgba(29, 78, 216, 0.3);
}

/* =========================================================
   دارک مود - طلایی
========================================================= */
[data-theme="dark"] .article-content h1,
[data-theme="dark"] .article-content h2,
[data-theme="dark"] .article-content h3 {
    color: #F59E0B !important;  /* طلایی */
}

[data-theme="dark"] .article-content h1 {
    border-bottom-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .article-content h2 {
    border-right-color: #F59E0B;
}

[data-theme="dark"] .article-content h3 {
    border-right-color: rgba(245, 158, 11, 0.4);
}

/* =========================================================
   ریسپانسیو برای موبایل
========================================================= */
@media (max-width: 768px) {
    .article-content h1 {
        font-size: 1.6rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
    }
}