/* ===========================
   TIMELINE — Knight Lab style
   =========================== */

.tl-section {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.tl-section-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.tl-section-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* Wrapper */
.tl-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

/* ---- SLIDE PANEL (top) ---- */
.tl-slide-panel {
    display: flex;
    align-items: center;
    min-height: 260px;
    position: relative;
    background: var(--gray-900);
    color: var(--white);
}

/* Nav arrows */
.tl-nav-arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin: 0 1rem;
    z-index: 2;
}

.tl-nav-arrow:hover {
    background: var(--red-600);
    transform: scale(1.1);
}

.tl-nav-arrow:active {
    transform: scale(0.95);
}

.tl-nav-arrow:disabled {
    opacity: 0.25;
    cursor: default;
    background: transparent;
    transform: none;
}

/* Slide content */
.tl-slide {
    flex: 1;
    padding: 2rem 1rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.tl-slide-date {
    font-family: var(--font-title);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--red-400);
    margin-bottom: 0.5rem;
}

.tl-slide-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.tl-slide-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--gray-300);
}

.tl-slide-counter {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-title);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.05em;
}

/* ---- TRACK (bottom) ---- */
.tl-track-container {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--red-400) var(--gray-200);
}

.tl-track-container:active {
    cursor: grabbing;
}

.tl-track-container::-webkit-scrollbar {
    height: 6px;
}

.tl-track-container::-webkit-scrollbar-track {
    background: var(--gray-200);
}

.tl-track-container::-webkit-scrollbar-thumb {
    background: var(--red-400);
    border-radius: 3px;
}

.tl-track {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 0 3rem;
    min-width: max-content;
    height: 130px;
}

.tl-track-line {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-300);
    z-index: 0;
}

/* Station */
.tl-station {
    position: relative;
    flex-shrink: 0;
    width: 130px;
    padding-top: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.15s;
}

.tl-station:hover {
    transform: translateY(-2px);
}

/* Station dot */
.tl-station-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gray-400);
    margin: 0 auto;
    position: relative;
    z-index: 2;
    transition: all 0.25s;
}

.tl-station--alert .tl-station-dot {
    border-color: var(--red-600);
}

/* Active station */
.tl-station--active .tl-station-dot {
    width: 22px;
    height: 22px;
    background: var(--red-600);
    border-color: var(--red-600);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.2), 0 0 0 10px rgba(239, 68, 68, 0.08);
}

.tl-station--active .tl-station-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Station label */
.tl-station-date {
    font-family: var(--font-title);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gray-500);
    margin-top: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.tl-station--active .tl-station-date {
    color: var(--red-600);
    font-size: 0.65rem;
}

.tl-station-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--gray-600, #4B5563);
    margin-top: 3px;
    line-height: 1.3;
    max-width: 120px;
    margin-left: auto;
    margin-right: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tl-station--active .tl-station-label {
    color: var(--gray-700);
}

/* Year markers on track */
.tl-year-marker {
    position: absolute;
    top: 0;
    font-family: var(--font-title);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--gray-300);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .tl-slide-panel {
        min-height: 220px;
        flex-direction: row;
    }

    .tl-nav-arrow {
        width: 36px;
        height: 36px;
        margin: 0 0.5rem;
    }

    .tl-slide {
        padding: 1.5rem 0.5rem;
    }

    .tl-slide-title {
        font-size: 1rem;
    }

    .tl-slide-text {
        font-size: 0.82rem;
    }

    .tl-station {
        width: 100px;
    }

    .tl-track {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .tl-slide-panel {
        min-height: 200px;
    }

    .tl-nav-arrow {
        width: 32px;
        height: 32px;
        margin: 0 0.25rem;
    }

    .tl-nav-arrow svg {
        width: 18px;
        height: 18px;
    }

    .tl-slide-title {
        font-size: 0.9rem;
    }

    .tl-slide-text {
        font-size: 0.78rem;
    }

    .tl-station {
        width: 85px;
    }

    .tl-track {
        height: 110px;
    }

    .impact-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .tl-section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
