/* ===================================
   VIDEO LIGHTBOX MODAL
   =================================== */

/* Prevent body scrolling when lightbox is open */
body.video-lightbox-open {
    overflow: hidden;
}

/* Main lightbox container */
.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Dark overlay background */
.video-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
    transition: background 0.3s ease;
}

.video-lightbox.active .video-lightbox-overlay {
    background: rgba(0, 0, 0, 0.92);
}

/* Content wrapper */
.video-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10000;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.video-lightbox.active .video-lightbox-content {
    transform: scale(1);
}

/* Video player container */
.video-lightbox-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#vimeo-player-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#vimeo-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video title below player */
.video-lightbox-title {
    margin-top: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Close button */
.video-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.video-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.video-lightbox-close svg {
    width: 20px;
    height: 20px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-lightbox-content {
        width: 95%;
    }
    
    .video-lightbox-close {
        top: -45px;
        right: 5px;
        width: 40px;
        height: 40px;
    }
    
    .video-lightbox-title {
        font-size: 16px;
        margin-top: 16px;
    }
}

@media (max-width: 480px) {
    .video-lightbox-content {
        width: 100%;
    }
    
    .video-lightbox-player {
        border-radius: 0;
    }
    
    .video-lightbox-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.6);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .video-lightbox-title {
        padding: 0 15px;
    }
}

/* Animation for work items */
.work-item.video-lightbox-trigger {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.work-item.video-lightbox-trigger:hover {
    transform: translateY(-4px);
}

.work-item.video-lightbox-trigger:active {
    transform: translateY(-2px);
}
