.timeline-horizontal-block {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    gap: 14px;
    align-items: center;
    margin-top: 36px;
}

.timeline-years-wrap {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px 4px 18px;
    scrollbar-width: none;
}

.timeline-years-wrap::-webkit-scrollbar {
    display: none;
}

.timeline-year-btn {
    position: relative;
    flex: 0 0 auto;
    min-width: 110px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    text-align: center;
    transition: transform .25s ease;
}

.timeline-year-btn:hover {
    transform: translateY(-2px);
}

.timeline-year-btn::before {
    content: "";
    position: absolute;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--border);
}

.timeline-year-btn::after {
    content: "";
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 rgba(246,195,22,0);
    transition: .25s ease;
}

.timeline-year-btn.active::after {
    background: var(--accent-strong);
    box-shadow: 0 0 14px rgba(246,195,22,0.40);
}

.timeline-year-number {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--title);
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 96px;
    transition: .25s ease;
}

.timeline-year-btn.active .timeline-year-number {
    background: rgba(246,195,22,0.12);
    border-color: rgba(246,195,22,0.35);
    color: var(--accent-strong);
}

.timeline-nav {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--title);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: .25s ease;
}

.timeline-nav:hover {
    transform: translateY(-2px);
    border-color: rgba(246,195,22,0.35);
}

.timeline-detail-card {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.timeline-detail-text h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    color: var(--title);
}

.timeline-detail-image-wrap {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, white 12%);
}

.timeline-detail-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform .3s ease;
}

.timeline-detail-image:hover {
    transform: scale(1.03);
}

.timeline-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
}

.timeline-modal.active {
    opacity: 1;
    visibility: visible;
}

.timeline-modal-image {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

.timeline-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: .25s ease;
}

.timeline-modal-close:hover {
    background: rgba(255,255,255,0.20);
    transform: scale(1.05);
}

@media (max-width: 980px) {
    .timeline-detail-card {
        grid-template-columns: 1fr;
    }

    .timeline-detail-image {
        height: 220px;
    }
}

@media (max-width: 640px) {
    .timeline-horizontal-block {
        grid-template-columns: 42px 1fr 42px;
        gap: 10px;
    }

    .timeline-nav {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }

    .timeline-year-btn {
        min-width: 120px;
    }

    .timeline-year-btn::before {
        width: 84px;
    }

    .timeline-detail-card {
        padding: 18px;
    }

    .timeline-detail-image {
        height: 200px;
    }
}


