
/* ==============================
   Veranstaltungsseite
   ============================== */

.events-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 70px;
    box-sizing: border-box;
}

/* Einleitung */

.events-intro {
    max-width: 850px;
    margin: 0 auto 40px;
    text-align: center;
}

.events-intro h1 {
    position: relative;
    z-index: 1;
    max-width: 80%;
    margin: auto;
    color: lightcoral;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 3px 3px 3px var(--kibuh-main-dark);
    border-radius: 20px;
    padding: 5px 25px;
}

.events-intro p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Galerie */

.events-gallery-section {
    width: 100%;
}

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

/* Einzelner Galerieeintrag */


.gallery-item {
    min-width: 0;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}

.gallery-item img,
.gallery-item video {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f0f0;
}

.gallery-item img {
    transition: transform 0.25s ease;
}

.gallery-image-link:hover img {
    transform: scale(1.035);
}

/* Beschreibung als Overlay am unteren Bildrand */

.gallery-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 24px 14px 12px;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, 0.78)
    );
    overflow-wrap: anywhere;
}

.gallery-image-link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}


/* Sichtbare Bildbeschreibung */

.gallery-description {
    margin: 10px 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Lade- und Fehlermeldungen */

.gallery-loading {
    grid-column: 1 / -1;
    margin: 20px 0;
    text-align: center;
}

/* Tastaturbedienung */

.gallery-item a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

/* ==============================
   Responsive Layout
   ============================== */

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .gallery-item img,
    .gallery-item video {
        height: 230px;
    }
}

@media (max-width: 600px) {
    .events-page {
        padding: 28px 16px 48px;
    }

    .events-intro {
        margin-bottom: 28px;
    }

    .events-intro p {
        font-size: 1rem;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .gallery-item img,
    .gallery-item video {
        height: auto;
        max-height: 400px;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
}

/* Animationen bei reduzierter Bewegung deaktivieren */

@media (prefers-reduced-motion: reduce) {
    .gallery-item img {
        transition: none;
    }
}
