/* =====================================================================
   سایت عمومی — طراحی سه‌بعدی (navbar شیشه‌ای، hero با کرهٔ سه‌بعدی پویا،
   کارت‌های tilt، نوار آمار و CTA با حلقه‌های سه‌بعدی). رنگ‌ها از site-theme.css.
   ===================================================================== */
:root {
    --x-glow: rgba(34, 158, 217, .55);
    --x-glass: rgba(255, 255, 255, .72);
    --x-glass-border: rgba(15, 27, 45, .08);
    --x-hero-1: #070F1C;
    --x-hero-2: #0C1D33;
    --x-grad: linear-gradient(135deg, #2AABEE 0%, #229ED9 45%, #7B61FF 100%);
    --x-grad-warm: linear-gradient(135deg, #FF8A3D, #FF5E7E);
}
[data-bs-theme="dark"] {
    --x-glass: rgba(19, 34, 53, .72);
    --x-glass-border: rgba(255, 255, 255, .08);
}

/* ---------- Navbar شیشه‌ای ---------- */
.x-nav {
    background: var(--x-glass); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--x-glass-border); transition: background .3s, border-color .3s, box-shadow .3s;
}
.x-nav .navbar-brand { font-weight: 800; letter-spacing: -.01em; }
.x-nav .nav-link { font-weight: 500; border-radius: 10px; padding-inline: .8rem !important; }
.x-nav .nav-link:hover { background: var(--brand-primary-soft); }
.x-brand-mark {
    width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--x-grad); color: #fff; box-shadow: 0 6px 18px var(--x-glow);
    transform: perspective(200px) rotateX(10deg) rotateY(-10deg);
}
/* روی hero صفحهٔ اصلی: شفاف با متن سفید تا اسکرول */
.x-home .x-nav:not(.x-scrolled) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.x-home .x-nav:not(.x-scrolled) .navbar-brand,
.x-home .x-nav:not(.x-scrolled) .nav-link { color: #fff; }
.x-home .x-nav:not(.x-scrolled) .nav-link:hover { background: rgba(255,255,255,.08); }
.x-home .x-nav:not(.x-scrolled) .btn-outline-secondary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.3); --bs-btn-hover-bg: rgba(255,255,255,.12); --bs-btn-hover-border-color: rgba(255,255,255,.5); --bs-btn-hover-color: #fff; }
.x-home .x-nav:not(.x-scrolled) .btn-outline-primary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.45); --bs-btn-hover-bg: #fff; --bs-btn-hover-color: var(--brand-navy); --bs-btn-hover-border-color: #fff; }
.x-home .x-nav:not(.x-scrolled) .navbar-toggler { filter: invert(1); }
.x-home .x-nav.x-scrolled { box-shadow: 0 8px 30px rgba(15, 27, 45, .08); }
.x-home .x-nav { position: fixed; inset: 0 0 auto 0; } /* hero زیر navbar شفاف */
@media (max-width: 991.98px) {
    .x-home .x-nav:not(.x-scrolled) .navbar-collapse.show,
    .x-home .x-nav:not(.x-scrolled) .navbar-collapse.collapsing { background: rgba(7, 15, 28, .92); border-radius: 16px; padding: .75rem; margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.x-hero {
    position: relative; overflow: hidden; color: #fff; isolation: isolate;
    background:
        radial-gradient(900px 500px at 85% 10%, rgba(42, 171, 238, .28), transparent 60%),
        radial-gradient(700px 500px at 10% 90%, rgba(123, 97, 255, .22), transparent 60%),
        linear-gradient(180deg, var(--x-hero-1), var(--x-hero-2));
    padding: 150px 0 110px; border-radius: 0 0 40px 40px;
}
.x-hero::after { /* شبکهٔ پرسپکتیو کف */
    content: ""; position: absolute; inset: auto -20% -1px -20%; height: 45%; z-index: -1; opacity: .35;
    background-image: linear-gradient(rgba(42,171,238,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(42,171,238,.35) 1px, transparent 1px);
    background-size: 56px 56px; transform: perspective(500px) rotateX(62deg); transform-origin: bottom;
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%); mask-image: linear-gradient(to top, #000 10%, transparent 90%);
    animation: x-grid 9s linear infinite;
}
@keyframes x-grid { to { background-position: 0 56px, 0 0; } }
.x-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.x-badge {
    display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; font-size: .85rem;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px);
}
.x-badge .x-dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; box-shadow: 0 0 0 4px rgba(61,220,151,.2); animation: x-pulse 2s infinite; }
@keyframes x-pulse { 50% { box-shadow: 0 0 0 8px rgba(61,220,151,0); } }
.x-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 900; line-height: 1.25; letter-spacing: -.02em; }
html[lang="en"] .x-hero h1 { line-height: 1.1; }
.x-grad-text { background: linear-gradient(90deg, #6FD3FF, #2AABEE 40%, #A08BFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.x-hero .lead { color: rgba(255,255,255,.75); font-size: 1.15rem; max-width: 560px; }
.x-btn-glow { box-shadow: 0 10px 30px rgba(255, 138, 61, .45); border: 0; background: var(--x-grad-warm); color: #fff; }
.x-btn-glow:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 94, 126, .5); }
.x-btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.05); backdrop-filter: blur(6px); }
.x-btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.x-hero .btn { transition: transform .2s, box-shadow .2s, background .2s; padding: .8rem 1.5rem; border-radius: 14px; font-weight: 600; }

