/* ============================================================
   Galeria ośrodka – siatka miniaturek
   ============================================================ */

.raftur-gallery {
    margin-top: 2rem;
}

.raftur-gallery__heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.raftur-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 575px) {
    .raftur-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.raftur-gallery__item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #e9ecef;
}

.raftur-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.raftur-gallery__item:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ============================================================
   Lightbox
   ============================================================ */

.rftlb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.rftlb.is-open {
    opacity: 1;
    visibility: visible;
}

/* Obraz */
.rftlb__img-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rftlb__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.rftlb__img.is-loaded {
    opacity: 1;
}

/* Loader */
.rftlb__loader {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rftlb-spin 0.7s linear infinite;
}

@keyframes rftlb-spin {
    to { transform: rotate(360deg); }
}

/* Przyciski nawigacji */
.rftlb__btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 100001;
    padding: 0;
}

.rftlb__btn:hover,
.rftlb__btn:focus {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

.rftlb__btn--prev { left: 16px; }
.rftlb__btn--next { right: 16px; }

/* Zamknij */
.rftlb__close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 100001;
    padding: 0;
}

.rftlb__close:hover,
.rftlb__close:focus {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

/* Licznik */
.rftlb__counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    z-index: 100001;
    pointer-events: none;
}

@media (max-width: 575px) {
    .rftlb__btn { width: 38px; height: 38px; font-size: 1.1rem; }
    .rftlb__btn--prev { left: 6px; }
    .rftlb__btn--next { right: 6px; }
}
