/* Fullscreen overlay */
.video-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;              /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;          /* Prevents scrolling when popup is open */
}

/* When active */
.video-popup--visible {
    display: flex;
}

/* Popup box */
.video-popup__content {
    position: relative;
    max-width: 900px;          /* Maximum width for larger screens */
    width: 90%;                /* Allow width to adjust dynamically based on screen size */
    height: auto;
    background: transparent;
    display: flex;             /* Center the content */
    justify-content: center;   /* Center horizontally */
    align-items: center;       /* Center vertically */
}

/* Video */
.video-popup__video {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
    border-radius: 6px;
}

/* For screens 768px and above, restrict max height */
@media screen and (min-width: 768px) {
    .video-popup__video {
        max-height: 90vh; /* Set maximum height to 90% of viewport height */
        width: auto;      /* Let width adjust automatically */
    }
}

/* Close button */
.video-popup__close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    font-size: 20px;
    line-height: 32px;
    cursor: pointer;
}
