.history {
    margin-top: 40px;
}

.history__entry {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 24px;
}

.history__entry:not(:first-child) .history__column {
    padding-top: 16px;
}

.history__column {
    position: relative;
}

.history__column:first-child::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 1px;
    border-left: 1px dashed #d6dbe0;
}

.history__date_desktop {
    position: -webkit-sticky;
    position: sticky;
    top: 4px;
    border-top: 8px solid #fff;
    border-bottom: 8px solid #fff;
    border-radius: 50px;
    padding: 8px 0px;
    background: var(--fon-zelenyy);
    font-weight: 600;
    font-size: var(--fluid-20-16);
    line-height: 120%;
    color: var(--zagolovki);
    text-align: center;
    transition: top 0.25s ease-in;
}

.history__date_mobile {
    margin-bottom: 16px;
    display: inline-block;
    background: var(--belyy);
    border-radius: 50px;
    padding: 4px 8px;
    font-weight: 600;
    font-size: 15px;
    line-height: 130%;
    color: var(--lazurnyy-luch);
}

.history__content {
    border-radius: var(--main-chamfer);
    padding: 32px;
    background: var(--fon-siniy);
}

.history__gallery {
    margin-top: 24px;
    position: relative;
    display: grid;
}

.history__gallery .site-slide-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--fon);
    border-radius: var(--main-chamfer);
    z-index: 2;
    width: 50px;
    height: 50px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.history-gallery {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    gap: 24px;
}

.history-gallery__item {
    -ms-flex: 1;
    flex: 1;
    display: grid;
    border-radius: var(--main-chamfer);
    overflow: hidden;
}

.history-gallery__item a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 767.98px) {
    .history__date_mobile {
        display: none;
    }

    .history__gallery .site-slide-icon {
        display: none;
    }

    .header-is-show .history__date {
        top: 82px;
    }
}

@media (min-width: 1023.98px) {
    .header-is-show .history__date {
        top: 140px;
    }
}

@media (max-width: 1023.98px) {
    .history__content {
        padding: 16px;
    }

    .history-gallery {
        gap: 8px;
    }
}

@media (max-width: 767.98px) {
    .history__entry {
        grid-template-columns: 1fr;
    }

    .history__column:first-child {
        display: none;
    }

    .history__date_desktop {
        display: none;
    }

    .history-gallery {
        display: grid;
        gap: 16px;
        grid-template-columns: 100%;
        grid-auto-flow: column;
        grid-auto-columns: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        margin-right: -15px;
        padding-right: 15px;
        -ms-scroll-snap-type: x mandatory;
        scroll-snap-type: x mandatory;
    }

    .history-gallery__item {
        scroll-snap-align: start;
    }
}