/* Gallery CSS - Extracted from gallery.js for CSP compliance */

/* Gallery item styling */
.gallery-item {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

/* Navigation buttons are now permanently visible */
#prevButton,
#nextButton {
    opacity: 1;
}

/* Image transition effect */
#modalImage {
    transition: opacity 0.15s ease;
    display: block;
    margin: 0 auto;
}

.image-fade {
    opacity: 0.3;
}

/* Caption styling */
#modalCaption {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    min-height: 1.5rem;
}

/* Masonry layout support */
.gallery-masonry {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 640px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        column-count: 4;
    }
}

.gallery-masonry .gallery-item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* Grid layout support */
.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* CSP-compliant utility classes for JavaScript manipulation */
.gallery-modal-open {
    overflow: hidden !important;
}

.gallery-nav-disabled {
    pointer-events: none !important;
}

.gallery-nav-hidden {
    display: none !important;
}

/* Close button drop shadow for contrast against bright images */
.gallery-close-shadow {
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 0, 0, 0.4);
}