/* Premium Services Section - Dark Theme */

/* General Dark Theme Overrides for Services Page */
body.services-page.dark-theme {
    background-color: #0b0f19; /* Deep graphite/navy */
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
}

body.services-page.dark-theme .navbar {
    background: rgba(7, 11, 20, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(40px) saturate(200%) brightness(120%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(120%) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(103, 61, 230, 0.2) !important;
}

body.services-page.dark-theme .nav-link {
    color: #e2e8f0;
}

body.services-page.dark-theme .nav-link:hover,
body.services-page.dark-theme .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #a78bfa;
}

/* Premium Header Area */
.premium-header {
    position: relative;
    padding: 240px 0 100px;
    overflow: hidden;
}

.premium-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at 50% 0%, rgba(103, 61, 230, 0.15) 0%, transparent 70%);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.header-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 900px;
}

.small-label {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(103, 61, 230, 0.1);
    border: 1px solid rgba(103, 61, 230, 0.3);
    color: #c4b5fd;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.premium-header h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0;
}

.premium-header p {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 700px;
    line-height: 1.6;
}

/* Main Services Layout (Ecosystem + Stack) */
/* Living Operational Intelligence System - Ecosystem Section */
#operational-ecosystem {
    padding: 80px 0 120px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Layer 4 — Ambient Background System */
.ambient-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #050816; /* Deep dark background */
}

/* Light theme support */
body:not(.dark-theme) .ambient-background {
    background: #F8FAFC;
}

.ambient-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(124, 77, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 77, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 20%, transparent 80%);
    animation: slowDrift 60s linear infinite;
}

body:not(.dark-theme) .ambient-grid {
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
}

.ambient-gradients {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(124, 77, 255, 0.08) 0%, transparent 60%);
    filter: blur(60px);
}

body:not(.dark-theme) .ambient-gradients {
    background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 60%);
}

.ecosystem-layout {
    display: block;
    position: relative;
    z-index: 2;
}

/* LEFT SIDE: Visual System Graphic */
.ecosystem-visual {
    position: relative;
    height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-system-container {
    position: relative;
    width: 450px;
    height: 450px;
}

/* Floating System Metrics */
.system-metric-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(124, 77, 255, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #F8FAFC;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 30;
    animation: floatMetric 8s ease-in-out infinite;
    white-space: nowrap;
}

body:not(.dark-theme) .system-metric-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.15);
    color: #0F172A;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.smc-dot {
    width: 8px;
    height: 8px;
    background: #38BDF8;
    border-radius: 50%;
    box-shadow: 0 0 10px #38BDF8;
}

.smc-1 { top: 5%; left: -10%; animation-delay: 0s; }
.smc-2 { top: 20%; right: -15%; animation-delay: 2s; }
.smc-3 { bottom: 15%; left: -5%; animation-delay: 4s; }
.smc-4 { bottom: 0%; right: -5%; animation-delay: 6s; }

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

/* Layer 3 — Dynamic Connection Lines */
.dynamic-connections {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.connection-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(124, 77, 255, 0.15);
}

body:not(.dark-theme) .connection-ring {
    border-color: rgba(124, 58, 237, 0.1);
}

.main-ring {
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 40px rgba(124, 77, 255, 0.05), 0 0 40px rgba(124, 77, 255, 0.05);
    animation: pulseRing 4s infinite alternate;
}

.inner-ring {
    width: 60%;
    height: 60%;
    border-style: dashed;
    opacity: 0.5;
    animation: rotateOrbit 40s linear infinite reverse;
}

.data-particles {
    position: absolute;
    inset: 0;
    animation: rotateOrbit 20s linear infinite;
}

.data-particle {
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #38BDF8;
    border-radius: 50%;
    box-shadow: 0 0 15px 2px #38BDF8;
}

.dp-2 { top: auto; bottom: -3px; background: #A855F7; box-shadow: 0 0 15px 2px #A855F7; }
.dp-3 { top: 50%; left: -3px; background: #7C4DFF; box-shadow: 0 0 15px 2px #7C4DFF; }

@keyframes pulseRing {
    0% { box-shadow: inset 0 0 20px rgba(124, 77, 255, 0.02), 0 0 20px rgba(124, 77, 255, 0.02); }
    100% { box-shadow: inset 0 0 60px rgba(124, 77, 255, 0.1), 0 0 60px rgba(124, 77, 255, 0.1); border-color: rgba(124, 77, 255, 0.3); }
}

/* Layer 1 — Central Core */
.central-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 170px;
    height: 170px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-glow-effect {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: corePulse 3s infinite alternate;
    filter: blur(10px);
}

body:not(.dark-theme) .core-glow-effect {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
}

@keyframes corePulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 1; }
}

