/* ==========================================================================
   360 NEGAR | Master Platform Stylesheet
   Dark Futuristic Spatial Computing Theme
   Multi-language: RTL (FA/AR) & LTR (EN)
   ========================================================================== */

:root {
    --bg-dark: #070913;
    --bg-card: rgba(14, 19, 38, 0.7);
    --bg-card-hover: rgba(22, 30, 58, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow-purple: rgba(138, 43, 226, 0.4);
    --border-glow-cyan: rgba(0, 242, 254, 0.4);

    --primary-purple: #8A2BE2;
    --primary-cyan: #00F2FE;
    --accent-blue: #3B82F6;
    --text-light: #F1F5F9;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    --font-fa: 'Vazirmatn', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-fa);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* LTR Adjustments when English is active */
html[dir="ltr"] body {
    font-family: var(--font-en);
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Interactive Background Canvas */
.spatial-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Typography & Gradients */
.gradient-text-purple {
    background: linear-gradient(135deg, #C084FC 0%, #8A2BE2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
    background: linear-gradient(135deg, #70F7FF 0%, #00C6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header & Navigation */
.navbar-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.logo-orbit-icon {
    width: 38px;
    height: 38px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-inner-core {
    width: 14px;
    height: 14px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-cyan);
}

.orbit-spinning-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px dashed var(--primary-purple);
    border-radius: 50%;
    animation: rotateRing 8s linear infinite;
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #FFFFFF, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 0.65rem;
    color: var(--primary-cyan);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: var(--primary-cyan);
}

/* Actions & Language Switcher */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switch-dropdown {
    position: relative;
}

.lang-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary-purple);
}

.lang-dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: #0E1326;
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    list-style: none;
    padding: 0.4rem;
    min-width: 130px;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

html[dir="ltr"] .lang-dropdown-menu {
    right: auto;
    left: 0;
}

.lang-dropdown-menu.show {
    display: block;
}

.lang-dropdown-menu li {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 0.4rem;
    transition: background 0.2s;
}

.lang-dropdown-menu li:hover,
.lang-dropdown-menu li.active {
    background: rgba(138, 43, 226, 0.2);
    color: var(--primary-cyan);
}

.btn-ecosystem-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--primary-cyan);
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-ecosystem-link:hover {
    background: var(--primary-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.mobile-toggle-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle-btn span {
    width: 22px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    padding: 9rem 0 5rem;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-glow-orb {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
}

.glow-purple {
    top: 15%;
    right: 5%;
    background: var(--primary-purple);
}

.glow-cyan {
    bottom: 10%;
    left: 5%;
    background: var(--primary-cyan);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.dev-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(138, 43, 226, 0.12);
    border: 1px solid rgba(138, 43, 226, 0.3);
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    color: #D8B4FE;
    margin-bottom: 1.5rem;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: #38EF7D;
    border-radius: 50%;
    box-shadow: 0 0 10px #38EF7D;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-main-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.2rem;
}

.hero-lead-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.metric-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    backdrop-filter: blur(12px);
}

.metric-num {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

.metric-lbl {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.hero-actions-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--accent-blue) 100%);
    color: #050811;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.85rem 1.6rem;
    border-radius: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.35);
    transition: all 0.3s;
}

.btn-primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.5);
}

.btn-glass-tech {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 0.85rem 1.6rem;
    border-radius: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-glass-tech:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-purple);
}

/* 3D Spatial Simulator Graphic */
.hero-visual-graphic {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 380px;
}

.spatial-radar-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(138, 43, 226, 0.25);
    box-shadow: 0 0 40px rgba(138, 43, 226, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-scan-line {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    right: 0;
    background: linear-gradient(45deg, rgba(0, 242, 254, 0.35) 0%, transparent 70%);
    transform-origin: bottom left;
    animation: radarSweep 5s linear infinite;
    border-radius: 100% 0 0 0;
}

@keyframes radarSweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spatial-cube {
    width: 90px;
    height: 90px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 14s linear infinite;
}

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 90px;
    height: 90px;
    background: rgba(14, 19, 38, 0.85);
    border: 1px solid var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-cyan);
    box-shadow: inset 0 0 15px rgba(0, 242, 254, 0.2);
}

