.gallery-section {
    min-height: 55vh;
    padding: 3.5rem 0 5rem;
}

.gallery-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.toolbar-label {
    margin: 0 0 .7rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.season-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.season-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: .55rem .9rem;
    color: var(--forest-800);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 850;
    text-decoration: none;
}

.season-nav a:hover,
.season-nav a[aria-current="page"] {
    color: var(--white);
    background: var(--forest-800);
    border-color: var(--forest-800);
}

.data-notice {
    max-width: 390px;
    padding: .75rem 1rem;
    margin: 0;
    color: #6f5200;
    background: #fff6d8;
    border-left: 4px solid #d39c00;
    font-size: .88rem;
}

.empty-state {
    padding: clamp(2rem, 5vw, 4rem);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    text-align: center;
}

.empty-state h2 {
    margin: 0;
}

.empty-state p {
    margin-bottom: 0;
    color: var(--muted);
}

.album-summary {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.35rem;
    color: var(--muted);
}

.album-summary p {
    padding: .5rem .8rem;
    margin: 0;
    background: rgb(255 255 255 / 72%);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .82rem;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2vw, 1.75rem);
}

.album-card {
    content-visibility: auto;
    contain-intrinsic-size: 430px;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
    border: 1px solid rgb(7 59 42 / 12%);
    border-radius: 1.4rem;
    box-shadow: 0 16px 42px rgb(4 38 28 / 9%);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.album-card:hover,
.album-card:focus-within {
    border-color: rgb(50 122 32 / 30%);
    transform: translateY(-6px);
    box-shadow: 0 24px 58px rgb(4 38 28 / 16%);
}

.album-card > a {
    display: block;
    height: 100%;
    text-decoration: none;
}

.album-card__media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--forest-900);
}

.album-card__media::after {
    position: absolute;
    inset: 35% 0 0;
    content: "";
    background: linear-gradient(to bottom, transparent, rgb(3 30 22 / 36%));
    pointer-events: none;
}

.album-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.album-card:hover .album-card__media img,
.album-card:focus-within .album-card__media img {
    transform: scale(1.035);
}

.album-card__media > span {
    position: absolute;
    z-index: 1;
    right: 1rem;
    bottom: 1rem;
    padding: .42rem .72rem;
    color: var(--white);
    background: rgb(4 38 28 / 78%);
    border: 1px solid rgb(255 255 255 / 24%);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 850;
}

.album-card__placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: rgb(255 255 255 / 18%);
    font-size: 3rem;
    font-weight: 900;
}

.album-card__body {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    padding: 1.35rem 1.4rem 1.45rem;
}

.album-card__category {
    margin: 0;
    color: var(--green-500);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.album-card__body h2 {
    margin: .45rem 0 .9rem;
    color: var(--forest-950);
    font-size: clamp(1.15rem, 1.7vw, 1.38rem);
    line-height: 1.24;
    letter-spacing: -.015em;
}

.album-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    margin-bottom: 1.15rem;
    color: var(--muted);
    font-size: .82rem;
}

.album-card__meta span,
.album-card__meta time {
    display: inline-flex;
    align-items: center;
}

.album-card__meta span + time::before {
    width: 3px;
    height: 3px;
    margin-right: .8rem;
    content: "";
    background: var(--green-500);
    border-radius: 50%;
}

.album-card__body .text-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: auto;
    color: var(--forest-800);
    font-size: .86rem;
    font-weight: 850;
}

.album-heading {
    max-width: 900px;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--forest-700);
    font-weight: 850;
    text-decoration: none;
}

.album-heading h2 {
    margin: 0;
    font-family: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: .95;
    letter-spacing: -.025em;
    text-transform: uppercase;
}

.album-heading > p:last-child {
    color: var(--muted);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.photo-tile {
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: 300px 225px;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    background: var(--forest-950);
    border: 0;
    border-radius: .7rem;
    cursor: zoom-in;
}

.photo-tile[disabled] {
    cursor: not-allowed;
}

.photo-tile[disabled]::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    content: "Bild nicht verfügbar";
    color: var(--white);
    background: var(--forest-900);
    font-weight: 800;
}

.photo-tile img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    image-orientation: from-image;
    transition: transform .3s ease, opacity .3s ease;
}

.photo-tile > span {
    position: absolute;
    right: .5rem;
    bottom: .5rem;
    padding: .25rem .5rem;
    color: var(--white);
    background: rgb(4 38 28 / 85%);
    border-radius: .4rem;
    font-size: .65rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity .2s ease;
}

.photo-tile:hover img {
    opacity: .82;
    transform: scale(1.04);
}

.photo-tile:hover > span,
.photo-tile:focus-visible > span {
    opacity: 1;
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(2 15 11 / 94%);
}

.lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(94vw, 1500px);
    height: min(92vh, 960px);
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
}

.photo-grid--single {
    grid-template-columns: minmax(0, 1100px);
    justify-content: center;
}

.photo-grid--single .photo-tile {
    aspect-ratio: auto;
    background: transparent;
}

.photo-grid--single .photo-tile img {
    height: auto;
    max-height: 78vh;
    object-fit: contain;
}

.lightbox__dialog[aria-busy="true"] figure {
    opacity: .55;
}

.lightbox figure {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-height: 90vh;
    display: grid;
    justify-items: center;
    margin: 0;
}

.lightbox__image-slot {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
}

.lightbox figure img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(90vh - 50px);
    display: block;
    object-fit: contain;
    image-orientation: from-image;
}

.lightbox figcaption {
    padding-top: .65rem;
    color: rgb(255 255 255 / 75%);
    font-size: .82rem;
}

.lightbox__close,
.lightbox__nav {
    position: relative;
    z-index: 2;
    color: var(--white);
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 24%);
    cursor: pointer;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgb(255 255 255 / 20%);
}

.lightbox__nav:disabled {
    display: none;
}

.lightbox__close {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 2rem;
}

.lightbox__nav {
    width: 48px;
    height: 62px;
    border-radius: .6rem;
    font-size: 2.5rem;
}

body.lightbox-open {
    overflow: hidden;
}

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

    .photo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .gallery-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .season-nav {
        flex-wrap: nowrap;
        padding: 0 0 .5rem;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .season-nav a {
        flex: 0 0 auto;
    }

    .album-grid {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lightbox__dialog {
        width: 100dvw;
        height: 100dvh;
        grid-template-columns: 1fr;
        padding: .5rem;
    }

    .lightbox__close {
        top: .6rem;
        right: .6rem;
    }

    .lightbox__nav {
        position: absolute;
        top: 50%;
        width: 42px;
        height: 54px;
        transform: translateY(-50%);
    }

    .lightbox__nav--previous {
        left: .6rem;
    }

    .lightbox__nav--next {
        right: .6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .album-card,
    .album-card__media img,
    .photo-tile img,
    .photo-tile > span {
        transition: none;
    }
}
