/* =========================================================
   seosafar.ir -- "Liquid Glass" Visual System (Apple-inspired)
   Multi-layer frosted glass, specular edge highlights, spring motion.
   RTL, auto dark/light theme (prefers-color-scheme, overridable via
   data-theme + localStorage). Two selectable color presets --
   "classic" (warm sunset/ocean, gradients) and "flat" (solid, muted) --
   both admin-selectable, plus a custom accent color override; see
   [data-preset="flat"] and --accent below (index.php prints a small
   inline <style> to override --accent/--accent-deep when the admin
   picks a custom color in تنظیمات -> برند و ظاهر سایت).
   ========================================================= */

/* ---------- 1. THEME TOKENS ---------- */
:root {
    /* Sunset / boarding-pass palette -- distinct from generic SaaS emerald/indigo */
    --accent: #FF7A45;          /* coral sunset -- primary accent (admin-overridable) */
    --accent-deep: #F0512A;
    --accent-rgb: 255, 122, 69;      /* same as --accent, as "r, g, b" -- used for rgba() glows/tints so
                                        every glow follows a custom admin accent color, not just the solid fill */
    --accent-deep-rgb: 240, 81, 42;  /* same as --accent-deep, as "r, g, b" */
    --amber: #FFB020;        /* golden hour -- secondary accent */
    --ocean: #0EA5A4;        /* deep teal sea */
    --ocean-deep: #0B7A79;
    --dusk: #6C5CE7;         /* twilight purple -- used sparingly */

    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --blur: 30px;
    --glass-edge: rgba(255, 255, 255, 0.55);   /* specular highlight stroke on glass panels */
    --transition: 280ms cubic-bezier(.22, 1, .36, 1);   /* soft spring-ish ease, Apple-like */
    --transition-spring: 480ms cubic-bezier(.34, 1.56, .64, 1);
    --font-main: 'Vazirmatn', Tahoma, sans-serif;
}

/* ---------- 1b. "FLAT" COLOR PRESET -- solid, muted, no gradients ---------- */
:root[data-preset="flat"] {
    --accent-deep: var(--accent);   /* flat = one solid tone, no light/dark blend */
    --accent-deep-rgb: var(--accent-rgb);
    --amber: var(--accent);
    --glass-edge: rgba(255, 255, 255, 0.28);
}

/* ---------- 1c. "MINIMAL" PRESET -- no blur, crisp flat borders, generous whitespace ---------- */
:root[data-preset="minimal"] {
    --accent-deep: var(--accent);
    --accent-deep-rgb: var(--accent-rgb);
    --amber: var(--accent);
    --blur: 0px;
    --glass-edge: rgba(0, 0, 0, 0);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}
:root[data-preset="minimal"] .glass,
:root[data-preset="minimal"] .glass-strong {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    border: 1px solid var(--panel-border);
}
:root[data-preset="minimal"] .glass::before,
:root[data-preset="minimal"] .glass-strong::before,
:root[data-preset="minimal"] .ambient-bg,
:root[data-preset="minimal"] .ambient-dots { display: none; }
:root[data-preset="minimal"] .hero-stat,
:root[data-preset="minimal"] .bundle-card { border-style: solid; }
:root[data-preset="minimal"] .support-fab { animation: none; }

/* ---------- 1e. "GLASS" PRESET -- stronger, more luminous Liquid Glass ---------- */
:root[data-preset="glass"] {
    --blur: 46px;
    --radius-lg: 34px;
    --radius-md: 22px;
    --glass-edge: rgba(255, 255, 255, 0.7);
}
:root[data-preset="glass"] .glass,
:root[data-preset="glass"] .glass-strong {
    backdrop-filter: blur(var(--blur)) saturate(1.9);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(1.9);
}

