/* ========== فونت‌های لوکال ========== */
@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;
    --red: #ff3366;
}

* { 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: 0.3s; }
a:hover { color: var(--text-muted); }

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

/* --- Navbar --- */
header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}
.nav-wrapper {
    display: flex; align-items: center; justify-content: space-between;
    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;
    background: transparent; color: var(--text-main); font-family: inherit; cursor: pointer; transition: 0.3s;
}
.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; }

/* --- محتوای لاب --- */
.lab-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 2vw 20px;
}

/* هدر */
.lab-header { margin-bottom: 30px; }
.lab-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.lab-tags span {
    font-size: 0.7rem; padding: 3px 12px;
    border: 1px solid rgba(255,51,102,0.3); color: var(--red);
    font-family: 'JetBrains Mono', monospace;
}
.lab-header h1 { font-size: 2rem; font-weight: 900; margin-bottom: 12px; }
.lab-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--text-muted); }
.lab-meta i { margin-left: 4px; color: var(--red); }

/* توضیحات */
.lab-desc { margin-bottom: 30px; color: #ccc; line-height: 2; }
.lab-desc p { margin-bottom: 12px; }

/* بخش دانلود */
.download-section { margin-bottom: 40px; }
.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.download-info {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.95rem; color: var(--text-muted);
}
.download-info i { font-size: 1.8rem; color: var(--red); }
.file-size { font-size: 0.8rem; opacity: 0.7; }
.download-btn {
    padding: 14px 28px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    display: inline-flex; align-items: center; gap: 8px;
}
.download-btn:hover { background: #ff1a4f; box-shadow: 0 0 15px rgba(255,51,102,0.5); }

/* راهنما */
.lab-guide { margin-bottom: 40px; }
.lab-guide h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 20px; }
.lab-guide h3 { font-size: 1.2rem; font-weight: 700; margin: 24px 0 10px; color: #fff; }
.lab-guide ul, .lab-guide ol { padding-right: 24px; color: var(--text-muted); }
.lab-guide li { margin-bottom: 8px; }
.lab-guide code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255,255,255,0.08);
    padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: var(--red);
}
.lab-guide pre {
    background: #111; border: 1px solid var(--border-color);
    padding: 14px 18px; border-radius: 8px; margin: 10px 0;
    direction: ltr; text-align: left;
    font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;
    color: #ccc; overflow-x: auto;
}
.lab-guide pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.lab-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(255,51,102,0.05);
    border: 1px solid rgba(255,51,102,0.2);
    padding: 14px 18px; margin-top: 20px; border-radius: 8px;
    color: var(--text-muted);
}
.lab-note i { color: var(--red); font-size: 1.2rem; margin-top: 2px; }

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

/* --- تصاویر داخلی (برای تصویر اصلی جدید) --- */
.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); }

/* --- فوتر --- */
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; }

    .download-card { flex-direction: column; align-items: flex-start; }
    .download-btn { width: 100%; justify-content: center; }
}
/* --- کارت آموزش ویدیویی --- */
.video-tutorial-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 51, 102, 0.25);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.video-tutorial-info {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-main);
}

.video-tutorial-info i {
    font-size: 2rem;
    color: #ff0000;
    flex-shrink: 0;
}

.video-tutorial-info strong {
    color: #fff;
}

.youtube-btn {
    padding: 12px 24px;
    background: #ff0000;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.youtube-btn:hover {
    background: #cc0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

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