.core-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(124, 77, 255, 0.4);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    box-shadow: inset 0 0 30px rgba(124, 77, 255, 0.2), 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2;
    animation: subtleRotate 20s linear infinite;
}

body:not(.dark-theme) .core-content {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: inset 0 0 20px rgba(124, 58, 237, 0.1), 0 10px 20px rgba(0,0,0,0.05);
}

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

.core-title {
    font-size: 0.8rem;
    color: #A855F7;
    letter-spacing: 2px;
    font-weight: 600;
    animation: counterRotate 20s linear infinite;
}

.core-subtitle {
    font-size: 1.1rem;
    color: #F8FAFC;
    font-weight: 800;
    letter-spacing: 1px;
    animation: counterRotate 20s linear infinite;
}

body:not(.dark-theme) .core-title { color: #7C3AED; }
body:not(.dark-theme) .core-subtitle { color: #0F172A; }

/* Layer 2 — Orbiting Service Nodes */
.orbiting-nodes {
    position: absolute;
    inset: 0;
    animation: rotateOrbit 60s linear infinite;
    z-index: 20;
}

.orbit-node-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    margin-top: -45px;
    margin-left: -45px;
    transform: rotate(var(--node-angle)) translate(225px) rotate(calc(-1 * var(--node-angle)));
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-node-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: counterRotate 60s linear infinite;
    position: relative;
}

body:not(.dark-theme) .service-node-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.node-icon {
    font-size: 1.4rem;
    color: #A855F7;
    transition: all 0.3s ease;
}

body:not(.dark-theme) .node-icon { color: #7C3AED; }

.node-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #E2E8F0;
    text-align: center;
    line-height: 1.1;
    transition: all 0.3s ease;
}

body:not(.dark-theme) .node-title { color: #0F172A; }

.node-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #7C4DFF;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
    box-shadow: 0 10px 20px rgba(124, 77, 255, 0.4);
    pointer-events: none;
}

body:not(.dark-theme) .node-tooltip {
    background: #7C3AED;
}

.node-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #7C4DFF transparent;
}

body:not(.dark-theme) .node-tooltip::before {
    border-color: transparent transparent #7C3AED transparent;
}

.service-node-card:hover {
    transform: scale(1.3);
    background: rgba(124, 77, 255, 0.15);
    border-color: rgba(124, 77, 255, 0.6);
    box-shadow: 0 15px 30px rgba(124, 77, 255, 0.3);
    z-index: 100;
}

body:not(.dark-theme) .service-node-card:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.4);
}

.service-node-card:hover .node-icon {
    color: #38BDF8;
    transform: scale(1.1);
}

.service-node-card:hover .node-title {
    color: #fff;
}

body:not(.dark-theme) .service-node-card:hover .node-title { color: #0F172A; }

.service-node-card:hover .node-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
}

/* RIGHT SIDE: Content Structure */
.ecosystem-content-side {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.ecosystem-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ecosystem-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.3);
    color: #A855F7;
    border-radius: 50px;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    align-self: flex-start;
}

body:not(.dark-theme) .ecosystem-label {
    color: #7C3AED;
    background: rgba(124, 58, 237, 0.05);
    border-color: rgba(124, 58, 237, 0.2);
}

.ecosystem-title {
    font-size: 3rem;
    line-height: 1.2;
    color: #F8FAFC;
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

body:not(.dark-theme) .ecosystem-title { color: #0F172A; }

.ecosystem-text {
    font-size: 1.15rem;
    color: #94A3B8;
    line-height: 1.6;
    max-width: 90%;
    margin: 0;
}

body:not(.dark-theme) .ecosystem-text { color: #475569; }

.ecosystem-service-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-stacked-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    height: 100%;
}

body:not(.dark-theme) .mini-stacked-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.mini-stacked-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, #7C4DFF, #38BDF8);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.4s ease;
}

.mini-stacked-card:hover {
    transform: scale(1.03) translateY(-5px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(124, 77, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3), 0 0 20px rgba(124, 77, 255, 0.1);
}

body:not(.dark-theme) .mini-stacked-card:hover {
    background: #ffffff;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05), 0 0 20px rgba(124, 58, 237, 0.1);
}

.mini-stacked-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent);
    transform: rotate(45deg) translateY(100%);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 10;
}

.mini-stacked-card:hover::after {
    transform: rotate(45deg) translateY(-100%);
}

.mini-stacked-card:hover .stacked-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.4);
}

.mini-stacked-card:hover::before {
    transform: scaleY(1);
}

