.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 200000;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    padding: 20px; 
    overflow-y: auto; 
}

.modal-content {
    background: transparent;
    padding: 20px;
    text-align: center;
    width: 90%; 
    max-width: 1100px;
    position: relative;
    top: 40px;
    border: 0;
    z-index: 2000;
}

.video-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.video-modal-container {
    width: 100%;
    background-image: url("../images/namibia/modal-banner.webp");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9; /* Maintains aspect ratio */
}

/* Close Button Fix */
.closeModal {
    position: absolute;
    top: -20px;
    right: -10px;
    font-size: 18px;
    cursor: pointer;
    background-color: white;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* 🔹 Responsive Adjustments */

@media (max-width: 1225px) {

    .closeModal {
        top: 5px;
        right: 10px;
        height: 25px;
        width: 25px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }

    .video-modal-container {
        background-size: cover; /* Cover entire modal on smaller screens */
    }
}

@media (max-width: 500px) {
    .modal-content {
        width: 100%;
    }

    .video-modal-container {
        background-size: cover;
    }

    .closeModal {
        top: 5px;
        right: 5px;
        height: 25px;
        width: 25px;
        font-size: 16px;
    }
}
