.history-page {
    background: #FDF2E1;
    color: #2E0D0D;
    overflow: hidden;
}

.history-page__main {
    display: block;
}

.history-page__main > section {
    position: relative;
}

/* ——— Timeline ——— */
.history-timeline {
    position: relative;
    padding: 100px 0 100px;
    overflow: hidden;
}

.history-timeline__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: calc(var(--content-max-width) + 2 * var(--page-inline));
    margin-inline: auto;
    padding-inline: var(--page-inline);
    box-sizing: border-box;
    min-width: 0;
}

.history-timeline__heading {
    margin: 0;
    max-width: 900px;
    color: #151515;
    font-family: var(--font-family);
    font-size: 29px;
    font-weight: 600;
    line-height: 1.25;
}

.history-timeline__stage {
    position: relative;
    display: grid;
    grid-template-columns: 384px minmax(0, 1fr);
    margin-top: 40px;
    min-width: 0;
    width: 100%;
}

.history-timeline__toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    min-width: 0;
    width: 100%;
    padding-right: 8px;
    box-sizing: border-box;
}

.history-timeline__years {
    position: relative;
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
}

.history-timeline__years .swiper-slide {
    width: auto;
}

.history-timeline__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.history-timeline__year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 111px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #A1A1A1;
    border-radius: 300px;
    background: transparent;
    color: #151515;
    font-family: var(--font-family);
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--ease-ui), border-color var(--ease-ui), color var(--ease-ui);
}

.history-timeline__year.is-active {
    border-color: #AA3036;
    background: #AA3036;
    color: #fff;
}

.history-timeline__year:hover:not(.is-active) {
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.history-timeline__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #A1A1A1;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: border-color var(--ease-ui), background-color var(--ease-ui);
}

.history-timeline__arrow:hover:not(.swiper-button-disabled) {
    border-color: var(--color-brand);
    background: rgba(170, 48, 54, 0.06);
}

.history-timeline__arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.history-timeline__arrow img {
    display: block;
    width: 7px;
    height: 14px;
}

.history-timeline__arrow--next img {
    transform: scaleX(-1);
}

.history-timeline__content {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.history-timeline__content .swiper-wrapper,
.history-timeline__content .swiper-slide {
    min-width: 0;
    max-width: 100%;
}

.history-timeline__content .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

.history-timeline__slide {
    display: grid;
    grid-template-columns: 384px minmax(0, 1fr);
    column-gap: 32px;
    row-gap: 48px;
    align-items: start;
    min-width: 0;
    width: 100%;
}

.history-timeline__copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    padding-top: 0;
}

.history-timeline__title {
    margin: 0;
    color: #151515;
    font-family: var(--third-family);
    font-size: 39px;
    font-weight: 400;
    line-height: 1.15;
    overflow-wrap: break-word;
}

.history-timeline__text {
    max-width: min(837px, 100%);
    margin-top: 24px;
    color: #222;
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.history-timeline__text p,
.history-timeline__text div,
.history-timeline__text li {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.history-timeline__text span {
    white-space: normal;
}

.history-timeline__copy > .history-timeline__text:first-child {
    margin-top: 0;
}

.history-timeline__slide--no-copy .history-timeline__gallery {
    grid-row: 1;
}

.history-timeline__slide--no-copy .history-timeline__text--below {
    grid-column: 1 / -1;
    grid-row: 2;
}

.history-timeline__slide--no-copy.history-timeline__slide--no-gallery .history-timeline__text--below {
    grid-row: 1;
}

.history-timeline__slide--no-gallery .history-timeline__text--below {
    grid-row: 2;
}

.history-timeline__gallery {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 32px;
    min-width: 0;
    max-width: 100%;
}

.history-timeline__img {
    display: block;
    flex-shrink: 1;
    min-width: 0;
    object-fit: cover;
    border-radius: 29px;
    background: rgba(250, 230, 201, 0.5);
}

.history-timeline__img--md {
    width: 384px;
    height: 344px;
}

.history-timeline__img--lg {
    width: 488px;
    height: 344px;
}

.history-timeline__img--sm {
    width: 280px;
    height: 344px;
}

.history-timeline__text--below {
    grid-column: 2;
    grid-row: 3;
    max-width: min(800px, 100%);
    margin-top: 0;
}

/* Content enter animation */
.history-timeline__title,
.history-timeline__copy > .history-timeline__text,
.history-timeline__text--below,
.history-timeline__img {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.history-timeline__content .swiper-slide-active .history-timeline__title,
.history-timeline__content:not(.swiper-initialized) .swiper-slide:first-child .history-timeline__title {
    opacity: 1;
    transform: none;
    transition-delay: 0.08s;
}

.history-timeline__content .swiper-slide-active .history-timeline__copy > .history-timeline__text,
.history-timeline__content:not(.swiper-initialized) .swiper-slide:first-child .history-timeline__copy > .history-timeline__text {
    opacity: 1;
    transform: none;
    transition-delay: 0.16s;
}

.history-timeline__content .swiper-slide-active .history-timeline__img--md,
.history-timeline__content:not(.swiper-initialized) .swiper-slide:first-child .history-timeline__img--md {
    opacity: 1;
    transform: none;
    transition-delay: 0.12s;
}

.history-timeline__content .swiper-slide-active .history-timeline__img--lg,
.history-timeline__content:not(.swiper-initialized) .swiper-slide:first-child .history-timeline__img--lg {
    opacity: 1;
    transform: none;
    transition-delay: 0.2s;
}

.history-timeline__content .swiper-slide-active .history-timeline__img--sm,
.history-timeline__content:not(.swiper-initialized) .swiper-slide:first-child .history-timeline__img--sm {
    opacity: 1;
    transform: none;
    transition-delay: 0.28s;
}

.history-timeline__content .swiper-slide-active .history-timeline__text--below,
.history-timeline__content:not(.swiper-initialized) .swiper-slide:first-child .history-timeline__text--below {
    opacity: 1;
    transform: none;
    transition-delay: 0.34s;
}
