/* GalleryLightbox — galería + visor a pantalla completa */

.GalleryLightbox {
    margin-left: -15px;
    margin-right: -15px;
}

.GalleryLightbox-item {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #1a1a1a;
    cursor: zoom-in;
    text-decoration: none;
}

.GalleryLightbox-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.GalleryLightbox-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.GalleryLightbox-item:hover img,
.GalleryLightbox-item:focus img {
    transform: scale(1.06);
    filter: brightness(1.05);
}

.GalleryLightbox-item:hover::after,
.GalleryLightbox-item:focus::after {
    opacity: 1;
}

.GalleryLightbox-item:focus {
    outline: 2px solid #ff9933;
    outline-offset: 2px;
}

.GalleryLightbox-dialog {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 4.5rem;
    background: rgba(0, 0, 0, 0.92);
    box-sizing: border-box;
}

.GalleryLightbox-dialog.is-open {
    display: flex;
}

.GalleryLightbox-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.GalleryLightbox-image {
    max-width: min(96vw, 1100px);
    max-height: calc(100vh - 7rem);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.GalleryLightbox-caption {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.GalleryLightbox-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.GalleryLightbox-btn:hover,
.GalleryLightbox-btn:focus {
    background: #ff9933;
    color: #fff;
    outline: none;
}

.GalleryLightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
}

.GalleryLightbox-prev {
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.GalleryLightbox-next {
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

body.GalleryLightbox-locked {
    overflow: hidden;
}

@media (max-width: 767px) {
    .GalleryLightbox-dialog {
        padding: 4rem 0.75rem 1.5rem;
    }

    .GalleryLightbox-prev,
    .GalleryLightbox-next {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .GalleryLightbox-prev {
        left: 1rem;
    }

    .GalleryLightbox-next {
        right: 1rem;
    }

    .GalleryLightbox-image {
        max-height: calc(100vh - 9rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .GalleryLightbox-item img,
    .GalleryLightbox-item::after,
    .GalleryLightbox-btn {
        transition: none;
    }

    .GalleryLightbox-item:hover img,
    .GalleryLightbox-item:focus img {
        transform: none;
    }
}
