/* Galerie-Seite: Layout wie Startseite (Desktop), Mobile unverändert */

body.page main {
    display: block !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100%;
}

/* Galerie-Titel näher am Header (wie Team), aber unter der Nav */
body.gallery-page main > .section-light:first-of-type {
    padding-top: clamp(4.5rem, 10vw, 5.5rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
    margin-top: 1.25rem;
}

body.gallery-page .gallery-intro {
    margin-bottom: 1.5rem;
}

#gallery-categories-mount {
    display: block;
    width: 100%;
}

/* Dynamisch geladene Abschnitte: nicht unsichtbar durch effects.css belassen */
#gallery-categories-mount > section,
#gallery-intro-mount section {
    opacity: 1 !important;
    transform: none !important;
}

.gallery-intro {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 3rem;
}

.gallery-intro p {
    color: var(--color-muted);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: none;
    margin: 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) * 1.05);
    background: linear-gradient(180deg, #fffaf3, #f8eee2);
    border: 1px solid rgba(117, 95, 72, 0.12);
    box-shadow: var(--shadow);
}

.gallery-item--video {
    width: 100%;
    max-width: 960px;
    margin-inline: auto;
}

.gallery-item__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a2419;
    overflow: hidden;
}

.gallery-item__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-video-carousel {
    --gallery-nav-size: 2.75rem;
}

.gallery-video-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: var(--gallery-nav-size);
    height: var(--gallery-nav-size);
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f7a26;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    display: grid;
    place-items: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-video-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.gallery-video-nav--prev {
    left: 0.85rem;
}

.gallery-video-nav--next {
    right: 0.85rem;
}

.gallery-video-dots {
    position: absolute;
    left: 50%;
    bottom: 0.85rem;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
}

.gallery-video-dot {
    width: 0.55rem;
    height: 0.55rem;
    border: none;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.gallery-video-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}


.gallery-item__caption {
    padding: 1.35rem 1.6rem 1.5rem;
}

.gallery-item__caption h2 {
    margin: 0 0 0.45rem;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.gallery-item__caption p {
    margin: 0;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.gallery-category {
    margin-top: 0;
    max-width: none;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

.gallery-category + .gallery-category {
    margin-top: 0;
}

.gallery-section {
    padding: 4.5rem 0;
    margin: 2.25rem 0;
    border-radius: calc(var(--radius) * 1.2);
}

.gallery-section--bg {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    box-shadow: 0 30px 60px rgba(57, 45, 33, 0.06);
}

.gallery-section--surface {
    background: linear-gradient(180deg, var(--color-surface), var(--color-bg));
    border: 1px solid var(--color-border);
    box-shadow: 0 30px 60px rgba(57, 45, 33, 0.06);
}

.gallery-section .container {
    padding: 0 1.5rem;
}

.gallery-category__header {
    text-align: left;
    margin-bottom: 1.5rem;
}

.gallery-category__header h2 {
    margin-bottom: 0.5rem;
}

.gallery-category__header p {
    margin: 0;
    color: var(--color-muted);
    max-width: 42rem;
}

.gallery-compare {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.gallery-compare--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    margin-inline: 0;
}

.gallery-compare__card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.gallery-compare__card h3 {
    margin: 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}

.gallery-compare:not(.gallery-compare--two) .gallery-compare__card h3 {
    font-size: 1.35rem;
}

.gallery-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: calc(var(--radius) * 1.05);
    background: #dfe8dc;
    border: 1px solid rgba(117, 95, 72, 0.12);
    box-shadow: var(--shadow);
}

.gallery-slideshow__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.gallery-slideshow__slide.is-active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.gallery-slideshow__slide.is-leaving {
    opacity: 0;
    z-index: 1;
}

.gallery-cta {
    text-align: center;
    margin-top: 3.5rem;
}

@media (max-width: 900px) {
    .gallery-compare {
        gap: 1rem;
    }
}

/* Handy */
@media (max-width: 700px) {
    body.gallery-page main > .section-light:first-of-type {
        padding-top: 4.75rem;
        padding-bottom: 1.25rem;
        margin-top: 0.85rem;
    }

    .gallery-intro {
        text-align: center;
        max-width: 40rem;
        margin-top: 0;
        margin-bottom: 1.1rem;
        padding-top: 0.25rem;
    }

    .gallery-intro p {
        font-size: inherit;
        line-height: inherit;
    }

    .gallery-grid {
        max-width: none;
        width: 100%;
        margin-inline: 0;
        gap: 2rem;
    }

    .gallery-item {
        border-radius: var(--radius);
        background: var(--color-surface);
        border: 1px solid var(--color-border);
    }

    .gallery-item--video {
        display: flex;
        flex-direction: column;
        border-radius: 1rem;
        max-width: none;
        margin-inline: 0;
        /* Etwas kleiner: Platz für Nav + H1 + Caption */
        height: calc(100svh - 11.5rem);
        max-height: calc(100svh - 11.5rem);
        overflow: hidden;
    }

    .gallery-item--video .gallery-item__media {
        flex: 1 1 0;
        aspect-ratio: auto;
        width: 100%;
        min-height: 0;
        height: auto;
        max-height: none;
        background: #0f1610;
    }

    .gallery-item--video .gallery-item__media video {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: contain;
    }

    .gallery-item--video .gallery-item__caption {
        flex: 0 0 auto;
        padding: 0.85rem 1rem 1rem;
    }

    .gallery-item__caption {
        padding: 1rem 1.1rem 1.15rem;
    }

    .gallery-item__caption h2 {
        font-size: 1.15rem;
        margin: 0 0 0.35rem;
    }

    .gallery-item__caption p {
        font-size: 0.95rem;
        line-height: inherit;
    }

    .gallery-category {
        margin-top: 0;
        max-width: 1080px;
    }

    .gallery-category + .gallery-category {
        margin-top: 0;
    }

    .gallery-section {
        padding: 2.5rem 0;
        margin: 1.75rem 0;
    }

    .gallery-section .container {
        padding: 0 1rem;
    }

    .gallery-category__header {
        text-align: center;
        margin-bottom: 0.85rem;
    }

    .gallery-category__header h2 {
        margin-bottom: 0.35rem;
    }

    .gallery-category__header p {
        max-width: 36rem;
        margin-inline: auto;
    }

    .gallery-compare {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 360px;
        margin-inline: auto;
    }

    .gallery-compare--two {
        max-width: 360px;
        margin-inline: auto;
    }

    .gallery-compare__card {
        gap: 0.75rem;
    }

    .gallery-slideshow {
        border-radius: calc(var(--radius) - 0.4rem);
        border: 1px solid var(--color-border);
        box-shadow: 0 14px 36px rgba(57, 45, 33, 0.12);
    }

    .gallery-cta {
        margin-top: 3rem;
    }
}
