/* ===========================
   VIDEO MODAL COMPONENT
   =========================== */

/* Modal Overlay */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
    box-sizing: border-box;
}

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

/* Modal Container */
.video-modal-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal-overlay.active .video-modal-container {
    transform: scale(1);
}

/* Landscape Video (16:9) */
.video-modal-container.landscape {
    aspect-ratio: 16 / 9;
}

/* Portrait/Reels Video (9:16) */
.video-modal-container.portrait {
    max-width: 400px;
    aspect-ratio: 9 / 16;
}

/* Video Wrapper */
.video-modal-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.video-modal-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Close Button */
.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* Navigation Arrows */
.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.video-nav-prev {
    left: -70px;
}

.video-nav-next {
    right: -70px;
}

.video-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(229, 24, 37, 0.4);
}

.video-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.video-nav-btn i {
    pointer-events: none;
}

/* Video Title in Modal */
.video-modal-title {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Move navigation arrows inside the modal for tablets */
    .video-nav-prev {
        left: 10px;
    }

    .video-nav-next {
        right: 10px;
    }

    .video-nav-btn {
        background: transparent;
        border: none;
        backdrop-filter: none;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .video-modal-overlay {
        padding: 1rem;
    }

    .video-modal-close {
        top: -45px;
        right: 0;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .video-nav-btn {
        background: transparent;
        border: none;
        backdrop-filter: none;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .video-nav-prev {
        left: 5px;
    }

    .video-nav-next {
        right: 5px;
    }

    .video-modal-container.portrait {
        max-width: 90vw;
        max-height: 80vh;
    }

    .video-modal-title {
        bottom: -40px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .video-modal-container.landscape {
        aspect-ratio: 16 / 9;
    }

    .video-modal-container.portrait {
        max-width: 85vw;
    }

    .video-nav-btn {
        background: transparent;
        border: none;
        backdrop-filter: none;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .video-nav-prev {
        left: 3px;
    }

    .video-nav-next {
        right: 3px;
    }
}
