/* ===========================================================
   Galerie-Grid + Lightbox
   =========================================================== */

/* Galerie-Grid: responsives, automatisches Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.gallery__item {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: #f0eee9;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

.gallery__item:hover,
.gallery__item:focus {
    transform: scale(1.02);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
}

/* Event-Übersicht (fotos.html als Index) */
.event-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.event-card {
    display: block;
    background: var(--color-content-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-card:hover,
.event-card:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.event-card__thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0eee9;
}

.event-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card__body {
    padding: 0.85rem 1rem;
}

.event-card__title {
    font-weight: 600;
    color: var(--color-accent-dark);
    margin: 0 0 0.25rem 0;
    font-size: 0.98rem;
    line-height: 1.35;
}

.event-card__meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

.year-divider {
    grid-column: 1 / -1;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.4rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--color-accent-dark);
    font-size: 1.4rem;
}

.year-divider:first-child {
    margin-top: 0;
}

/* ===========================================================
   Lightbox
   =========================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    cursor: zoom-out;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: default;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox__close {
    top: 1rem;
    right: 1rem;
}

.lightbox__prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .lightbox__close,
    .lightbox__prev,
    .lightbox__next {
        width: 40px;
        height: 40px;
    }
}
