.gallery.page {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.gallery.page .video-item .gallery-btn-x{
    position: absolute;
    top: 7%;
    right: 0%;
    width: 2rem;
    height: 2rem;
    opacity: 0;
}

.gallery.page .video-item.expanded .gallery-btn-x{
    opacity: 1;
}

.gallery.page .video-item .gallery-btn-prev{
    position: absolute;
    top: 48%;
    left: 0%;
    width: 2rem;
    height: 2rem;
    opacity: 0;
}

.gallery.page .video-item.expanded .gallery-btn-prev{
    opacity: 1;
}

.gallery.page .video-item .gallery-btn-next{
    position: absolute;
    top: 48%;
    right: 0%;
    width: 2rem;
    height: 2rem;
    opacity: 0;
}

.gallery.page .video-item.expanded .gallery-btn-next{
    opacity: 1;
}

.gallery.page .video-item {
    display: flex;
    width: 16.31rem;
    height: 12.875rem;
    border-radius: 0.312rem;
    filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.3));
    object-fit: cover;
    margin-right: 1.875rem;
    margin-bottom: 1.25rem;
    position: relative;
    margin-top: 0.625rem;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.7);
}

.gallery.page video {
    width: auto;
    height: 100%;
    object-fit: cover;
    border-radius: 0.312rem;
    max-width: 100%;
    min-width: 8rem;
}

.gallery.page .video-clickable{
    cursor: pointer;
}

.gallery.page .video-item img{
    width: auto;
    height: 100%;
    object-fit: cover;
    border-radius: 0.312rem;
    max-width: 100%;
    min-width: 8rem;
}

.gallery.page .video-item.expanded {
    width: 100%;
    height: 100%;
    position: fixed;
    top: -0.6rem;
    left: 0;
    padding: 6%;
    z-index: 9999;
}

.gallery.page .video-item::after{
    display: block;
    position: absolute;
    content: "";
    left: 50%;
    top: 50%;
    margin: -1.71rem 0 0 -2.187rem;
    max-width: inherit;
    width: 4.375rem;
    height: 3.43rem;
    background: url(../img/search_img.png) 0 0/ 100% auto no-repeat;
    pointer-events: none;
    opacity: 0;
}

.gallery.page .video-item:hover::after{
    opacity: 1;
}

.gallery.page .video-item.expanded:hover::after{
    opacity: 0;
}

@media screen and (max-width: 991px) {
    .gallery.page{
        justify-content: center;
    }
    .gallery.page .video-item {
        width: 20.25rem;
        height: 15.97488rem;
        margin-right: 0;
        margin-bottom: 1.53rem;
        margin-top: 0;
    }

    .gallery.page .video-item img{
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 0.312rem;
        max-width: 100%;
        min-width: 8rem;
    }
    
    .gallery.page video {
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 0.312rem;
        max-width: 100%;
        min-width: 8rem;
    
    }

    .gallery.page .video-item::after{
        display: none;
    }

    

}