/* ========== فونت‌های لوکال ========== */
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('/fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
    src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
    src: url('/fonts/inter-v20-latin-800.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 900; font-display: swap;
    src: url('/fonts/inter-v20-latin-900.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('/fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('/fonts/jetbrains-mono-v24-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
}

/* ========== متغیرهای رنگی ========== */
:root {
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #888888;
    --border-color: #222222;
    --accent: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-main); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--text-muted); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2vw; }

/* ========== نوار ناوبری (ایستا) ========== */
header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-dark);
}
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}
.nav-section { flex: 1; display: flex; gap: 20px; list-style: none; }
.nav-right { justify-content: flex-start; }
.logo {
    flex: 1; text-align: center;
    font-family: monospace; font-size: 1.5rem; font-weight: bold;
    letter-spacing: 2px; text-transform: uppercase;
    display: flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
}
.logo-img { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; }
.nav-actions { flex: 1; display: flex; justify-content: flex-end; gap: 16px; }
.btn-outline {
    padding: 7px 18px; border: 1px solid var(--text-main);
    font-weight: 600; transition: all 0.3s ease;
    background: transparent; color: var(--text-main); font-family: inherit; cursor: pointer;
}
.btn-outline:hover { background: var(--text-main); color: #000; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; order: -1; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: 0.3s; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 999; }

/* ========== محتوای مقاله ========== */
.article-container { max-width: 800px; margin: 0 auto; padding: 40px 2vw 20px; }
.article-header { margin-bottom: 30px; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.article-tags span {
    font-size: 0.7rem; padding: 3px 12px; border: 1px solid var(--border-color);
    color: var(--text-muted); font-family: monospace;
}
.article-header h1 { font-size: 2.2rem; font-weight: 900; line-height: 1.4; margin-bottom: 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.85rem; color: var(--text-muted); }
.article-meta i { margin-left: 4px; color: var(--accent); }

/* ========== بدنه مقاله ========== */
.article-body { font-size: 1.05rem; line-height: 2; color: #e0e0e0; }
.lead { font-size: 1.15rem; border-right: 3px solid var(--accent); padding-right: 18px; color: #ccc; margin-bottom: 28px; }
.article-body h2 { font-size: 1.6rem; font-weight: 800; color: #fff; margin: 36px 0 14px; }
.article-body h3 { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 28px 0 12px; }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 16px 0; padding-right: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: #fff; }
.article-body code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255,255,255,0.08);
    padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: #ccc;
}
.article-body pre {
    background: #111; border: 1px solid var(--border-color);
    padding: 14px 18px; border-radius: 8px; margin: 10px 0 20px;
    direction: ltr; text-align: left;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
    color: #ccc; overflow-x: auto;
}
.article-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.article-body blockquote {
    border-right: 3px solid var(--accent);
    padding: 12px 20px; margin: 24px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 0 8px 8px 0; color: var(--text-muted); font-style: italic;
}

/* ========== تصاویر داخلی ========== */
.article-image { margin: 24px 0; text-align: center; }
.article-image img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border-color); }
.article-image figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); }

/* ========== بخش دنبال کردن ========== */
.article-follow { margin-top: 50px; }
.follow-card { background-color: var(--bg-card); border: 1px solid var(--border-color); padding: 24px; text-align: center; }
.follow-card h3 { font-size: 1.25rem; margin-bottom: 8px; color: #fff; }
.follow-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.follow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.follow-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border: 1px solid var(--border-color); background: transparent; color: var(--text-main);
    font-size: 0.85rem; font-weight: 500; transition: 0.2s;
}
.follow-link:hover { background: var(--text-main); color: #000; border-color: var(--text-main); }

/* ========== دکمه بازگشت ========== */
.article-back { margin-top: 40px; text-align: center; }
.btn-back {
    display: inline-block; padding: 12px 28px;
    border: 1px solid var(--text-main); color: var(--text-main);
    font-weight: 600; transition: all 0.3s ease;
}
.btn-back:hover { background: var(--text-main); color: #000; }

/* ========== فوتر ========== */
footer {
    border-top: 1px solid var(--border-color);
    padding: 50px 0; text-align: center;
}
.social-links {
    display: flex; justify-content: center; gap: 30px;
    margin-bottom: 20px; list-style: none; flex-wrap: wrap;
}
.social-links a { font-family: monospace; letter-spacing: 1px; text-transform: uppercase; }
.copyright { color: var(--text-muted); font-size: 0.85rem; font-family: monospace; }

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .nav-right, .nav-actions { display: none; }
    .logo { position: static; text-align: center; flex: 1; }
    .hamburger { display: block; }
    .nav-wrapper { height: auto; padding: 15px 0; gap: 15px; flex-wrap: wrap; justify-content: center; }

    .mobile-open .nav-right {
        display: flex; flex-direction: column; position: fixed;
        top: 0; right: 0; width: 260px; height: 100vh;
        background: #000; border-left: 1px solid var(--border-color);
        padding: 80px 24px; gap: 20px; z-index: 1001;
    }
    .mobile-open .mobile-overlay { display: block; }

    .article-header h1 { font-size: 1.7rem; }
    .article-body { font-size: 0.95rem; }
}
/* ========== کارت منبع اصلی ========== */
.source-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    transition: border-color 0.3s;
}

.source-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.source-card-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 200px;
}

.source-card-content i {
    font-size: 1.4rem;
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}

.source-card-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.source-card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

.source-card-content strong {
    color: var(--text-main);
}

.source-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.3s;
    white-space: nowrap;
}

.source-card-btn:hover {
    background: var(--accent);
    color: #000;
}

@media (max-width: 768px) {
    .source-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .source-card-btn {
        width: 100%;
        justify-content: center;
    }
}