.history-timeline {
    --history-orange: #ed7b00;
    --history-ink: #313131;
    color: var(--history-ink);
    padding: clamp(2rem, 5vw, 5rem) 0;
}

.history-timeline__intro { max-width: 850px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.history-timeline__intro h2 { margin-bottom: 1rem; }
.history-timeline__intro-text p:last-child,
.history-timeline__description p:last-child { margin-bottom: 0; }

.history-timeline__navigation { position: relative; }

.history-timeline__scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    cursor: grab;
    user-select: none;
}
.history-timeline__scroll::-webkit-scrollbar { display: none; }
.history-timeline__scroll.is-dragging { cursor: grabbing; }

.history-timeline__next {
    position: absolute;
    z-index: 3;
    top: calc(3.75rem + 8px - 22px);
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--history-orange);
    color: white;
    box-shadow: 0 5px 15px rgba(49, 49, 49, .18);
    cursor: pointer;
}
.history-timeline__next svg { width: 23px; height: 23px; }
.history-timeline__next:hover:not(:disabled) { background: #cf6900; }
.history-timeline__next:focus-visible { outline: 2px solid var(--history-ink); outline-offset: 3px; }
.history-timeline__next:disabled { box-shadow: none; cursor: default; }

.history-timeline__track {
    display: flex;
    position: relative;
    width: max-content;
    min-width: 100%;
    padding: 0 0 1.75rem;
}

.history-timeline__tab {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 clamp(155px, 15vw, 190px);
    flex-direction: column;
    align-items: center;
    gap: .65rem;
    border: 0;
    background: transparent;
    color: var(--history-ink);
    font: inherit;
    cursor: pointer;
    padding: .65rem 1rem 0;
    text-align: center;
}

.history-timeline__tab::before {
    content: '';
    position: absolute;
    z-index: 0;
    left: 0;
    width: calc(100% + 1px);
    top: calc(3.75rem + 6.5px);
    height: 3px;
    background: var(--history-orange);
}
.history-timeline__tab > span { position: relative; z-index: 1; }

.history-timeline__tab:hover,
.history-timeline__tab:focus-visible,
.history-timeline__tab.is-active { color: var(--history-orange); }
.history-timeline__tab:focus-visible { outline: 2px solid var(--history-orange); outline-offset: -2px; border-radius: 8px; }
.history-timeline__year { min-height: 2.45rem; font-size: clamp(1rem, 1.4vw, 1.3rem); font-weight: 700; white-space: nowrap; }
.history-timeline__dot {
    display: block;
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border-radius: 50%;
    border: 3px solid var(--history-orange);
    background: #fffbf8;
    box-shadow: 0 0 0 4px #fffbf8;
    transition: transform .2s ease, background-color .2s ease;
}
.history-timeline__tab.is-active .history-timeline__dot { background: var(--history-orange); transform: scale(1.3); }

.history-timeline__panels { padding-top: clamp(1.5rem, 4vw, 3rem); }
.history-timeline__panel:not(.is-active) { display: none; }
.history-timeline__panel { animation: history-appear .25s ease-out; }
.history-timeline__category { margin: 0 0 .6rem; color: var(--history-orange); font-weight: 700; }
.history-timeline__panel h3 { margin-bottom: 1rem; max-width: 900px; }
.history-timeline__description { max-width: 850px; }
.history-timeline__gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); margin-top: 1.75rem; }
.history-timeline__image-link { display: block; overflow: hidden; border-radius: 14px; box-shadow: 0 10px 28px rgba(39, 30, 71, .19); }
.history-timeline__image-link img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.history-timeline__image-link:hover img { transform: scale(1.035); }
.history-timeline__image-link:focus-visible { outline: 3px solid var(--history-orange); outline-offset: 3px; }

@keyframes history-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .history-timeline__panel { animation: none; } .history-timeline__dot, .history-timeline__image-link img { transition: none; } }
