/* =========================================================
   Veranstaltungs-Rückblick (z. B. fachtagung-2026.html)
   Video-Text-Abschnitte, Fotogalerie und Lightbox.
   Ergänzt styles.css, wird nur auf Veranstaltungsseiten geladen.
   ========================================================= */

/* Einleitung: big-statement ohne Überschrift, Text etwas größer */
.event-intro p {
    font-size: clamp(17px, 1.6vw, 20px);
    max-width: 760px;
    margin-bottom: 0;
}

/* ---- Video-Text-Abschnitte ---- */
.event-stories { padding: 7rem 0; }
.event-story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    gap: 5rem;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
}
.event-story + .event-story { margin-top: 3.5rem; }
.event-story.flip { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.event-story.flip .event-video { order: -1; }

.event-story-title {
    font-family: var(--font-head);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--c-black);
    margin: 0 0 1.2rem;
}
.event-story-text p {
    font-family: var(--font-head);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.65;
    color: var(--c-dark);
    margin: 0 0 1rem;
}
.event-story-text p:last-child { margin-bottom: 0; }

.event-video {
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    overflow: hidden;
    background: var(--c-black);
}
.event-video video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 860px) {
    .event-story { gap: 3rem; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); }
    .event-story.flip { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
}
/* Handy: Video oben, Text darunter – wie bei den Varianten-Blöcken */
@media (max-width: 720px) {
    .event-stories { padding: 4.5rem 0; }
    .event-story,
    .event-story.flip { grid-template-columns: 1fr; gap: 1.8rem; }
    .event-story + .event-story { margin-top: 3rem; }
    .event-video { order: -1; width: 100%; max-width: 340px; justify-self: center; }
}

/* ---- Galerie ---- */
.event-gallery { padding: 7rem 0; }
.event-gallery-lead {
    max-width: 680px;
    margin: 1rem auto 0;
    line-height: 1.65;
}
/* Querformate füllen eine 3:2-Zeile, Hochformate zwei Zeilen (≈ 3:4), damit
   Köpfe nicht abgeschnitten werden. Die Zeilenhöhe hängt an der Spaltenbreite
   (Container-Einheit cqw); "dense" füllt Lücken neben den hohen Kacheln. */
.event-gallery > .container { container-type: inline-size; }
.event-gallery-grid {
    --cols: 4;
    --gap: 0.75rem;
    list-style: none;
    margin: 3rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    grid-auto-rows: 180px;
    grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols) * 2 / 3);
    grid-auto-flow: row dense;
    gap: var(--gap);
}
.event-gallery-grid .is-portrait { grid-row: span 2; }
.event-gallery-grid .is-portrait img { object-position: center 30%; }
.event-gallery-grid a {
    display: block;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: var(--c-muted);
}
.event-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
@media (hover: hover) {
    .event-gallery-grid a:hover img { transform: scale(1.04); }
}
.event-gallery-grid a:focus-visible {
    outline: 3px solid var(--c-link);
    outline-offset: 3px;
}
@media (max-width: 960px) { .event-gallery-grid { --cols: 3; } }
@media (max-width: 600px) { .event-gallery-grid { --cols: 2; --gap: 0.5rem; } }

.event-gallery-actions {
    text-align: center;
    margin-top: 3rem;
}
.event-gallery-hint {
    margin: 0.8rem 0 0;
    font-size: 14px;
    color: var(--c-muted-text);
}

/* ---- Lightbox (natives <dialog>, per showModal() geöffnet) ---- */
.lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.94);
    color: var(--c-white);
    overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox-figure {
    position: absolute;
    inset: 4.5rem 5.5rem 2rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-figure img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
}
.lightbox-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    gap: 1rem;
}
.lightbox-count {
    font-family: var(--font-head);
    font-size: 15px;
    letter-spacing: 0.04em;
}
.lightbox-tools { display: flex; align-items: center; gap: 0.6rem; }
.lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 44px;
    height: 44px;
    padding: 0 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--c-white);
    font-family: var(--font-head);
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.22); color: var(--c-white); }
.lightbox-btn:focus-visible { outline: 3px solid var(--c-secondary-hover); outline-offset: 2px; }
.lightbox-btn svg { width: 20px; height: 20px; flex: none; }
.lightbox-close { padding: 0; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    width: 52px;
    height: 52px;
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

@media (max-width: 720px) {
    .lightbox-figure { inset: 4.5rem 0.75rem 5.5rem; }
    .lightbox-nav { top: auto; bottom: 1.25rem; transform: none; }
    .lightbox-prev { left: calc(50% - 64px); }
    .lightbox-next { right: calc(50% - 64px); }
    .lightbox-download-label { display: none; }
    .lightbox-download { padding: 0; }
}

/* Banner-Überschrift ohne automatische Silbentrennung ("un-sere") */
.event-banner h1 { -webkit-hyphens: manual; hyphens: manual; text-wrap: balance; }
