        :root {
            --primary: #059669;
            --primary-hover: #047857;
            --primary-light: #e7f8ee;
            --navy: #064e3b;
            --navy-light: #065f46;
            --text: #0b3d2c;
            --text-dark: #064e3b;
            --muted: #3f7a63;
            --border: #cfe9dd;
            --bg: #f3fbf6;
            --surface: #ffffff;
            --surface-sub: #e7f8ee;
            --success: #059669;
            --success-light: #ecfdf5;
            --warning: #d97706;
            --accent-edu: #0f766e;
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* هدر استیکی و ریسپانسیو */
        header {
            background-color: var(--surface);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 50;
            box-shadow: var(--shadow-sm);
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0.85rem 1.25rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }

        .brand-box {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            color: var(--text-dark);
            flex-shrink: 0;
        }

        .brand-icon {
            width: 42px;
            height: 42px;
            background: linear-gradient(135deg, var(--primary), #059669);
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            box-shadow: var(--shadow-sm);
        }

        .brand-text h1 {
            font-size: 1rem;
            font-weight: 800;
            color: var(--navy);
            letter-spacing: -0.3px;
        }

        .brand-text span {
            font-size: 0.72rem;
            color: var(--muted);
            display: block;
        }

        /* نویگیشن بار */
        .portal-nav {
            display: flex;
            gap: 6px;
            background: var(--surface-sub);
            padding: 4px;
            border-radius: 10px;
            overflow-x: auto;
            scrollbar-width: none;
        }

            .portal-nav::-webkit-scrollbar {
                display: none;
            }

        .nav-btn {
            background: none;
            border: none;
            padding: 8px 14px;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--muted);
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

            .nav-btn:hover {
                color: var(--navy);
            }

            .nav-btn.active {
                background: var(--surface);
                color: var(--primary);
                box-shadow: var(--shadow-sm);
            }

        /* لایه محتوا */
        main {
            flex: 1;
            max-width: 1200px;
            width: 100%;
            margin: 0 auto;
            padding: 1.5rem 1.25rem 3.5rem;
        }

        .badge-notice {
            background-color: var(--primary-light);
            color: var(--primary);
            border: 1px solid #bbf7d0;
            padding: 10px 14px;
            border-radius: var(--radius-md);
            font-size: 0.82rem;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 10px;
            line-height: 1.6;
        }

        /* بنر خنثی و معتبر سازمانی */
        .intro-banner {
            background: linear-gradient(135deg, #ffffff 0%, #e7f8ee 100%);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 1.4rem 1.5rem;
            margin-bottom: 1.75rem;
            box-shadow: var(--shadow-sm);
        }

            .intro-banner h2 {
                font-size: 1.25rem;
                font-weight: 900;
                color: var(--navy);
                margin-bottom: 0.4rem;
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .intro-banner p {
                font-size: 0.88rem;
                color: var(--muted);
                line-height: 1.7;
            }

        .section-sub-title {
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--navy);
            margin: 2rem 0 1rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* گرید خدمات */
        .catalog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.25rem;
            margin-bottom: 2rem;
        }

        .service-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 1.4rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }

            .service-card:hover {
                transform: translateY(-3px);
                box-shadow: var(--shadow-lg);
                border-color: #cfe9dd;
            }

            .service-card.recommended {
                border-color: #059669;
                box-shadow: 0 0 0 1px #059669, var(--shadow-md);
            }

            .service-card.edu-card {
                border-color: #a7f3d0;
                background: linear-gradient(180deg, #f0fdf6 0%, #ffffff 100%);
            }

        .card-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.85rem;
        }

        .card-badge {
            font-size: 0.7rem;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 20px;
        }

        .badge-std {
            background: #e7f8ee;
            color: #3f7a63;
        }

        .badge-pop {
            background: #d1fae5;
            color: #059669;
        }

        .badge-gold {
            background: #fef3c7;
            color: #92400e;
        }

        .badge-edu {
            background: #d1fae5;
            color: #0f766e;
        }

        .sku-label {
            font-size: 0.72rem;
            color: var(--muted);
            font-family: monospace;
            background: #f3fbf6;
            padding: 2px 6px;
            border-radius: 4px;
            border: 1px solid var(--border);
        }

        .card-title {
            font-size: 1.05rem;
            font-weight: 800;
            color: var(--navy);
            margin-bottom: 0.4rem;
        }

        .card-desc {
            font-size: 0.82rem;
            color: var(--muted);
            margin-bottom: 1rem;
            line-height: 1.6;
            min-height: 44px;
        }

        .features-list {
            list-style: none;
            margin-bottom: 1.25rem;
            border-top: 1px dashed var(--border);
            padding-top: 0.85rem;
        }

            .features-list li {
                font-size: 0.8rem;
                color: var(--text);
                margin-bottom: 6px;
                display: flex;
                align-items: center;
                gap: 8px;
            }

                .features-list li svg {
                    flex-shrink: 0;
                    color: var(--success);
                }

        .edu-card .features-list li svg {
            color: #0f766e;
        }

        .card-price-box {
            display: flex;
            align-items: baseline;
            gap: 4px;
            margin-bottom: 1rem;
        }

        .price-amount {
            font-size: 1.35rem;
            font-weight: 900;
            color: var(--navy);
        }

        .price-currency {
            font-size: 0.75rem;
            color: var(--muted);
            font-weight: 600;
        }

        .btn-select {
            width: 100%;
            padding: 11px;
            background: var(--surface-sub);
            color: var(--navy);
            border: 1px solid var(--border);
            border-radius: var(--radius-md);
            font-size: 0.88rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

            .btn-select:hover {
                background: var(--primary);
                color: #fff;
                border-color: var(--primary);
            }

        .service-card.recommended .btn-select {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }

            .service-card.recommended .btn-select:hover {
                background: var(--primary-hover);
            }

        .edu-card .btn-select {
            background: #d1fae5;
            color: #115e59;
            border-color: #6ee7b7;
        }

            .edu-card .btn-select:hover {
                background: #0f766e;
                color: #ffffff;
                border-color: #0f766e;
            }

        /* پنل صورتحساب و پرداخت */
        #checkoutPanel {
            scroll-margin-top: 85px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 1.75rem;
            box-shadow: var(--shadow-lg);
            margin-bottom: 2.5rem;
            display: none;
        }

        .invoice-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border);
            padding-bottom: 0.85rem;
            margin-bottom: 1.25rem;
        }

            .invoice-header h3 {
                font-size: 1.15rem;
                font-weight: 800;
                color: var(--navy);
                display: flex;
                align-items: center;
                gap: 8px;
            }

        .invoice-details-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1rem;
            background: var(--surface-sub);
            padding: 1rem;
            border-radius: var(--radius-md);
            margin-bottom: 1.25rem;
        }

        .inv-item label {
            display: block;
            font-size: 0.72rem;
            color: var(--muted);
            margin-bottom: 3px;
        }

        .inv-item div {
            font-weight: 700;
            color: var(--navy);
            font-size: 0.9rem;
        }

        .btn-pay {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #047857, var(--primary));
            color: #fff;
            border: none;
            border-radius: var(--radius-md);
            font-size: 1rem;
            font-weight: 800;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

            .btn-pay:hover {
                transform: translateY(-1px);
                box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
            }

        /* رسید و صدور ووچر */
        #receiptBox {
            display: none;
            margin-top: 1.5rem;
            background: #f0fdf4;
            border-radius: var(--radius-md);
            padding: 1.25rem;
            border: 1px solid #bbf7d0;
        }

        .receipt-success-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--success);
            font-weight: 800;
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }

        .receipt-instruction {
            font-size: 0.88rem;
            color: #166534;
            line-height: 1.6;
            margin-bottom: 1rem;
            background: #ffffff;
            padding: 10px 14px;
            border-radius: 8px;
            border-right: 4px solid var(--success);
        }

        .voucher-display-container {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #ffffff;
            border: 2px dashed #86efac;
            padding: 12px 14px;
            border-radius: 10px;
        }

        .voucher-code-output {
            flex: 1;
            font-family: monospace;
            font-size: 1.25rem;
            font-weight: 800;
            color: #064e3b;
            letter-spacing: 2px;
            direction: ltr;
            text-align: center;
            user-select: all;
        }

        .btn-copy {
            background: var(--navy);
            color: #ffffff;
            border: none;
            padding: 9px 16px;
            border-radius: 8px;
            font-size: 0.82rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

            .btn-copy:hover {
                background: #065f46;
            }

        /* بخش وبلاگ و مقالات آموزشی */
        .blog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 1.5rem;
            margin-top: 1rem;
        }

        .blog-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 1.4rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

            .blog-card:hover {
                transform: translateY(-2px);
                box-shadow: var(--shadow-md);
            }

        .blog-meta {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.75rem;
            color: var(--muted);
            margin-bottom: 0.75rem;
        }

        .blog-tag {
            background: var(--primary-light);
            color: var(--primary);
            padding: 2px 8px;
            border-radius: 4px;
            font-weight: 600;
        }

        .blog-title {
            font-size: 1.05rem;
            font-weight: 800;
            color: var(--navy);
            margin-bottom: 0.6rem;
            line-height: 1.5;
        }

        .blog-excerpt {
            font-size: 0.85rem;
            color: var(--muted);
            line-height: 1.7;
            margin-bottom: 1.25rem;
        }

        .blog-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-top: 1px solid var(--border);
            padding-top: 0.85rem;
            font-size: 0.8rem;
            color: var(--primary);
            font-weight: 700;
            cursor: pointer;
        }

        /* تبها و استایل های مشترک */
        .tab-panel {
            display: none;
        }

            .tab-panel.active {
                display: block;
            }

        .info-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            margin-bottom: 1.25rem;
        }

            .info-card h3 {
                color: var(--navy);
                font-size: 1.1rem;
                font-weight: 800;
                margin-bottom: 0.6rem;
                display: flex;
                align-items: center;
                gap: 8px;
            }

        /* فوتر رسمی و کامل سازمانی */
        footer {
            background: #032b1e;
            color: #6ee7b7;
            border-top: 1px solid #065f46;
            padding: 3rem 1.25rem 1.5rem;
            font-size: 0.85rem;
            margin-top: auto;
        }

        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1.5fr;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .footer-col h4 {
            color: #ffffff;
            font-size: 0.95rem;
            font-weight: 800;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .footer-col p {
            line-height: 1.7;
            font-size: 0.82rem;
            margin-bottom: 1rem;
        }

        .footer-links {
            list-style: none;
        }

            .footer-links li {
                margin-bottom: 8px;
            }

            .footer-links a {
                color: #6ee7b7;
                text-decoration: none;
                transition: color 0.2s ease;
                font-size: 0.82rem;
            }

                .footer-links a:hover {
                    color: #ffffff;
                }

        .compliance-box {
            background: #04382a;
            border: 1px solid #065f46;
            border-radius: 8px;
            padding: 12px;
            font-size: 0.78rem;
            line-height: 1.6;
        }

        .compliance-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 8px;
        }

        .comp-tag {
            background: #065f46;
            color: #34d399;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.72rem;
            font-family: monospace;
        }

        .footer-bottom-bar {
            max-width: 1200px;
            margin: 0 auto;
            border-top: 1px solid #065f46;
            padding-top: 1.25rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            font-size: 0.78rem;
        }

        /* اعلان Toast */
        #toastNotice {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--navy);
            color: #fff;
            padding: 10px 20px;
            border-radius: 30px;
            font-size: 0.85rem;
            font-weight: 600;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 100;
        }

            #toastNotice.visible {
                transform: translateX(-50%) translateY(0);
                opacity: 1;
            }

        @media (max-width: 900px) {
            .footer-container {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 640px) {
            .header-container {
                flex-direction: column;
                align-items: stretch;
            }

            .footer-container {
                grid-template-columns: 1fr;
            }

            .voucher-display-container {
                flex-direction: column;
            }

            .btn-copy {
                width: 100%;
                justify-content: center;
            }

            .footer-bottom-bar {
                flex-direction: column;
                text-align: center;
            }
        }
        /* ==========================================================================
           پکیج ریسپانسیو جامع و اختصاصی موبایل و تبلت (نسخه اختصاصی نینجا)
           بدون هیچگونه دستکاری در ظاهر دسکتاپ یا ساختار لاجیک برنامه
           ========================================================================== */

        /* ۱. جلوگیری سراسری از اسکرول افقی روی دستگاه های لمسی */
        html, body {
            max-width: 100%;
            overflow-x: hidden;
            -webkit-text-size-adjust: 100%;
        }

        /* ۲. تبلت ها و صفحات زیر ۹۹۲ پیکسل */
        @media screen and (max-width: 992px) {
            .footer-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
            }

            .intro-banner {
                padding: 1.5rem;
            }

                .intro-banner h2 {
                    font-size: 1.25rem;
                }
        }

        /* ۳. موبایل های افقی و تبلت های عمودی (زیر ۷۶۸ پیکسل) */
        @media screen and (max-width: 768px) {
            main {
                padding: 1rem 0.75rem;
            }

            .header-container {
                flex-direction: column;
                align-items: stretch;
                gap: 0.85rem;
                padding: 0.75rem 1rem;
            }

            .brand-box {
                justify-content: center;
                text-align: center;
            }

            .brand-text h1 {
                font-size: 1.05rem;
            }

            .brand-text span {
                font-size: 0.72rem;
            }

            /* اسکرول تبها روی موبایل بدون بیرون زدن */
            .portal-nav {
                display: flex;
                overflow-x: auto;
                white-space: nowrap;
                padding-bottom: 4px;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                gap: 6px;
            }

                .portal-nav::-webkit-scrollbar {
                    display: none;
                }

            .nav-btn {
                padding: 7px 12px;
                font-size: 0.78rem;
                flex-shrink: 0;
            }

            /* اصلاح گرید ها برای جلوگیری از سرریز شدن */
            .catalog-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .blog-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            /* تنظیمات کارت ها روی موبایل */
            .service-card, .blog-card, .info-card {
                padding: 1.15rem;
            }

            .card-title {
                font-size: 1rem;
            }

            .card-desc {
                min-height: auto;
                font-size: 0.8rem;
            }

            /* بهینه سازی فرم پیش فاکتور در موبایل */
            #checkoutPanel {
                padding: 1.1rem;
                margin-bottom: 1.5rem;
            }

            .invoice-details-grid {
                grid-template-columns: 1fr 1fr;
                gap: 0.75rem;
                padding: 0.75rem;
            }

            .btn-pay {
                padding: 12px;
                font-size: 0.92rem;
            }

            /* ووچر و کد لایسنس */
            .voucher-display-container {
                flex-direction: column;
                gap: 10px;
                padding: 10px;
            }

            .voucher-code-output {
                font-size: 1.1rem;
                letter-spacing: 1px;
                word-break: break-all;
                width: 100%;
            }

            .btn-copy {
                width: 100%;
                justify-content: center;
                padding: 10px;
            }
        }

        /* ۴. گوشی های موبایل با عرض کوچک و متوسط (زیر ۵۴۰ پیکسل) */
        @media screen and (max-width: 540px) {
            .badge-notice {
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
                font-size: 0.78rem;
                padding: 0.75rem 0.9rem;
                line-height: 1.6;
            }

                .badge-notice svg {
                    margin-top: 2px;
                }

            .intro-banner {
                padding: 1rem;
                border-radius: var(--radius-md);
            }

                .intro-banner h2 {
                    font-size: 1.1rem;
                    line-height: 1.5;
                }

                .intro-banner p {
                    font-size: 0.8rem;
                    line-height: 1.6;
                }

            /* تکستونه شدن جزئیات فاکتور در نمایشگر های کوچک */
            .invoice-details-grid {
                grid-template-columns: 1fr;
            }

            .invoice-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            /* فوتر موبایل */
            .footer-container {
                grid-template-columns: 1fr;
                gap: 1.75rem;
            }

            footer {
                padding: 2rem 1rem 1.25rem;
            }

            .footer-bottom-bar {
                flex-direction: column;
                text-align: center;
                gap: 0.75rem;
            }

            /* پیام شناور تست یا اعلان Toast در موبایل */
            #toastNotice {
                width: 90%;
                max-width: 320px;
                text-align: center;
                font-size: 0.8rem;
                bottom: 15px;
            }
        }

        /* ۵. گوشی های فوق باریک (زیر ۳۶۰ پیکسل مانند iPhone SE نسل اول و Foldهای بسته) */
        @media screen and (max-width: 360px) {
            body {
                font-size: 13px;
            }

            .card-price-box {
                flex-direction: column;
                align-items: flex-start;
                gap: 2px;
            }

            .price-amount {
                font-size: 1.2rem;
            }

            .btn-select {
                padding: 9px;
                font-size: 0.82rem;
            }
        }
