/* ============================================================
   Lightbox — añadir al final de gallery.css o en su propio archivo.
   ============================================================ */

.lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lb-overlay.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 18, 28, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Imagen */
.lb-img-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}
.lb-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-sm);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    transition: opacity 0.25s ease;
}
.lb-img.is-loading { opacity: 0; }

/* Caption */
.lb-caption {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--text-sm);
    font-family: var(--font-display);
    font-style: italic;
    text-align: center;
    max-width: 600px;
}

/* Contador */
.lb-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    letter-spacing: 1.5px;
    z-index: 2;
}

/* Cerrar */
.lb-close {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.lb-close:hover { background: rgba(255, 255, 255, 0.18); }

/* Flechas */
.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.lb-arrow:hover {
    background: var(--color-turquoise);
    border-color: var(--color-turquoise);
    color: var(--color-ocean-deep);
}
.lb-arrow--prev { left: 20px; }
.lb-arrow--next { right: 20px; }

@media (max-width: 600px) {
    .lb-arrow { display: none; }
    .lb-img   { max-height: 75vh; }
}