/* Video Popup Overlay Background */
.video-overlay {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.94);
    display: none; /* Controlled by JS flex/none */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Active State for Overlay */
.video-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Container */
.video-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-overlay.active .video-content {
    transform: scale(1);
}

/* Close Button (X Icon) */
.close-btn {
    position: absolute;
    top: -55px;
    right: 0;
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ff4d4d;
}

/* Responsive Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Center Big Play Button Overlay */
.big-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(204, 0, 0, 0.7); /* Red transparent background */
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.big-play-button:hover {
    background: rgba(204, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.big-play-button svg {
    width: 40px;
    height: 40px;
    fill: #fff;
    margin-left: 5px; /* Offset to visually center the triangle */
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .video-content {
        width: 95%;
    }
    
    .close-btn {
        top: -65px;
        right: 5px;
        font-size: 60px;
    }

    .big-play-button {
        width: 60px;
        height: 60px;
    }
}