.hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    /* 16:9 erzwingen */
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Bild füllt 16:9 aus */
    object-position: center;
}

/* Galerie – Layout & Titel */
.tn-gallery {
    max-width: 1400px;
    margin-inline: auto;
    padding: 2rem 1rem;
}

.tng-title {
    margin: 0 0 1.2rem 0;
    line-height: 1.2;
}

/* Filter-Tabs */
.tng-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.tng-filter {
    padding: .45rem .9rem;
    border: 1px solid currentColor;
    background: none;
    border-radius: .45rem;
    cursor: pointer;
    opacity: .75;
    transition: opacity .2s;
}

.tng-filter:hover,
.tng-filter:focus {
    opacity: 1;
}

.tng-filter:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.tng-filter.active {
    font-weight: 600;
    background: color-mix(in srgb, currentColor 12%, transparent);
}

/* Masonry (Columns) */
.tng-masonry {
    column-count: 1;
    column-gap: 1rem;
}

@media (min-width: 600px) {
    .tng-masonry {
        column-count: 2;
    }
}

@media (min-width: 900px) {
    .tng-masonry {
        column-count: 3;
    }
}

.tng-item {
    -webkit-column-break-inside: avoid;
    break-inside: avoid;
    margin: 0 0 1rem 0;
    transition: opacity .5s ease, transform .5s ease;
}

.tng-item:not(.visible) {
    opacity: 0;
    transform: translateY(10px);
}

.tng-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.tng-link {
    display: block;
}

.lazy-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: .5rem;
}

/* Caption */
.tng-item figcaption {
    font-size: .95rem;
    opacity: .85;
    margin-top: .35rem;
}

/* Load More */
.tng-loadmore-wrap {
    text-align: center;
    margin-top: 1.5rem;
}

.tng-loadmore-btn {
    padding: .7rem 1.4rem;
    font-size: 1rem;
    border: 1px solid currentColor;
    background: none;
    border-radius: .4rem;
    cursor: pointer;
    opacity: .85;
    transition: opacity .2s ease;
}

.tng-loadmore-btn:hover,
.tng-loadmore-btn:focus {
    opacity: 1;
}

.tng-loadmore-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Lightbox (:target) */
.tng-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    place-items: center;
    z-index: 9999;
    padding: 2rem;
}

.tng-lightbox:target {
    display: grid;
}

.tng-lightbox img {
    max-width: min(1200px, 92vw);
    max-height: 85vh;
    border-radius: .5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

/* Close & Navigation */
.tng-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    color: #fff;
    text-decoration: none;
    font-size: 2rem;
    line-height: 1;
}

.tng-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tng-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    text-decoration: none;
    padding: .6rem 1rem;
    opacity: .75;
    transition: opacity .2s;
}

.tng-nav.left {
    left: 1rem;
}

.tng-nav.right {
    right: 1rem;
}

.tng-nav:hover,
.tng-nav:focus {
    opacity: 1;
}

.tng-nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
    .tng-item {
        transition: none;
        transform: none;
    }
}