/* Gallery Lightbox – full-screen overlay with close, prev, next */

.gallery-img-clickable,
.gallery-item[data-images] .gallery-img-clickable {
    cursor: pointer !important;
}

/* Full-screen overlay – hidden by default */
.lightbox-overlay#galleryLightbox {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* When active: full-screen flex container */
.lightbox-overlay#galleryLightbox.active {
    display: flex !important;
}

/* Image wrapper – centered, max size */
#galleryLightbox .lightbox-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 90vh;
    z-index: 1;
}

#galleryLightbox .lightbox-image-wrap img,
#galleryLightbox #lightboxImage {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

/* Close button – top right */
#galleryLightbox .lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, opacity 0.2s;
}

#galleryLightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

/* Prev/Next – vertically centered, left/right */
#galleryLightbox .lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, opacity 0.2s;
}

#galleryLightbox .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

#galleryLightbox .lightbox-prev {
    left: 20px;
}

#galleryLightbox .lightbox-next {
    right: 20px;
}

/* Hide prev/next when only one image */
#galleryLightbox .lightbox-nav.hidden {
    display: none !important;
}

/* Counter – bottom center */
#galleryLightbox .lightbox-counter,
#lightboxCounter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 100002;
}

/* Touch-friendly on small screens */
@media (max-width: 768px) {
    #galleryLightbox .lightbox-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 1.75rem;
    }
    #galleryLightbox .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    #galleryLightbox .lightbox-prev {
        left: 12px;
    }
    #galleryLightbox .lightbox-next {
        right: 12px;
    }
}
