/* =========================================================
   timeline — «История компании».
   Группы: оранжевый заголовок по левому краю колонки событий;
   строки «год — линия с точками — событие».
   Прогресс линии (закрашивание при скролле) — JS: assets/js/scripts.js
   (CSS-переменная --tl-progress).
   Опция фона: `timeline-section--gray`.
   ========================================================= */

.timeline-section {
    padding: var(--section-pad) 0;
}

.timeline-section--gray {
    background-color: var(--color-bg-gray);
}

.timeline-header {
    margin-bottom: 80px;
}

.timeline-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(34px, 3.6vw, 48px);
    line-height: 1;
    color: var(--color-bg-dark);
}

.timeline-subtitle {
    margin-top: 8px;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.3;
    color: var(--color-text-gray);
}

.timeline-groups {
    display: flex;
    flex-direction: column;
    gap: 90px;
}

.timeline-group-title {
    padding-left: 278px;
    margin-bottom: 36px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: clamp(17px, 1.7vw, 23px);
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    color: var(--color-accent-orange);
}

.timeline-list {
    position: relative;
}

/* Серая линия (124px от года, 64px до текста; центр на 215px) */
.timeline-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 214px;
    width: 2px;
    background-color: rgba(31, 31, 31, 0.15);
}

/* Оранжевая заливка (высота — из JS) */
.timeline-list::after {
    content: "";
    position: absolute;
    top: 0;
    left: 214px;
    width: 2px;
    height: var(--tl-progress, 0%);
    background-color: var(--color-accent-orange);
    transition: height 0.2s linear;
}

.timeline-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    column-gap: 188px;
    align-items: start;
    padding: 30px 0;
}

.timeline-year {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(28px, 3.2vw, 43px);
    line-height: 1.1;
    text-align: left;
    color: var(--color-text-gray);
    transition: color 0.25s ease;
}

.timeline-item.is-passed .timeline-year {
    color: var(--color-accent-orange);
}

.timeline-event {
    position: relative;
    padding-left: 0;
    font-size: clamp(16px, 1.6vw, 21px);
    line-height: 1.45;
    color: var(--color-bg-dark);
}

/* Точка: центр ровно на линии (215px) и на середине первой строки текста */
.timeline-event::after {
    content: "";
    position: absolute;
    left: -63px;
    top: calc(0.725em - 5.5px);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: rgba(31, 31, 31, 0.2);
    transform: translateX(-50%);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item.is-passed .timeline-event::after {
    background-color: var(--color-accent-orange);
}

.timeline-item.is-current .timeline-event::after {
    box-shadow: 0 0 0 6px rgba(235, 97, 61, 0.18);
}

@media (max-width: 900px) {
    .timeline-list::before,
    .timeline-list::after {
        display: none;
    }

    .timeline-group-title {
        padding-left: 0;
        text-align: center;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .timeline-year {
        text-align: left;
    }

    .timeline-event {
        padding-left: 0;
    }

    .timeline-event::after {
        display: none;
    }
}
