/* ==========================================
   ESTILOS DEL MODAL
   ========================================== */

/* Capa oscura que cubre toda la pantalla */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Sombra semitransparente */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Cuando se activa (la clase la añade JS) */
.modal-overlay.activo {
    opacity: 1;
    visibility: visible;
}

/* Caja blanca que contiene la imagen */
.modal-contenido {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.activo .modal-contenido {
    transform: scale(1);
}

/* Imagen dentro del modal */
.modal-contenido img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    height: auto;
}

/* Botón de cerrar (X) */
.modal-cerrar {
    position: absolute;
    top: 5px;
    right: 12px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    line-height: 1;
}

.modal-cerrar:hover {
    color: #e74c3c;
}