/* =============================================
   TSG Seckenhausen – Galerie CSS – CSS-Variablen-kompatibel
   ============================================= */

.tsg-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-section);
    border-radius: 8px;
}
.tsg-slider__track {
    display: flex;
    transition: transform 0.6s ease;
}
.tsg-slider__slide {
    min-width: 100%;
    position: relative;
}
.tsg-slider__slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}
.tsg-slider__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 20px 24px 16px;
    font-size: 1rem;
    font-weight: 500;
}
.tsg-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(204,0,0,0.85);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}
.tsg-slider__btn:hover { background: var(--red); }
.tsg-slider__btn--prev { left: 12px; }
.tsg-slider__btn--next { right: 12px; }
.tsg-slider__dots {
    position: absolute;
    bottom: 10px;
    right: 16px;
    display: flex;
    gap: 6px;
}
.tsg-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.2s;
}
.tsg-slider__dot.active { background: var(--red); }

.galerie-page { padding: 40px 0; }
.galerie-page h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
.galerie-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.galerie-filter__btn {
    padding: 6px 16px;
    border: 2px solid var(--red);
    background: transparent;
    color: var(--red);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}
.galerie-filter__btn:hover,
.galerie-filter__btn.active {
    background: var(--red);
    color: #fff;
}
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.galerie-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: var(--bg-section);
    aspect-ratio: 4/3;
}
.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.galerie-item:hover img { transform: scale(1.05); }
.galerie-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: flex-end;
    padding: 12px;
    transition: background 0.3s;
}
.galerie-item:hover .galerie-item__overlay { background: rgba(0,0,0,0.25); }
.galerie-item__title { display: none; }
.galerie-item.hidden { display: none; }

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox__img-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
}
.lightbox__img-wrap img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}
.lightbox__caption { display: none; }
.lightbox__close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}
.lightbox__btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(204,0,0,0.85);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
}
.lightbox__btn--prev { left: 16px; }
.lightbox__btn--next { right: 16px; }

@media (max-width: 600px) {
    .tsg-slider__slide img { height: 220px; }
    .galerie-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
