:root {
    --blau-900: #16314f;
    --blau-700: #254f79;
    --blau-600: #336699;
    --blau-400: #6699cc;
    --blau-100: #eef6ff;
    --text: #222;
    --grau: #5c6670;
    --linie: #dcdcdc;
    --flaeche: #f7f7f7;
    --breite: 72rem;
    --schrift: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --titel: var(--schrift);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 1.0625rem/1.65 var(--schrift); color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau-600); text-underline-offset: .15em; }
a:hover { color: var(--blau-900); }
:focus-visible { outline: 3px solid var(--blau-400); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--titel); color: var(--blau-700); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); margin: 0 0 1.25rem; }
h2 { font-size: 1.5rem; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 .5rem; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: .5rem; top: .5rem; z-index: 100; background: #fff; padding: .5rem 1rem; }

/* Kopf */
.kopf { background: var(--blau-700); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgb(0 0 0 / .2); }
.kopf-innen { max-width: var(--breite); margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.marke { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; min-width: 0; }
.marke:hover { color: #fff; }
.marke img { width: 44px; height: auto; flex: none; }
.marke-text { font-family: var(--titel); font-weight: 700; line-height: 1.15; font-size: clamp(1.05rem, .8rem + 1.4vw, 1.6rem); }
.marke-zusatz { display: block; font-size: .7em; font-weight: 400; opacity: .9; }
.menue-knopf { display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: 1rem; color: #fff; background: none; border: 1px solid rgb(255 255 255 / .5); border-radius: .4rem; padding: .5rem .8rem; cursor: pointer; }
.menue-knopf-striche, .menue-knopf-striche::before, .menue-knopf-striche::after { display: block; width: 1.15rem; height: 2px; background: currentColor; content: ""; position: relative; }
.menue-knopf-striche::before { position: absolute; top: -6px; }
.menue-knopf-striche::after { position: absolute; top: 6px; }

.menue { display: none; background: var(--blau-900); max-height: calc(100dvh - 4.5rem); overflow-y: auto; }
.menue.offen { display: block; }
.menue ul { list-style: none; margin: 0; padding: 0; }
.menue li { display: flex; flex-wrap: wrap; border-top: 1px solid rgb(255 255 255 / .12); }
.menue a { flex: 1; color: #fff; text-decoration: none; padding: .8rem 1rem; }
.menue a:hover, .menue .aktiv > a { background: rgb(255 255 255 / .1); }
.unter-knopf { width: 3.25rem; background: none; border: 0; border-left: 1px solid rgb(255 255 255 / .12); color: #fff; cursor: pointer; }
.unter-knopf::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.unter-knopf[aria-expanded="true"]::before { transform: rotate(-135deg); }
.menue li > ul { display: none; flex-basis: 100%; background: rgb(0 0 0 / .18); }
@media (max-width: 61.99rem) { .menue li.offen > ul { display: block; } }
.menue-ebene-2 a { padding-left: 2rem; }
.menue-ebene-3 a { padding-left: 3rem; }

@media (min-width: 62rem) {
    .menue-knopf { display: none; }
    .menue { display: block; background: var(--blau-600); overflow: visible; max-height: none; }
    .menue-ebene-1 { max-width: var(--breite); margin: 0 auto; padding: 0 .5rem; display: flex; }
    .menue li { border: 0; position: relative; flex-wrap: nowrap; }
    .menue-ebene-1 > li > a { padding: .7rem 1rem; font-weight: 600; }
    .menue-ebene-1 > li.hat-kinder > a::after { content: ""; display: inline-block; margin-left: .45rem; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2rem) rotate(45deg); }
    .unter-knopf { display: none; }
    .menue li > ul { position: absolute; top: 100%; left: 0; min-width: 15rem; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / .18); border-top: 3px solid var(--blau-400); }
    .menue li > ul ul { top: -3px; left: 100%; }
    .menue li:hover > ul, .menue li:focus-within > ul { display: block; }
    .menue.zu li > ul { display: none !important; }
    .menue li > ul li { border-top: 1px solid var(--linie); }
    .menue li > ul a { color: var(--text); padding: .55rem 1rem; }
    .menue li > ul a:hover, .menue li > ul .aktiv > a { background: var(--blau-100); color: var(--blau-700); }
    .menue-ebene-2 > li.hat-kinder > a::after { content: "›"; float: right; color: var(--grau); }
}

/* Bühne */
.buehne { position: relative; aspect-ratio: 1600 / 520; max-height: 30rem; width: 100%; overflow: hidden; background: var(--blau-900); }
.buehne img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.buehne img.an { opacity: 1; }
@media (max-width: 40rem) { .buehne { aspect-ratio: 16 / 9; } }

/* Countdown */
.countdown { background: var(--blau-100); border-bottom: 1px solid #d5e6f8; }
.countdown-innen { max-width: var(--breite); margin: 0 auto; padding: .9rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; }
.countdown p { margin: 0; }
.countdown-titel strong { font-family: var(--titel); font-size: 1.25rem; color: var(--blau-700); margin-right: .5rem; }
.countdown-zahlen { display: flex; gap: 1.25rem; color: var(--grau); font-size: .9rem; }
.countdown-zahlen b { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--blau-700); font-variant-numeric: tabular-nums; }

/* Inhalt */
.seite { padding: 2.25rem 1rem 4rem; }
.spalte { max-width: 46rem; margin: 0 auto; }
.spalte.breit { max-width: var(--breite); }
.pfad { font-size: .9rem; color: var(--grau); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.pfad a { color: var(--grau); }
.datum { color: var(--grau); margin: 0 0 .25rem; }
.text > :first-child { margin-top: 0; }
.text img { border-radius: .4rem; margin: 1.5rem 0; }
.text table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .97rem; }
.text th, .text td { text-align: left; vertical-align: top; padding: .6rem .9rem; border-bottom: 1px solid var(--linie); }
.text thead th { background: var(--blau-600); color: #fff; white-space: nowrap; border: 0; }
.text tbody tr:nth-child(even) { background: var(--flaeche); }
.text td:first-child { font-weight: 600; white-space: nowrap; }

.knopf { display: inline-block; background: var(--blau-600); color: #fff; text-decoration: none; padding: .65rem 1.3rem; border-radius: .4rem; font-weight: 600; }
.knopf:hover { background: var(--blau-700); color: #fff; }
.mehr { margin-top: 2rem; }

.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.5rem; }
.karte { border: 1px solid var(--linie); border-radius: .5rem; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.karte:hover { box-shadow: 0 8px 24px rgb(37 79 121 / .16); transform: translateY(-2px); }
.karte-bild img { width: 100%; aspect-ratio: 640 / 420; object-fit: cover; }
.karte-text { padding: 1rem 1.1rem 1.25rem; }
.karte-text time { font-size: .85rem; color: var(--grau); }
.karte-text h3 { margin: .15rem 0 .4rem; font-size: 1.25rem; }
.karte-text h3 a { color: inherit; text-decoration: none; }
.karte-text h3 a:hover { text-decoration: underline; }
.karte-text p { margin: 0; color: var(--grau); font-size: .97rem; }

.kacheln { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.kacheln a { display: block; padding: 1rem 1.1rem; background: var(--blau-100); border-left: 4px solid var(--blau-600); border-radius: .3rem; text-decoration: none; font-weight: 600; color: var(--blau-700); }
.kacheln a:hover { background: #dcebfb; }

/* Galerie */
.galerie { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .25rem; transition: opacity .2s; }
.galerie a:hover img { opacity: .85; }
@media (min-width: 40rem) { .galerie { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; } }

.lichtkasten { border: 0; padding: 0; margin: 0; background: rgb(10 20 34 / .96); width: 100vw; height: 100dvh; max-width: none; max-height: none; color: #fff; }
.lichtkasten[open] { display: grid; place-items: center; }
.lichtkasten::backdrop { background: rgb(10 20 34 / .96); }
.lichtkasten img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lichtkasten button { position: absolute; background: rgb(0 0 0 / .45); color: #fff; border: 0; cursor: pointer; font-size: 1.75rem; line-height: 1; width: 3rem; height: 3rem; border-radius: 50%; }
.lichtkasten button:hover { background: var(--blau-600); }
.lk-zu { top: .75rem; right: .75rem; }
.lk-vor { right: .75rem; top: 50%; translate: 0 -50%; }
.lk-zurueck { left: .75rem; top: 50%; translate: 0 -50%; }
.lk-zaehler { position: absolute; bottom: .9rem; left: 50%; translate: -50% 0; font-size: .9rem; background: rgb(0 0 0 / .45); padding: .2rem .7rem; border-radius: 1rem; }

/* Fuß */
.fuss { background: var(--blau-900); color: #d7e3f0; }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 1.75rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.fuss p { margin: 0; }
.fuss-name { font-family: var(--titel); font-weight: 600; }
.fuss-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.fuss a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .buehne img, .karte { transition: none; }
}

/* Tabellen auf dem Handy: jede Zeile als Block */
@media (max-width: 40rem) {
    .text table, .text tbody, .text tr, .text td { display: block; width: 100%; }
    .text thead { display: none; }
    .text tr { padding: .75rem .9rem; border-bottom: 1px solid var(--linie); }
    .text td { padding: 0; border: 0; white-space: normal; }
    .text td:empty { display: none; }
}

/* Tabellen: nur breite Tabellen (ab 4 Spalten) werden am Handy gestapelt */
.text thead th:empty { display: none; }
@media (max-width: 40rem) {
    .text table:not(:has(th:nth-child(4))) { display: table; }
    .text table:not(:has(th:nth-child(4))) thead { display: table-header-group; }
    .text table:not(:has(th:nth-child(4))) tbody { display: table-row-group; }
    .text table:not(:has(th:nth-child(4))) tr { display: table-row; padding: 0; }
    .text table:not(:has(th:nth-child(4))) td { display: table-cell; width: auto; padding: .5rem .6rem; border-bottom: 1px solid var(--linie); white-space: normal; }
}

/* Videos: laden erst nach Klick */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.video { margin: 0; }
.video button, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: .5rem; }
.video button { background: linear-gradient(135deg, var(--blau-700), var(--blau-900)); color: #fff; cursor: pointer; font: inherit; display: grid; place-content: center; justify-items: center; gap: .75rem; padding: 1rem; }
.video button:hover { background: linear-gradient(135deg, var(--blau-600), var(--blau-700)); }
.video-pfeil { width: 4rem; height: 4rem; border-radius: 50%; background: rgb(255 255 255 / .18); display: grid; place-items: center; }
.video-pfeil::before { content: ""; border-style: solid; border-width: .75rem 0 .75rem 1.2rem; border-color: transparent transparent transparent #fff; margin-left: .25rem; }
.video-hinweis { font-weight: 600; }
.video-hinweis small { display: block; font-weight: 400; opacity: .8; margin-top: .2rem; }
.video figcaption { margin-top: .5rem; font-weight: 600; color: var(--blau-700); }

.zufall { margin-top: 3.5rem; }
.zufall img { max-height: 28rem; width: auto; border-radius: .5rem; }

/* Großansicht: einzelnes Bild, Beschriftung, externe Links */
.lichtkasten.einzeln .lk-vor, .lichtkasten.einzeln .lk-zurueck { display: none; }
.lichtkasten img { cursor: default; }
.lk-zaehler { max-width: 90vw; text-align: center; }
.text a.extern::after { content: "\2197"; font-size: .8em; margin-left: .15em; text-decoration: none; display: inline-block; }

/* Knopf „Nach oben" */
.nach-oben { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: 3rem; height: 3rem; border-radius: 50%; background: var(--blau-600); box-shadow: 0 4px 14px rgb(0 0 0 / .25); display: grid; place-items: center; opacity: 0; transition: opacity .25s, background .2s; }
.nach-oben[hidden] { display: none; }
.nach-oben.sichtbar { opacity: 1; }
.nach-oben:hover { background: var(--blau-700); }
.nach-oben span { width: .8rem; height: .8rem; border: solid #fff; border-width: 3px 0 0 3px; transform: translateY(.2rem) rotate(45deg); }
@media print { .nach-oben, .kopf, .fuss { display: none; } }