/* Light palette (default) -- warm sand / cream */
:root,
:root[data-theme="light"] {
    --bg: #FBF7F2;
    --bg-grad-1: #FFE8D6;
    --bg-grad-2: #DFF6F3;
    --panel: rgba(255, 255, 255, 0.74);
    --panel-strong: rgba(255, 255, 255, 0.92);
    --panel-border: rgba(20, 30, 40, 0.08);
    --text-main: #1E2430;
    --text-muted: #55606e;
    --text-soft: #8792a0;
    --shadow: 0 14px 40px rgba(var(--accent-deep-rgb), 0.10);
    --shadow-soft: 0 6px 20px rgba(20, 30, 40, 0.06);
    --input-bg: rgba(255, 255, 255, 0.65);
    --chip-bg: rgba(20, 30, 40, 0.05);
    --success: #0d9668;
    --danger: #e34848;
    --card-cover-1: linear-gradient(135deg, var(--accent), var(--amber));
    --card-cover-2: linear-gradient(135deg, var(--ocean), #22d3ee);
    --card-cover-3: linear-gradient(135deg, var(--dusk), #a78bfa);
    --card-cover-4: linear-gradient(135deg, #64748b, #94a3b8);
}

/* Dark palette -- deep midnight sky over ocean */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0D1321;
        --bg-grad-1: #2A1338;
        --bg-grad-2: #06272A;
        --panel: rgba(23, 29, 43, 0.72);
        --panel-strong: rgba(23, 29, 43, 0.92);
        --panel-border: rgba(255, 255, 255, 0.10);
        --text-main: #F3F1EC;
        --text-muted: #C7CEDB;
        --text-soft: #8B93A7;
        --shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
        --shadow-soft: 0 8px 24px rgba(0,0,0,.35);
        --input-bg: rgba(255, 255, 255, 0.07);
        --chip-bg: rgba(255, 255, 255, 0.07);
        --success: #34d399;
        --danger: #f87171;
        --card-cover-1: linear-gradient(135deg, var(--accent-deep), var(--amber));
        --card-cover-2: linear-gradient(135deg, var(--ocean-deep), #0891b2);
        --card-cover-3: linear-gradient(135deg, #4c3aa8, var(--dusk));
        --card-cover-4: linear-gradient(135deg, #475569, #64748b);
    }
}
:root[data-theme="dark"] {
    --bg: #0D1321;
    --bg-grad-1: #2A1338;
    --bg-grad-2: #06272A;
    --panel: rgba(23, 29, 43, 0.72);
    --panel-strong: rgba(23, 29, 43, 0.92);
    --panel-border: rgba(255, 255, 255, 0.10);
    --text-main: #F3F1EC;
    --text-muted: #C7CEDB;
    --text-soft: #8B93A7;
    --shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 8px 24px rgba(0,0,0,.35);
    --input-bg: rgba(255, 255, 255, 0.07);
    --chip-bg: rgba(255, 255, 255, 0.07);
    --success: #34d399;
    --danger: #f87171;
    --card-cover-1: linear-gradient(135deg, var(--accent-deep), var(--amber));
    --card-cover-2: linear-gradient(135deg, var(--ocean-deep), #0891b2);
    --card-cover-3: linear-gradient(135deg, #4c3aa8, var(--dusk));
    --card-cover-4: linear-gradient(135deg, #475569, #64748b);
}

/* ---------- 1f. "DARK LUXURY" PRESET -- dedicated dark+gold theme, always dark
   regardless of the day/night toggle (placed after the light/dark blocks above
   so it wins the specificity tie for both [data-theme="light"] and [data-theme="dark"]). ---------- */
:root[data-preset="dark-luxury"],
:root[data-preset="dark-luxury"][data-theme="light"],
:root[data-preset="dark-luxury"][data-theme="dark"] {
    --bg: #0B0B0D;
    --bg-grad-1: #241C0E;
    --bg-grad-2: #0C1410;
    --panel: rgba(24, 22, 18, 0.72);
    --panel-strong: rgba(24, 22, 18, 0.92);
    --panel-border: rgba(212, 175, 55, 0.22);
    --glass-edge: rgba(212, 175, 55, 0.35);
    --text-main: #F3EEDF;
    --text-muted: #C9BFA3;
    --text-soft: #8D8570;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.45);
    --input-bg: rgba(212, 175, 55, 0.08);
    --chip-bg: rgba(212, 175, 55, 0.08);
    --success: #34d399;
    --danger: #f87171;
    --amber: var(--accent-deep);
    --card-cover-1: linear-gradient(135deg, var(--accent-deep), var(--accent));
    --card-cover-2: linear-gradient(135deg, #4a3c14, var(--accent-deep));
    --card-cover-3: linear-gradient(135deg, #2c2412, #574a20);
    --card-cover-4: linear-gradient(135deg, #3a3226, #574a20);
}

/* ---------- 2. RESET & BASE ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    line-height: 1.85;
    position: relative;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ---------- 3. AMBIENT BACKGROUND (sunset blobs + dotted route map) ---------- */
.ambient-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.ambient-bg::before, .ambient-bg::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .4;
}
.ambient-bg::before {
    width: 520px; height: 520px; top: -160px; left: -120px;
    background: radial-gradient(circle, var(--bg-grad-1), transparent 70%);
}
.ambient-bg::after {
    width: 620px; height: 620px; bottom: -220px; right: -160px;
    background: radial-gradient(circle, var(--bg-grad-2), transparent 70%);
}
.ambient-dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(var(--panel-border) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 75%);
    opacity: .5;
}

/* ---------- 4. GLASS PANEL (Liquid Glass: layered blur + specular edge) ---------- */
.glass, .glass-strong {
    position: relative;
    background: var(--panel);
    backdrop-filter: blur(var(--blur)) saturate(1.5);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(1.5);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft), inset 0 1px 0 var(--glass-edge);
    isolation: isolate;
}
.glass-strong { background: var(--panel-strong); }
/* thin curved light-refraction line along the top edge -- the "liquid" highlight */
.glass::before, .glass-strong::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    padding: 1px;
    background: linear-gradient(160deg, var(--glass-edge), transparent 40%, transparent 60%, rgba(255,255,255,.08));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: .8;
}

/* ---------- 5. PROMO BANNER ---------- */
.promo-banner {
    background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--amber));
    color: #fff;
    text-align: center;
    font-size: 13.5px;
    font-weight: 700;
    padding: 11px 16px;
    letter-spacing: .2px;
    position: relative; z-index: 2;
}
.promo-banner strong { text-decoration: underline; }

/* ---------- 6. NAVBAR (logo + day/night toggle share one row; sticky is admin-selectable) ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    margin: 14px auto 0;
    max-width: 1180px;
    gap: 14px;
}
/* admin can turn Sticky off from تنظیمات -> برند و ظاهر سایت */
.navbar.not-sticky { position: static; }
.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
}
.navbar .brand .logomark {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--amber));
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; box-shadow: 0 6px 16px rgba(var(--accent-deep-rgb),.35);
    transform: rotate(-40deg);
    overflow: hidden;
    flex-shrink: 0;
}
.navbar .brand .logomark img { width: 100%; height: 100%; object-fit: cover; transform: rotate(40deg); }

/* ---------- 6b. DAY/NIGHT TOGGLE -- 5 admin-selectable visual styles ---------- */
.theme-toggle { border: none; background: none; padding: 0; color: var(--text-main); flex-shrink: 0; }

/* style 1 -- classic pill with icon + label (default) */
.theme-toggle.style-1 {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--panel-border); background: var(--panel);
    backdrop-filter: blur(var(--blur));
    border-radius: 999px; padding: 8px 14px; font-size: 12.5px;
    transition: transform var(--transition-spring);
}
.theme-toggle.style-1:hover { transform: translateY(-1px) scale(1.03); }

