.video-gallery{
    max-width:1200px;
    margin:50px auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:20px;
    padding:0 15px;
}
.video-gallery .thumb{
    position:relative;
    cursor:pointer;
    border-radius:10px;
    overflow:hidden;
    transition:.3s;
}
.video-gallery .thumb:hover{
    transform:scale(1.03);
}
.video-gallery .thumb video{
    width:100%;
    height:500px;
    object-fit:cover;
    display:block;
    border-radius:10px;
    pointer-events:none;
}
.video-gallery .thumb .play-btn{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:70px;
    height:70px;
    background:rgba(0,0,0,.6);
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
}
.video-gallery .thumb .play-btn::before{
    content:"";
    border-style:solid;
    border-width:14px 0 14px 22px;
    border-color:transparent transparent transparent #fff;
    margin-left:5px;
}
.popup-video{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.92);
    display:flex;
    justify-content:center;
    align-items:center;
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:9999;
}
.popup-video.active{
    opacity:1;
    visibility:visible;
}
.popup-video video{
    max-width:90%;
    max-height:90vh;
    border-radius:10px;
    transform:scale(.8);
    transition:.3s;
}
.popup-video.active video{
    transform:scale(1);
}
.popup-video .close{
    position:absolute;
    top:20px;
    right:30px;
    color:#fff;
    font-size:40px;
    cursor:pointer;
    line-height:1;
}

@media (max-width:768px){
    .video-gallery{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
        padding:0 12px;
    }
    .video-gallery .thumb video{
        height:220px;
    }
    .video-gallery .thumb .play-btn{
        width:50px;
        height:50px;
    }
    .video-gallery .thumb .play-btn::before{
        border-width:10px 0 10px 16px;
    }
}

@media (max-width:400px){
    .video-gallery{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
        padding:0 12px;
    }
    .video-gallery .thumb video{
        height:180px;
    }
    .video-gallery .thumb .play-btn{
        width:40px;
        height:40px;
    }
    .video-gallery .thumb .play-btn::before{
        border-width:8px 0 8px 13px;
    }
}