.gallery-grid,
.gallery-preview {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-preview__item,
.gallery-item {
    align-items: center;
    background: var(--color-soft);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    min-height: 160px;
}

@media (max-width: 840px) {
    .gallery-grid,
    .gallery-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .gallery-grid,
    .gallery-preview {
        grid-template-columns: 1fr;
    }
}

/* W6 «Eindrücke»: 16:9-Loop über den beiden Karten */
.gallery-loop {
    margin: 0 auto clamp(28px, 5vw, 48px);
    max-width: 1040px;
}

/* ── Fotogalerien 2026/2025 (von sens7.ch) und Lightbox ── */
.photo-gallery + .photo-gallery {
    padding-top: 0;
}

.photo-grid {
    columns: 4 220px;
    column-gap: 12px;
    list-style: none;
    margin: clamp(24px, 3vw, 36px) 0 0;
    padding: 0;
}

.photo-grid__item {
    break-inside: avoid;
    margin: 0 0 12px;
}

.photo-grid__link {
    border-radius: 10px;
    display: block;
    overflow: hidden;
}

.photo-grid__link img {
    display: block;
    height: auto;
    transition: transform 0.4s;
    width: 100%;
}

.photo-grid__link:hover img,
.photo-grid__link:focus-visible img {
    transform: scale(1.03);
}

.photo-gallery__more {
    margin-top: 8px;
}

.photo-gallery__more > summary {
    cursor: pointer;
    display: inline-flex;
    list-style: none;
}

.photo-gallery__more > summary::-webkit-details-marker {
    display: none;
}

.photo-gallery__more[open] > .photo-grid {
    margin-top: 20px;
}

.gallery-join {
    max-width: 760px;
}

.lightbox {
    background: transparent;
    border: 0;
    height: 100vh;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: 0;
    width: 100vw;
}

.lightbox::backdrop {
    background: rgba(12, 12, 18, 0.94);
}

.lightbox__figure {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    margin: 0;
    padding: 56px 72px 24px;
}

.lightbox__img {
    border-radius: 8px;
    max-height: calc(100vh - 120px);
    max-width: 100%;
    object-fit: contain;
}

.lightbox__caption {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    margin-top: 12px;
}

.lightbox__btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    height: 48px;
    justify-content: center;
    position: fixed;
    width: 48px;
}

.lightbox__btn:hover,
.lightbox__btn:focus-visible {
    background: var(--color-lime);
    color: var(--color-ink);
}

.lightbox__btn svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    width: 22px;
}

.lightbox__btn--prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__btn--close {
    right: 14px;
    top: 14px;
}

@media (max-width: 620px) {
    .photo-grid {
        columns: 2;
        column-gap: 8px;
    }

    .photo-grid__item {
        margin-bottom: 8px;
    }

    .lightbox__figure {
        padding: 64px 10px 80px;
    }

    .lightbox__btn--prev,
    .lightbox__btn--next {
        bottom: 18px;
        top: auto;
        transform: none;
    }

    .lightbox__btn--prev {
        left: calc(50% - 60px);
    }

    .lightbox__btn--next {
        right: calc(50% - 60px);
    }
}