/* style 2 -- iOS-like sliding switch (sun/moon icons fixed in the track, knob slides) */
.theme-toggle.style-2 {
    display: inline-flex; align-items: center; width: 64px; height: 34px; padding: 3px;
    border-radius: 999px; border: 1px solid var(--panel-border); background: var(--panel);
    position: relative; justify-content: space-between; font-size: 13px;
}
.theme-toggle.style-2 .ttrack-icon { z-index: 1; opacity: .8; }
.theme-toggle.style-2 .tknob {
    position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: 0 3px 8px rgba(var(--accent-deep-rgb),.4);
    transition: transform var(--transition-spring);
}
html.is-dark-mode .theme-toggle.style-2 .tknob { transform: translateX(-30px); }

/* style 3 -- rotating glass orb (flips to reveal sun/moon) */
.theme-toggle.style-3 {
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--panel-strong); backdrop-filter: blur(var(--blur));
    border: 1px solid var(--panel-border); box-shadow: var(--shadow-soft), inset 0 1px 0 var(--glass-edge);
    font-size: 17px; transition: transform var(--transition-spring);
}
.theme-toggle.style-3:hover { transform: rotate(-25deg) scale(1.06); }
html.is-dark-mode .theme-toggle.style-3 { transform: rotate(180deg); }
html.is-dark-mode .theme-toggle.style-3:hover { transform: rotate(155deg) scale(1.06); }
.theme-toggle.style-3 .ticon { display: inline-block; }
html.is-dark-mode .theme-toggle.style-3 .ticon { transform: rotate(-180deg); }

/* style 4 -- minimal text-only link */
.theme-toggle.style-4 {
    font-size: 12.5px; color: var(--text-muted); padding: 6px 4px;
    border-bottom: 1px solid transparent; transition: all var(--transition);
}
.theme-toggle.style-4:hover { color: var(--text-main); border-bottom-color: var(--accent); }

