.history-timeline {
    margin: 0;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, #005578, #0F2758);
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.history-timeline *,
.history-timeline *::before,
.history-timeline *::after {
    box-sizing: border-box;
}

.history-timeline .timeline-section {
    max-width: 1256px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) 24px;
}

.history-timeline .timeline-section__title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 clamp(28px, 4vw, 48px);
    color: #ffffff;
}

.history-timeline .timeline {
    margin-bottom: clamp(40px, 6vw, 56px);
}

.history-timeline .timeline__row {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
    margin-bottom: clamp(28px, 4vw, 48px);
}

.history-timeline .timeline__years-track {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.history-timeline .timeline__years-track::-webkit-scrollbar {
    display: none;
}

.history-timeline .years {
    display: flex;
    align-items: baseline;
    gap: 47px;
    list-style: none;
    margin: 0;
    padding: 5px 4px; /* Защита от обрезания шрифтов на мобильных */
    width: max-content;
    min-width: 100%;
}

.history-timeline .year {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 0;
    color: #2D6E8F;
    cursor: pointer;
    transition: opacity 0.25s ease;
    white-space: nowrap;
    line-height: 1;
}

.history-timeline .year:hover {
    opacity: 0.75;
}

.history-timeline .year.is-active {
    background: linear-gradient(180deg, #A4F348 0%, #48E9F3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.history-timeline .timeline__nav {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.history-timeline .nav-btn {
    width: 41px;
    height: 41px;
    border-radius: 50%;
    border: 1px solid #A4F348;
    background: transparent;
    color: #A4F348;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.history-timeline .nav-btn:hover {
    background: rgba(164, 243, 72, 0.08);
}

.history-timeline .nav-btn:active {
    transform: scale(0.95);
}

.history-timeline .nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.history-timeline .nav-btn svg {
    width: 40%;
    height: 40%;
}

.history-timeline .progress {
    position: relative;
    height: 2px;
    background: #2D6E8F;
}

.history-timeline .progress__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: #A4F348;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-timeline .progress__dot {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #A4F348;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 6px rgba(164, 243, 72, 0.2);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-timeline .history-swiper {
    width: 100%;
    overflow: hidden;
}

.history-timeline .content {
    display: grid;
    grid-template-columns: 287px 1fr;
    gap: clamp(24px, 5vw, 70px);
    align-items: start;
}

/* ==================================
   CARDS & STATS
   ================================== */
.history-timeline .stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #A4F348;
    border-radius: 5px;
    padding: 32px 24px;
    text-align: center;
    min-height: 203px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.history-timeline .stat-card__number {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #A4F348 0%, #48E9F3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.history-timeline .stat-card__label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    background: linear-gradient(180deg, #A4F348 0%, #48E9F3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0; /* Отступ перенесли в tags для линии */
}

/* ТЕГИ И ЛИНИЯ */
.history-timeline .stat-card__tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;

    /* Линия и отступы */
    width: 100%;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #2D6E8F;
}

.history-timeline .stat-card__tags li {
    color: #3889B3;
    font-size: 15px;
    font-weight: 600;
}

/* ==================================
   PRODUCTS
   ================================== */
.history-timeline .products {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 18px;
}

@supports (-moz-appearance: none) {
    .history-timeline .products {
        scrollbar-width: thin;
        scrollbar-color: #A4F348 transparent;
    }
}

.history-timeline .products::-webkit-scrollbar {
    width: 4px;
}

.history-timeline .products::-webkit-scrollbar-track {
    background-color: transparent;
}

.history-timeline .products::-webkit-scrollbar-thumb {
    background-color: #A4F348;
    border-radius: 2px;
}

.history-timeline .products::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.history-timeline .product {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr;
    gap: clamp(16px, 3vw, 32px);
    padding: 14px 0;
    align-items: center;
}

.history-timeline .product__name {
    color: #A4F348; /* Оставил сплошной цвет, убрал background-clip */
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0;
}

.history-timeline .product__desc {
    color: #FFF; /* Белый цвет */
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
}

/* ==================================
   TABLET (до 1023px)
   ================================== */
@media (max-width: 1023px) {
    .history-timeline .timeline-section__title { font-size: 24px; }
    .history-timeline .year { font-size: 40px; }
    .history-timeline .stat-card__number { font-size: 36px; }
    .history-timeline .stat-card__label { font-size: 14px; }
    .history-timeline .product__name { font-size: 16px; }
    .history-timeline .product__desc { font-size: 16px; }
    .history-timeline .years { gap: 34px; }

    .history-timeline .content { grid-template-columns: 1fr; }

    .history-timeline .stat-card {
        order: 2;
        min-height: 147px;
        padding: 24px 20px;
    }

    .history-timeline .products {
        order: 1;
        max-height: 300px;
        overflow-y: auto;
        padding-right: 12px;
    }

    /* Теги выстраиваются в ряд с центрированием */
    .history-timeline .stat-card__tags {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 20px;
        margin-top: 16px;
        padding-top: 16px;
    }

    .history-timeline .product { padding: 10px 0; }
}

/* ==================================
   MOBILE (до 480px)
   ================================== */
@media (max-width: 480px) {
    .history-timeline .timeline-section {
        padding: clamp(48px, 8vw, 96px) 10px;
        max-width: 1228px;
    }
    .history-timeline .timeline-section__title { font-size: 20px; }
    .history-timeline .year { font-size: 24px; }
    .history-timeline .stat-card__number { font-size: 24px; }
    .history-timeline .stat-card__label { font-size: 12px; }
    .history-timeline .stat-card__tags li { font-size: 13px; }
    .history-timeline .product__name { font-size: 15px; }
    .history-timeline .product__desc { font-size: 15px; }
    .history-timeline .years { gap: 20px; }

    .history-timeline .timeline__nav { display: none; }

    /* Перестраиваем карточку: выравнивание по левому краю, цифра и текст в один ряд */
    .history-timeline .stat-card {
        min-height: 94px;
        padding: 16px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
    }

    .history-timeline .stat-card__number {
        margin-bottom: 0;
        margin-right: 12px; /* Расстояние между цифрой 117 и "НАБОРОВ" */
    }

    .history-timeline .stat-card__label {
        margin-bottom: 0;
    }

    /* Теги выравниваем по левому краю под линией */
    .history-timeline .stat-card__tags {
        justify-content: flex-start;
        text-align: left;
        margin-top: 12px;
        padding-top: 12px;
    }

    .history-timeline .product {
        grid-template-columns: minmax(100px, 130px) 1fr;
        gap: 12px;
    }
}

@media (max-width: 360px) {
    .history-timeline .product {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
