/* ==========================================================================
   TopSite - 3D Cosmic Galaxy Scrollytelling Stylesheet
   File: public/assets/css/components/landing.css
   ========================================================================== */

/* --- ۱. کانتینر اصلی و لایه ثابت صحنه (Visual Stage) --- */
.ts-galaxy-viewport {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #050814;
    direction: rtl;
    font-family: var(--ts-font-base);
}

.ts-galaxy-stage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    perspective: 1300px;
    transform-style: preserve-3d;
    overflow: hidden;
}

/* هاله و عمق نوری پس‌زمینه */
.ts-cosmic-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.15) 0%, rgba(10, 15, 44, 0.85) 60%, #050814 100%);
    pointer-events: none;
    z-index: 0;
}

/* --- ۲. لایه ابرهای سحابی (Atmospheric Cloud Layer) --- */
.ts-nebula-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.ts-cloud {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.65;
}

.ts-cloud--cyan {
    width: 60vw;
    height: 60vh;
    top: 20%;
    left: 10%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.4) 0%, transparent 70%);
}

.ts-cloud--magenta {
    width: 50vw;
    height: 50vh;
    bottom: 10%;
    right: 15%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.45) 0%, transparent 70%);
}

/* کلاس فعال شدن عبور از جو (Cloud Break) */
.ts-nebula-layer.is-entering {
    opacity: 1;
    transform: scale(2.2);
}

/* --- ۳. زاویه پرسپکتیو منظومه سه‌بعدی --- */
.ts-solar-system {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1100px;
    height: 700px;
    margin-top: -350px;
    margin-left: -550px;
    transform-style: preserve-3d;
    transform: rotateX(64deg) rotateY(-8deg) rotateZ(-4deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    z-index: 2;
}

/* مدارهای رنگی نئونی */
.ts-orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ts-orbit--gold {
    width: 420px;
    height: 420px;
    border: 1.5px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.25), inset 0 0 15px rgba(255, 215, 0, 0.2);
}

.ts-orbit--magenta {
    width: 720px;
    height: 720px;
    border: 1.5px solid rgba(217, 70, 239, 0.5);
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.25);
}

.ts-orbit--cyan {
    width: 1040px;
    height: 1040px;
    border: 2px solid rgba(0, 255, 255, 0.65);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.35);
}

/* --- ۴. خورشید مرکزی و شراره‌های هندسی --- */
.ts-celestial--sun {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    margin: -70px 0 0 -70px;
    transform-style: preserve-3d;
    transform: rotateX(-64deg); /* متمایل رو به دوربین */
}

.ts-sun-core {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 15%, #ffd700 65%, #ff8c00 100%);
    box-shadow: 0 0 45px #ffd700, 0 0 95px rgba(255, 215, 0, 0.6), 0 0 150px rgba(0, 255, 255, 0.4);
    animation: tsSunPulse 4s ease-in-out infinite alternate;
    z-index: 3;
}

@keyframes tsSunPulse {
    0% { transform: scale(0.96); filter: brightness(1); }
    100% { transform: scale(1.04); filter: brightness(1.25); }
}

