/* ========================================
History (Tarihçe) — horizontal year rail
======================================== */

.history-timeline {
    --history-year-gap: clamp(1.75rem, 4vw, 3rem);
    --history-rail-height: 3.25rem;
    --history-marker-width: 1.75rem;
    --history-marker-height: 0.25rem;
    --history-panel-gap: clamp(1.25rem, 3vw, 2.5rem);

    background-color: var(--color-background);
    color: var(--color-text);
}

.history-timeline__inner {
    display: grid;
    grid-template-rows: var(--history-rail-height) minmax(0, auto);
    row-gap: clamp(1.75rem, 4vw, 3.25rem);
    align-items: start;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-block: clamp(2rem, 6vw, 6.5rem);
    padding-inline: 0;
}

@media (min-width: 1024px) {
    .history-timeline__inner {
        padding-block: 0 clamp(5rem, 8vw, 8rem);
    }
}

/* --------------------------------------
Year rail — active year stays centered;
years scroll horizontally via transform
-------------------------------------- */
.history-timeline__rail {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: var(--history-rail-height);
    min-height: var(--history-rail-height);
}

.history-timeline__track {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 0;
    height: 1px;
    background-color: var(--color-border);
    pointer-events: none;
}

.history-timeline__marker {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    width: var(--history-marker-width);
    height: var(--history-marker-height);
    background-color: var(--color-brand-red);
    transform: translate(-50%, 50%);
    pointer-events: none;
}

.history-timeline__years {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--history-year-gap);
    height: 100%;
    width: max-content;
    padding-block-end: 0.85rem;
    will-change: transform;
}

.history-timeline__year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.35rem 0.15rem;
    border: 0;
    background: transparent;
    color: color-mix(in srgb, var(--color-text) 28%, transparent);
    cursor: pointer;
    transition: color var(--transition-base);
}

.history-timeline__year:hover,
.history-timeline__year:focus-visible {
    color: color-mix(in srgb, var(--color-text) 62%, transparent);
}

.history-timeline__year:focus-visible {
    outline: 2px solid var(--color-brand-red);
    outline-offset: 4px;
}

.history-timeline__year.is-active {
    color: var(--color-text);
}

.history-timeline__year-label {
    display: block;
    font-family: var(--font-manrope);
    font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.history-timeline__year.is-active .history-timeline__year-label {
    font-weight: 700;
}

/* --------------------------------------
Content panels — vertical strip;
active centered, neighbors at 50%
-------------------------------------- */
.history-timeline__panels {
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.history-timeline__panels-track {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--history-panel-gap);
    width: 100%;
    will-change: transform;
}

.history-timeline__panel {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.52s ease,
        visibility 0.52s ease;
}

.history-timeline__panel.is-adjacent {
    opacity: 0.2;
    visibility: visible;
    pointer-events: auto;
    cursor: pointer;
}

.history-timeline__panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    cursor: default;
}

.history-timeline__heading {
    margin: 0;
    font-family: var(--font-manrope);
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0em;
    color: var(--color-text);
}

.history-timeline__description {
    width: 100%;
    margin-block-start: 1rem;
    font-family: var(--font-manrope);
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0em;
    color: var(--color-text-muted);
}

.history-timeline__description p {
    margin: 0;
}

.history-timeline__description p + p {
    margin-block-start: 0.85em;
}

.history-timeline__description strong {
    font-weight: 700;
    color: inherit;
}

.history-timeline__description img {
    display: block;
    width: 100%;
    height: auto;
    margin-block-start: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .history-timeline__year,
    .history-timeline__panel {
        transition: none;
    }
}

@media (min-width: 768px) {
    .history-timeline {
        --history-rail-height: 3.75rem;
    }
}

@media (min-width: 1024px) {
    .history-timeline__inner {
        width: var(--layout-col-10);
        row-gap: clamp(2.5rem, 4vw, 4rem);
        padding-inline: 0;
    }

    .history-timeline__panel {
        width: min(100%, var(--layout-col-8));
    }

    .history-timeline__heading {
        font-size: clamp(2.25rem, 3vw, 3rem);
    }
}
