/* Lichtblau Werbetechnik - globale Galerie-Lightbox V6.19.1 */
.gallery-lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.gallery-lightbox-trigger img {
    transition: transform .25s ease;
}

.gallery-lightbox-trigger:hover img {
    transform: scale(1.02);
}

.gallery-lightbox-trigger:focus-visible {
    outline: .2rem solid var(--color-brand-red, #a22948);
    outline-offset: -.2rem;
}

.gallery-lightbox {
    width: min(96vw, 96rem);
    max-width: none;
    max-height: 96dvh;
    margin: auto;
    border: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    color: white;
}

.gallery-lightbox::backdrop {
    background: rgba(7, 12, 23, .91);
    backdrop-filter: blur(3px);
}

.gallery-lightbox__shell {
    position: relative;
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
    gap: 1rem;
    align-items: center;
    min-height: min(90dvh, 56rem);
    padding: 3rem 0 2rem;
}

.gallery-lightbox__figure {
    display: flex;
    min-width: 0;
    max-height: calc(96dvh - 5rem);
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .8rem;
}

.gallery-lightbox__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(96dvh - 8rem);
    object-fit: contain;
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .38);
    touch-action: pan-y;
    user-select: none;
}

.gallery-lightbox__caption {
    max-width: 60rem;
    color: rgba(255, 255, 255, .9);
    font-size: .92rem;
    line-height: 1.45;
    text-align: center;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(10, 18, 33, .72);
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
    border-color: rgba(255, 255, 255, .55);
    background: rgba(25, 39, 64, .94);
    transform: translateY(-1px);
}

.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
    outline: .2rem solid white;
    outline-offset: .18rem;
}

.gallery-lightbox__close {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.85rem;
    line-height: 1;
}

.gallery-lightbox__nav {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 2.2rem;
    line-height: 1;
}

.gallery-lightbox__nav[hidden] {
    display: none;
}

.gallery-lightbox__counter {
    position: absolute;
    top: .55rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .05em;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 48rem) {
    .gallery-lightbox {
        width: 100vw;
        max-height: 100dvh;
    }

    .gallery-lightbox__shell {
        display: block;
        min-height: 100dvh;
        padding: 4rem .75rem 3.5rem;
    }

    .gallery-lightbox__figure {
        min-height: calc(100dvh - 7.5rem);
        max-height: calc(100dvh - 7.5rem);
    }

    .gallery-lightbox__image {
        max-height: calc(100dvh - 10rem);
        border-radius: .55rem;
    }

    .gallery-lightbox__close {
        top: .65rem;
        right: .75rem;
    }

    .gallery-lightbox__nav {
        position: absolute;
        z-index: 2;
        top: 50%;
        width: 2.9rem;
        height: 2.9rem;
        transform: translateY(-50%);
        background: rgba(10, 18, 33, .82);
    }

    .gallery-lightbox__nav:hover {
        transform: translateY(-50%);
    }

    .gallery-lightbox__nav--prev { left: .85rem; }
    .gallery-lightbox__nav--next { right: .85rem; }
    .gallery-lightbox__counter { top: 1.35rem; }
    .gallery-lightbox__caption { padding-inline: 3rem; font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox-trigger img,
    .gallery-lightbox__close,
    .gallery-lightbox__nav {
        transition: none;
    }
}

/* V6.19.2 - Ladezustand und sanftes Einblenden */
.gallery-lightbox__image {
    opacity: 0;
    transition: opacity .18s ease;
}

.gallery-lightbox__image.is-loaded {
    opacity: 1;
}

.gallery-lightbox__loader,
.gallery-lightbox__error {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gallery-lightbox__loader {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(10, 18, 33, .66);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.gallery-lightbox__spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 3px solid rgba(255, 255, 255, .28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gallery-lightbox-spin .75s linear infinite;
}

.gallery-lightbox__error {
    max-width: min(28rem, calc(100vw - 4rem));
    margin: 0;
    border-radius: .75rem;
    background: rgba(10, 18, 33, .82);
    padding: .8rem 1rem;
    color: white;
    font-size: .92rem;
    line-height: 1.4;
    text-align: center;
}

.gallery-lightbox__loader[hidden],
.gallery-lightbox__error[hidden] {
    display: none;
}

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

@media (prefers-reduced-motion: reduce) {
    .gallery-lightbox__image {
        transition: none;
    }

    .gallery-lightbox__spinner {
        animation-duration: 1.5s;
    }
}
