@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/roboto-400.woff2") format("woff2");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/fonts/roboto-500.woff2") format("woff2");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/assets/fonts/roboto-600.woff2") format("woff2");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/roboto-700.woff2") format("woff2");
}

:root {
    --color-primary: #dd5252;
    --color-primary-dark: #dd0000;
    --color-bg-alt: #f5f5f5;
    --color-text: #4b4f58;
    --color-heading: #3a3a3a;
    --color-muted: #7a7a7a;
    --color-border: #e5e5e5;
    --color-footer: #3a3a3a;
    --color-button: #878787;
    --max-width: 1000px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--color-text);
    line-height: 1.6;
}

button, input, select, textarea {
    font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-family: inherit;
    font-weight: 600;
    line-height: 1.25;
}

a { color: var(--color-primary); }
a:hover, a:focus { color: var(--color-primary-dark); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    background: #fff;
    color: var(--color-heading);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 280px;
    max-height: 52px;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (min-width: 901px) {
    /* Logo oben links, Menüpunkte bleiben daneben statt darunter. */
    .site-header .container {
        flex-wrap: nowrap;
    }

    .main-nav {
        flex-wrap: nowrap;
        white-space: nowrap;
    }
}

@media (max-width: 1100px) {
    .logo img {
        max-width: 220px;
    }

    .main-nav a {
        margin-left: 0.8rem;
        font-size: 0.9rem;
    }
}

.main-nav a {
    color: var(--color-heading);
    text-decoration: none;
    margin-left: 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.main-nav a:hover { color: var(--color-primary); text-decoration: none; }

.btn-nav {
    background: transparent;
    color: var(--color-primary) !important;
    border: 1px solid var(--color-primary);
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
}

.btn-nav:hover { background: var(--color-primary); color: #fff !important; }

.admin-link {
    color: var(--color-muted) !important;
    font-size: 0.85rem !important;
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
}

.admin-link:hover { color: var(--color-primary) !important; }

.hero {
    position: sticky;
    top: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(360px, 60vh, 720px);
    padding: 2rem 0;
    background: linear-gradient(180deg, #030026 0%, #1d1d23 100%);
    color: #fff;
    text-align: center;
    overflow: hidden;
}

/* Full-bleed hero image: the section stays pinned while the content scrolls over it. */
.hero--with-media {
    background: none;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 0, 38, 0.25) 0%, rgba(3, 0, 38, 0.45) 100%);
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    margin: 0;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

/* Desktop: etwas größere Fließtexte und Hero-Überschrift, Hero bis zum
   unteren Bildschirmrand. */
@media (min-width: 901px) {
    body {
        font-size: 1.0625rem;
    }

    .hero {
        min-height: 100vh;
    }

    .hero h1 {
        font-size: 2.75rem;
    }
}

/* Opaque layer that scrolls over the pinned hero image. */
.home-content {
    position: relative;
    z-index: 1;
    background: #fff;
}

/* Full-bleed middle image: scrolls into view, then stays pinned while the
   following content scrolls over it. */
.middle-image-band {
    position: sticky;
    top: 0;
    z-index: 0;
    height: clamp(320px, 60vh, 720px);
    overflow: hidden;
    background: var(--color-bg-alt);
}

.middle-image-band img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Opaque layer that scrolls over the pinned middle image. */
.home-content-after {
    position: relative;
    z-index: 1;
    background: #fff;
}

.section { padding: 3rem 0; scroll-margin-top: 80px; }
.section.alt { background: var(--color-bg-alt); }

.project-list, .board-grid {
    list-style: none;
    padding: 0;
}

.event-cancelled { color: #b00020; font-weight: bold; }

/* Vorstand: Karten mit Bild, Name, Funktion und Kontakt */
.board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
}

.board-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.board-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.board-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-muted);
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-border) 100%);
}

.board-photo-placeholder[hidden] {
    display: none;
}

.board-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem;
}

.board-name {
    font-size: 1.05rem;
    color: var(--color-heading);
}

.board-position { color: var(--color-muted); }

.board-email {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.board-email:hover,
.board-email:focus {
    background: var(--color-primary);
    color: #fff;
}

.board-phone {
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
}

.board-phone:hover { text-decoration: underline; }

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

@media (max-width: 600px) {
    .board-grid { grid-template-columns: 1fr; }
}

.btn {
    display: inline-block;
    background: var(--color-button);
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
}

.btn:hover { background: var(--color-primary-dark); }

.form { display: flex; flex-direction: column; gap: 1rem; max-width: 100%; }
.form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.95rem; }
.form input, .form select { padding: 0.5rem; font-size: 1rem; }
.form .checkbox { flex-direction: row; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; }
.form .checkbox input { margin-top: 0.25rem; flex: 0 0 auto; }
.form .checkbox .field-error { flex-basis: 100%; }
.form button { align-self: flex-start; }