/* style 5 -- glowing switch (like style 2 but with a pulsing accent halo on the knob) */
.theme-toggle.style-5 {
    display: inline-flex; align-items: center; width: 64px; height: 34px; padding: 3px;
    border-radius: 999px; border: 1px solid var(--panel-border); background: var(--panel);
    position: relative; justify-content: space-between; font-size: 13px;
}
.theme-toggle.style-5 .ttrack-icon { z-index: 1; opacity: .8; }
.theme-toggle.style-5 .tknob {
    position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55);
    animation: toggle-glow 2.2s ease-in-out infinite;
    transition: transform var(--transition-spring);
}
html.is-dark-mode .theme-toggle.style-5 .tknob { transform: translateX(-30px); }
@keyframes toggle-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); }
    50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); }
}

/* ---------- 7. HERO ---------- */
.hero { padding: 68px 0 30px; text-align: center; position: relative; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 18px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
    color: var(--accent-deep); background: rgba(var(--accent-rgb),.12); margin-bottom: 22px;
    border: 1px solid rgba(var(--accent-rgb),.25);
}
.hero h1 {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 800;
    margin: 0 0 18px;
    line-height: 1.3;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent) 45%, var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { color: var(--text-muted); font-size: 17px; max-width: 620px; margin: 0 auto 34px; }

/* admin-chosen hero poster/animation (replaces the old auto-generated site-name chips row) */
.hero-media { margin: 8px auto 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.hero-media img, .hero-media video { width: 100%; display: block; }
.hero-media.size-small { max-width: 340px; }
.hero-media.size-medium { max-width: 560px; }
.hero-media.size-large { max-width: 820px; }
.hero-media.size-full { max-width: 100%; }
.hero-media.size-responsive { max-width: 560px; width: 92%; }
@media (max-width: 900px) { .hero-media.size-responsive { max-width: 420px; } }
@media (max-width: 560px) { .hero-media.size-responsive { max-width: 100%; width: 100%; } }

/* dashed flight-route divider between sections */
.route-divider { position: relative; height: 40px; margin: 10px 0 6px; }
.route-divider::before {
    content: ""; position: absolute; top: 50%; left: 6%; right: 6%; height: 0;
    border-top: 2px dashed var(--panel-border);
}
.route-divider .plane {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(180deg);
    background: var(--bg); padding: 0 14px; font-size: 18px; color: var(--accent);
}

/* ---------- 8. SECTION HEADINGS ---------- */
.section { padding: 34px 0; position: relative; }
.section-title { font-size: 25px; font-weight: 800; margin-bottom: 6px;text-align: center; }
.section-subtitle { color: var(--text-soft); font-size: 14px; margin-bottom: 28px;text-align: center; }

/* ---------- 9. SERVICE TABS ---------- */
.tabs { display: flex; gap: 10px; margin-bottom: 24px; }
.tab-btn {
    flex: 1;
    padding: 17px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    background: var(--panel);
    backdrop-filter: blur(var(--blur));
    font-weight: 700;
    font-size: 15px;
    color: var(--text-muted);
    transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(var(--accent-deep-rgb),.32);
}

/* ---------- 10. GROUP FILTER TABS ---------- */
.group-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.group-chip {
    padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--panel-border); background: var(--panel); color: var(--text-muted);
    transition: all var(--transition);
}
.group-chip.active { background: linear-gradient(135deg, var(--ocean), var(--ocean-deep)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(14,165,164,.3); }

/* ---------- 11. BUNDLE "TICKET" CARDS ---------- */
.bundles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 32px; }
.bundle-card {
    position: relative;
    padding: 20px 18px;
    border-radius: var(--radius-md);
    border: 1.5px dashed var(--panel-border);
    background: var(--panel);
    backdrop-filter: blur(var(--blur));
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}
.bundle-card::before {
    content: "✈"; position: absolute; top: 12px; left: 14px; font-size: 15px; color: var(--accent); opacity: .7;
}
.bundle-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow); transition: transform var(--transition-spring), box-shadow var(--transition), border-color var(--transition); }
.bundle-card.selected { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow); }
.bundle-card .badge {
    position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(90deg, var(--amber), var(--accent)); color: #fff; font-size: 10.5px; font-weight: 700; padding: 4px 14px; border-radius: 0 0 10px 10px;
}
.bundle-card h4 { margin: 10px 0 6px; font-size: 15px; }
.bundle-card p { margin: 0; font-size: 12px; color: var(--text-soft); }

