/* ===================================================================
   RoboShop — Design Tokens
   نکته: نام متغیرها عیناً با همون‌هایی که تو x-navbar استفاده شده یکیه
   (--primary, --primary-dark, --text-primary, --text-secondary)
   تا رنگ navbar و بقیه‌ی صفحه صد در صد یکدست بمونن.
=================================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-deep: #3730a3;
    --gold: #f0b429;
    --gold-dark: #c98d0f;

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-faint: #9ca3af;

    --bg: #fafafc;
    --bg-elevated: #ffffff;
    --bg-sunken: #f3f2fa;
    --border: rgba(17, 24, 39, 0.08);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 14px 34px rgba(17, 24, 39, 0.08);
    --shadow-lg: 0 24px 60px rgba(76, 60, 180, 0.16);

    --font-body: 'Vazirmatn', Tahoma, sans-serif;
    --font-num: 'Vazirmatn', Consolas, monospace;
}

[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #98a2b8;
    --text-faint: #5e6b85;

    --bg: #0a0a12;
    --bg-elevated: #14141f;
    --bg-sunken: #191926;
    --border: rgba(255, 255, 255, 0.08);

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(99, 102, 241, 0.22);
}

/* ===================================================================
   Base
=================================================================== */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.75;
    transition: background .35s ease, color .35s ease;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(99,102,241,.25); }

.mt-4 { margin-top: 1.5rem; }

/* ===================================================================
   Buttons (استفاده‌شده تو hero-actions، pricing، مودال‌ها)
=================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 24px;
    font-family: inherit; font-size: .95rem; font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 10px 26px rgba(99,102,241,.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(99,102,241,.42); }
.btn-outline {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ===================================================================
   Hero
=================================================================== */
.hero-section {
    position: relative;
    padding: 168px 0 100px;
    overflow: hidden;
}
.hero-background {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(700px 420px at 85% -10%, rgba(99,102,241,.16), transparent 60%),
        radial-gradient(500px 380px at -5% 20%, rgba(240,180,41,.14), transparent 60%);
}
.hero-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .82rem; font-weight: 700; color: var(--primary);
    background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.18);
    padding: 7px 15px; border-radius: 30px; margin-bottom: 20px;
}
[data-theme="dark"] .badge { color: #a5b4fc; background: rgba(165,180,252,.08); border-color: rgba(165,180,252,.18); }
.hero-title {
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 900; letter-spacing: -.03em; line-height: 1.32;
    margin-bottom: 20px;
}
.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--primary-deep));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust p { font-size: .86rem; color: var(--text-faint); }
.hero-trust p::before { content: '⭐️ '; }

.hero-visual { display: flex; justify-content: center; position: relative; }
.mockup-card {
    width: 100%; max-width: 420px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.mockup-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; background: var(--bg-sunken); border-bottom: 1px solid var(--border);
}
.mockup-header .dots { display: flex; gap: 6px; }
.mockup-header .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mockup-header .title { font-size: .82rem; font-weight: 600; color: var(--text-secondary); }
.mockup-body { padding: 20px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-box {
    background: var(--bg-sunken); border-radius: 14px; padding: 14px;
    display: flex; flex-direction: column; gap: 6px;
}
.stat-box i { font-size: 1.1rem; }
.stat-box span { font-size: .76rem; color: var(--text-faint); }
.stat-box strong { font-family: var(--font-num); font-size: 1rem; }
.mockup-chart {
    height: 90px; border-radius: 12px; margin-bottom: 16px;
    background: linear-gradient(180deg, rgba(99,102,241,.16), transparent),
                repeating-linear-gradient(90deg, rgba(99,102,241,.35) 0 14%, transparent 14% 20%);
    background-size: 100% 100%, 100% 60%;
    background-position: bottom, bottom;
    background-repeat: no-repeat, repeat-x;
}
.mockup-alert {
    display: flex; align-items: center; gap: 8px;
    background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2);
    color: var(--text-primary); font-size: .82rem; font-weight: 600;
    padding: 10px 14px; border-radius: 10px;
}

@media (max-width: 960px) {
    .hero-container { grid-template-columns: 1fr; }
    .hero-visual { order: -1; margin-bottom: 12px; }
}

/* ===================================================================
   Entrance animations (فقط delay از inline style میاد)
=================================================================== */
.fade-in-up { opacity: 0; animation: fadeInUp .7s ease forwards; }
.fade-in-left { opacity: 0; animation: fadeInLeft .8s ease forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
    .fade-in-up, .fade-in-left { animation: none; opacity: 1; }
}

