        :root {
            --primary: #3B7EC7;
            --primary-dark: #2A5F9E;
            --primary-light: #5B9FE0;
            --accent: #4A90D9;
            --telegram: #0088cc;
            --telegram-hover: #006da3;
            --bg-soft: #f4f8fc;
            --bg-white: #ffffff;
            --text-dark: #1a1a2e;
            --text-body: #3a3a4a;
            --text-muted: #6b7280;
            --border-soft: #e2e8f0;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
            --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.05);
            --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
            --radius-sm: 8px;
            --radius-md: 14px;
            --radius-lg: 20px;
            --radius-xl: 28px;
            --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            --font-family: iran, system-ui, -apple-system, sans-serif;
            --max-width: 1140px;
            --header-height: 72px;
        }

        @font-face {
          font-family: iran;
          src: url('../Fonts/IRANSansWeb_Bold.woff2');
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
            font-size: 16px;
            -webkit-text-size-adjust: 100%;
        }

        body {
            font-family: var(--font-family);
            background: var(--bg-white);
            color: var(--text-body);
            line-height: 1.75;
            direction: rtl;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            background-image:
                radial-gradient(ellipse at 15% 5%, rgba(59, 126, 199, 0.03) 0%, transparent 55%),
                radial-gradient(ellipse at 85% 90%, rgba(74, 144, 217, 0.03) 0%, transparent 55%),
                radial-gradient(ellipse at 50% 40%, rgba(59, 126, 199, 0.02) 0%, transparent 60%);
            background-attachment: fixed;
        }

        /* ============ SKIP LINK ============ */
        .skip-link {
            position: absolute;
            top: -100px;
            right: 16px;
            background: var(--primary);
            color: #fff;
            padding: 10px 18px;
            border-radius: var(--radius-sm);
            z-index: 9999;
            font-weight: 600;
            font-size: 0.9rem;
            text-decoration: none;
            transition: top 0.3s;
        }
        .skip-link:focus {
            top: 12px;
        }

        /* ============ HEADER ============ */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.88);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--border-soft);
            height: var(--header-height);
            display: flex;
            align-items: center;
            transition: box-shadow var(--transition-smooth);
        }
        .site-header.scrolled {
            box-shadow: var(--shadow-md);
        }
        .header-inner {
            max-width: var(--max-width);
            width: 100%;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }
        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            flex-shrink: 0;
            font-weight: 800;
            font-size: 1.45rem;
            color: var(--text-dark);
            letter-spacing: -0.3px;
            transition: opacity var(--transition-fast);
        }
        .logo:hover {
            opacity: 0.8;
        }
        .logo-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--primary), var(--primary-light));
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 1.2rem;
            font-weight: 900;
            flex-shrink: 0;
            box-shadow: 0 3px 10px rgba(59, 126, 199, 0.3);
        }
        .logo-text {
            display: flex;
            flex-direction: column;
            line-height: 1.15;
        }
        .logo-text .brand {
            font-size: 1.35rem;
            font-weight: 800;
            color: var(--text-dark);
        }
        .logo-text .tagline {
            font-size: 0.65rem;
            font-weight: 400;
            color: var(--text-muted);
            letter-spacing: 0.5px;
        }
        .main-nav {
            display: flex;
            align-items: center;
            gap: 28px;
            list-style: none;
        }
        .main-nav a {
            text-decoration: none;
            color: var(--text-body);
            font-weight: 500;
            font-size: 0.95rem;
            position: relative;
            padding: 6px 0;
            transition: color var(--transition-fast);
            white-space: nowrap;
        }
        .main-nav a::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 0;
            height: 2px;
            background: var(--primary);
            border-radius: 2px;
            transition: width var(--transition-smooth);
        }
        .main-nav a:hover,
        .main-nav a:focus {
            color: var(--primary);
        }
        .main-nav a:hover::after,
        .main-nav a:focus::after {
            width: 100%;
        }
        .header-cta {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: var(--telegram);
            color: #fff;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 0.88rem;
            transition: all var(--transition-smooth);
            white-space: nowrap;
            flex-shrink: 0;
            box-shadow: 0 3px 14px rgba(0, 136, 204, 0.28);
        }
        .header-cta:hover {
            background: var(--telegram-hover);
            box-shadow: 0 6px 22px rgba(0, 136, 204, 0.38);
            transform: translateY(-2px);
        }
        .header-cta svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }
        .active{
          color: var(--accent);
        }

        /* ========== DARK MODE VARIABLES (html.dark) ========== */
        html.dark {
            --bg-white: #121220;        /* main background – deep navy, not pure black */
            --bg-soft: #1e1e30;         /* card / soft background */
            --text-dark: #ecf0f5;       /* primary heading text */
            --text-body: #cfd8e6;       /* body text */
            --text-muted: #8b96ad;      /* muted text */
            --border-soft: #2d2f45;     /* subtle borders */
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
            --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
            --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3);
            /* Keep brand blues but adjust for dark backgrounds */
            --primary: #61a3e0;         /* slightly brighter blue for contrast */
            --primary-dark: #4a88cc;
            --primary-light: #7ab8f0;
            --accent: #61a3e0;
            --telegram: #0088cc;        /* Telegram blue remains unchanged */
            --telegram-hover: #00a1e0;
            /* Additional overrides for specific elements if needed */
        }

        /* Smooth transition on all themed elements */
        body, .site-header, .feature-card, .testimonial-card, .faq-item, .quiz-container,
        .chat-bubble, .hero-illustration, .option-btn, .progress-bar-bg, .seo-content,
        .site-footer {
            transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
        }

        /* ========== THEME TOGGLE BUTTON ========== */
        .theme-toggle {
            background: transparent;
            border: 2px solid var(--border-soft);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            flex-shrink: 0;
            color: var(--text-dark);
        }

        .theme-toggle:hover {
            border-color: var(--primary);
            box-shadow: 0 0 15px rgba(59, 126, 199, 0.25);
        }

        .theme-icon {
            position: absolute;
            width: 20px;
            height: 20px;
            transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.3s ease;
        }

        /* Initial state: show sun, hide moon */
        .moon-icon {
            opacity: 0;
            transform: rotate(90deg) scale(0.4);
        }
        .sun-icon {
            opacity: 1;
            transform: rotate(0deg) scale(1);
        }

        /* When dark mode is active, flip icons */
        html.dark .sun-icon {
            opacity: 0;
            transform: rotate(-90deg) scale(0.4);
        }
        html.dark .moon-icon {
            opacity: 1;
            transform: rotate(0deg) scale(1);
        }

        /* Correct footer & header specific backgrounds in dark mode */
        html.dark .site-header {
            background: rgba(18, 18, 32, 0.85);
            backdrop-filter: blur(16px);
        }
        html.dark .site-footer {
            background: #0e0e1c;
        }
        html.dark .faq-item,
        html.dark .question-card {
            background: #1e1e30;
        }
        html.dark .option-btn {
            background: #1e1e30;
            color: #cfd8e6;
        }
        html.dark .option-btn:hover {
            background: #282840;
        }
        html.dark .hero-illustration {
            background: radial-gradient(circle at 40% 35%, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 38, 0.7) 100%);
            box-shadow: var(--shadow-lg), 0 0 0 20px rgba(97, 163, 224, 0.05), 0 0 0 50px rgba(97, 163, 224, 0.02);
        }
        html.dark .chat-bubble {
            background: #2d2f45;
            color: #e2e8f0;
        }
        html.dark .chat-bubble:nth-child(1),
        html.dark .chat-bubble:nth-child(3) {
            background: #3a4a68;
        }
        html.dark .seo-content .keyword-pill {
            background: #25253b;
            border-color: #3b4a68;
        }
        html.dark .seo-content .keyword-pill:hover {
            background: #2d2f50;
        }

        /* Hamburger */
        .hamburger {
            display: none;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            z-index: 1001;
            border-radius: var(--radius-sm);
            transition: background var(--transition-fast);
        }
        .hamburger:hover {
            background: var(--bg-soft);
        }
        .hamburger span {
            display: block;
            width: 26px;
            height: 2.5px;
            background: var(--text-dark);
            border-radius: 3px;
            transition: all var(--transition-smooth);
            transform-origin: center;
        }
        .hamburger.active span:nth-child(1) {
            transform: translateY(7.5px) rotate(45deg);
        }
        .hamburger.active span:nth-child(2) {
            opacity: 0;
            transform: scaleX(0);
        }
        .hamburger.active span:nth-child(3) {
            transform: translateY(-7.5px) rotate(-45deg);
        }

        /* ============ MOBILE MENU OVERLAY ============ */
        .mobile-nav-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 998;
            opacity: 0;
            transition: opacity var(--transition-smooth);
        }
        .mobile-nav-overlay.active {
            display: block;
            opacity: 1;
        }
        /* Mobile Nav Panel – accessible scrolling */
        .mobile-nav-panel {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;                 /* اگر پنل از راست باز می‌شود */
        width: 80%;
        max-width: 320px;
        background: var(--bg-white);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);

        /* فعال‌سازی اسکرول */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;  /* اسکرول نرم در iOS */
        overscroll-behavior: contain;       /* جلوگیری از کشیده شدن کل صفحه */
        padding: 1.5rem 1.25rem 2rem;
        z-index: 1000;
        transform: translateX(100%);        /* حالت اولیه مخفی */
        transition: transform 0.3s ease;
        }

        /* وقتی پنل فعال (باز) است */
        .mobile-nav-panel.active {
        transform: translateX(0);
        }

        /* استایل اختیاری برای اسکرول‌بار نازک و مینیمال */
        .mobile-nav-panel::-webkit-scrollbar {
        width: 4px;
        }
        .mobile-nav-panel::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 8px;
        }
        .mobile-nav-panel.active {
            transform: translateX(0);
        }
        .mobile-nav-panel .mobile-logo {
            font-size: 1.3rem;
            font-weight: 800;
            color: var(--text-dark);
            text-align: center;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border-soft);
        }
        .mobile-nav-panel a {
            text-decoration: none;
            color: var(--text-body);
            font-weight: 500;
            font-size: 1.05rem;
            padding: 10px 16px;
            border-radius: var(--radius-sm);
            transition: all var(--transition-fast);
            display: block;
        }
        .mobile-nav-panel a:hover,
        .mobile-nav-panel a:focus {
            background: var(--bg-soft);
            color: var(--primary);
        }
        .mobile-nav-panel .mobile-cta {
            margin-top: auto;
            background: var(--telegram);
            color: #fff;
            text-align: center;
            padding: 14px 20px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 1rem;
        }