.form-row { display: grid; gap: 1rem; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: minmax(90px, 0.5fr) 1.5fr; }

.form-note { margin: 0; color: var(--color-muted); font-size: 0.85rem; line-height: 1.5; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.field-hint { color: var(--color-muted); font-size: 0.85rem; font-weight: 400; }
.field-error { color: #b00020; font-size: 0.85rem; line-height: 1.4; }

.form input.input-error,
.form select.input-error,
.form textarea.input-error {
    border: 2px solid #b00020;
    background: #fff5f5;
    outline: none;
}

.form .checkbox input.input-error {
    outline: 2px solid #b00020;
    outline-offset: 2px;
}

.form .checkbox-error { color: #b00020; }

.form fieldset {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.form fieldset legend {
    padding: 0 0.4rem;
    font-weight: 600;
}

.sepa-mandate-text {
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    background: var(--color-bg-alt);
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.sepa-mandate-text p { margin: 0.35rem 0; }

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

/* Wenn der Antrag aufgeklappt ist, soll die Spendenbox oben stehen bleiben
   und nicht auf die Höhe des langen Formulars gestreckt werden. */
.support-grid.is-expanded {
    align-items: start;
}

.support-grid:has(.membership-application[open]) {
    align-items: start;
}

.support-box {
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
}

.support-box > h2:first-child {
    margin-top: 0;
}

.support-text {
    line-height: 1.7;
}

.support-box .form {
    margin-top: 1.5rem;
}

.membership-application {
    margin-top: 1.25rem;
}

.membership-application-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    list-style: none;
    cursor: pointer;
}

.membership-application-toggle::-webkit-details-marker {
    display: none;
}

.membership-application-toggle::after {
    content: "▾";
    font-size: 0.85em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.membership-application[open] .membership-application-toggle::after {
    transform: rotate(180deg);
}

.membership-application-toggle .toggle-label-open {
    display: none;
}

.membership-application[open] .toggle-label-open {
    display: inline;
}

.membership-application[open] .toggle-label-closed {
    display: none;
}

.membership-application-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.membership-application .form {
    margin-top: 1.5rem;
}

@media (max-width: 700px) {
    .support-grid { grid-template-columns: 1fr; }
    .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
    .main-nav a { margin-left: 0.6rem; }
}

.alert { padding: 0.8rem 1rem; border-radius: 4px; }
.alert-success { background: #e4f7e9; color: #1b5e20; }
.alert-error { background: #fdecea; color: #b00020; }

.muted { color: var(--color-muted); }

.site-footer {
    background: var(--color-footer);
    color: #b9b9b9;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #b9b9b9;
    margin-left: 1rem;
    text-decoration: none;
}

.footer-nav a:hover { color: var(--color-primary); }

.event-detail { max-width: 720px; }

.event-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin: 1rem 0;
}

.event-teaser { font-size: 1.15rem; font-weight: bold; }
.event-performers { font-style: italic; color: var(--color-text); }
.event-description { margin: 1.5rem 0; }

.event-price {
    font-weight: bold;
    color: var(--color-primary);
}

.event-calendar-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-secondary:hover { background: var(--color-bg-alt); }

.event-meta {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.5rem 1rem;
}

.event-meta dt { font-weight: bold; color: var(--color-muted); }
.event-meta dd { margin: 0; }

.event-past-tag { color: var(--color-muted); font-style: italic; margin-left: 0.5rem; }
.event-cancelled-tag { color: #b00020; font-weight: bold; margin-left: 0.5rem; }

/* --- Veranstaltungsdetailseite --- */
.concert-page {
    background: #fff;
}

.concert-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 440px;
    color: #fff;
    background: linear-gradient(135deg, #221d31 0%, #443342 100%);
    overflow: hidden;
}

.concert-hero--compact {
    min-height: 0;
    background: linear-gradient(135deg, #fbf8fa 0%, #eee6ec 100%);
    color: var(--color-text);
}

.concert-hero--compact::after {
    display: none;
}

.concert-hero--compact .concert-hero-inner {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
}

.concert-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.08) 0%, rgba(10, 10, 20, 0.45) 55%, rgba(10, 10, 20, 0.88) 100%);
}

.concert-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 4rem;
    padding-bottom: 2.75rem;
}

.concert-title {
    max-width: 900px;
    margin: 0 0 0.4rem;
    color: var(--color-heading);
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    line-height: 1.1;
}

.concert-hero-teaser {
    max-width: 720px;
    margin: 0;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.6;
}

.concert-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 3rem;
    align-items: start;
    padding-top: 3.5rem;
    padding-bottom: 2rem;
}

.concert-main {
    min-width: 0;
}

.concert-block + .concert-block {
    margin-top: 2.5rem;
}

.concert-block-title {
    margin: 0 0 0.9rem;
    color: var(--color-muted);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.concert-description {
    max-width: 70ch;
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.85;
}

.concert-performers {
    max-width: 65ch;
    margin: 0;
    color: var(--color-text);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.8;
}

.concert-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.concert-card {
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.concert-card-title {
    margin: 0 0 0.8rem;
    color: var(--color-muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.concert-dates {
    display: flex;
    flex-direction: column;
}

.concert-date {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
}

.concert-date:first-child {
    padding-top: 0;
}

.concert-date:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.concert-date-day {
    min-width: 2.4rem;
    color: var(--color-primary);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.concert-date-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.9rem;
}

.concert-date-month {
    color: var(--color-muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.concert-date-time {
    color: var(--color-heading);
    font-weight: 600;
}

.concert-date-note {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.concert-status {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.concert-status--past {
    color: var(--color-muted);
}

.concert-status--cancelled {
    color: #b00020;
}

.concert-price {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.concert-address,
.concert-organizer {
    margin: 0;
    font-style: normal;
    line-height: 1.6;
}

.concert-organizer a,
.concert-address a {
    color: var(--color-primary);
}

.concert-address-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.concert-address-link:hover,
.concert-address-link:focus-visible {
    color: var(--color-primary);
}

.concert-address-action {
    display: block;
    margin-top: 0.35rem;
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 600;
}

.concert-calendar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.concert-calendar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    color: var(--color-primary);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.concert-calendar-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

.concert-media-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #4f4954;
}

.concert-media-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) rgba(255, 255, 255, 0.2);
    padding: 0 max(1.5rem, calc((100vw - var(--max-width)) / 2 + 1.5rem));
}

.concert-media-track {
    display: flex;
    gap: 0.75rem;
    width: max-content;
    height: clamp(260px, 50vh, 540px);
}

.concert-media-slide {
    flex: 0 0 auto;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    scroll-snap-align: start;
}

.concert-media-slide img {
    display: block;
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: contain;
    cursor: zoom-in;
    transition: filter 0.25s ease;
}

.concert-media-slide img:hover {
    filter: brightness(1.06);
}

.concert-back {
    display: inline-block;
    margin: 2.5rem 0 3rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.concert-back:hover {
    text-decoration: underline;
}

.concert-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.concert-photo-link {
    margin: 2.5rem 0 3rem;
    color: var(--color-muted);
    font-size: 0.85rem;
    text-decoration: none;
}

.concert-photo-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .concert-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 2.5rem;
    }

    .concert-media-track {
        height: clamp(220px, 40vh, 380px);
    }
}

@media (max-width: 640px) {
    .concert-hero-inner {
        padding-top: 1.5rem;
        padding-bottom: 1.25rem;
    }

    .concert-title {
        font-size: 1.6rem;
    }

    .concert-media-track {
        height: clamp(200px, 36vh, 340px);
    }
}

/* Kommende Veranstaltungen - prominente, volle Breite */
.upcoming-events {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.upcoming-event {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.upcoming-event:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.upcoming-event-link {
    display: grid;
    grid-template-columns: minmax(180px, 24%) 1fr;
    min-height: 0;
    color: inherit;
    text-decoration: none;
}

.upcoming-event-media {
    overflow: hidden;
    background: var(--color-bg-alt);
}

.upcoming-event-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upcoming-event-media-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-border) 100%);
}

.upcoming-event-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 1rem 1.25rem;
}

.upcoming-event-date {
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.upcoming-event-title {
    margin: 0;
    font-size: 1.25rem;
}

.upcoming-event-venue {
    color: var(--color-muted);
    font-style: italic;
}

.upcoming-event-teaser {
    margin: 0.15rem 0;
    color: var(--color-text);
    font-size: 0.9rem;
}

.upcoming-event-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    margin: 0.15rem 0 0;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.upcoming-event-more {
    align-self: flex-end;
    margin-top: auto;
    padding-top: 0.25rem;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

.archive-heading {
    margin-top: 1rem;
}

.no-upcoming-events {
    margin: 0 0 2.5rem;
    color: var(--color-muted);
    font-style: italic;
}

@media (max-width: 760px) {
    .upcoming-event-link {
        grid-template-columns: 1fr;
    }

    .upcoming-event-media {
        padding: 0;
    }

    .upcoming-event-media img,
    .upcoming-event-media-placeholder {
        height: 100%;
        max-height: none;
        aspect-ratio: 16 / 9;
    }

    .upcoming-event-body {
        padding: 1.25rem;
    }

    .upcoming-event-title {
        font-size: 1.3rem;
    }
}

/* Event Cards - Grid Layout */
.event-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.event-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.event-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.event-item-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.event-thumbnail {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-bg-alt);
    flex-shrink: 0;
}

.event-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-image--placeholder {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-border) 100%);
}

.event-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.9rem 1rem 1.1rem;
}

/* Titel bleibt oben, Datum und Ort werden am Kachelboden ausgerichtet. */
.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    margin-top: auto;
}

.event-date-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.event-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    padding: 0;
    color: var(--color-heading);
}

.event-card-body .event-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 0;
    padding: 0;
}

.event-past {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.event-card-body .event-cancelled {
    padding: 0;
    font-size: 0.85rem;
}

.event-card-body .event-venue {
    padding: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
    font-style: italic;
}

.event-load-more {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Utility: robust default-hidden state for all modals/overlays/lightboxes.
   Using !important guarantees this always wins over any other display rule,
   regardless of load order or specificity, preventing "stuck" overlays. */
.hidden {
    display: none !important;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    z-index: 1001;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-muted);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1002;
}

.modal-close:hover {
    color: var(--color-heading);
}

.modal-hero-image {
    margin: -2rem -2rem 1.5rem -2rem;
    width: calc(100% + 4rem);
    height: 300px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.modal-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-button);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: var(--color-primary-dark);
}

.btn-primary {
    background: var(--color-button);
}

/* Responsive Grid Layout */
@media (max-width: 1200px) {
    .event-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .event-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Gallery Styles */
.event-gallery {
    margin: 3rem 0 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.event-gallery h2 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.gallery-container {
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Lightbox */
.lightbox {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
    z-index: 1002;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    max-width: 100%;
    font-size: 0.95rem;
}

/* Galerie-Lightbox der Veranstaltungsseite */
#galleryLightbox {
    padding: 0.5rem;
    background: rgba(88, 81, 93, 0.94);
}

#galleryLightbox .lightbox-content {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    justify-content: center;
}

#galleryLightbox .lightbox-image {
    width: auto;
    height: auto;
    max-width: 98vw;
    max-height: 96vh;
    margin: 0;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.35);
}

