.videos-section {
    padding-top: 30px;
    margin-bottom: 60px;
}

.videos-block,
.videos-block__rail {
    min-width: 0;
}

.videos-block__rail {
    overflow: hidden;
}

.videos-block__swiper {
    overflow: visible;
}

.videos-block__slide {
    height: auto;
}

.videos-block__card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    border: 0;
    border-radius: var(--border-radius, 16px);
    background: #181818;
    color: #fff;
    cursor: pointer;
}

.videos-block__poster,
.videos-block__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.videos-block__poster {
    object-fit: cover;
    transition: transform .35s ease;
}

.videos-block__placeholder {
    background: linear-gradient(145deg, #3d3d45, #141418);
}

.videos-block__card:hover .videos-block__poster {
    transform: scale(1.025);
}

.videos-block__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
    background: rgba(20, 20, 20, .28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
    transform: translate(-50%, -50%);
    backdrop-filter: blur(10px) saturate(140%);
}

.videos-block__play svg {
    width: 27px;
    height: 27px;
    margin-left: 3px;
    fill: currentColor;
}

.videos-viewer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.videos-viewer.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.videos-viewer__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(5, 5, 8, .82);
    cursor: default;
    backdrop-filter: blur(12px);
}

.videos-viewer__frame {
    position: relative;
    z-index: 1;
    width: min(92vw, 520px, 49.5vh);
    max-height: 88vh;
    aspect-ratio: 9 / 16;
}

.videos-viewer__swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--border-radius, 16px);
    background: #000;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .45);
}

.videos-viewer__slide,
.videos-viewer__video {
    width: 100%;
    height: 100%;
}

.videos-viewer__video {
    display: block;
    background: #000;
    object-fit: cover;
}

.videos-viewer__close,
.videos-viewer__prev,
.videos-viewer__next {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px) saturate(140%);
}

.videos-viewer__close:hover,
.videos-viewer__prev:hover,
.videos-viewer__next:hover {
    background: rgba(255, 255, 255, .3);
}

.videos-viewer__close svg,
.videos-viewer__prev svg,
.videos-viewer__next svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.videos-viewer__close {
    position: absolute;
    top: 20px;
    right: 20px;
}

.videos-viewer__prev,
.videos-viewer__next {
    position: absolute;
    right: -64px;
}

.videos-viewer__prev {
    top: calc(50% - 52px);
}

.videos-viewer__next {
    top: calc(50% + 8px);
}

@media (max-width: 700px) {
    .videos-section {
        padding-top: 0px;
    }

    .videos-viewer {
        padding: 0;
    }

    .videos-viewer__frame {
        width: min(100vw, 56.25vh);
        max-height: 100vh;
    }

    .videos-viewer__swiper {
        border-radius: 0;
    }

    .videos-viewer__close {
        top: max(10px, env(safe-area-inset-top));
        right: 10px;
    }

    .videos-viewer__prev,
    .videos-viewer__next {
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .videos-viewer,
    .videos-block__poster {
        transition: none;
    }
}
