:root {
    --bg-color: #09090b;
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* --------- استایل‌های Roadmap خطی فشرده (اسلاید 8) --------- */

.roadmap-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    max-width: 1100px; /* عرض کلی کمتر شد */
    height: 250px; /* ارتفاع کلی بسیار کمتر شد */
    margin-top: 1rem;
}

.timeline-track-line {
    position: absolute;
    top: 50%;
    left: 2%;
    width: 96%;
    height: 0;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 18%; /* حفظ تناسب افقی */
}

.step-up { justify-content: flex-end; padding-bottom: 0; transform: translateY(-50%); }
.step-down { justify-content: flex-start; padding-top: 0; transform: translateY(50%); }

.timeline-connector {
    width: 2px;
    height: 25px; /* خط اتصال کوتاه‌تر شد */
    margin: 5px 0;
}

.timeline-dot {
    width: 35px; /* دایره‌ها کوچکتر شدند */
    height: 35px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid; /* ضخامت خط دایره ظریف‌تر شد */
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.1rem; /* عدد داخل دایره کوچکتر شد */
    color: #fff;
    z-index: 2;
}

.timeline-content {
    padding: 0.8rem 1rem; /* پدینگ داخل کارت کمتر شد */
    text-align: center;
    width: 100%;
    border-radius: 10px;
}

.timeline-content h3 { 
    font-size: 0.95rem; /* تیتر کارت کوچکتر شد */
    justify-content: center; 
    margin-bottom: 4px; 
}

.timeline-content p { 
    font-size: 0.75rem; /* متن کارت کوچکتر شد */
    margin: 0; 
    color: #cbd5e1;
    line-height: 1.3;
}

.timeline-content .iconify { 
    font-size: 1.8rem; /* آیکون کوچکتر شد */
    margin-bottom: 8px; 
}


/* --------- استایل‌های فشرده (Compact) برای چارت درختی (Mind Map) - اسلاید 8 --------- */

/* --------- استایل‌های مخصوص اسلاید 7 (Tech Stack) --------- */
.tech-item {
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    padding: 0.8rem; /* پدینگ فشرده برای جا شدن ۸ کارت در یک صفحه */
    border-radius: 12px; 
    position: relative; /* این خط حیاتی است! باعث می‌شود پاپ‌آپ کد دقیقاً روی خود کارت باز شود */
    transition: 0.3s;
}

.tech-item:hover { 
    background: rgba(255, 255, 255, 0.03); 
}

.tech-item h3 { 
    font-size: 1.1rem; 
    margin-bottom: 5px; 
}

.tech-item p { 
    font-size: 0.85rem; 
    margin: 0; 
    color: #cbd5e1; 
}

.highlight-tech { 
    border: 1px solid rgba(250, 204, 21, 0.3); 
    background: rgba(250, 204, 21, 0.05); 
}

section { 
    height: 100vh; 
    scroll-snap-align: start; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 0 10%; 
    position: relative; 
    overflow: hidden; /* این خط جلوی بیرون زدن و ادغام شدن اسلایدها را می‌گیرد */
}

.roadmap-wrapper {
    display: flex; flex-direction: column; width: 100%; max-width: 1400px; 
    /* اسکرول و ارتفاع ثابت حذف شد تا کل چارت در یک نما جا شود */
    border-radius: 12px;
    background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border);
}

.rm-row { display: flex; border-bottom: 1px solid rgba(255,255,255,0.05); }
.rm-row:last-child { border-bottom: none; }

.rm-label {
    width: 35px; min-width: 35px; display: flex; align-items: center; justify-content: center;
    background: var(--theme-color); color: #fff; font-weight: 700; font-size: 0.85rem;
    writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 1px; text-align: center;
}

.rm-content {
    flex: 1; padding: 0.6rem 1rem; overflow-x: auto;
    background: linear-gradient(90deg, var(--bg-color-alpha) 0%, transparent 100%);
}

.tree-col { display: flex; flex-direction: column; gap: 4px; }

.tree-node-wrapper { display: flex; align-items: center; position: relative; margin: 1px 0; }

.tree-node {
    position: relative; padding: 4px 10px; background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--theme-color); border-radius: 5px;
    color: #f8fafc; font-size: 0.75rem; font-weight: 600; white-space: nowrap; z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); transition: 0.3s;
}

.tree-node:hover {
    background: var(--theme-color); color: #000;
    box-shadow: 0 0 10px var(--theme-color);
}

.tree-children {
    display: flex; flex-direction: column; gap: 4px; padding-left: 12px;
    margin-left: 10px; position: relative; justify-content: center;
    border-left: 1px solid var(--theme-color);
}

/* خط افقی خروجی از نود پدر */
.has-children > .tree-node::after {
    content: ''; position: absolute; right: -11px; top: 50%; width: 10px; height: 1px; background: var(--theme-color);
}

/* خط افقی ورودی به نود فرزند */
.tree-children > .tree-node-wrapper::before {
    content: ''; position: absolute; left: -13px; top: 50%; width: 12px; height: 1px; background: var(--theme-color);
}

