/* =================================
   Modal Video - Professional Style
   ================================= */

.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrolling on the modal container itself */
    background-color: rgba(10, 10, 10, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    -webkit-transition: opacity 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
}

.modal.is-active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    padding: 0;
    width: 90%;
    max-width: 1100px; /* Increased max-width for a more immersive view */
    background-color: #000; /* Black background for the video */
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    -webkit-transition: -webkit-transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.modal.is-active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px; /* Match parent's border-radius */
}

.modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    background: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    -webkit-transition: -webkit-transform 0.3s ease, color 0.3s ease;
    opacity: 0.8;
    line-height: 1;
}

.modal-close svg {
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* Prevent body scroll when modal is active */
body.modal-open {
    overflow: hidden;
}
