/* --- ROADMAP SECTION LAYOUT --- */
.roadmap-section {
    position: relative;
    padding: 80px 8% 60px 8%;
    background: transparent;
    z-index: 10;
}

.roadmap-header {
    margin-bottom: 50px;
    text-align: left;
}
/* 1. Standardized Title Scale for Laptop */
#roadmap .hero-title {
    font-size: clamp(2.2rem, 5vw, 4.2rem) !important; 
    line-height: 1.0;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* --- THE TIMELINE ENGINE --- */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

/* The Vertical Spine (Dashed CAD Line) */
.timeline-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background-image: linear-gradient(to bottom, 
        rgba(0, 71, 171, 0) 0%, 
        rgba(0, 71, 171, 0.5) 15%, 
        rgba(0, 71, 171, 0.5) 85%, 
        rgba(0, 71, 171, 0) 100%);
    border-left: 1px dashed rgba(0, 71, 171, 0.3);
    transform: translateX(-50%);
}

/* Timeline Items */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 60px;
    margin-bottom: 60px;
    box-sizing: border-box;
}

.timeline-item.left { left: 0; text-align: right; }
.timeline-item.right { left: 50%; text-align: left; }

/* The Central Node (The 'Joint') */
.timeline-node {
    position: absolute;
    top: 30px;
    width: 12px;
    height: 12px;
    background: #050505;
    border: 2px solid #0047AB;
    border-radius: 50%;
    z-index: 5;
    transition: all 0.4s ease;
}

.left .timeline-node { right: -6px; }
.right .timeline-node { left: -6px; }

/* Content Styling */
.timeline-content {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 71, 171, 0.1);
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-content h3 {
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 10px 0;
}

.step-number {
    font-size: 10px;
    color: #0047AB;
    font-weight: 900;
    letter-spacing: 0.4em;
}

.timeline-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1.6;
}

/* --- HOVER RESONANCE --- */
.timeline-item:hover .timeline-node {
    background: #00d4ff;
    box-shadow: 0 0 20px #0047AB;
    transform: scale(1.5);
}

.timeline-item:hover .timeline-content {
    border-color: rgba(0, 212, 255, 0.4);
    background: rgba(0, 71, 171, 0.05);
}
/* --- PROGRESSIVE FILL ANIMATION --- */
.timeline-spine::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* This height will be controlled by JavaScript */
    height: var(--scroll-draw, 0%); 
    background: #0047AB;
    box-shadow: 0 0 15px #0047AB, 0 0 30px rgba(0, 71, 171, 0.5);
    transition: height 0.1s linear;
}

/* ACTIVE NODE PULSE */
.timeline-item.is-active .timeline-node {
    background: #00d4ff;
    box-shadow: 0 0 25px #00d4ff;
    border-color: #fff;
    transform: scale(1.3);
}

