/* ============================================================
   ESTILOS PREMIUM PARA LA VENTANA EMERGENTE (POPUP AD/CONFERENCIA)
   ============================================================ */

/* Superposición desenfocada (Overlay) */
.overlay {
    display: none; /* Se activa con JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 19, 86, 0.65); /* Fondo azul marino profundo semitransparente */
    backdrop-filter: blur(8px); /* Efecto glassmorphic */
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* Contenedor del Popup */
.popup {
    display: none; /* Se activa con JS */
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    background-color: #ffffff;
    border-radius: 20px; /* Bordes muy suaves */
    box-shadow: 0 25px 50px -12px rgba(15, 19, 86, 0.4); /* Sombra difuminada moderna */
    z-index: 10000;
    max-width: 520px; /* Ancho idóneo para flyers */
    width: 90%;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

/* Clase activa inyectada por JS para activar animación */
.popup.active {
    display: block !important;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Contenido de la Imagen */
.popup-image-container {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.popup img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.popup:hover img {
    transform: scale(1.02); /* Sutil zoom de interactividad */
}

/* Botón de Cierre (X) Moderno */
#closePopup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 19, 86, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.25s ease !important;
}

#closePopup:hover {
    background: #dc3545 !important; /* Rojo vibrante al pasar el mouse */
    color: #ffffff !important;
    transform: scale(1.1) rotate(90deg);
    border-color: #dc3545 !important;
}

/* Barra de Acción de WhatsApp inferior */
.popup-action-bar {
    background-color: #f8fafc;
    border-top: 1px solid rgba(197, 168, 128, 0.2);
    padding: 16px 20px;
    text-align: center;
}

.popup-btn-whatsapp {
    background-color: #25d366 !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
    border-radius: 30px !important;
    padding: 12px 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3) !important;
    width: 100%;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
}

.popup-btn-whatsapp:hover {
    background-color: #128c7e !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 140, 126, 0.4) !important;
}