/* ---------- 12. DESTINATION (SITE) CARDS ---------- */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.site-card {
    position: relative;
    border-radius: var(--radius-md);
    border: 1px solid var(--panel-border);
    background: var(--panel);
    backdrop-filter: blur(var(--blur));
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}
.site-card:hover { transform: translateY(-5px) scale(1.01); box-shadow: var(--shadow); transition: transform var(--transition-spring), box-shadow var(--transition); }
.site-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow); }

.site-card .cover {
    height: 64px; width: 100%; position: relative;
    background: var(--card-cover-4);
}
.site-card[data-cover="1"] .cover { background: var(--card-cover-1); }
.site-card[data-cover="2"] .cover { background: var(--card-cover-2); }
.site-card[data-cover="3"] .cover { background: var(--card-cover-3); }
.site-card[data-cover="0"] .cover { background: var(--card-cover-4); }

.site-card .logo-wrap {
    width: 160px; height: 56px; border-radius: 16px; overflow: hidden;
    background: var(--panel-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    position: absolute; top: 36px; right: 18px; border: 3px solid var(--panel-strong);
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.site-card .logo-wrap img { width: 100%; height: 100%; object-fit:contain; }

.site-card .body { padding: 34px 18px 18px; }
.site-card h3 { font-size: 16px; margin: 0 0 3px; }
.site-card .domain { font-size: 12px; color: var(--text-soft); direction: ltr; display: inline-block; }
.site-card .topics { font-size: 12.5px; color: var(--text-muted); margin: 10px 0 12px; min-height: 40px; }
.site-card .site-footer { display: flex; align-items: center; justify-content: space-between; }
.site-card .metric { font-size: 11px; color: var(--ocean-deep); background: rgba(14,165,164,.12); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.site-card .price { font-weight: 800; font-size: 14px; }
.site-card .check-circle {
    position: absolute; top: 12px; left: 12px; width: 24px; height: 24px; border-radius: 50%; z-index: 2;
    border: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: transparent; transition: all var(--transition);
}
.site-card.selected .check-circle { background: #fff; border-color: #fff; color: var(--accent-deep); }

/* ---------- 13. CLIENT LOGO TICKER (uniform tiles regardless of source aspect ratio) ---------- */
.ticker-wrap {
    overflow: hidden;
    position: relative;
    padding: 24px 0;
    direction: ltr; /* the page is RTL, but the ticker must lay out/overflow left-to-right for the loop below to be seamless */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; gap: 20px; width: max-content; animation: scroll-ltr 32s linear infinite; will-change: transform; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
.brand-tile {
    width: 148px; height: 76px; flex-shrink: 0; border-radius: var(--radius-sm);
    background: var(--input-bg); border: 1px solid var(--panel-border);
    display: flex; align-items: center; justify-content: center; padding: 12px;
     opacity: .65; transition: all var(--transition);
}
.brand-tile:hover { filter: grayscale(0); opacity: 1; transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.brand-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes scroll-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 14. WIZARD ---------- */
.wizard { display: none; }
.wizard.active { display: block; }
.wizard-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.wizard-step-dot {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft);
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--panel-border); background: var(--panel);
}
.wizard-step-dot.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: transparent; box-shadow: 0 8px 20px rgba(var(--accent-deep-rgb),.28); }
.wizard-step-dot .num { width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.15); display:flex; align-items:center; justify-content:center; font-size: 11px; }

/* style-1 (ساده) is the base look above and needs no override.
   styles 2-5 are admin-selectable alternatives (تنظیمات -> نمایش مراحل سفارش). */

/* style-2 -- فلش‌دار: chevron connector between steps */
.wizard-steps.style-2 { gap: 0; }
.wizard-steps.style-2 .wizard-step-dot { border-radius: 10px; position: relative; margin-left: 14px; }
.wizard-steps.style-2 .wizard-step-dot:last-child { margin-left: 0; }
.wizard-steps.style-2 .wizard-step-dot::after {
    content: "◀"; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: var(--text-soft);
}
[dir="rtl"] .wizard-steps.style-2 .wizard-step-dot::after { content: "◀"; }
.wizard-steps.style-2 .wizard-step-dot:last-child::after { content: ""; }

/* style-3 -- تایم‌لاین افقی: connecting line running behind the numbered circles */
.wizard-steps.style-3 { position: relative; gap: 30px; padding: 0 10px; }
.wizard-steps.style-3 .wizard-step-dot { flex-direction: column; gap: 6px; background: none; border: none; padding: 0; font-size: 12px; }
.wizard-steps.style-3 .wizard-step-dot .num {
    width: 30px; height: 30px; background: var(--panel); border: 1px solid var(--panel-border); font-size: 13px; position: relative; z-index: 2;
}
.wizard-steps.style-3 .wizard-step-dot.active .num { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(var(--accent-deep-rgb),.28); }
.wizard-steps.style-3 .wizard-step-dot.active { color: var(--text-main); }
.wizard-steps.style-3 .wizard-step-dot::before {
    content: ""; position: absolute; top: 15px; right: -30px; width: 30px; height: 2px; background: var(--panel-border); z-index: 1;
}
.wizard-steps.style-3 .wizard-step-dot:first-child::before { display: none; }

/* style-4 -- مینیمال: bare small circles, label hidden until active */
.wizard-steps.style-4 { gap: 10px; }
.wizard-steps.style-4 .wizard-step-dot { background: none; border: none; padding: 0; gap: 6px; }
.wizard-steps.style-4 .wizard-step-dot .num { width: 26px; height: 26px; background: var(--panel); border: 1px solid var(--panel-border); }
.wizard-steps.style-4 .wizard-step-dot.active .num { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border-color: transparent; }
.wizard-steps.style-4 .wizard-step-dot .lbl { display: none; }
.wizard-steps.style-4 .wizard-step-dot.active .lbl { display: inline; color: var(--text-main); font-weight: 700; }

/* style-5 -- نوار پیشرفت: horizontal progress-bar track, active step highlighted as a filled segment */
.wizard-steps.style-5 { gap: 0; width: 100%; max-width: 480px; margin: 0 auto 30px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 999px; padding: 6px; }
.wizard-steps.style-5 .wizard-step-dot { flex: 1 1 0; justify-content: center; background: none; border: none; border-radius: 999px; padding: 8px 6px; gap: 6px; }
.wizard-steps.style-5 .wizard-step-dot.active { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: none; }
.wizard-steps.style-5 .wizard-step-dot .num { background: rgba(0,0,0,.12); }
@media (max-width: 560px) { .wizard-steps.style-5 .wizard-step-dot .lbl { display: none; } }

.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: translateY(0);} }

