/* Pop-up del home: imagen centrada con overlay y boton de cierre */

body.popup-home-abierto {
    overflow: hidden;
}

.popup-home {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.popup-home--visible {
    opacity: 1;
}

.popup-home__caja {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    line-height: 0;
}

.popup-home__imagen {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    object-fit: contain;
    /* El CSS general del sitio deja las imagenes con opacity 0; en el pop-up se fuerza visible */
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
}

.popup-home__cerrar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    font-family: Arial, sans-serif;
    font-size: 28px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.popup-home__cerrar:hover {
    background: #eeeeee;
}

.popup-home__cerrar:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #000000;
}

@media (prefers-reduced-motion: reduce) {
    .popup-home {
        transition: none;
    }
}
