/* --- Ecosystem Section --- */
.eco-section {
    background-color: #000;
    padding: 95px 0 120px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Premium Top Divider */
.eco-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 20%, rgba(59, 130, 246, 0.5) 50%, rgba(255, 255, 255, 0.2) 80%, transparent 100%);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.eco-container {
    max-width: 1055px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Header --- */
.eco-header {
    text-align: center;
    max-width: 800px;
    margin-bottom: 80px;
    z-index: 5;
    position: relative;
}

.eco-badge {
    display: inline-block;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
}

.eco-title {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 20px 0;
    color: #fff;
    line-height: 1.05;
}

.eco-subtitle {
    font-size: 20px;
    color: #94a3b8;
    line-height: 1.6;
    font-weight: 400;
}

/* --- The 4-Image Stage --- */
.eco-stage {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 550px; /* Fixed height to manage absolute stacking */
    /* margin-bottom: 60px; */
    z-index: 1;
}

/* Common Image Styles */
.eco-stage img {
    display: block;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
}

/* --- Layer 1: Web Client (Background Anchor) --- */
.eco-layer-web {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 75%; /* Large, central */
    z-index: 1;
}

.eco-img-web {
    width: 100%;
}

/* The Glow */
.eco-glow-backdrop {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120%; height: 120%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* --- Layer 2: Desktop Client (Foreground Left) --- */
.eco-layer-desktop {
    position: absolute;
    bottom: 50px; /* Overlaps bottom of web */
    left: 5%;
    width: 45%; /* Smaller than web, larger than mobile */
    z-index: 2;
}

.eco-img-desktop {
    width: 100%;
}

/* --- Layer 3: Mobile Group (Foreground Right) --- */
.eco-layer-mobile {
    position: absolute;
    top: 0 !important;
    right: 5%;
    width: 25%;
    height: 400px; /* Container for phones */
    z-index: 3;
}

/* Mobile 1: Dashboard (Behind Selection) */
.eco-img-mobile-1 {
    position: absolute;
    bottom: 40px;
    right: 120px; /* Pushed left */
    width: 70%;   /* Relative to mobile layer */
    z-index: 1;
    filter: brightness(0.8); /* Slight depth dimming */
}

/* Mobile 2: Selection (Front) */
.eco-img-mobile-2 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70%;
    z-index: 2;
    animation: ecoFloat 6s ease-in-out infinite;
}

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

/* --- Features Grid --- */
.eco-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    width: 100%;
    max-width: 1200px;
    /* border-top: 1px solid rgba(255, 255, 255, 0.08); */
    padding-top: 0px;
    position: relative;
    z-index: 10;
}

.eco-feature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.eco-icon-box {
    width: 48px;
    height: 48px;
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
}

.eco-feature:hover .eco-icon-box {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.eco-feature h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.eco-feature p {
    font-size: 15px;
    color: #888;
    line-height: 1.6;
    margin: 0;
}

/* --- Reveal Animation Classes --- */
.eco-reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.eco-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.eco-header.eco-reveal-visible { transition-delay: 0.1s; }
.eco-stage.eco-reveal-visible { transition-delay: 0.3s; }
.eco-grid.eco-reveal-visible { transition-delay: 0.5s; }

/* --- Responsive --- */
@media (max-width: 1200px) {
    .eco-stage { height: 600px; }
    .eco-layer-web { width: 85%; }
    .eco-layer-desktop { width: 50%; left: 0; }
    .eco-layer-mobile { width: 30%; right: 0; top: 0;}
}

@media (max-width: 900px) {
    .eco-stage { height: auto; display: flex; flex-direction: column; gap: 40px; margin-bottom: 40px; }
    
    /* Stack them vertically on tablet/mobile */
    .eco-layer-web, .eco-layer-desktop, .eco-layer-mobile {
        position: relative;
        width: 100%;
        left: auto; right: auto; top: auto; bottom: auto;
        transform: none;
    }
    
    .eco-layer-mobile { height: 350px; } /* Give height for the absolute phones */
    
    .eco-img-mobile-1 { right: 50%; transform: translateX(50%); }
    .eco-img-mobile-2 { right: 20%; }
}

@media (max-width: 768px) {
    .eco-title { font-size: 32px; }
    .eco-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --- Modern Header (Left-Aligned, Minimalist) --- */
.modern-header {
    width: 100%;
    max-width: 900px; /* Restrained width for readability */
    text-align: left;
    margin-bottom: 80px;
    position: relative;
    padding-left: 4px; /* Optical alignment */
}

/* 1. The Badge (Clean & Technical) */
.modern-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8; /* Muted tech gray */
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 4px; /* Slightly squared for "unique" feel */
    background: rgba(255, 255, 255, 0.02);
}

.modern-badge-dot {
    width: 6px;
    height: 6px;
    background-color: #3b82f6; /* Electric Blue */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* 2. The Title (Bold & Tight) */
.modern-title {
    font-family: 'Inter', sans-serif;
    font-size: 64px; /* Large but controlled */
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.04em; /* Tight "Swiss" tracking */
    margin: 0 0 32px 0;
}

.modern-highlight {
    color: #5b5b5b; /* Unique "Dark Mode" contrast (Dark Gray instead of Blue) */
    /* Alternatively, for color: color: #3b82f6; */
}

/* 3. The Subtitle Layout (Connected) */
.modern-subtitle-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* The Graphic Line Accent */
.modern-line {
    width: 60px; /* Long, elegant line */
    height: 2px;
    background: #3b82f6;
    opacity: 0.8;
}

.modern-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #a1a1aa;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    max-width: 450px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .modern-title { font-size: 42px; }
    .modern-subtitle-wrapper { gap: 16px; }
    .modern-line { width: 30px; }
    .modern-subtitle { font-size: 16px; }
}

/* --- Mobile Fix for Command Center / Ecosystem Section --- */
@media (max-width: 768px) {
    /* 1. Convert the stage to a tight vertical column */
    .eco-stage {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 0 !important; /* Remove gap to allow for negative margins */
        margin-bottom: 40px !important;
        padding: 0 10px !important; /* Prevent edge touching */
    }

    /* 2. Reset the Layers to be relative stacked blocks */
    .eco-layer-web, 
    .eco-layer-desktop, 
    .eco-layer-mobile {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
    }

    /* 3. Pull the Desktop Client UP to overlap the Web Client */
    .eco-layer-desktop {
        margin-top: -15% !important; /* The Magic Number: Creates the overlap */
        z-index: 2 !important;
        margin-left: 5% !important; /* Slight offset for depth */
        width: 95% !important;
    }

    /* 4. Fix the Mobile Phones Container */
    .eco-layer-mobile {
        height: 280px !important; /* Constrain height */
        margin-top: -10% !important; /* Pull up to overlap Desktop client */
        z-index: 3 !important;
        overflow: visible !important;
    }

    /* 5. Perfectly Center the Two Phones */
    /* Phone 1 (Back) */
    .eco-img-mobile-1 {
        position: absolute !important;
        width: 45% !important; /* Resize for mobile screen */
        left: 50% !important;
        transform: translateX(-80%) !important; /* Shift Left of Center */
        bottom: 20px !important;
        right: auto !important;
    }

    /* Phone 2 (Front) */
    .eco-img-mobile-2 {
        position: absolute !important;
        width: 45% !important;
        left: 50% !important;
        transform: translateX(-20%) !important; /* Shift Right of Center (Overlapping) */
        bottom: 50px !important; /* Sit slightly higher */
        right: auto !important;
    }
}