/* شراره‌های هندسی طلایی */
.ts-sun-spikes {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px dashed rgba(255, 215, 0, 0.85);
    filter: drop-shadow(0 0 15px #ffd700);
    animation: tsSpinClockwise 30s linear infinite;
}

/* پرتوهای الکتریسیته فیروزه‌ای */
.ts-sun-electric-rays {
    position: absolute;
    inset: -22px;
    border: 2px solid transparent;
    border-top: 2.5px solid var(--ts-neon-cyan);
    border-bottom: 2.5px solid var(--ts-neon-cyan);
    border-radius: 50%;
    filter: drop-shadow(0 0 20px #00ffff);
    animation: tsElectricPulse 2.5s ease-in-out infinite alternate;
}

@keyframes tsElectricPulse {
    0% { transform: scale(0.95) rotate(0deg); opacity: 0.7; }
    100% { transform: scale(1.1) rotate(45deg); opacity: 1; }
}

/* --- ۵. سیاره ۱: تکنولوژی و برنامه‌نویسی (پایین - چپ) --- */
.ts-planet--tech {
    position: absolute;
    width: 140px;
    height: 140px;
    top: 58%;
    left: 14%;
    margin: -70px 0 0 -70px;
    transform-style: preserve-3d;
    transform: rotateX(-64deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ts-tech-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #2a3b5c, #0a0f2c 60%, #030617 100%);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.5), inset -15px -15px 30px rgba(0, 0, 0, 0.9);
    position: relative;
    overflow: hidden;
}

/* خطوط مدار چاپی نئونی */
.ts-circuit-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(90deg, rgba(0, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(rgba(0, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.75;
    animation: tsCircuitFlicker 3s infinite;
}

@keyframes tsCircuitFlicker {
    0%, 100% { opacity: 0.6; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.6) drop-shadow(0 0 8px #00ffff); }
}

/* مکعب داده سه‌بعدی شناور */
.ts-holo-cube {
    position: absolute;
    bottom: 15px;
    left: 12px;
    width: 35px;
    height: 35px;
    border: 1.5px solid var(--ts-neon-cyan);
    background: rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.45);
    transform: rotate(25deg);
}

/* قمر سیاره */
.ts-moon--tech {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #64748b);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    top: -15px;
    right: -15px;
    animation: tsMoonOrbit 9s linear infinite;
}

@keyframes tsMoonOrbit {
    0% { transform: rotate(0deg) translateX(70px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(70px) rotate(-360deg); }
}

/* --- ۶. سیاره ۲: دیزاین با حلقه‌های شیشه‌ای (بالا - راست) --- */
.ts-planet--design {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 25%;
    left: 68%;
    margin: -60px 0 0 -60px;
    transform-style: preserve-3d;
    transform: rotateX(-64deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ts-design-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #d946ef, #6b21a8 55%, #1e0b36 100%);
    box-shadow: 0 0 45px rgba(217, 70, 239, 0.45);
    position: relative;
    z-index: 1;
}

/* حلقه‌های شفاف شیشه‌ای با زاویه شیب‌دار */
.ts-design-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 75px;
    margin: -37.5px 0 0 -125px;
    border: 8px solid rgba(255, 255, 255, 0.35);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: rotateX(70deg) rotateY(-18deg);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(217, 70, 239, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* --- ۷. سیاره ۳: سئو با امواج رادار طلایی (پایین - راست) --- */
.ts-planet--seo {
    position: absolute;
    width: 110px;
    height: 110px;
    top: 68%;
    left: 82%;
    margin: -55px 0 0 -55px;
    transform-style: preserve-3d;
    transform: rotateX(-64deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ts-seo-sphere {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #00ffff, #005555 60%, #031414 100%);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.4);
    position: relative;
    z-index: 2;
}

.ts-seo-beacon-dot {
    position: absolute;
    top: 45%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 0 0 12px #ffd700;
}

/* امواج راداری/سونار طلایی */
.ts-radar-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(255, 215, 0, 0.85);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    animation: tsSonarPulse 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ts-wave-1 { width: 140px; height: 140px; animation-delay: 0s; }
.ts-wave-2 { width: 210px; height: 210px; animation-delay: 1.1s; }
.ts-wave-3 { width: 290px; height: 290px; animation-delay: 2.2s; }

@keyframes tsSonarPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.9;
        border-color: rgba(255, 215, 0, 0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
        border-color: rgba(255, 215, 0, 0);
    }
}

/* ماهواره مدار سئو */
.ts-seo-satellite {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700;
    border-radius: 2px;
    top: -20px;
    left: -20px;
    animation: tsMoonOrbit 7s linear infinite reverse;
}

/* رادار گوشه صفحه (HUD Radar) */
.ts-hud-radar {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1rem;
    background: rgba(10, 15, 44, 0.7);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
    color: var(--ts-neon-cyan);
    font-family: monospace;
    z-index: 10;
}

.ts-radar-blip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--ts-neon-cyan);
    box-shadow: 0 0 8px var(--ts-neon-cyan);
    animation: tsBlink 1.5s infinite;
}

@keyframes tsBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes tsSpinClockwise { 100% { transform: rotate(360deg); } }

/* --- ۸. لایه اسکرول و کارت‌های شیشه‌ای محتوا (Scroller & Cards) --- */
.ts-galaxy-scroller {
    position: relative;
    z-index: 10;
    width: 100%;
}

.ts-station {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 5rem;
    box-sizing: border-box;
}

.ts-station__card {
    max-width: 520px;
    padding: 2.75rem 2.25rem;
    background: rgba(10, 15, 44, 0.78);
    border: 1px solid rgba(138, 43, 226, 0.35);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(30px);
    opacity: 0.2;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.ts-station.is-active .ts-station__card {
    transform: translateY(0);
    opacity: 1;
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 255, 255, 0.18);
}

.ts-station__badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ts-neon-cyan);
    font-family: monospace;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.ts-station__title {
    font-family: var(--ts-font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 1rem 0;
}

.ts-highlight-cyan {
    background: linear-gradient(135deg, #fff 30%, var(--ts-neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ts-station__desc {
    font-size: 1rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin: 0 0 1.75rem 0;
}

.ts-station__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ts-station__pills span {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: #e2e8f0;
}

.ts-station__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.ts-btn-primary {
    background: linear-gradient(135deg, var(--ts-neon-cyan), var(--ts-neon-purple));
    color: #050814;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.ts-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.55);
}

.ts-btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.ts-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ts-neon-cyan);
}

/* --- ۹. بهینه‌سازی واکنش‌گرایی برای موبایل --- */
@media (max-width: 991px) {
    .ts-station {
        padding: 2rem 1.5rem;
        justify-content: center;
    }
    .ts-station__card {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    .ts-solar-system {
        transform: rotateX(64deg) rotateY(-5deg) scale(0.65);
    }
    .ts-hud-radar {
        bottom: 1rem;
        left: 1rem;
    }
}