#galleryLightbox .lightbox-caption {
    display: none;
}

#galleryLightbox .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 2rem;
}

#galleryLightbox .lightbox-prev,
#galleryLightbox .lightbox-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 2rem;
}

#galleryLightbox .lightbox-prev:hover,
#galleryLightbox .lightbox-next:hover {
    background: rgba(0, 0, 0, 0.65);
}

#galleryLightbox .lightbox-prev {
    left: 1rem;
}

#galleryLightbox .lightbox-next {
    right: 1rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }
}

/* Zwei-Spalten Layout für Über uns und Projekte */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.column-left {
    /* Linke Spalte: Über uns */
}

.column-right {
    /* Rechte Spalte: Projekte Box */
}

.projects-box {
    background: var(--color-bg-alt);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.projects-box h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--color-heading);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.projects-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-border);
}

.project-item:last-child {
    border-bottom: none;
}

.project-year-box {
    flex-shrink: 0;
    width: 3.5rem;
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.project-title {
    flex-grow: 1;
}

.project-title strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.project-description {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.4;
    margin-top: 0.3rem;
}

.no-projects {
    color: var(--color-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Responsive Anpassungen */
@media (max-width: 900px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .projects-box {
        margin-top: 1rem;
    }
}

@media (max-width: 600px) {
    .event-list {
        grid-template-columns: 1fr;
    }
    
    .event-meta { grid-template-columns: 1fr; }
    .event-meta dt { margin-top: 0.8rem; }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-hero-image {
        margin: -1.5rem -1.5rem 1rem -1.5rem;
        width: calc(100% + 3rem);
    }
    
    .project-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-year-box {
        width: auto;
        align-self: flex-start;
        padding: 0.3rem 1rem;
    }
}
