/**
 * Estilos del lightbox (visor de fotos).
 * Overlay oscuro, foto centrada, botones de navegación.
 * Se ve bien en móvil (imagen ocupa hasta 90% de la pantalla).
 */

/* Capa oscura que cubre toda la pantalla */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;            /* por encima de los modales de Bootstrap */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.lightbox-overlay.lightbox-open {
    opacity: 1;
    visibility: visible;
}

/* Foto grande */
.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-select: none;
}

/* Pie de foto */
.lightbox-caption {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 80%;
    text-align: center;
}

/* Botón cerrar (✕) */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 8px;
}
.lightbox-close:hover {
    opacity: 1;
}

/* Botones anterior / siguiente */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 4px;
    opacity: 0.6;
    user-select: none;
    -webkit-user-select: none;
}
.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}
.lightbox-prev {
    left: 10px;
}
.lightbox-next {
    right: 10px;
}

/* En pantallas pequeñas, botones más chicos */
@media (max-width: 576px) {
    .lightbox-nav {
        font-size: 32px;
        padding: 8px 10px;
    }
    .lightbox-img {
        max-width: 95%;
        max-height: 80%;
    }
}