.cube-face.front  { transform: translateZ(45px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(45px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(45px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(45px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(45px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(45px); }

.floating-tech-chip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-light);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.chip-1 { top: 10%; right: -10%; animation: floatY 4s ease-in-out infinite; }
.chip-2 { bottom: 15%; left: -10%; animation: floatY 4.5s ease-in-out infinite 1s; }
.chip-3 { bottom: -5%; right: 20%; animation: floatY 5s ease-in-out infinite 2s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Sections Common */
.section-block {
    padding: 6rem 0;
    position: relative;
}

.bg-contrast {
    background: rgba(11, 15, 30, 0.6);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-heading {
    font-size: 2.1rem;
    font-weight: 900;
    margin-top: 0.5rem;
}

.tech-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-cyan));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Macro Pillars */
.macro-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.macro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2.2rem;
    transition: all 0.35s ease;
    backdrop-filter: blur(12px);
}

.macro-card:hover {
    border-color: var(--border-glow-purple);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -10px rgba(138, 43, 226, 0.25);
}

.card-icon-glow {
    width: 50px;
    height: 50px;
    background: rgba(138, 43, 226, 0.15);
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D8B4FE;
    font-size: 1.3rem;
    margin-bottom: 1.3rem;
}

.macro-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.macro-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Architecture Section */
.architecture-flow-wrapper {
    text-align: center;
}

.arch-ecosystem-badge {
    display: inline-block;
    background: linear-gradient(90deg, rgba(138,43,226,0.2), rgba(0,242,254,0.2));
    border: 1px solid rgba(0,242,254,0.4);
    padding: 0.6rem 1.8rem;
    border-radius: 2rem;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 2.5rem;
    color: var(--text-light);
}

.arch-nodes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: start;
}

.arch-node-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-glow {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 30px rgba(0, 242, 254, 0.15);
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.node-header i {
    font-size: 1.5rem;
    color: var(--primary-cyan);
}

.node-role {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 0.4rem;
    color: var(--text-dim);
}

.arch-node-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.arch-node-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.node-external-link {
    color: var(--primary-cyan);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.node-status-tag {
    font-size: 0.75rem;
    background: rgba(138, 43, 226, 0.2);
    color: #D8B4FE;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    align-self: flex-start;
}

.node-status-tag.tag-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

/* Tech Matrix */
.tech-matrix-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.tech-matrix-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
}

.matrix-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.matrix-card-header i {
    font-size: 1.3rem;
    color: var(--primary-purple);
}

.matrix-card-header h3 {
    font-size: 1rem;
    font-weight: 800;
}

.tech-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.tech-feature-list li i {
    color: var(--primary-cyan);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Archive */
.archive-intro-text {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.archive-categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.archive-cat-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.4rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-light);
    transition: all 0.3s;
}

.archive-cat-pill:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 242, 254, 0.1);
    transform: translateY(-2px);
}

.archive-cat-pill i {
    color: var(--primary-cyan);
}

/* Roadmap */
.status-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 239, 125, 0.1);
    color: #38EF7D;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.ping-dot {
    width: 6px;
    height: 6px;
    background: #38EF7D;
    border-radius: 50%;
    box-shadow: 0 0 8px #38EF7D;
}

.roadmap-timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    padding-inline-start: 2rem;
    border-inline-start: 2px dashed rgba(255, 255, 255, 0.12);
}

.timeline-node {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-badge {
    position: absolute;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0E1326;
    border: 2px solid var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-dim);
}

html[dir="rtl"] .timeline-badge {
    right: -2.95rem;
}

html[dir="ltr"] .timeline-badge {
    left: -2.95rem;
}

.timeline-node.completed .timeline-badge {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.timeline-node.in-progress .timeline-badge {
    border-color: var(--primary-purple);
    color: #D8B4FE;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 1rem;
}

.phase-time {
    font-size: 0.75rem;
    color: var(--primary-cyan);
    font-weight: 700;
    display: block;
    margin-bottom: 0.35rem;
}

.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
.macro-footer {
    background: #04050A;
    border-top: 1px solid var(--border-color);
    padding: 4.5rem 0 2rem;
}

.footer-layout {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer-brand-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 460px;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.system-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6EE7B7;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-green-dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.footer-nav-column h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-light);
}

.footer-nav-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-nav-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.footer-nav-column a:hover {
    color: var(--primary-cyan);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-layout,
    .macro-pillars-grid,
    .arch-nodes-grid,
    .tech-matrix-layout,
    .footer-layout {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding-top: 7rem;
    }

    .hero-visual-graphic {
        height: 280px;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle-btn {
        display: flex;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #070913;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }
}