.stacked-icon {
    width: 45px;
    height: 45px;
    background: rgba(124, 77, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #A855F7;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body:not(.dark-theme) .stacked-icon {
    background: rgba(124, 58, 237, 0.1);
    color: #7C3AED;
}

.stacked-info {
    display: flex;
    flex-direction: column;
}

.stacked-info h4 {
    color: #F8FAFC;
    font-size: 1.15rem;
    margin: 0 0 0.3rem 0;
}

body:not(.dark-theme) .stacked-info h4 { color: #0F172A; }

.stacked-info p {
    color: #94A3B8;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

body:not(.dark-theme) .stacked-info p { color: #64748b; }



/* ================================================================
   SCROLL-DRIVEN OPERATIONAL JOURNEY
   Premium pinned timeline with progressive line draw, node activation,
   detail panels, and ambient gradient shifts.
   ================================================================ */

/* --- Section Shell --- */
.journey-section {
    position: relative;
    overflow: hidden;
    /* Extra padding to ensure scroll space isn't jarring */
    padding: 0;
}

.journey-ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    transition: background 1.2s ease;
    filter: blur(80px);
}

.journey-pin-target {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 80px;
}

/* --- Header --- */
.journey-header {
    text-align: center;
    margin-bottom: 4rem;
}

.journey-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(124, 77, 255, 0.08);
    border: 1px solid rgba(124, 77, 255, 0.25);
    color: #A855F7;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    font-family: 'Outfit', sans-serif;
}

body:not(.dark-theme) .journey-label {
    color: #7C3AED;
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.18);
}

.journey-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #F8FAFC;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

body:not(.dark-theme) .journey-title { color: #0F172A; }

.journey-subtitle {
    font-size: 1.05rem;
    color: #94A3B8;
    font-family: 'Inter', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

body:not(.dark-theme) .journey-subtitle { color: #64748B; }

/* --- Timeline Track --- */
.journey-track {
    position: relative;
    margin: 0 auto 3.5rem;
    max-width: 900px;
    height: 120px;
    display: flex;
    align-items: flex-start;
    padding-top: 24px;
}

/* Background line (inactive) */
.journey-line-bg {
    position: absolute;
    top: 48px;
    left: 28px;
    right: 28px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    z-index: 0;
}

body:not(.dark-theme) .journey-line-bg {
    background: rgba(124, 58, 237, 0.08);
}

/* Progress line (animated fill) */
.journey-line-progress {
    position: absolute;
    top: 48px;
    left: 28px;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #7C4DFF, #38BDF8, #A855F7);
    background-size: 200% 100%;
    animation: lineShimmer 3s linear infinite;
    border-radius: 4px;
    z-index: 1;
    box-shadow: 0 0 12px rgba(124, 77, 255, 0.5), 0 0 30px rgba(56, 189, 248, 0.2);
}

@keyframes lineShimmer {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

body:not(.dark-theme) .journey-line-progress {
    background: linear-gradient(90deg, #7C3AED, #6D28D9, #A855F7);
    background-size: 200% 100%;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.35);
}

/* --- Nodes Container --- */
.journey-nodes {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* --- Individual Node --- */
.journey-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 56px;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Node circle */
.node-dot {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 3;
}

.node-dot i {
    font-size: 1.1rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

/* Node label */
.node-name {
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.03em;
    transition: all 0.5s ease;
    white-space: nowrap;
}

/* ---- Node States ---- */

/* INACTIVE: muted, small */
.journey-node.is-inactive .node-dot {
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transform: scale(0.85);
}
.journey-node.is-inactive .node-dot i { color: rgba(255, 255, 255, 0.2); }
.journey-node.is-inactive .node-name  { color: rgba(255, 255, 255, 0.2); }

body:not(.dark-theme) .journey-node.is-inactive .node-dot {
    background: #ffffff;
    border-color: rgba(124, 58, 237, 0.2);
}
body:not(.dark-theme) .journey-node.is-inactive .node-dot i { color: rgba(124, 58, 237, 0.2); }
body:not(.dark-theme) .journey-node.is-inactive .node-name  { color: rgba(15, 23, 42, 0.25); }

/* ACTIVE: glowing, scaled up, pulsing */
.journey-node.is-active .node-dot {
    background: rgba(124, 77, 255, 0.12);
    border: 2px solid #A855F7;
    box-shadow:
        0 0 20px rgba(124, 77, 255, 0.5),
        0 0 50px rgba(124, 77, 255, 0.2),
        inset 0 0 15px rgba(124, 77, 255, 0.15);
    transform: scale(1.15);
    animation: activeNodePulse 2.5s ease-in-out infinite;
}
.journey-node.is-active .node-dot i { color: #E9D5FF; filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8)); }
.journey-node.is-active .node-name  { color: #F8FAFC; font-weight: 700; }

body:not(.dark-theme) .journey-node.is-active .node-dot {
    background: #ffffff;
    border-color: #7C3AED;
    box-shadow:
        0 0 18px rgba(124, 58, 237, 0.35),
        0 0 40px rgba(124, 58, 237, 0.12);
}
body:not(.dark-theme) .journey-node.is-active .node-dot i { color: #6D28D9; }
body:not(.dark-theme) .journey-node.is-active .node-name  { color: #0F172A; }

@keyframes activeNodePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(124, 77, 255, 0.5), 0 0 50px rgba(124, 77, 255, 0.15); }
    50%      { box-shadow: 0 0 30px rgba(124, 77, 255, 0.7), 0 0 70px rgba(124, 77, 255, 0.3); }
}

/* COMPLETED: solid, slightly dimmed, checkmark feel */
.journey-node.is-completed .node-dot {
    background: linear-gradient(135deg, #7C4DFF, #6D5EF8);
    border: 2px solid rgba(124, 77, 255, 0.5);
    box-shadow: 0 4px 16px rgba(124, 77, 255, 0.3);
    transform: scale(1);
}
.journey-node.is-completed .node-dot i { color: #ffffff; }
.journey-node.is-completed .node-name  { color: rgba(248, 250, 252, 0.5); }

body:not(.dark-theme) .journey-node.is-completed .node-dot {
    background: linear-gradient(135deg, #7C3AED, #6D28D9);
    border-color: rgba(124, 58, 237, 0.3);
}
body:not(.dark-theme) .journey-node.is-completed .node-name { color: rgba(15, 23, 42, 0.4); }

/* --- Detail Panel --- */
.journey-detail-panel {
    position: relative;
    max-width: 620px;
    margin: 0 auto;
    min-height: 260px;
}

.journey-detail-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(124, 77, 255, 0.12);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body:not(.dark-theme) .journey-detail-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(124, 58, 237, 0.12);
}

.journey-detail-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Phase number tag */
.detail-phase-num {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #A855F7;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 100px;
    padding: 4px 14px;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

body:not(.dark-theme) .detail-phase-num {
    color: #7C3AED;
    background: rgba(124, 58, 237, 0.06);
    border-color: rgba(124, 58, 237, 0.15);
}

.journey-detail-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #F8FAFC;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.75rem;
}

body:not(.dark-theme) .journey-detail-card h3 { color: #0F172A; }

.journey-detail-card > p {
    font-size: 0.95rem;
    color: #94A3B8;
    line-height: 1.7;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.5rem;
}

body:not(.dark-theme) .journey-detail-card > p { color: #64748B; }

/* Checklist */
.detail-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.detail-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #CBD5E1;
    font-family: 'Inter', sans-serif;
    padding: 8px 12px;
    background: rgba(124, 77, 255, 0.04);
    border: 1px solid rgba(124, 77, 255, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
}

body:not(.dark-theme) .detail-checklist li {
    color: #334155;
    background: rgba(124, 58, 237, 0.03);
    border-color: rgba(124, 58, 237, 0.08);
}

.detail-checklist li i {
    color: #38BDF8;
    font-size: 0.85rem;
    flex-shrink: 0;
}

body:not(.dark-theme) .detail-checklist li i { color: #7C3AED; }

/* Staggered checklist animation when card becomes active */
.journey-detail-card.active .detail-checklist li {
    animation: checklistSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.journey-detail-card.active .detail-checklist li:nth-child(1) { animation-delay: 0.1s; }
.journey-detail-card.active .detail-checklist li:nth-child(2) { animation-delay: 0.2s; }
.journey-detail-card.active .detail-checklist li:nth-child(3) { animation-delay: 0.3s; }
.journey-detail-card.active .detail-checklist li:nth-child(4) { animation-delay: 0.4s; }

@keyframes checklistSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Hover on checklist items */
.detail-checklist li:hover {
    background: rgba(124, 77, 255, 0.1);
    border-color: rgba(124, 77, 255, 0.2);
    transform: translateX(4px);
}

/* --- Completion Badge --- */
.journey-completion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.journey-completion.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.journey-completion i {
    font-size: 1.4rem;
    color: #38BDF8;
    animation: completionPulse 2s ease-in-out infinite;
}

.journey-completion span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94A3B8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
}

body:not(.dark-theme) .journey-completion i { color: #7C3AED; }
body:not(.dark-theme) .journey-completion span { color: #64748B; }

@keyframes completionPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
    50%      { transform: scale(1.15); filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5)); }
}

/* --- Responsive --- */


/* Metrics Strip */
.metrics-strip {
    padding: 80px 0;
}

.metrics-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-item {
    text-align: center;
    padding: 0 2rem;
}

.metric-item h2 {
    font-size: 3.5rem;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-item p {
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 600;
}

.metric-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
}

/* General Responsive */


/* Immersive Modal Styles */
.immersive-modal-overlay {
    position: fixed;
    inset: 0;
    background: transparent; /* No background fill — blur only */
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 2rem;
}

.immersive-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.immersive-modal-content {
    background: rgba(15, 23, 42, 1); /* 100% visibility (solid) */
    border: 1px solid rgba(124, 77, 255, 0.4);
    border-radius: 24px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 40px rgba(124, 77, 255, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.7); /* Pronounced outline shadow */
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-dynamic-content {
    overflow-y: auto;
    flex-grow: 1;
}

.immersive-modal-overlay.is-active .immersive-modal-content {
    transform: scale(1) translateY(0);
}

.immersive-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s ease;
}

.immersive-close:hover {
    background: #673de6;
    border-color: #673de6;
    transform: rotate(90deg);
}

.modal-banner {
    position: relative;
    padding: 60px 40px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.modal-banner-bg {
    position: absolute;
    inset: -20px;
    background: #0b0f19 url('../images/modal_bg.png') center/cover no-repeat;
    z-index: 0;
    filter: blur(8px);
}

.modal-banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.95));
    z-index: 1;
}

.modal-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 700px;
}

.modal-banner-icon {
    width: 60px;
    height: 60px;
    background: rgba(103, 61, 230, 0.2);
    border: 1px solid rgba(103, 61, 230, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #a78bfa;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(103, 61, 230, 0.4);
}

.modal-banner h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.modal-banner p {
    font-size: 1.2rem;
    color: #cbd5e1;
}

.modal-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
}

.modal-sidebar {
    padding: 40px;
    background: rgba(11, 15, 25, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.modal-main {
    padding: 40px;
}

.stat-box {
    margin-bottom: 2.5rem;
}

.stat-box h3 {
    font-size: 2.5rem;
    color: #c4b5fd;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-box p {
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.mini-timeline h4 {
    color: #f8fafc;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.mini-timeline ul {
    position: relative;
    padding-left: 20px;
    overflow: hidden;
}

.mini-timeline ul::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 4px;
    width: 2px;
    background: rgba(103, 61, 230, 0.3);
}

.mini-timeline li {
    position: relative;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.mini-timeline li:last-child {
    margin-bottom: 0;
}

.mini-timeline .dot {
    position: absolute;
    left: -19px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
    flex-shrink: 0;
    display: block;
}

.content-block {
    margin-bottom: 3rem;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-block p {
    color: #cbd5e1;
    line-height: 1.7;
}

.capability-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.capability-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.capability-list li i {
    color: #10b981;
    margin-top: 4px;
}

/* Dashboard Visual Component inside Modal */
.dashboard-preview {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.dash-header {
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 8px;
}

.dash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.dash-header .dash-dot:nth-child(1) { background: #ff5f56; }
.dash-header .dash-dot:nth-child(2) { background: #ffbd2e; }
.dash-header .dash-dot:nth-child(3) { background: #27c93f; }

.dash-title-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    letter-spacing: 1px;
    margin-left: auto;
}

.dash-body {
    padding: 25px;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

/* 1. Executive Intel */
.intel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}
.intel-map {
    position: relative;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    overflow: hidden;
}
.map-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #a78bfa;
    border-radius: 50%;
    box-shadow: 0 0 10px #a78bfa;
}
.map-node.main { top: 50%; left: 50%; width: 20px; height: 20px; transform: translate(-50%,-50%); }
.map-node.orbit-1 { top: 20%; left: 20%; animation: floatNode 4s infinite ease-in-out; }
.map-node.orbit-2 { top: 30%; right: 25%; animation: floatNode 5s infinite ease-in-out; }
.map-node.orbit-3 { bottom: 25%; left: 40%; animation: floatNode 6s infinite ease-in-out; }

.intel-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.intel-card {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #a78bfa;
}
.intel-card span { font-size: 0.75rem; color: #94a3b8; display: block; margin-bottom: 4px; }
.intel-card strong { font-size: 1.1rem; color: #fff; }

/* 2. Analytics Heavy */
.analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 120px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.bar {
    flex: 1;
    background: linear-gradient(to top, #673de6, #a78bfa);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
    animation: barGrow 2s ease-out forwards;
}
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.kpi-mini {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #fff;
    display: flex;
    flex-direction: column;
}
.kpi-mini span { font-size: 0.7rem; color: #94a3b8; }

/* 3. Workflow Architecture */
.workflow-visual-ui {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 40px 0;
}
.wf-step {
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
}
.wf-step.active {
    background: #673de6;
    color: #fff;
    border-color: #a78bfa;
    box-shadow: 0 0 15px rgba(103,61,230,0.5);
}
.wf-line {
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    position: relative;
}
.wf-line::after {
    content: '';
    position: absolute;
    top: -4px; right: 0;
    width: 0; height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid rgba(255,255,255,0.1);
}

/* 4. Risk Intelligence */
.risk-ui {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}
.risk-heatmap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.risk-cell { height: 40px; border-radius: 4px; }
.risk-cell.low { background: rgba(39,201,63,0.3); border: 1px solid #27c93f; }
.risk-cell.med { background: rgba(255,189,46,0.3); border: 1px solid #ffbd2e; }
.risk-cell.high { background: rgba(255,95,86,0.3); border: 1px solid #ff5f56; }

.risk-meter {
    background: rgba(255,255,255,0.05);
    height: 12px;
    border-radius: 6px;
    position: relative;
}
.meter-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0; width: 98%;
    background: #27c93f;
    border-radius: 6px;
    box-shadow: 0 0 10px #27c93f;
}
.risk-meter span { position: absolute; top: 20px; left: 0; font-size: 0.8rem; color: #94a3b8; }

/* 5. Finance Ops */
.finance-ui {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cashflow-graph svg {
    filter: drop-shadow(0 0 5px rgba(167,139,250,0.5));
}
.finance-cards {
    display: flex;
    gap: 15px;
}
.f-card {
    flex: 1;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}
.f-card span { display: block; font-size: 0.75rem; color: #94a3b8; font-weight: 500; margin-bottom: 5px; }

/* 6. Org Architecture */
.org-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}
.tree-node {
    width: 40px; height: 25px;
    background: #673de6;
    border-radius: 4px;
    border: 1px solid #a78bfa;
}
.tree-branch {
    display: flex;
    gap: 40px;
    position: relative;
    margin-top: 30px;
}
.tree-branch::before {
    content: '';
    position: absolute;
    top: -30px; left: 50%; height: 30px; width: 1px; background: rgba(255,255,255,0.2);
}
.tree-branch::after {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px; height: 1px; background: rgba(255,255,255,0.2);
}

/* 7. Infrastructure Intel */
.infra-ui {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    padding: 20px 0;
}
.system-nodes {
    display: flex;
    gap: 40px;
}
.s-node {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #94a3b8;
    position: relative;
}
.s-node.active {
    background: #673de6;
    color: #fff;
    border-color: #a78bfa;
    box-shadow: 0 0 20px rgba(103,61,230,0.5);
}
.data-stream {
    width: 80%;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}
.data-stream::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, #38BDF8, transparent);
    animation: streamFlow 2s linear infinite;
}

/* 8. Monitoring Oversight */
.monitor-ui {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 30px;
    align-items: center;
}
.live-pulse {
    width: 80px; height: 80px;
    border: 2px solid #27c93f;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.live-pulse::after {
    content: '';
    position: absolute;
    inset: 5px;
    background: rgba(39,201,63,0.1);
    border-radius: 50%;
    animation: monitorPulse 2s infinite;
}
.audit-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.log-entry {
    font-family: monospace;
    font-size: 0.8rem;
    color: #27c93f;
    opacity: 0.8;
}

/* 9. Cloud Infrastructure */
.cloud-infra-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}
.cloud-nodes {
    position: relative;
    width: 200px;
    height: 150px;
}
.cloud-node.central {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(103, 61, 230, 0.2);
    border: 2px solid #a78bfa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.4);
    z-index: 5;
}
.node-sat {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #94a3b8;
    z-index: 4;
}
.node-sat.orbit-1 { top: 0; left: 20%; animation: orbitCloud1 6s infinite linear; }
.node-sat.orbit-2 { bottom: 0; right: 20%; animation: orbitCloud2 8s infinite linear; }
.node-sat.orbit-3 { top: 30%; right: 0; animation: orbitCloud3 7s infinite linear; }

.sync-status {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.sync-line {
    width: 80%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}
.sync-line::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, #a78bfa, transparent);
    animation: streamFlow 2s linear infinite;
}
.sync-status span {
    font-size: 0.75rem;
    color: #27c93f;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: blinkSync 2s infinite;
}

@keyframes orbitCloud1 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(20px, 10px); }
    66% { transform: translate(-10px, 20px); }
    100% { transform: translate(0, 0); }
}
@keyframes orbitCloud2 {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-20px, -15px); }
    66% { transform: translate(15px, -10px); }
    100% { transform: translate(0, 0); }
}
@keyframes orbitCloud3 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 0); }
    100% { transform: translate(0, 0); }
}
@keyframes blinkSync {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Animations */
@keyframes floatNode {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-10px) translateX(5px); }
}
@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}
@keyframes streamFlow {
    from { left: -100%; }
    to { left: 100%; }
}
@keyframes monitorPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Responsive Modal Adjustments */
@media (max-width: 900px) {
    .modal-layout {
        grid-template-columns: 1fr;
    }
    .modal-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        padding: 30px;
    }
    .stat-box { margin-bottom: 0; }
    .mini-timeline { width: 100%; margin-top: 10px; }
}



/* Dashboard UI Classes and Light Theme Overrides */
.premium-static-dashboard {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(124, 77, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 10;
}
body:not(.dark-theme) .premium-static-dashboard {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1.5rem;
}
body:not(.dark-theme) .dashboard-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dashboard-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}
body:not(.dark-theme) .dashboard-header h4 {
    color: #0f172a;
}

.dashboard-dots {
    display: flex;
    gap: 8px;
}
.dash-dot-red, .dash-dot-yellow, .dash-dot-green {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dash-dot-red { background: #ff5f56; box-shadow: 0 0 8px rgba(255,95,86,0.6); }
.dash-dot-yellow { background: #ffbd2e; box-shadow: 0 0 8px rgba(255,189,46,0.6); }
.dash-dot-green { background: #27c93f; box-shadow: 0 0 8px rgba(39,201,63,0.6); }

.stat-primary {
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.2);
}
.stat-secondary {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
}
body:not(.dark-theme) .stat-primary {
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.15);
}
body:not(.dark-theme) .stat-secondary {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.stat-label {
    font-size: 0.9rem;
    color: #94A3B8;
    margin-bottom: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}
body:not(.dark-theme) .stat-label {
    color: #64748b;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}
.primary-color { color: #A855F7; }
.secondary-color { color: #38BDF8; }
body:not(.dark-theme) .primary-color { color: #7C3AED; }
body:not(.dark-theme) .secondary-color { color: #0284c7; }

.dashboard-pipeline-title {
    font-size: 0.9rem;
    color: #94A3B8;
    margin-bottom: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}
body:not(.dark-theme) .dashboard-pipeline-title {
    color: #64748b;
}

.dashboard-workflow {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.05);
}
body:not(.dark-theme) .dashboard-workflow {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 1);
}

.workflow-node {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
body:not(.dark-theme) .workflow-node {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
body:not(.dark-theme) .workflow-node i.fa-chart-line {
    color: #0f172a !important;
}

.workflow-line {
    height: 3px;
    flex-grow: 1;
    margin: 0 15px;
    opacity: 0.8;
    border-radius: 2px;
}
.line-1 { background: linear-gradient(90deg, #A855F7, #38BDF8); }
.line-2 { background: linear-gradient(90deg, #38BDF8, #f8fafc); }
body:not(.dark-theme) .line-1 { background: linear-gradient(90deg, #7C3AED, #0284c7); }
body:not(.dark-theme) .line-2 { background: linear-gradient(90deg, #0284c7, #94a3b8); }

.dashboard-glow-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 500px;
    background: radial-gradient(circle at center, rgba(124, 77, 255, 0.15) 0%, transparent 60%);
    filter: blur(40px);
    z-index: 1;
}
body:not(.dark-theme) .dashboard-glow-bg {
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, transparent 60%);
}

/* General Light Theme Fixes */
body:not(.dark-theme) .premium-header h1 { color: #0f172a; }
body:not(.dark-theme) .premium-header p { color: #475569; }

body:not(.dark-theme) .bg-grid {
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
}

body:not(.dark-theme) .workflow-timeline {
    background: #f8fafc;
    border-top: 1px solid rgba(124, 58, 237, 0.1);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}
body:not(.dark-theme) .timeline-title { color: #0f172a; }
body:not(.dark-theme) .step-node {
    background: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.1);
}
body:not(.dark-theme) .timeline-step:hover .step-node {
    background: #7c3aed;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}
body:not(.dark-theme) .step-content h4 { color: #0f172a; }
body:not(.dark-theme) .step-content p { color: #64748b; }

body:not(.dark-theme) .metrics-strip {
    background: rgba(241, 245, 249, 0.8);
}
body:not(.dark-theme) .metric-item h2 {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body:not(.dark-theme) .metric-item p { color: #475569; }
body:not(.dark-theme) .metric-divider { background: rgba(0, 0, 0, 0.1); }

body:not(.dark-theme) .small-label {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.05);
    border-color: rgba(124, 58, 237, 0.2);
}

/* --- Immersive Modal Light Theme Overrides --- */
body:not(.dark-theme) .immersive-modal-overlay {
    background: rgba(248, 250, 252, 0.4); /* Reduced opacity for more background visibility */
}

body:not(.dark-theme) .immersive-modal-content {
    background: rgba(255, 255, 255, 1); /* 100% visibility (solid) */
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.15), 0 25px 50px -12px rgba(0, 0, 0, 0.2); /* Pronounced outline shadow */
}

body:not(.dark-theme) .immersive-close {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

body:not(.dark-theme) .immersive-close:hover {
    background: #673de6;
    color: #fff;
    border-color: #673de6;
}

body:not(.dark-theme) .modal-banner {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body:not(.dark-theme) .modal-banner-bg {
    background: url('../images/modal_bg.png') center/cover no-repeat;
}
body:not(.dark-theme) .modal-banner-bg::after {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6), rgba(248, 250, 252, 0.95));
}

body:not(.dark-theme) .modal-banner-icon {
    background: rgba(103, 61, 230, 0.1);
    border: 1px solid rgba(103, 61, 230, 0.3);
    color: #673de6;
    box-shadow: 0 0 20px rgba(103, 61, 230, 0.15);
}

body:not(.dark-theme) .modal-banner h2 {
    color: #0f172a;
}

body:not(.dark-theme) .modal-banner p {
    color: #475569;
}

body:not(.dark-theme) .modal-sidebar {
    background: rgba(248, 250, 252, 0.5);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

body:not(.dark-theme) .stat-box h3 {
    color: #673de6;
}

body:not(.dark-theme) .stat-box p {
    color: #64748b;
}

body:not(.dark-theme) .mini-timeline h4 {
    color: #0f172a;
}

body:not(.dark-theme) .mini-timeline li {
    color: #475569;
}

body:not(.dark-theme) .mini-timeline ul::before {
    background: rgba(103, 61, 230, 0.2);
}

body:not(.dark-theme) .content-block h3 {
    color: #0f172a;
}

body:not(.dark-theme) .content-block p {
    color: #475569;
}

body:not(.dark-theme) .capability-list li {
    color: #475569;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body:not(.dark-theme) .dashboard-preview {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

body:not(.dark-theme) .dash-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body:not(.dark-theme) .dash-dot {
    background: rgba(0, 0, 0, 0.15);
}

body:not(.dark-theme) .dash-stat-bar {
    background: rgba(0, 0, 0, 0.05);
}

body:not(.dark-theme) .dash-chart {
    background: linear-gradient(180deg, rgba(103, 61, 230, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid rgba(103, 61, 230, 0.2);
}

body:not(.dark-theme) .dash-chart::after {
    background-image: linear-gradient(90deg, transparent 50%, rgba(0, 0, 0, 0.05) 50%);
}



/* Custom Scrollbar for Modal to ensure it's visibly operational */
.modal-dynamic-content::-webkit-scrollbar {
    width: 8px;
}
.modal-dynamic-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 24px 24px 0;
    margin: 16px 0;
}
.modal-dynamic-content::-webkit-scrollbar-thumb {
    background: rgba(103, 61, 230, 0.5);
    border-radius: 10px;
}
.modal-dynamic-content::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 61, 230, 0.8);
}

body:not(.dark-theme) .modal-dynamic-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
body:not(.dark-theme) .immersive-modal-content::-webkit-scrollbar-thumb {
    background: rgba(103, 61, 230, 0.3);
}
body:not(.dark-theme) .immersive-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 61, 230, 0.5);
}

/* Animations to make the modal dashboard feel operational */
@keyframes fillBar {
    from { width: 0; }
}

.immersive-modal-overlay.is-active .dash-stat-fill {
    animation: fillBar 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.immersive-modal-overlay.is-active .dash-chart {
    animation: slideUpFade 1s ease-out forwards;
}

.immersive-modal-overlay.is-active .capability-list li {
    opacity: 0;
    animation: slideUpFade 0.5s ease-out forwards;
}

.immersive-modal-overlay.is-active .capability-list li:nth-child(1) { animation-delay: 0.1s; }
.immersive-modal-overlay.is-active .capability-list li:nth-child(2) { animation-delay: 0.2s; }
.immersive-modal-overlay.is-active .capability-list li:nth-child(3) { animation-delay: 0.3s; }
.immersive-modal-overlay.is-active .capability-list li:nth-child(4) { animation-delay: 0.4s; }
.immersive-modal-overlay.is-active .capability-list li:nth-child(5) { animation-delay: 0.5s; }
.immersive-modal-overlay.is-active .capability-list li:nth-child(6) { animation-delay: 0.6s; }
