/* ================= TIMELINE SECTION ================= */
.timeline-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background: #E9EEE9;
    padding: 10px 24px 40px;
    width: 100%;
    box-sizing: border-box;
}

.timeline-header {
    max-width: 900px;
    margin: 0 auto 80px;
}

.timeline-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #517E1D;
    margin-bottom: 14px;
}

.timeline-header h2 {
    font-size: clamp(24px, 3.6vw, 40px);
    font-weight: 600;
    color: black;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

#timeline-section {
    overflow-x: hidden;
    max-width: 100vw;
}

.timeline-line-wrap {
    width: 100%;
    overflow-x: hidden;
    /* ✅ scrollbar nathi joitu — content container ni andar j fit thashe */
    overflow-y: visible;
}

.timeline-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: 480px;
    padding: 0 6vw;
    box-sizing: border-box;
}

.timeline-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg,
            #4C741B 0%,
            #4A7019 50%,
            #405D13 100%);


    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
}

.timeline-line-glow {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 10px;
    background: linear-gradient(90deg,
            #517E1D 0%,
            #629B23 35%,
            #74B52B 70%,
            #517E1D 100%);
    filter: blur(10px);
    opacity: 0.35;
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
}

.timeline-item {
    position: relative;
    flex: 1 1 0;
    /* ✅ badha items available width equally share kare, overflow nahi thay */
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-stem {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: calc(var(--h) * 1px);
    background: linear-gradient(180deg, var(--c), #cfcfcf 85%);
    transform: translate(-50%, -50%) scaleY(0);
    transform-origin: center;
}

.tl-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
    transform: translate(-50%, -50%) scale(0);
    box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--c);
}

.tl-above,
.tl-below {
    position: absolute;
    left: 50%;
    width: 94%;
    /* ✅ item na potana space ne j vaparo — neighbor ma overlap nahi thay */
    max-width: 175px;
    text-align: center;
    transform: translateX(-50%) translateY(12px);
    opacity: 0;
}

.tl-above {
    bottom: calc(50% + (var(--h) * 1px) / 2 + 16px);
}

.tl-below {
    top: calc(50% + (var(--h) * 1px) / 2 + 16px);
}

.year-text {
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.label-text {
    font-size: 13px;
    line-height: 1.45;
    color: #5F6875;
    transition: color 0.3s ease;
}

.timeline-item:hover .label-text {
    color: #517E1D;
}

.timeline-item:hover .timeline-stem {
    filter: drop-shadow(0 0 6px var(--c));
}

.our-story-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 0;
    color: #517E1D;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.our-story-link:hover {
    gap: 16px;
}

.our-story-link span {
    transition: transform 0.3s ease;
}

.our-story-link:hover span {
    transform: translateX(4px);
}


/* ===== Responsive — VERTICAL mobile/tablet timeline ===== */
/* ===== Responsive — CENTER-LINE ZIGZAG mobile/tablet timeline ===== */
@media (max-width: 1023px) {

    .timeline-sticky {
        position: static;
        height: auto;
        min-height: auto;
        padding: 0 20px 40px;
    }

    #timeline-section {
        height: auto !important;
    }

    .timeline-item .label-text strong {
        display: block;
        margin-bottom: 8px;
        color: #2F6B3A;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.35;
    }

    .timeline-item .label-text span {
        display: block;
        color: #5F6875;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.5;
    }

    .timeline-header {
        max-width: 100%;
        width: 100%;
        margin: 0 auto 36px;
        text-align: center;
        padding: 0;
    }

    .timeline-header h2 {
        margin-top: 20px;
        line-height: 1.4;
    }

    .timeline-line-wrap {
        overflow: visible;
        width: 100%;
    }

    .timeline-line,
    .timeline-line-glow {
        display: none;
    }

    /* ---- Center vertical line ---- */
    .timeline-track {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        position: relative !important;
        height: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 520px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .timeline-track::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(180deg,
                #517E1D,
                #74B52B);
        transform: translateX(-50%) scaleY(0);
        transform-origin: top center;
        transition: transform 1s ease;
        z-index: 0;
    }

    .timeline-track.tl-line-visible::before {
        transform: translateX(-50%) scaleY(1);
    }

    /* ---- Each item: full width row, content splits left/right of center ---- */
    .timeline-item {
        position: relative !important;
        display: grid !important;
        grid-template-columns: 1fr 32px 1fr !important;
        align-items: start !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: none !important;
        height: auto !important;
        padding: 0 0 40px 0 !important;
        box-sizing: border-box !important;
        column-gap: 12px;
    }

    .timeline-item:last-child {
        padding-bottom: 0 !important;
    }

    /* center dot column */
    .timeline-stem {
        position: relative !important;
        grid-column: 2 !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        transform: none !important;
        display: flex;
        justify-content: center;
    }

    .tl-dot {
        position: relative !important;
        left: auto !important;
        top: 4px !important;
        transform: scale(0) !important;
        transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
        z-index: 1;
    }

    .timeline-item.tl-visible .tl-dot {
        transform: scale(1) !important;
    }

    /* ================= Alternate DOT position ================= */

    /* Stem hamesha center ma */
    .timeline-stem {
        grid-column: 2 !important;
        justify-content: center !important;
    }

    /* ODD -> dot left */
    .timeline-item:nth-child(odd) .tl-dot {
        left: -35px !important;

    }

    /* text blocks: reset absolute positioning, put into grid columns */
    .tl-above,
    .tl-below {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        opacity: 0;
        transition: opacity .5s ease, transform .5s ease;
        word-wrap: break-word;
        white-space: normal !important;
        margin: 0 !important;
    }

    .timeline-item.tl-visible .tl-above,
    .timeline-item.tl-visible .tl-below {
        opacity: 1;
    }

    /* ODD items (1st, 3rd, 5th...): year LEFT, label RIGHT */
    .timeline-item:nth-child(odd) .tl-above,
    .timeline-item:nth-child(odd) .tl-below {
        transform: translateX(12px);
    }

    .timeline-item:nth-child(odd).tl-visible .tl-above,
    .timeline-item:nth-child(odd).tl-visible .tl-below {
        transform: translateX(0);
    }

    .timeline-item:nth-child(odd) .year-text {
        grid-column: 1;
        text-align: right;
        padding-right: 4px;
    }

    .timeline-item:nth-child(odd) .label-text {
        grid-column: 3;
        text-align: left;
        padding-left: 4px;
    }

    /* EVEN items (2nd, 4th, 6th...): label LEFT, year RIGHT */
    .timeline-item:nth-child(even) .tl-above,
    .timeline-item:nth-child(even) .tl-below {
        transform: translateX(-12px);
    }

    .timeline-item:nth-child(even).tl-visible .tl-above,
    .timeline-item:nth-child(even).tl-visible .tl-below {
        transform: translateX(0);
    }

    .timeline-item:nth-child(even) .label-text {
        grid-column: 1;
        text-align: right;
        padding-right: 4px;
    }

    .timeline-item:nth-child(even) .year-text {
        grid-column: 3;
        text-align: left;
        padding-left: 4px;
    }

    .year-text {
        font-size: 19px !important;
    }

    .label-text {
        font-size: 13px !important;
        line-height: 1.5;
    }
}