﻿.box{
    height: 260px;
    overflow: clip;
}

.box img {
    object-fit: scale-down;
}

.box a.gallery-item {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Video poster fills its tile so the play badge sits on a solid image */
.gallery-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-video .gallery-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    transition: background 0.2s ease;
    pointer-events: none;
}

.gallery-video:hover .gallery-play {
    background: rgba(0, 0, 0, 0.75);
}

.gallery-video .gallery-play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}

/* Video lightbox shell */
.gallery-video-popup {
    background: #000;
    max-width: 900px;
    width: auto;
    margin: 20px auto;
    padding: 0;
    position: relative;
}

.gallery-video-popup video {
    display: block;
    width: 100%;
    max-height: 85vh;
}