/* Główne opakowanie strony galerii */
.gallery-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px;
}

/* Siatka kafelków */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Tablet: 2 w rzędzie */
@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Duże ekrany: 3 w rzędzie */
@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pojedynczy kafelek */
.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* LIGHTBOX (pełny ekran) */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* ukryty domyślnie */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox__inner {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.gallery-lightbox__inner img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
}

/* Przyciski zamykania i strzałki */
.gallery-lightbox__close,
.gallery-lightbox__arrow {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    z-index: 10000;
}

.gallery-lightbox__close {
    top: 20px;
    right: 30px;
}

.gallery-lightbox__arrow--prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox__arrow--next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Kliknięcie w tło (poza obrazkiem) też może zamykać */
.gallery-lightbox {
    cursor: pointer;
}
.gallery-lightbox__inner,
.gallery-lightbox__inner img {
    cursor: default;
}