/* تِم رنگی دسته‌بندی‌ها */
.theme-red { --theme-color: #ef4444; --bg-color-alpha: rgba(239, 68, 68, 0.15); }
.theme-orange { --theme-color: #f97316; --bg-color-alpha: rgba(249, 115, 22, 0.15); }
.theme-yellow { --theme-color: #eab308; --bg-color-alpha: rgba(234, 179, 8, 0.15); }
.theme-green { --theme-color: #22c55e; --bg-color-alpha: rgba(34, 197, 94, 0.15); }

/* برای اینکه نوشته‌های روی زرد خوانا باشند */
.theme-yellow .rm-label { color: #000; }

/* فونت Vazirmatn برای کلمات فارسی اعمال می‌شود */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', 'Vazirmatn', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); overflow-x: hidden; scroll-behavior: smooth; }

.bg-animation {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(20, 20, 50, 1), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(10, 40, 60, 1), transparent 50%);
    z-index: -1; animation: bgShift 15s infinite alternate ease-in-out;
}
@keyframes bgShift { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.1); opacity: 1; } }

.container { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.container::-webkit-scrollbar { display: none; }
section { height: 100vh; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 10%; position: relative; }

h1 { font-size: 4rem; font-weight: 900; background: linear-gradient(45deg, #4facfe, #00f2fe); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; text-align: center; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; text-align: center; background: linear-gradient(45deg, #e2e8f0, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 0.8rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
p { font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 1rem; }
.subtitle { font-size: 1.3rem; text-align: center; max-width: 800px; color: #e2e8f0; }

.author { font-size: 1.2rem; margin-top: 2rem; color: var(--primary); opacity: 0.8; font-weight: 700; }

.grid { display: grid; gap: 2rem; width: 100%; max-width: 1200px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); border-radius: 16px; padding: 2rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}
.glass-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px var(--primary-glow); border-color: rgba(56, 189, 248, 0.3); z-index: 10; }
.highlight-card { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.05); }

.tech-card-small { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 1.2rem; }
.tech-logo-small { height: 45px; margin-bottom: 1rem; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }
.icon { font-size: 2.5rem; margin-bottom: 1rem; color: var(--primary); filter: drop-shadow(0 0 10px var(--primary-glow)); }

/* --------- استایل پاپ‌آپ کد --------- */
.code-modal {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -40%) scale(0.9);
    width: 340px; background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(56, 189, 248, 0.3);
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100; overflow: hidden; text-align: left;
}
.has-code-modal:hover .code-modal { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.mac-header { background: rgba(255, 255, 255, 0.05); padding: 8px 12px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.mac-header .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; } .dot.yellow { background: #eab308; } .dot.green { background: #22c55e; }
.mac-header .title { margin-left: auto; margin-right: auto; font-size: 0.75rem; color: #94a3b8; font-family: monospace; }
.code-body { padding: 15px; font-family: 'Courier New', Courier, monospace; font-size: 0.8rem; color: #38bdf8; line-height: 1.6; white-space: pre-wrap; }
.cursor { display: inline-block; width: 8px; height: 15px; background: #00f2fe; animation: blink 1s step-end infinite; vertical-align: middle; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* فول‌اسکرین ویدئو */
.video-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.video-overlay.active { opacity: 1; visibility: visible; }
.video-modal-content { position: relative; width: 80%; max-width: 900px; background: #000; border-radius: 12px; border: 1px solid var(--primary); box-shadow: 0 0 30px var(--primary-glow); }
.video-modal-content video { width: 100%; border-radius: 12px; display: block; outline: none; }
.close-btn { position: absolute; top: -40px; right: 0; color: white; font-size: 2.5rem; cursor: pointer; transition: 0.2s; }
.close-btn:hover { color: var(--primary); transform: scale(1.1); }

/* استایل مخصوص عکس‌های قابل زوم (اسلاید 5) */
.zoomable-img { cursor: zoom-in; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.zoomable-img:hover { transform: scale(1.02); box-shadow: 0 0 15px rgba(255,255,255,0.2); }

/* فول‌اسکرین عکس */
.img-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.img-overlay.active { opacity: 1; visibility: visible; }
.img-modal-content { position: relative; max-width: 90vw; max-height: 90vh; }
.img-modal-content img { max-width: 100%; max-height: 90vh; border-radius: 12px; box-shadow: 0 0 30px rgba(56, 189, 248, 0.4); display: block; }

/* استایل نشان‌های گیت در اسلاید 6 */
.gate-badge {
    display: inline-block; padding: 8px 16px; border: 1px solid var(--primary);
    background: rgba(56, 189, 248, 0.1); color: white; border-radius: 6px;
    font-family: monospace; font-size: 1.2rem; font-weight: bold; box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Animations & Nav */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }
.nav-dots { position: fixed; right: 2rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1rem; z-index: 100; }
.dot-nav { width: 12px; height: 12px; border-radius: 50%; background: var(--glass-border); border: 2px solid transparent; cursor: pointer; transition: 0.3s; }
.dot-nav.active { background: var(--primary); box-shadow: 0 0 10px var(--primary); }

/* دکمه‌های سایت و انیمیشن‌ها */
.btn { display: inline-block; background: linear-gradient(45deg, #0ea5e9, #2563eb); color: white; padding: 1.2rem 3rem; border-radius: 50px; font-size: 1.3rem; font-weight: bold; text-decoration: none; box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4); transition: 0.3s; border: none; cursor: pointer; }
.btn:hover { transform: scale(1.05); box-shadow: 0 15px 35px rgba(37, 99, 235, 0.6); }

.pulse-btn { animation: pulseGlow 2s infinite; }
.pulse-arrow { animation: pulseArrow 1.5s infinite alternate; }

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

@keyframes pulseArrow {
    0% { transform: translateX(-5px); filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4)); }
    100% { transform: translateX(5px); filter: drop-shadow(0 0 25px rgba(56, 189, 248, 0.9)); }
}