/* ===================================
   Video Modal
   =================================== */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.video-modal[hidden] {
    display: none;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
}

.video-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    animation: fadeInUp 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close button — top-right corner of the video, shown on hover */
.video-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background var(--transition-fast), transform var(--transition-fast);
}

.video-modal-content:hover .video-modal-close {
    opacity: 1;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.08);
}

/* Header is now just a visually hidden title holder — no bar */
.video-modal-header {
    display: none;
}

/* Video — fills content width at 16:9 */
.video-modal-player {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}

.video-modal-player video {
    width: 100%;
    height: 100%;
    display: block;
}

/* Title below the video */
.video-modal-title {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 14px;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile */
@media (max-width: 640px) {
    .video-modal {
        padding: var(--spacing-sm);
        align-items: center;
    }

    .video-modal-content {
        max-width: 100%;
    }

    .video-modal-close {
        top: 10px;
        right: 10px;
        opacity: 1;
    }

    .video-modal-player {
        border-radius: 8px;
    }

    .video-modal-title {
        padding: 10px 16px 14px;
        margin-top: 0;
        background: #111;
        border-radius: 0;
        white-space: normal;
        font-size: 0.9375rem;
    }
}