/* ===================================================================
   Sections عمومی
=================================================================== */
.section { padding: 100px 0; }
.section.bg-light { background: var(--bg-sunken); }
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { max-width: 620px; margin: 0 auto 56px; text-align: center; }
.section-header .title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.section-header .subtitle { font-size: 1rem; color: var(--text-secondary); }
.empty-state { text-align: center; color: var(--text-faint); font-size: .95rem; grid-column: 1/-1; padding: 40px 0; }

/* ===================================================================
   Features
=================================================================== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(99,102,241,.25); }
.feature-icon {
    width: 48px; height: 48px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #fff; margin-bottom: 18px;
}
.feature-icon.bg-blue   { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.feature-icon.bg-green  { background: linear-gradient(135deg, #10b981, #059669); }
.feature-icon.bg-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.feature-icon.bg-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.feature-icon.bg-pink   { background: linear-gradient(135deg, #ec4899, #db2777); }
.feature-icon.bg-teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: .87rem; color: var(--text-secondary); }
@media (max-width: 860px) { .features-grid { grid-template-columns: 1fr; } }

/* ===================================================================
   Blog / آکادمی فروش
=================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-card {
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-image { height: 170px; background: var(--bg-sunken); overflow: hidden; }
.blog-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-image-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--text-faint); font-size: 2rem;
    background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(240,180,41,.08));
}
.blog-content { padding: 20px; }
.blog-meta { margin-bottom: 10px; }
.blog-meta .date { font-size: .78rem; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.blog-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.blog-excerpt { font-size: .85rem; color: var(--text-secondary); margin-bottom: 14px; }
.read-more { font-size: .82rem; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr; } }

/* ===================================================================
   Pricing
=================================================================== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.pricing-card {
    position: relative;
    background: var(--bg-elevated); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
    padding: 32px 26px; display: flex; flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: scale(1.03); }
.popular-badge {
    position: absolute; top: -13px; right: 26px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-size: .74rem; font-weight: 700;
    padding: 5px 14px; border-radius: 20px;
}
.plan-header { margin-bottom: 24px; }
.plan-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 12px; }
.plan-price-box { display: flex; align-items: baseline; gap: 8px; }
.price-number { font-family: var(--font-num); font-size: 2rem; font-weight: 700; }
.price-currency { font-size: .88rem; color: var(--text-faint); }
.price-currency small { display: block; font-size: .76rem; }
.plan-features-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; flex: 1; }
.plan-features-list li { display: flex; align-items: flex-start; gap: 9px; font-size: .87rem; color: var(--text-secondary); }
.plan-features-list li i { color: var(--primary); margin-top: 3px; font-size: .8rem; }
.pricing-card.featured .btn-outline { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } .pricing-card.featured { transform: none; } }

/* ===================================================================
   مودال‌ها (بر پایه‌ی رفتار .modal/.active که تو layout هست)
   ⚠️ اگر ساختار داخلی x-modal فرق داره، فایلش رو بفرست تا دقیق‌ترش کنم
=================================================================== */
.modal {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,10,18,.55); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; animation: fadeInUp .25s ease; }
.modal-box, .modal-content {
    width: 100%; max-width: 420px;
    background: var(--bg-elevated); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 28px 26px;
}
.modal-header { margin-bottom: 20px; }
.modal-close { cursor: pointer; color: var(--text-faint); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 8px; }
.form-group input {
    width: 100%; padding: 12px 14px; font-family: inherit; font-size: .92rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg-sunken); color: var(--text-primary);
    transition: border-color .2s ease;
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.form-group small { display: block; margin-top: 6px; font-size: .76rem; color: var(--text-faint); }

/* ===================================================================
   آلرت‌ها (x-alert)
   ⚠️ همون‌طور: اگه کلاس‌بندی داخلی x-alert فرق داره بگو دقیقش کنم
=================================================================== */
.alert {
    display: flex; align-items: center; gap: 10px;
    max-width: 1200px; margin: 84px auto 0; padding: 14px 20px;
    border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600;
}
.alert-success { background: rgba(16,185,129,.1); color: #059669; border: 1px solid rgba(16,185,129,.25); }
.alert-error   { background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.25); }
[data-theme="dark"] .alert-success { color: #34d399; }
[data-theme="dark"] .alert-error { color: #f87171; }