.card-pad { padding: 28px;margin: 10px; }

/* ---------- ABOUT PAGE (text + optional image/video/HTML embed side by side) ---------- */
.about-layout { max-width: 980px; margin: 20px auto 0; display: grid; grid-template-columns: 1fr; gap: 20px; }
.about-layout.has-media { grid-template-columns: 1.1fr 1fr; align-items: start; }
.about-text { line-height: 2; }
.about-media { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.about-media img, .about-media video { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.about-media iframe { width: 100%; min-height: 280px; border: 0; border-radius: var(--radius-sm); }
@media (max-width: 760px) { .about-layout.has-media { grid-template-columns: 1fr; } }
.field-group { margin-bottom: 20px; }
.field-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.field-group .hint { font-size: 12px; color: var(--text-soft); margin-top: 6px; }
input[type="text"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="password"], input[type="file"], textarea, select {
    width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--panel-border);
    background: var(--input-bg); color: var(--text-main); font-family: inherit; font-size: 14.5px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.16); }
textarea { min-height: 160px; resize: vertical; }

.radio-grid, .checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pill-option {
    display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border); background: var(--input-bg); font-size: 13.5px; transition: all var(--transition);
}
.pill-option.checked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pill-option input { width: 16px; height: 16px; accent-color: var(--accent); }
/* per-site-selection live price shown next to each banner placement option */
.pill-price { margin-right: auto; font-weight: 700; font-size: 12.5px; color: var(--accent-deep); direction: ltr; }
.pill-size { font-size: 11px; color: var(--text-soft); background: rgba(0,0,0,.06); padding: 2px 8px; border-radius: 999px; direction: ltr; }

