.hoin-home-video-gallery .hoin-video-gallery {
    min-width: 0;
}

.hoin-video-gallery__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-block-end: 18px;
}

.hoin-video-gallery__header h2 {
    margin: 0;
}

.hoin-video-gallery__nav {
    display: flex;
    gap: 8px;
}

.hoin-video-gallery__row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 48px) / 4);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.hoin-video-gallery__row::-webkit-scrollbar {
    display: none;
}

.hoin-video-gallery a.hoin-video-gallery__card {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    background: #14283f;
    color: #fff;
    scroll-snap-align: start;
}

.hoin-video-gallery__card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hoin-video-gallery__play {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding-left: 3px;
    border: 1px solid #ffffffaa;
    border-radius: 50%;
    background: #112337d9;
    color: #fff;
    font-size: 18px;
}

.hoin-video-gallery__card:hover .hoin-video-gallery__play {
    background: #064790;
}

.hoin-video-gallery__card:focus-visible {
    outline: 2px solid #064790;
    outline-offset: -4px;
}

.hoin-video-gallery__nav button,
.hoin-video-gallery__dialog button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #0c3564;
    color: #fff;
    font: 500 24px/1 system-ui, sans-serif;
}

.hoin-video-gallery__nav button:disabled,
.hoin-video-gallery__dialog button:disabled {
    opacity: .42;
    cursor: default;
}

.hoin-video-gallery__dialog {
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    margin: auto;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: #101e2d;
    color: #fff;
}

.hoin-video-gallery__dialog::backdrop {
    background: #0b1423d9;
}

.hoin-video-gallery__dialog .hoin-video-gallery__nav {
    justify-content: space-between;
}

.hoin-video-gallery__player {
    width: min(760px, calc((100dvh - 96px) * var(--hoin-video-ratio, .5625)), calc(100vw - 44px));
    aspect-ratio: var(--hoin-video-ratio, .5625);
    margin-block-start: 8px;
}

.hoin-video-gallery__player video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
    object-fit: contain;
}

@media (max-width: 1000px) {
    .hoin-video-gallery__row {
        grid-auto-columns: calc((100% - 32px) / 3);
    }
}

@media (max-width: 640px) {
    .hoin-video-gallery__row {
        grid-auto-columns: 44%;
        gap: 10px;
    }
}
