/* Thumbnail container */
.video-thumb {
    position: relative;
    width: 100%;
    height: 256px;
}

/* Thumbnail image */
.video-thumb img {
    width: 100%;
    height: 256px;
    object-position: center;
}


/* Play button overlay */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-button::after {
    content: '';
    display: block;
    margin-left: 5px;
    width: 0;
    height: 0;
    border-left: 25px solid white;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
}

/* Hover effect */
.video-thumb:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0, 0, 0, 0.75);
}

/* Modal overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Modal content */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    /* bigger video */
}

/* Video iframe */
.modal-content iframe {
    width: 100%;
    height: 620px;
    border-radius: 8px;
}

/* Close button */
.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
    .modal-content iframe {
        height: 420px;
    }
}

@media (max-width: 600px) {
    .modal-content iframe {
        height: 260px;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button::after {
        border-left: 18px solid white;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }
}


@media (min-width: 1024px) {
    .video-thumb {
        position: relative;
        cursor: pointer;
        width: 515px;
        height: 485px;
        overflow: hidden;
    }

    .video-thumb img {
        width: 100%;
        height: 100%;
    }
}