/* Mosaic Gallery – Impressionen */
.mosaic-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, 1fr);
    grid-auto-flow: dense;
    gap: 14px;
    margin-top: var(--spacing-lg);
}

.mosaic-gallery .elementor-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: unset;
    min-height: 160px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease;
}

.mosaic-gallery .elementor-gallery-item:hover,
.mosaic-gallery .elementor-gallery-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(104, 4, 0, 0.22);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.mosaic-gallery .mosaic-wide {
    grid-column: span 2;
}

.mosaic-gallery .mosaic-tall {
    grid-row: span 2;
}

.mosaic-gallery .mosaic-large {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-gallery .e-gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
}

.mosaic-gallery .elementor-gallery-item:hover .e-gallery-image,
.mosaic-gallery .elementor-gallery-item:focus-visible .e-gallery-image {
    transform: scale(1.08);
}

.mosaic-gallery .elementor-gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(26, 61, 10, 0.88) 0%,
        rgba(104, 4, 0, 0.35) 45%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mosaic-gallery .elementor-gallery-item:hover .elementor-gallery-item__overlay,
.mosaic-gallery .elementor-gallery-item:focus-visible .elementor-gallery-item__overlay {
    opacity: 1;
}

.mosaic-gallery .elementor-gallery-item__content {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.mosaic-gallery .elementor-gallery-item:hover .elementor-gallery-item__content,
.mosaic-gallery .elementor-gallery-item:focus-visible .elementor-gallery-item__content {
    opacity: 1;
    transform: translateY(0);
}

.mosaic-gallery .elementor-gallery-item__description {
    color: var(--color-white);
    font-size: 0.92rem;
    line-height: 1.45;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mosaic-gallery .gallery-item-zoom {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.mosaic-gallery .elementor-gallery-item:hover .gallery-item-zoom,
.mosaic-gallery .elementor-gallery-item:focus-visible .gallery-item-zoom {
    opacity: 1;
    transform: scale(1);
}

/* Lightbox Modal */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 20, 12, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.gallery-lightbox__dialog {
    position: relative;
    width: min(1100px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.94) translateY(16px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-lightbox.is-open .gallery-lightbox__dialog {
    transform: scale(1) translateY(0);
}

.gallery-lightbox__figure {
    position: relative;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-lightbox__loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

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

.gallery-lightbox__loader::after {
    content: '';
    width: 2rem;
    height: 2rem;
    margin-left: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: gallery-spin 0.7s linear infinite;
}

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

.gallery-lightbox__image {
    max-width: 100%;
    max-height: calc(92vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-lightbox__caption {
    margin: 1rem 0 0;
    color: var(--color-white);
    text-align: center;
    max-width: 720px;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 1.5em;
}

.gallery-lightbox__counter {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-lightbox__close,
.gallery-lightbox__prev,
.gallery-lightbox__next {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: inherit;
    cursor: pointer;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover,
.gallery-lightbox__close:focus-visible,
.gallery-lightbox__prev:focus-visible,
.gallery-lightbox__next:focus-visible {
    background: var(--color-primary);
    transform: scale(1.05);
    outline: none;
}

.gallery-lightbox__close {
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.gallery-lightbox__prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox__next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover {
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 992px) {
    .mosaic-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mosaic-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(140px, 1fr);
        gap: 10px;
    }

    .mosaic-gallery .mosaic-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-lightbox__prev,
    .gallery-lightbox__next {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .gallery-lightbox__counter {
        top: -2rem;
    }
}

@media (max-width: 480px) {
    .mosaic-gallery {
        grid-template-columns: 1fr;
    }

    .mosaic-gallery .mosaic-wide,
    .mosaic-gallery .mosaic-tall,
    .mosaic-gallery .mosaic-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .mosaic-gallery .elementor-gallery-item {
        min-height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mosaic-gallery .elementor-gallery-item,
    .mosaic-gallery .e-gallery-image,
    .gallery-lightbox,
    .gallery-lightbox__dialog,
    .gallery-lightbox__image {
        transition: none;
    }
}

/* Member document lists */
.document-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.document-list li {
    padding: 0.65rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.document-list a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: underline;
}

.document-list a:hover {
    color: var(--color-primary-hover);
}

.document-date {
    color: var(--color-secondary);
    font-size: 0.9rem;
    margin-left: 0.35rem;
}

.page-content section {
    margin-bottom: var(--spacing-xl);
    scroll-margin-top: 100px;
}
