/**
 * Estilos para el Sistema de Popups de Inicio
 */

/* Overlay del popup */
.ibanez-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: auto;
    padding: 20px;
}

.ibanez-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevenir scroll en el body cuando el popup está activo */
body.ibanez-popup-active {
    overflow: hidden;
}

/* Contenedor del popup */
.ibanez-popup-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ibanez-popup-overlay.active .ibanez-popup-container {
    transform: scale(1);
}

/* Botón de cerrar */
.ibanez-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.ibanez-popup-close:hover {
    background: #ff8c00;
    color: #fff;
    transform: scale(1.1);
}

.ibanez-popup-close:focus {
    outline: 2px solid #ff8c00;
    outline-offset: 2px;
}

/* Contenido del popup */
.ibanez-popup-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

/* Imágenes */
.ibanez-popup-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* PDFs */
.ibanez-popup-pdf {
    width: 80vw;
    height: 85vh;
    border: none;
}

/* Contenido HTML */
.ibanez-popup-html-content {
    padding: 30px;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.ibanez-popup-html-content h1,
.ibanez-popup-html-content h2,
.ibanez-popup-html-content h3 {
    margin-top: 0;
    color: #2b2b2b;
}

.ibanez-popup-html-content p {
    line-height: 1.6;
    color: #555;
}

.ibanez-popup-html-content a {
    color: #ff8c00;
    text-decoration: none;
}

.ibanez-popup-html-content a:hover {
    text-decoration: underline;
}

/* Scrollbar personalizado para el contenido HTML */
.ibanez-popup-html-content::-webkit-scrollbar {
    width: 8px;
}

.ibanez-popup-html-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ibanez-popup-html-content::-webkit-scrollbar-thumb {
    background: #ff8c00;
    border-radius: 4px;
}

.ibanez-popup-html-content::-webkit-scrollbar-thumb:hover {
    background: #e67e00;
}

/* Responsive */
@media (max-width: 768px) {
    .ibanez-popup-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .ibanez-popup-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 5px;
        right: 5px;
    }
    
    .ibanez-popup-pdf {
        width: 90vw;
        height: 80vh;
    }
    
    .ibanez-popup-html-content {
        padding: 20px;
    }
    
    .ibanez-popup-image {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .ibanez-popup-overlay {
        padding: 10px;
    }
    
    .ibanez-popup-html-content {
        padding: 15px;
        font-size: 14px;
    }
    
    .ibanez-popup-pdf {
        width: 95vw;
        height: 75vh;
    }
}

/* Animación de transición entre popups */
.ibanez-popup-content {
    transition: opacity 0.2s ease;
}