/* صحنهٔ سه‌بعدی گوشی */
.x-scene { perspective: 1300px; display: flex; justify-content: center; }
.x-float { animation: x-float 7s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes x-float { 50% { transform: translateY(-14px); } }
.x-device {
    position: relative; width: 310px; transform-style: preserve-3d; transition: transform .25s ease-out;
    transform: rotateY(-22deg) rotateX(10deg) rotateZ(2deg);
}
html[dir="rtl"] .x-device { transform: rotateY(22deg) rotateX(10deg) rotateZ(-2deg); }
.x-phone {
    position: relative; border-radius: 42px; padding: 12px; background: linear-gradient(145deg, #1E2C3F, #0B1422);
    box-shadow: 0 50px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 60px rgba(42,171,238,.25);
    transform: translateZ(0);
}
.x-phone::before { /* ضخامت بدنه */
    content: ""; position: absolute; inset: 0; border-radius: 42px; transform: translateZ(-18px); background: #050A12; filter: blur(1px);
}
.x-screen { border-radius: 32px; overflow: hidden; background: #DCE6EE; min-height: 520px; position: relative; }
.x-screen-bar { display: flex; align-items: center; gap: .6rem; padding: 16px 16px 10px; background: #fff; color: #0F1B2D; font-size: .88rem; }
.x-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--x-grad); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.x-screen-body { padding: 14px; display: flex; flex-direction: column; gap: 10px;
    background-image: radial-gradient(rgba(34,158,217,.12) 1px, transparent 1px); background-size: 14px 14px; }
.x-bubble { background: #fff; color: #0F1B2D; border-radius: 16px; padding: 10px 12px; font-size: .86rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.x-bubble.x-short { width: 62%; }
.x-line { height: 8px; border-radius: 4px; background: #E6ECF2; margin-top: 6px; }
.x-ad { background: #fff; color: #0F1B2D; border-radius: 16px; padding: 12px; font-size: .86rem; box-shadow: 0 10px 30px rgba(34,158,217,.35);
    transform: translateZ(40px); border: 1px solid rgba(34,158,217,.35); }
.x-ad .x-sponsored { color: var(--brand-primary); font-weight: 700; font-size: .75rem; }
.x-ad .x-ad-btn { display: block; margin-top: 10px; text-align: center; padding: 8px; border-radius: 10px; background: var(--brand-primary); color: #fff; font-weight: 600; }
/* چیپ‌های شناور در عمق‌های مختلف */
.x-chip {
    position: absolute; display: flex; align-items: center; gap: .55rem; padding: .6rem .9rem; border-radius: 16px; white-space: nowrap;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: #fff; font-size: .85rem; font-weight: 600; box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.x-chip i { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; background: var(--x-grad); }
.x-chip.x-c1 { top: 10%; inset-inline-start: -150px; transform: translateZ(90px); }
.x-chip.x-c2 { top: 40%; inset-inline-end: -175px; transform: translateZ(130px); }
.x-chip.x-c2 i { background: var(--x-grad-warm); }
.x-chip.x-c3 { bottom: 10%; inset-inline-start: -165px; transform: translateZ(70px); }
.x-chip.x-c3 i { background: linear-gradient(135deg, #3DDC97, #1FA971); }
.x-chip { animation: x-bob 6s ease-in-out infinite; }
.x-chip.x-c2 { animation-delay: -2s; } .x-chip.x-c3 { animation-delay: -4s; }
@keyframes x-bob { 50% { margin-top: -10px; } }
@media (max-width: 991.98px) {
    .x-hero { padding: 120px 0 70px; text-align: center; }
    .x-hero .lead { margin-inline: auto; }
    .x-scene { margin-top: 2.5rem; }
    .x-device { width: 260px; }
    .x-screen { min-height: 430px; }
    .x-chip.x-c1 { inset-inline-start: -80px; } .x-chip.x-c3 { inset-inline-start: -90px; } .x-chip.x-c2 { inset-inline-end: -90px; } .x-chip.x-c3 { inset-inline-start: -40px; }
}
@media (max-width: 575.98px) { .x-chip { font-size: .75rem; padding: .45rem .7rem; } .x-chip i { width: 24px; height: 24px; } .x-chip.x-c1, .x-chip.x-c3 { inset-inline-start: -30px; } .x-chip.x-c2 { inset-inline-end: -40px; } }

/* ---------- عنوان بخش‌ها ---------- */
.x-section { padding: 90px 0 10px; }
.x-title { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.01em; }
.x-title::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; margin: 14px auto 0; background: var(--x-grad); }
.x-title.x-start::after { margin-inline: 0; }

/* ---------- کارت‌های سه‌بعدی (tilt + glare) ---------- */
.x-tilt { transform-style: preserve-3d; transition: transform .2s ease-out, box-shadow .3s; will-change: transform; position: relative; }
.x-tilt:hover { box-shadow: 0 30px 60px -20px rgba(15, 27, 45, .25); }
.x-tilt .x-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.35), transparent 40%); }
[data-bs-theme="dark"] .x-tilt .x-glare { background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(42,171,238,.18), transparent 40%); }
.x-tilt:hover .x-glare { opacity: 1; }
.x-card { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); padding: 2rem; height: 100%; }
.x-card > * { transform: translateZ(30px); }
/* آیکون مکعبی سه‌بعدی */
.x-cube { width: 64px; height: 64px; position: relative; transform-style: preserve-3d; margin-bottom: 1.4rem;
    transform: rotateX(-20deg) rotateY(35deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
html[dir="rtl"] .x-cube { transform: rotateX(-20deg) rotateY(-35deg); }
.x-card:hover .x-cube { transform: rotateX(-20deg) rotateY(215deg); }
html[dir="rtl"] .x-card:hover .x-cube { transform: rotateX(-20deg) rotateY(-215deg); }
.x-cube span { position: absolute; inset: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem; backface-visibility: hidden; }
.x-cube .f1 { background: var(--x-grad); transform: translateZ(32px); }
.x-cube .f2 { background: linear-gradient(135deg, #1A86BA, #5B47D6); transform: rotateY(90deg) translateZ(32px); }
.x-cube .f3 { background: linear-gradient(135deg, #2AABEE, #7B61FF); transform: rotateY(180deg) translateZ(32px); }
.x-cube .f4 { background: linear-gradient(135deg, #136B96, #4A38B8); transform: rotateY(-90deg) translateZ(32px); }
.x-cube .f5 { background: linear-gradient(135deg, #5BC6F5, #9C88FF); transform: rotateX(90deg) translateZ(32px); }
.x-cube-warm .f1 { background: var(--x-grad-warm); } .x-cube-warm .f2, .x-cube-warm .f4 { background: linear-gradient(135deg, #D9672A, #D9435F); } .x-cube-warm .f3, .x-cube-warm .f5 { background: linear-gradient(135deg, #FFA466, #FF7E97); }
.x-cube-green .f1 { background: linear-gradient(135deg, #3DDC97, #1FA971); } .x-cube-green .f2, .x-cube-green .f4 { background: linear-gradient(135deg, #1C9A63, #137A4E); } .x-cube-green .f3, .x-cube-green .f5 { background: linear-gradient(135deg, #63E8AE, #2BC283); }

/* ---------- مراحل ---------- */
.x-steps { position: relative; }
.x-steps::before { content: ""; position: absolute; top: 44px; inset-inline: 16%; height: 2px; background: linear-gradient(90deg, transparent, var(--brand-primary), transparent); opacity: .5; }
.x-orb { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 1.25rem; display: flex; align-items: center; justify-content: center; position: relative;
    font-size: 1.9rem; font-weight: 900; color: #fff;
    background: radial-gradient(circle at 30% 28%, #8EDBFF, #229ED9 45%, #183F8C 100%);
    box-shadow: 0 20px 40px -10px rgba(34,158,217,.6), inset -8px -10px 20px rgba(0,0,0,.25), inset 6px 8px 16px rgba(255,255,255,.35); }
.x-orb::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px dashed rgba(34,158,217,.45); animation: x-spin 14s linear infinite; }
@keyframes x-spin { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) { .x-steps::before { display: none; } }

/* ---------- نوار آمار ---------- */
.x-stats { position: relative; border-radius: 32px; overflow: hidden; color: #fff; padding: 3.5rem 1rem; isolation: isolate;
    background: radial-gradient(600px 300px at 20% 0%, rgba(42,171,238,.4), transparent 70%), radial-gradient(600px 300px at 90% 100%, rgba(123,97,255,.35), transparent 70%), linear-gradient(135deg, var(--x-hero-1), var(--x-hero-2)); }
.x-stats .x-num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; background: linear-gradient(180deg, #fff, #9CDCFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.x-stats .col-md-4 + .col-md-4 { border-inline-start: 1px solid rgba(255,255,255,.1); }
@media (max-width: 767.98px) { .x-stats .col-md-4 + .col-md-4 { border: 0; } }

/* ---------- کاتالوگ و تعرفه ---------- */
.x-peer { border-radius: 20px; padding: 1.25rem 1rem; text-align: center; }
.x-peer .x-avatar { width: 52px; height: 52px; font-size: 1.3rem; margin: 0 auto .75rem; box-shadow: 0 10px 24px -6px var(--x-glow); }
.x-price { border-radius: 24px; padding: 2rem 1.5rem; text-align: center; position: relative; background: var(--surface); }
.x-price::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--x-grad); opacity: .0; transition: opacity .3s;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.x-price:hover::before { opacity: 1; }
.x-price .x-amount { font-size: 1.5rem; font-weight: 800; color: var(--brand-primary); }
.x-price .x-ic { width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--brand-primary-soft); color: var(--brand-primary); margin-bottom: 1rem; }

/* ---------- FAQ ---------- */
.x-faq .accordion-item { border: 1px solid var(--border); border-radius: 18px !important; margin-bottom: .75rem; overflow: hidden; background: var(--surface); }
.x-faq .accordion-button { font-weight: 600; background: var(--surface); box-shadow: none; padding: 1.1rem 1.25rem; }
.x-faq .accordion-button:not(.collapsed) { color: var(--brand-primary); }

/* ---------- CTA با حلقه‌های سه‌بعدی ---------- */
.x-cta { position: relative; overflow: hidden; border-radius: 36px; padding: 4.5rem 1.5rem; color: #fff; text-align: center; isolation: isolate;
    background: radial-gradient(700px 300px at 50% 120%, rgba(255,138,61,.35), transparent 70%), linear-gradient(135deg, #0B1A2E, #13294A); }
.x-rings { position: absolute; inset: 0; z-index: -1; perspective: 900px; display: flex; align-items: center; justify-content: center; }
.x-ring { position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 2px solid rgba(42,171,238,.35); transform-style: preserve-3d; box-shadow: 0 0 40px rgba(42,171,238,.15) inset; }
.x-ring.r1 { animation: x-ring1 16s linear infinite; }
.x-ring.r2 { width: 420px; height: 420px; border-color: rgba(160,139,255,.35); animation: x-ring2 20s linear infinite; }
.x-ring.r3 { width: 320px; height: 320px; border-color: rgba(255,138,61,.35); animation: x-ring3 12s linear infinite; }
@keyframes x-ring1 { from { transform: rotateX(70deg) rotateZ(0); } to { transform: rotateX(70deg) rotateZ(360deg); } }
@keyframes x-ring2 { from { transform: rotateY(65deg) rotateZ(0); } to { transform: rotateY(65deg) rotateZ(-360deg); } }
@keyframes x-ring3 { from { transform: rotateX(50deg) rotateY(30deg) rotateZ(0); } to { transform: rotateX(50deg) rotateY(30deg) rotateZ(360deg); } }
.x-cta h2 { font-weight: 900; font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.x-cta p { color: rgba(255,255,255,.75); }
.x-cta .btn { padding: .85rem 1.8rem; border-radius: 14px; font-weight: 600; }

/* ---------- Footer ---------- */
.x-footer { background: linear-gradient(180deg, var(--x-hero-2), var(--x-hero-1)); color: rgba(255,255,255,.7); border-radius: 40px 40px 0 0; margin-top: 90px; position: relative; overflow: hidden; }
.x-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(42,171,238,.7), transparent); }
.x-footer a { color: rgba(255,255,255,.8); text-decoration: none; transition: color .2s; }
.x-footer a:hover { color: #6FD3FF; }
.x-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.x-footer .nav-link { padding: .25rem 0; }

/* ---------- ظاهر شدن هنگام اسکرول ---------- */
.x-reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.x-reveal.x-in { opacity: 1; transform: none; }

/* کاهش حرکت برای کاربرانی که ترجیح داده‌اند */
@media (prefers-reduced-motion: reduce) {
    .x-float, .x-chip, .x-ring, .x-orb::after, .x-hero::after, .x-badge .x-dot { animation: none !important; }
    .x-reveal { opacity: 1; transform: none; transition: none; }
}
html, body { overflow-x: clip; } /* جلوگیری از اسکرول افقی ناشی از تبدیل‌های سه‌بعدی */
/* موبایل: چرخش ملایم‌تر گوشی و چیپ‌ها همیشه روی گوشی (خوانا) */
@media (max-width: 575.98px) {
    .x-device, html[dir="rtl"] .x-device { transform: rotateX(6deg) !important; }
    .x-chip { display: none; }
}
