/* ═══════════════════════════════════════════════════════════════
   MODAL DE VIDEO AUTOMÁTICO - FESTIVAL DE LA FAMILIA (OPTIMIZADO)
   ═══════════════════════════════════════════════════════════════ */

.video-modal-auto {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

.video-modal-auto.active {
    display: flex;
}

.modal-video-container {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: auto;
    animation: slideUp 0.4s ease-out;
}

.modal-video-container video {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: contain;
    display: block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    line-height: 1;
    padding: 0;
}

.modal-close-btn:hover {
    transform: scale(1.2) rotate(90deg);
    color: #ff6b6b;
}

.modal-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* Overlay para cerrar al hacer clic fuera */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: -1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(80px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* RESPONSIVE - TABLET */
@media (max-width: 768px) {
    .video-modal-auto {
        padding: 15px;
    }
    
    .modal-video-container {
        max-width: 320px;
    }
    
    .modal-close-btn {
        top: -45px;
        font-size: 40px;
        width: 45px;
        height: 45px;
    }
}

/* RESPONSIVE - MÓVIL */
@media (max-width: 480px) {
    .video-modal-auto {
        padding: 10px;
    }
    
    .modal-video-container {
        max-width: 100%;
        width: 100%;
    }
    
    .modal-close-btn {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .modal-close-btn:hover {
        background: rgba(255, 107, 107, 0.8);
    }
}

/* RESPONSIVE - PANTALLAS MUY PEQUEÑAS */
@media (max-width: 360px) {
    .modal-video-container {
        max-width: 95vw;
    }
    
    .modal-close-btn {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}
