.cms-gallery-slider {
    overflow: visible;
}

.cms-gallery-slider .cms-gallery-track,
.cms-gallery-slider .cms-gallery-slide {
    display: block;
    height: auto;
}

.main .content .cms-gallery-slider .cms-gallery-slide img {
    margin: 20px auto;
}

.main .content .cms-gallery-slider .cms-gallery-slide:last-child img {
    margin: 0 auto;
}

.cms-gallery-navigation,
.cms-gallery-pagination {
    display: none;
}

@media screen and (max-width: 760px) {
    .main .content .cms-gallery-slider.cms-gallery-ready {
        position: relative;
        width: 100vw;
        margin-left: calc(50% - 50vw);
        overflow: hidden;
        background: #111118;
        line-height: normal;
        touch-action: pan-y;
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-track {
        display: flex;
        height: auto;
        transition: transform 320ms ease;
        will-change: transform;
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-slide {
        box-sizing: border-box;
        display: flex;
        flex: 0 0 100%;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: min(68svh, 680px);
        min-height: 420px;
        padding: 12px;
    }

    .main .content .cms-gallery-slider.cms-gallery-ready img {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 100%;
        margin: 0 auto !important;
        object-fit: contain;
        background: transparent;
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-navigation {
        position: absolute;
        z-index: 10;
        top: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        transform: translateY(-50%);
        border: 0;
        border-radius: 50%;
        background: rgba(10, 10, 14, .62);
        color: #fff;
        cursor: pointer;
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-navigation svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
    }

    .cms-gallery-previous {
        left: max(10px, env(safe-area-inset-left));
    }

    .cms-gallery-next {
        right: max(10px, env(safe-area-inset-right));
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-navigation.cms-gallery-disabled {
        opacity: .25;
        pointer-events: none;
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-navigation:focus-visible {
        outline: 2px solid #ffbf00;
        outline-offset: 2px;
    }

    .cms-gallery-slider.cms-gallery-ready .cms-gallery-pagination {
        position: absolute;
        z-index: 10;
        right: auto;
        bottom: 12px;
        left: 50%;
        display: block;
        width: auto;
        padding: 3px 9px;
        transform: translateX(-50%);
        border-radius: 3px;
        background: rgba(10, 10, 14, .7);
        color: rgba(255, 255, 255, .92);
        font-size: 13px;
        line-height: 22px;
    }
}

@media screen and (max-width: 420px) and (max-height: 700px) {
    .cms-gallery-slider.cms-gallery-ready .cms-gallery-slide {
        height: 60svh;
        min-height: 340px;
    }
}