.upload-zone {
    border: 2px dashed var(--panel-border); border-radius: var(--radius-md); padding: 30px 20px; text-align: center;
    background: var(--input-bg); transition: all var(--transition); cursor: pointer;
}
.upload-zone.dragover { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.upload-zone .icon { font-size: 30px; margin-bottom: 8px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.thumb { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--panel-border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .remove { position: absolute; top: 2px; left: 2px; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; display: flex; align-items:center; justify-content:center; border:none; }
.thumb .featured-tag { position: absolute; bottom: 0; right: 0; left: 0; background: var(--accent); color: #fff; font-size: 9px; text-align: center; padding: 2px 0; }

.link-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-bottom: 10px; }
.link-row .remove-link { background: transparent; border: 1px solid var(--panel-border); border-radius: var(--radius-sm); color: var(--danger); padding: 0 14px; }

/* ---------- 15. PAYMENT METHOD CARDS ---------- */
.payment-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 6px; }
.payment-card {
    position: relative; padding: 18px; border-radius: var(--radius-md); cursor: pointer;
    border: 1.5px solid var(--panel-border); background: var(--input-bg); transition: all var(--transition);
}
.payment-card:hover { transform: translateY(-2px); }
.payment-card.selected { border-color: var(--ocean); box-shadow: 0 0 0 2px var(--ocean) inset, var(--shadow-soft); }
.payment-card .pm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.payment-card .pm-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.payment-card .pm-discount { font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(90deg,var(--accent),var(--amber)); padding: 3px 10px; border-radius: 999px; }
.payment-card .pm-desc { font-size: 12px; color: var(--text-soft); }
.payment-card .pm-nudge { margin-top: 10px; font-size: 12px; color: var(--accent-deep); background: rgba(var(--accent-rgb),.1); padding: 8px 10px; border-radius: var(--radius-sm); border: 1px dashed rgba(var(--accent-rgb),.3); }
.card-transfer-info { margin-top: 16px; padding: 16px; border-radius: var(--radius-md); background: var(--chip-bg); font-size: 13.5px; }
.card-transfer-info .cn-box {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--panel-strong); border: 1.5px dashed var(--ocean);
}
.card-transfer-info .cn {
    direction: ltr; font-weight: 800; font-size: 19px; letter-spacing: 1.5px;
    color: var(--ocean-deep); font-variant-numeric: tabular-nums; user-select: all;
}
.card-transfer-info .cn-holder { margin-bottom: 4px; }
.btn-copy {
    flex-shrink: 0; border: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700;
    color: #fff; background: linear-gradient(135deg, var(--ocean), var(--ocean-deep));
    padding: 8px 14px; border-radius: 999px; transition: all var(--transition);
}
.btn-copy:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn-copy.copied { background: linear-gradient(135deg, var(--success), var(--ocean)); }

/* ---------- 16. CHECKOUT SUMMARY ---------- */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } }
.summary-card { position: sticky; top: 90px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 9px 0; border-bottom: 1px dashed var(--panel-border); color: var(--text-muted); }
.summary-row.total { font-size: 18px; font-weight: 800; color: var(--text-main); border-bottom: none; padding-top: 16px; }
.summary-row .neg { color: var(--success); }
.coupon-row { display: flex; gap: 8px; margin: 16px 0; }
.coupon-row input { flex: 1; }
.coupon-msg { font-size: 12.5px; margin-top: 6px; }
.coupon-msg.ok { color: var(--success); }
.coupon-msg.err { color: var(--danger); }

/* ---------- 17. BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: 999px; border: none; font-weight: 700; font-size: 14.5px;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: 0 10px 26px rgba(var(--accent-deep-rgb),.32); transition: transform var(--transition-spring), box-shadow var(--transition); }
.btn-primary:hover { transform: translateY(-2px) scale(1.015); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { color: var(--text-main); background: var(--input-bg); border: 1px solid var(--panel-border); border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 12px; margin-top: 26px; }

/* ---------- 17b. FLOATING SUPPORT BUTTON (WhatsApp / Telegram) ---------- */
.support-fab {
    position: fixed; bottom: 22px; z-index: 60;
    width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel-strong); backdrop-filter: blur(var(--blur));
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow), inset 0 1px 0 var(--glass-edge);
    transition: transform var(--transition-spring);
    overflow: hidden;
}
.support-fab img { width: 60%; height: 60%; object-fit: contain; }
.support-fab.pos-bottom-right { right: 22px; }
.support-fab.pos-bottom-left { left: 22px; }
.support-fab:hover { transform: scale(1.08); }
.support-fab:active { transform: scale(.95); }
@keyframes fab-pulse { 0%, 100% { box-shadow: var(--shadow), inset 0 1px 0 var(--glass-edge), 0 0 0 0 rgba(14,165,164,.35); } 50% { box-shadow: var(--shadow), inset 0 1px 0 var(--glass-edge), 0 0 0 10px rgba(14,165,164,0); } }
.support-fab { animation: fab-pulse 2.6s ease-in-out infinite; }

/* ---------- 18. OTP BOX ---------- */
.otp-inputs { display: flex; gap: 8px; justify-content: center; direction: ltr; }
.otp-inputs input { width: 44px; height: 52px; text-align: center; font-size: 20px; }

