*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

body {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    overflow-wrap: anywhere;
}

.public-events-shell {
    width: min(calc(100% - 2rem), 1100px);
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.public-events-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.public-events-header {
    margin-bottom: 2rem;
}

.public-events-header h1,
.public-events-section h2,
.public-event-card h3 {
    margin-top: 0;
}

.public-events-section {
    margin-top: 2.5rem;
}

.public-events-past {
    padding-top: 1.5rem;
    border-top: 1px solid currentColor;
}

.public-events-list {
    display: grid;
    gap: 1.5rem;
}

.public-event-card {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid currentColor;
}

.public-event-card-image img {
    width: 100%;
}

.public-event-card-content > :last-child,
.public-event-detail > :last-child {
    margin-bottom: 0;
}

.public-event-date {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.public-event-summary {
    font-size: 1.1rem;
}

.public-event-featured-image {
    margin: 0 0 2rem;
}

.public-event-featured-image img {
    max-height: 720px;
    object-fit: contain;
}

.public-event-featured-image figcaption {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.public-event-body {
    margin-bottom: 2.5rem;
    overflow-wrap: anywhere;
}

.public-event-downloads {
    display: grid;
    gap: 0.75rem;
    padding-left: 1.25rem;
}

.public-event-downloads li span {
    display: block;
    font-size: 0.9rem;
}

.public-events-backlink {
    margin-top: 3rem;
}

.public-events-home-list {
    display: grid;
    gap: 1rem;
}

.public-events-home-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid currentColor;
}

.public-events-home-item > :last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .public-event-card {
        grid-template-columns: 1fr;
    }

    .public-event-card-image {
        max-width: 480px;
    }
}

.public-event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 140px));
    align-items: start;
    justify-content: start;
    gap: 0.75rem;
}

.public-event-gallery-item {
    width: 100%;
    max-width: 140px;
    min-width: 0;
    margin: 0;
}

.public-event-gallery-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid currentColor;
    border-radius: 0.35rem;
    background: #f4f4f4;
}

.public-event-gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 160ms ease;
}

.public-event-gallery-link:hover img,
.public-event-gallery-link:focus-visible img {
    transform: scale(1.025);
}

.public-event-gallery-item figcaption {
    font-size: 0.9rem;
}

.public-event-lightbox[hidden] {
    display: none;
}

.public-event-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.78);
}

.public-event-lightbox-panel {
    position: relative;
    width: min(94vw, 1200px);
    max-height: 92vh;
    padding: 2.75rem 1rem 1rem;
    border-radius: 0.5rem;
    background: #fff;
    overflow: auto;
}

.public-event-lightbox-close {
    position: absolute;
    top: 0.45rem;
    right: 0.6rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.public-event-lightbox-figure {
    margin: 0;
}

.public-event-lightbox-figure img {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    margin: 0 auto;
    object-fit: contain;
}

.public-event-lightbox-caption {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.public-event-lightbox-caption[hidden] {
    display: none;
}

.public-event-lightbox-open {
    overflow: hidden;
}

.public-event-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 700px) {
    .public-event-gallery {
        grid-template-columns: repeat(auto-fill, minmax(92px, 120px));
        justify-content: start;
        gap: 0.6rem;
    }

    .public-event-gallery-item {
        max-width: 120px;
    }

    .public-event-lightbox {
        padding: 0.5rem;
    }

    .public-event-lightbox-panel {
        width: 100%;
        max-height: 96vh;
    }

    .public-event-lightbox-figure img {
        max-height: 76vh;
    }
}

/* Schritt 0.9.1-02: Themenführungen wie Ausstellungen strukturieren. */
.public-themes-archive {
    padding: 1.25rem 1.4rem;
    border: 1px solid currentColor;
    border-radius: 0.45rem;
}

.public-event-detail--embedded {
    overflow: hidden;
}

.public-event-embedded-header h3,
.public-event-embedded-subsection h4 {
    margin-top: 0;
}

.public-event-recurrence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding: 0.65rem 0.8rem;
}

.public-event-next-occurrences,
.public-event-more-occurrences {
    display: inline;
}

.public-event-more-occurrences {
    font-size: 0.92rem;
}

.public-theme-dates {
    margin: 2rem 0 0;
    border: 1px solid currentColor;
    border-radius: 0.45rem;
    overflow: hidden;
}

.public-theme-dates > summary {
    padding: 0.85rem 1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #960000;
    cursor: pointer;
    list-style-position: inside;
}

.public-theme-dates > summary:hover,
.public-theme-dates > summary:focus-visible {
    text-decoration: underline;
}

.public-theme-dates__content {
    padding: 0 1rem 1rem;
}

.public-theme-dates ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-theme-dates li {
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgb(21 61 99 / 14%);
    border-radius: 0.25rem;
    background: #fff;
    color: #153d63;
}

.public-event-embedded-subsection {
    margin-top: 2rem;
}

.public-themes-archive {
    margin-top: 2.5rem;
}

.public-event-card h3 > a,
.public-event-card h3 {
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .public-themes-archive {
        padding: 1rem;
    }

    .public-event-recurrence {
        display: grid;
        gap: 0.35rem;
    }

    .public-theme-dates ul {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
}

@media (min-width: 701px) and (max-width: 960px) {
    .public-theme-dates ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Korrekturschritt 0.9.1-02c:
   Beim Hauptbild bleibt die Bildunterschrift sichtbar.
   Zusätzliche Galeriebilder zeigen Caption/Rechte nur in der Vergrößerung. */
.public-events-shell .public-event-gallery-item > figcaption {
    display: none;
}


/* Korrekturschritt 0.9.1-03ba:
   Wenn der sichtbare Seitentitel entfällt, folgt die erste Fachsektion direkt
   auf den Breadcrumb. Deren obere Trennlinie wird dann nicht zusätzlich gezeigt. */
.public-events-shell > .public-events-breadcrumb + .public-events-section {
    border-top: 0;
}

/* Korrekturschritt 0.9.1-03bb:
   Hauptbilder von Themenführungen werden auf kleinen Ansichten unabhängig
   von der redaktionellen Desktop-Breitenstufe einspaltig dargestellt. */
@media (max-width: 720px) {
    .public-events-shell .public-event-featured-image.public-sized-image.public-image-size-mode--width,
    .public-events-shell .public-event-featured-image.public-sized-image.public-image-size-mode--height {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Korrekturschritt 0.9.1-03bd: Mobil Abstand zwischen Hauptbild und folgendem Inhalt. */
