/* ==========================================================================
   Premium 3D Construction Process Section
   ========================================================================== */

.process-3d-section {
    position: relative;
    padding: 60px 0;
    background-color: #f8fafc;
    overflow: hidden;
}


/* Blueprint Grid Background Overlay */
.process-3d-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(13, 44, 92, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 44, 92, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    pointer-events: none;
}

.process-3d-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Title */
.process-3d-title-area {
    text-center;
    margin-bottom: 80px;
}

/* Horizontal Timeline Track (Desktop) */
.timeline-3d-wrapper {
    position: relative;
    width: 100%;
    padding-top: 40px;
}

.timeline-track-bg {
    position: absolute;
    top: 60px; /* Center with the numbered nodes */
    left: 5%;
    right: 5%;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 4px;
    z-index: 1;
}

.timeline-track-progress {
    position: absolute;
    top: 60px;
    left: 5%;
    width: 90%; /* Connects from node 1 all the way through node 6 */
    height: 4px;
    background: linear-gradient(90deg, var(--color-gold, #00964A), var(--color-gold-light, #00C853));
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 0 15px rgba(0, 150, 74, 0.5);
    transition: width 0.3s ease-out;
}

/* Timeline Items Grid */
.timeline-items-grid {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.timeline-3d-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 10px;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-3d-item.is-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Numbered Node */
.timeline-node {
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border: 3px solid var(--color-gold, #00964A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-gold, #00964A);
    margin-bottom: 30px;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(0, 150, 74, 0.3);
    z-index: 4;
    position: relative;
    transform: scale(1.1);
}

.timeline-3d-item.is-active .timeline-node {
    border-color: var(--color-gold, #00964A);
    color: var(--color-gold, #00964A);
    box-shadow: 0 0 20px rgba(0, 150, 74, 0.3);
    transform: scale(1.15);
}

/* 3D Scene Card */
.timeline-3d-scene {
    position: relative;
    width: 100%;
    max-width: 220px;
    margin-bottom: 25px;
    transition: transform 0.5s ease;
}

/* Floating animation */
@keyframes subtleFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.timeline-3d-item.is-active .timeline-3d-scene {
    animation: subtleFloat 4s ease-in-out infinite;
}

.timeline-3d-scene img {
    width: 100%;
    height: auto;
    border-radius: 50%; /* Make the platform feel circular */
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 5px solid #ffffff;
}

.timeline-3d-item.is-active .timeline-3d-scene img {
    box-shadow: 0 25px 45px rgba(0, 150, 74, 0.15);
}

.timeline-3d-scene:hover img {
    transform: translateY(-10px) scale(1.05);
}

/* Text Content */
.timeline-3d-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-charcoal, #0d2c5c);
}

.timeline-3d-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: inline-block;
}

.timeline-3d-content li {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 8px;
    position: relative;
    padding-left: 18px;
}

.timeline-3d-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-gold, #00964A);
    font-weight: bold;
}

/* Mobile Responsive Layout (Vertical Alternating) */
@media (max-width: 991px) {
    .timeline-3d-wrapper {
        padding-top: 0;
    }

    .timeline-track-bg, .timeline-track-progress {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 4px;
        height: 100%;
        transform: translateX(-50%);
    }

    .timeline-track-progress {
        height: 0%; /* Animated via GSAP on mobile */
        width: 4px;
        transition: height 0.3s ease-out;
    }

    .timeline-items-grid {
        flex-direction: column;
    }

    .timeline-3d-item {
        flex-direction: row;
        width: 100%;
        margin-bottom: 50px;
        text-align: left;
        align-items: center;
        opacity: 0.3;
        transform: translateY(30px);
    }

    /* Even items reversed */
    .timeline-3d-item:nth-child(even) {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    .timeline-3d-item:nth-child(even) .timeline-3d-content ul {
        text-align: right;
    }
    .timeline-3d-item:nth-child(even) .timeline-3d-content li {
        padding-left: 0;
        padding-right: 18px;
    }
    .timeline-3d-item:nth-child(even) .timeline-3d-content li::before {
        left: auto;
        right: 0;
    }

    .timeline-node {
        position: absolute;
        left: 50%;
        margin-bottom: 0;
        transform: translate(-50%, 0) !important;
        z-index: 10;
    }

    .timeline-3d-item.is-active .timeline-node {
        transform: translate(-50%, 0) scale(1.15) !important;
    }

    .timeline-3d-scene {
        width: 40%;
        margin-bottom: 0;
        margin-right: 10%; /* For odd items */
    }

    .timeline-3d-item:nth-child(even) .timeline-3d-scene {
        margin-right: 0;
        margin-left: 10%;
    }

    .timeline-3d-content {
        width: 40%;
    }
}

@media (max-width: 767px) {
    /* Stacked mobile view */
    .timeline-track-bg, .timeline-track-progress {
        left: 30px;
    }

    .timeline-3d-item, .timeline-3d-item:nth-child(even) {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        padding-left: 70px;
        position: relative;
    }

    .timeline-node {
        left: 30px !important;
        top: 0;
        transform: translate(-50%, 0) !important;
    }
    
    .timeline-3d-item.is-active .timeline-node {
        transform: translate(-50%, 0) scale(1.1) !important;
    }

    .timeline-3d-scene {
        width: 100%;
        max-width: 250px;
        margin: 20px 0;
    }

    .timeline-3d-content {
        width: 100%;
    }

    .timeline-3d-item:nth-child(even) .timeline-3d-content ul {
        text-align: left;
    }
    .timeline-3d-item:nth-child(even) .timeline-3d-content li {
        padding-left: 18px;
        padding-right: 0;
    }
    .timeline-3d-item:nth-child(even) .timeline-3d-content li::before {
        left: 0;
        right: auto;
    }
}