/* ---------- 19. FOOTER ---------- */
footer { padding: 46px 0 30px; text-align: center; color: var(--text-soft); font-size: 13px; position: relative; }
footer .footer-route { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: .6; margin-bottom: 10px;margin-right: 10px;
    margin-left: 10px; }

/* ---------- 19a. FOOTER PAGE LINKS (Home / About / Contact) -- non-sticky, lives in the footer, not the top navbar ---------- */
.footer-links { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 14px; flex-wrap: wrap; }
.footer-links a {
    color: var(--text-soft);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: opacity .2s, color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* ---------- 19b. FOOTER SOCIAL LINKS (تنظیمات -> شبکه‌های اجتماعی) ---------- */
.social-links { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.social-link {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-soft);
    border: 1px solid var(--panel-border);
    background: var(--panel);
    backdrop-filter: blur(var(--blur));
    transition: transform var(--transition-spring), color .2s, border-color .2s;
}
.social-link svg { width: 18px; height: 18px; }
.social-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px) scale(1.06); }

/* ---------- 19c. FOOTER TRUST BADGES (اینماد / ساماندهی) ---------- */
.trust-badges { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.trust-badges.align-center { justify-content: center; }
.trust-badges.align-right { justify-content: flex-end; }
.trust-badges.align-left { justify-content: flex-start; }
.trust-badge { display: inline-flex; align-items: center; justify-content: center; }
.trust-badge img { max-height: 70px; }

/* ---------- 20. TOAST / ALERTS ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; }
.alert-error { background: rgba(227,72,72,.1); color: var(--danger); border: 1px solid rgba(227,72,72,.25); }
.alert-success { background: rgba(13,150,104,.1); color: var(--success); border: 1px solid rgba(13,150,104,.25); }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 20b. THEMED GRAPHIC TOAST (site-wide -- showToast() in app.js) ---------- */
#toastStack {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 999; display: flex; flex-direction: column; gap: 10px;
    width: min(92vw, 420px); pointer-events: none;
}
.toast-card {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-md);
    background: var(--panel); border: 1px solid var(--panel-border);
    backdrop-filter: blur(var(--blur));
    box-shadow: var(--shadow);
    pointer-events: auto;
    animation: toast-in .35s var(--transition-spring, ease);
}
.toast-card.leaving { animation: toast-out .25s ease forwards; }
.toast-card .toast-icon {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.toast-card.warn .toast-icon { background: rgba(240,171,26,.15); color: #d99400; }
.toast-card.error .toast-icon { background: rgba(227,72,72,.14); color: var(--danger); }
.toast-card.success .toast-icon { background: rgba(13,150,104,.14); color: var(--success); }
.toast-card.info .toast-icon { background: rgba(var(--accent-rgb),.14); color: var(--accent-deep); }
.toast-card .toast-body { flex: 1 1 auto; font-size: 13.5px; line-height: 1.9; color: var(--text-main); }
.toast-card .toast-close { flex-shrink: 0; background: none; border: none; color: var(--text-soft); font-size: 16px; cursor: pointer; line-height: 1; padding: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-10px); } }

/* A persistent (non-dismissing) themed info block, used for inline explanatory notes
   such as the reportage image/link limits or the SEO-addon callback note. Same visual
   language as .toast-card but sits inline in the page flow instead of floating. */
.inline-note {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-md);
    background: rgba(var(--accent-rgb),.08); border: 1px solid rgba(var(--accent-rgb),.22);
    font-size: 13.5px; line-height: 1.9; color: var(--text-main);
}
.inline-note .toast-icon { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--accent-rgb),.16); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* Themed replacement for a plain browser alert() on a required field the user skipped */
.field-group.field-invalid input,
.field-group.field-invalid textarea,
.field-group.field-invalid select {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(227,72,72,.12);
    animation: field-shake .35s ease;
}
@keyframes field-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- 21. RESPONSIVE ---------- */
@media (max-width: 600px) {
    .navbar { flex-direction: row; }
    .hero { padding: 44px 0 24px;margin-right: 20px;
        margin-left: 20px; }
    .card-pad { padding: 20px;margin-right: 15px;
    margin-left: 15px;margin-bottom: 15px; }
    .link-row { grid-template-columns: 1fr; }
    .support-fab { width: 50px; height: 50px; bottom: 16px; }
    .support-fab.pos-bottom-right { right: 16px; }
    .support-fab.pos-bottom-left { left: 16px; }
}