.timeline-item.is-active .timeline-content {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 71, 171, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Micro-interaction for the Step Number */
.timeline-item.is-active .step-number {
    color: #fff;
    text-shadow: 0 0 10px #00d4ff;
}
/* --- THE CONNECTION TRACE (The 'Bridge') --- */
/* This tiny dashed line links the node to the box so it doesn't look like a void */
.timeline-item::before {
    content: "";
    position: absolute;
    top: 36px; /* Centered with the node */
    width: 20px;
    height: 1px;
    border-top: 1px dashed rgba(0, 71, 171, 0.4);
    opacity: 0;
    transition: all 0.4s ease;
}

.timeline-item.left::before { right: 10px; }
.timeline-item.right::before { left: 10px; }

/* Reveal bridge when active or hovered */
.timeline-item.is-active::before,
.timeline-item:hover::before {
    opacity: 1;
    width: 35px;
    border-color: rgba(0, 212, 255, 0.6);
}

/* --- THE SCHEMATIC WATERMARK (LAPTOP VOID-FILLER) --- */
@media (min-width: 1024px) {
    .timeline-item::after {
        content: "";
        position: absolute;
        top: -50px;
        width: 300px; /* Large enough to fill the void */
        height: 300px;
        background-repeat: no-repeat;
        background-size: contain;
        opacity: 0; /* Hidden by default */
        pointer-events: none;
        transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1); /* Slower, 'Liquid' transition */
        z-index: -1;
    }

    /* Position Watermark on the opposite side of the text */
    .timeline-item.left::after {
        left: 120%; /* Moves to the right void */
        transform: translateX(40px);
    }

    .timeline-item.right::after {
        right: 120%; /* Moves to the left void */
        transform: translateX(-40px);
    }

    /* REVEAL ON ACTIVE: This is the 'Discovery' moment */
    .timeline-item.is-active::after {
        opacity: 0.12; /* VERY subtle (100/100 for non-distraction) */
        transform: translateX(0);
    }

    /* --- THE SVGS (ENCODED DIRECTLY IN CSS) --- */

    /* Step 01: Consultation - Site Survey / Master Plan */
    .timeline-item[data-bg="consultation"]::after {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h80v80h-80z' fill='none' stroke='%2300d4ff' stroke-width='0.4'/%3E%3Cpath d='M50 5v10M50 85v10M5 50h10M85 50h10' stroke='%2300d4ff' stroke-width='0.5'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='%230047AB' stroke-width='0.2' stroke-dasharray='2 2'/%3E%3Cpath d='M30 30l40 40M70 30l-40 40' stroke='%230047AB' stroke-width='0.2'/%3E%3Ctext x='15' y='18' fill='%2300d4ff' font-family='monospace' font-size='3'%3ENORTH-WEST SECTOR%3C/text%3E%3Cpath d='M50 40l3 10h-6z' fill='%2300d4ff'/%3E%3C/svg%3E");
    }

    /* Step 02: Analysis - Force Vectors & Stress Points */
    .timeline-item[data-bg="analysis"]::after {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 90Q50 10 90 90' fill='none' stroke='%2300d4ff' stroke-width='0.5'/%3E%3Cpath d='M50 10v80M30 35v55M70 35v55' stroke='%230047AB' stroke-width='0.3' stroke-dasharray='1 2'/%3E%3Cpath d='M48 10l2-5 2 5z' fill='%2300d4ff'/%3E%3Ctext x='55' y='15' fill='%2300d4ff' font-family='monospace' font-size='3'%3EMAX LOAD: 450kN%3C/text%3E%3C/svg%3E");
    }

    /* Step 03: Design - Connection Node (Bolted Joint Detail) */
    .timeline-item[data-bg="design"]::after {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='15' fill='none' stroke='%2300d4ff' stroke-width='0.8'/%3E%3Cpath d='M50 10v80M10 50h80M20 20l60 60M80 20l-60 60' stroke='%230047AB' stroke-width='0.3'/%3E%3Ccircle cx='40' cy='40' r='1.5' fill='%2300d4ff'/%3E%3Ccircle cx='60' cy='40' r='1.5' fill='%2300d4ff'/%3E%3Ccircle cx='40' cy='60' r='1.5' fill='%2300d4ff'/%3E%3Ccircle cx='60' cy='60' r='1.5' fill='%2300d4ff'/%3E%3C/svg%3E");
    }

    /* Step 04: Execution - Foundation Piling Detail */
    .timeline-item[data-bg="execution"]::after {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 30h80M20 30v60M40 30v60M60 30v60M80 30v60' stroke='%230047AB' stroke-width='0.5'/%3E%3Cpath d='M15 40l5-5 5 5M35 40l5-5 5 5' stroke='%2300d4ff' stroke-width='0.5'/%3E%3Cpath d='M10 10l5 5M85 10l5 5' stroke='%2300d4ff' stroke-width='0.5'/%3E%3Ctext x='15' y='25' fill='%2300d4ff' font-family='monospace' font-size='3'%3ESITE DEPTH: 12.5m%3C/text%3E%3C/svg%3E");
    }
}

/* --- MOBILE ADAPTATION --- */
@media (max-width: 768px) {
    .timeline-spine { left: 30px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 0; text-align: left !important; }
    .timeline-item.right { left: 0; }
    .timeline-node { left: 24px !important; }
}