/* ─────────────────────────────────────────────────
   TCM Timeline Scroll — v1.0.0
   ───────────────────────────────────────────────── */

.tcm-timeline-outer {
    position: relative;
    width: 100%;
    min-height: 75vh; /* fallback before JS measures */
}

/* Sticky viewport container ─────────────────────── */
.tcm-timeline-sticky {
    position: sticky;
    top: 12.5vh; /* visual fallback before JS runs; JS sets exact px via inline style */
    height: 75vh; /* overridden per-instance by Elementor selector */
    overflow: hidden;
    width: 100%;
}

/* Background image ──────────────────────────────── */
.tcm-timeline-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tcm-timeline-overlay {
    position: absolute;
    inset: 0;
}

/* Inner layout ──────────────────────────────────── */
.tcm-timeline-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 60px;
    gap: 80px;
}

/* Left panel ────────────────────────────────────── */
.tcm-timeline-left {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 60px 0;
    box-sizing: border-box;
}

.tcm-tl-heading {
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.25rem;
}

.tcm-tl-subheading {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.7;
    margin: 0;
}

/* Right panel ───────────────────────────────────── */
.tcm-timeline-right {
    flex: 1 1 0;
    height: 100%; /* inherits sticky container height */
    overflow: hidden;
    padding: 80px 0;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
}

.tcm-timeline-track {
    position: relative; /* makes it offsetParent for cards */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    will-change: transform;
}

.tcm-timeline-track.is-snap {
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cards ─────────────────────────────────────────── */
.tcm-timeline-card {
    background-color: #252177; /* overridden per-card by inline style */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    padding: 36px 44px;
    flex-shrink: 0;
}

.tcm-card-year {
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 18px;
}

.tcm-card-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    margin: 0;
}

/* ─── Mobile: stack, disable effect ─────────────── */
@media (max-width: 767px) {
    .tcm-timeline-outer {
        height: auto !important;
    }

    .tcm-timeline-sticky {
        position: relative;
        top: 0;
        height: auto;
        overflow: visible;
    }

    .tcm-timeline-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 24px;
        gap: 40px;
    }

    .tcm-timeline-left {
        flex: none;
        max-width: 100%;
    }

    .tcm-timeline-right {
        height: auto;
        overflow: visible;
        padding: 0 0 60px;
        width: 100%;
    }

    .tcm-timeline-track {
        transform: none !important;
        transition: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .tcm-timeline-inner {
        padding: 0 32px;
        gap: 40px;
    }

    .tcm-timeline-left {
        flex: 0 0 40%;
        max-width: 40%;
    }
}
