/*
Theme Name:   Kunstverein Schwimmhalle Schloss Plön
Theme URI:    https://kunstverein-ploen.de/
Description:  Eigenes Design für den Kunstverein Schwimmhalle Schloss Plön.
              Das Vereinsrot als Fläche, große Bilder aus der Halle, klare
              Karten für Ausstellungen. Kommt ohne fremde Server aus —
              keine Schriften von Google, keine externen Dienste.
Author:       Kunstverein Schwimmhalle Schloss Plön e. V.
Version:      1.7.0
Requires PHP: 7.4
Text Domain:  kunstverein
*/

/* ==========================================================================
   Grundwerte
   ========================================================================== */

:root {
  color-scheme: light;

  --rot:      #e2382a;
  --rot-tief: #c02b1f;
  --tief:     #111111;
  --still:    #767676;
  --kante:    #e3e3e3;
  --weiss:    #ffffff;
  --sand:     #f6f5f3;

  --schrift: "Helvetica Neue", "Inter", Arial, system-ui, sans-serif;

  --rand: clamp(1.25rem, 4vw, 3.5rem);
  --bahn: 88rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--weiss);
  color: var(--tief);
  font-family: var(--schrift);
  font-size: clamp(1rem, 1.05vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; }

.bahn { max-width: var(--bahn); margin-inline: auto; padding-inline: var(--rand); }

/* Für Bildschirmleser, optisch versteckt */
.nur-vorlesen {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.springen {
  position: absolute; left: -9999px; z-index: 999;
  background: var(--weiss); color: var(--tief); padding: 0.75rem 1.25rem;
}
.springen:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   Typografie — vier Stufen, mehr nicht
   ========================================================================== */

.titel-gross {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700; line-height: 0.95; letter-spacing: -0.035em;
  margin: 0; text-wrap: balance;
}
.titel-mittel {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  margin: 0; text-wrap: balance;
}
.titel-klein {
  font-size: 1.25rem; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.01em; margin: 0; text-wrap: balance;
}
.label {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rot); margin: 0 0 0.9rem;
}
.label::before {
  content: ""; width: 2rem; height: 2px; background: var(--rot); flex: none;
}
.fehlt { color: var(--rot); }

/* ==========================================================================
   Kopf — die Vereinsfarbe als Fläche
   ========================================================================== */

.kopf { background: var(--rot); color: var(--weiss); }
.kopf-oben {
  max-width: var(--bahn); margin-inline: auto;
  padding: 1.5rem var(--rand) 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.25rem 2rem;
}
.kopf-logo { display: block; }
/* Das Vereinszeichen liegt als rote Strichzeichnung vor und wäre auf rotem
   Grund unsichtbar. Bis eine weiße Fassung vorliegt, wird es hier umgefärbt. */
.kopf-logo img { width: min(27rem, 66vw); filter: brightness(0) invert(1); }
.kopf-logo-text {
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--weiss);
  text-decoration: none;
}
.kopf-marke {
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.kopf-nav { border-top: 1px solid rgba(255,255,255,0.28); }
.kopf-nav ul {
  max-width: var(--bahn); margin-inline: auto;
  padding: 0.85rem var(--rand);
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.kopf-nav a {
  text-decoration: none; color: rgba(255,255,255,0.88);
  padding-bottom: 0.2rem; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.kopf-nav a:hover,
.kopf-nav .current-menu-item > a,
.kopf-nav .current_page_item > a {
  color: var(--weiss); border-bottom-color: var(--weiss);
}

/* ==========================================================================
   Auftakt: großes Bild mit eingeschobener Karte
   ========================================================================== */

.auftakt { position: relative; }
.auftakt-bild img {
  width: 100%;
  height: clamp(22rem, 58vw, 38rem);
  object-fit: cover;
}
.auftakt-innen { max-width: var(--bahn); margin-inline: auto; padding-inline: var(--rand); }

.karte-haupt {
  background: var(--weiss);
  border-top: 4px solid var(--rot);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-top: clamp(-6rem, -8vw, -3rem);
  position: relative; z-index: 1;
  max-width: 46rem;
  box-shadow: 0 2px 40px rgba(0,0,0,0.10);
  display: grid; gap: 1.25rem;
}
.karte-haupt .daten {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem;
  font-size: 0.9375rem; font-weight: 600; color: var(--rot);
  margin: 0;
}
/* Hinweis in der Hauptkarte, wenn gerade nichts läuft — grau statt rot,
   damit er nicht wie eine Einladung aussieht */
.karte-haupt .geschlossen { color: var(--still); font-weight: 600; }
.karte-haupt .kuenstler {
  color: var(--still); font-weight: 600; font-size: 1.0625rem; margin: 0;
}
.karte-haupt p { margin: 0; max-width: 58ch; }
.karte-haupt a { color: var(--rot); }

/* ==========================================================================
   Abschnitte
   ========================================================================== */

.abschnitt { padding-block: clamp(3rem, 7vw, 5.5rem); }
.abschnitt-kopf { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }

.mit-spalte {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 58rem) {
  .mit-spalte { grid-template-columns: minmax(0, 1fr) 19rem; }
}

.infospalte {
  background: var(--sand);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  display: grid; gap: 1.5rem; align-content: start;
}
.infospalte h2, .infospalte h3 {
  margin: 0 0 0.4rem;
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--still);
}
.infospalte address, .infospalte p { font-style: normal; line-height: 1.7; margin: 0; }
/* Öffnungszeiten, die gerade nicht gelten — sichtbar, aber zurückgenommen,
   damit niemand sie für eine Zusage hält */
.infospalte .gedaempft { color: var(--still); font-size: 0.9375rem; }
.infospalte strong { font-weight: 700; }
.infospalte a { color: var(--rot); }
.infospalte .frei {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--rot); font-size: 0.9375rem;
}

/* ==========================================================================
   Karten — Ausstellungen im Überblick
   ========================================================================== */

.karten {
  display: grid; gap: clamp(1.25rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.karte {
  border: 1px solid var(--rot);
  display: grid; grid-template-rows: auto 1fr;
  background: var(--weiss);
  transition: box-shadow 0.25s, transform 0.25s;
}
.karte:hover, .karte:focus-within {
  box-shadow: 0 6px 28px rgba(0,0,0,0.10); transform: translateY(-3px);
}
.karte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.karte .platzhalter {
  aspect-ratio: 4 / 3; background: var(--sand);
  display: grid; place-content: center; color: var(--still);
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.karte .inhalt {
  padding: 1.25rem 1.35rem 1.5rem;
  display: grid; gap: 0.5rem; align-content: start;
}
/* Um welche Ausstellung handelt es sich? Steht ganz oben, klein und in Rot. */
.karte .bezeichnung {
  color: var(--rot); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin: 0;
}
.karte .zusatz { color: var(--still); font-size: 0.875rem; margin: 0; }
.karte .kuenstler-zeile { color: var(--still); font-size: 0.9375rem; margin: 0; }
.karte a { text-decoration: none; }
.karte a:hover .titel-klein { color: var(--rot); }

/* Kennzeichen „läuft“ / „kommt“ auf einer Karte */
.kennzeichen {
  display: inline-block; padding: 0.2rem 0.7rem;
  font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--rot); color: var(--weiss);
  justify-self: start;
}
.kennzeichen.kommt { background: var(--tief); }

/* ==========================================================================
   Zahlen
   ========================================================================== */

.zahlen {
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 46rem) { .zahlen { grid-template-columns: repeat(3, 1fr); } }
.zahlen > div { border-top: 3px solid var(--rot); padding-top: 1rem; }
.zahl {
  font-size: clamp(2.75rem, 6vw, 4.5rem); font-weight: 700;
  line-height: 0.95; letter-spacing: -0.04em; margin: 0 0 0.5rem;
  font-variant-numeric: tabular-nums;
}
.zahlen p { color: var(--still); font-size: 0.9375rem; max-width: 28ch; margin: 0; }

/* ==========================================================================
   Mitgliedschaft
   ========================================================================== */

.mitglied { background: var(--sand); }
.mitglied-innen {
  display: grid; gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr); align-items: center;
}
@media (min-width: 50rem) {
  .mitglied-innen { grid-template-columns: 9rem minmax(0, 1fr) auto; }
}
.marke-rund {
  width: 9rem; height: 9rem; border-radius: 50%;
  background: var(--rot); color: var(--weiss);
  display: grid; place-content: center; text-align: center;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5;
}
.knopf {
  display: inline-block; white-space: nowrap;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  color: var(--weiss); background: var(--rot);
  padding: 1.05rem 2.2rem; border: 2px solid var(--rot);
  transition: background 0.2s, color 0.2s;
}
.knopf:hover { background: transparent; color: var(--rot); }

/* ==========================================================================
   Fließtext auf Unterseiten
   ========================================================================== */

/* Der Textbereich ist breit, aber die Textzeilen bleiben schmal — sonst liest
   es sich schlecht. Bilder und Galerien dürfen die volle Breite nutzen. */
.beitrag-inhalt { max-width: 62rem; }
.beitrag-inhalt > p,
.beitrag-inhalt > h2,
.beitrag-inhalt > h3,
.beitrag-inhalt > ul,
.beitrag-inhalt > ol,
.beitrag-inhalt > blockquote { max-width: 42rem; }
.beitrag-inhalt > * + * { margin-top: 1.25rem; }
.beitrag-inhalt h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; }
.beitrag-inhalt h3 { font-size: 1.2rem; font-weight: 700; }
.beitrag-inhalt a { color: var(--rot); }
.beitrag-inhalt ul, .beitrag-inhalt ol { padding-left: 1.25rem; }
.beitrag-inhalt li + li { margin-top: 0.4rem; }
.beitrag-inhalt blockquote {
  border-left: 3px solid var(--rot); padding-left: 1.25rem; margin-left: 0;
  font-size: 1.15rem;
}
.beitrag-inhalt figure { margin: 2rem 0; }
.beitrag-inhalt figcaption {
  font-size: 0.8125rem; color: var(--still); margin-top: 0.6rem;
}

/* ==========================================================================
   Die Galerie einer Ausstellung
   ==========================================================================

   Gleich große Kacheln in einem ruhigen Raster, jede mit Bildunterschrift.
   Beim Zeigen hebt sich die Kachel leicht und ein Vergrößerungszeichen
   erscheint — damit erkennbar ist, dass man das Bild größer sehen kann.
   ========================================================================== */

.galerie-bahn { margin-block: clamp(2rem, 5vw, 3.5rem); }

.beitrag-inhalt .wp-block-gallery,
.wp-block-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-block: clamp(2rem, 4vw, 3rem);
  /* Die Galerie darf breiter sein als die Textspalte — die Werke brauchen Platz */
  width: 100%;
  max-width: 62rem;
}
/* WordPress gibt den Bildern im Galerieblock feste Breiten mit (calc(33% - …)).
   Im Raster führt das zu winzigen Kacheln — deshalb zurücksetzen. */
.wp-block-gallery .wp-block-image,
.wp-block-gallery.has-nested-images figure.wp-block-image {
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  flex-basis: auto !important;
  flex-grow: 0 !important;
  position: relative;
  overflow: hidden;
  background: var(--sand);
}
/* Der Bildbehälter innerhalb muss die volle Kachel füllen */
.wp-block-gallery.has-nested-images figure.wp-block-image > a,
.wp-block-gallery.has-nested-images figure.wp-block-image > .wp-lightbox-container {
  display: block; width: 100%; height: 100%;
}
.wp-block-gallery .wp-block-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}
.wp-block-gallery .wp-block-image:hover img,
.wp-block-gallery .wp-block-image:focus-within img {
  transform: scale(1.04);
}

/* Bildunterschrift: liegt über dem Bild, erscheint beim Zeigen */
.wp-block-gallery .wp-block-image figcaption {
  position: absolute; inset: auto 0 0 0;
  margin: 0; padding: 1.5rem 0.9rem 0.75rem;
  color: #fff; font-size: 0.8125rem; line-height: 1.4;
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
  text-align: left !important;   /* WordPress zentriert sie sonst */
}

/* Vergrößerungszeichen oben rechts — zeigt, dass es größer geht */
.wp-block-gallery .wp-block-image::after {
  content: "";
  position: absolute; top: 0.6rem; right: 0.6rem;
  width: 1.9rem; height: 1.9rem;
  background: var(--rot);
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  /* Lupe als Zeichen, ohne fremde Symbolschrift */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14m.5-7H9v2H7v1h2v2h1v-2h2V9h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14m.5-7H9v2H7v1h2v2h1v-2h2V9h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-gallery .wp-block-image:hover::after,
.wp-block-gallery .wp-block-image:focus-within::after {
  opacity: 1; transform: scale(1);
}

/* Die Schaltfläche, mit der WordPress das Bild vergrößert, wird über die ganze
   Kachel gezogen — so kann man überall klicken, nicht nur auf ein Knöpfchen
   in der Ecke.
   ACHTUNG: WordPress gibt dieser Schaltfläche einen Weichzeichner
   (backdrop-filter: blur(16px)) und eine graue Füllung mit. Bei einem
   20 × 20 Pixel großen Knopf in der Ecke fällt das nicht auf — über die ganze
   Kachel gezogen würde damit das ganze Bild verschwimmen. Beides muss deshalb
   ausdrücklich zurückgenommen werden, auch in WordPress' eigenen
   Hover-Regeln. */
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger,
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger:hover,
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger:focus,
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger:not(:hover):not(:active):not(.has-background) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  cursor: zoom-in;
}
/* Das Symbol von WordPress in der Schaltfläche ausblenden — wir zeigen eine
   eigene Lupe oben rechts (siehe ::after weiter oben). */
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger svg,
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger img { display: none; }

/* Die Großansicht selbst */
.wp-lightbox-overlay { background: rgba(10,10,10,0.94); }
.wp-lightbox-overlay .close-button { color: #fff; }

/* ==========================================================================
   Bilder gegen bequemes Abspeichern sichern
   ==========================================================================
   Kein echter Schutz — siehe Erläuterung in functions.php. Diese Regeln
   verhindern das Markieren und das lange Antippen auf dem Telefon.
   ========================================================================== */

.beitrag-inhalt img,
.wp-block-gallery img,
.karte img,
.auftakt-bild img,
.ausstellung-plakat img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;   /* kein "Bild sichern" beim langen Antippen */
  pointer-events: auto;
}

/* ==========================================================================
   Fuß
   ========================================================================== */

.fuss { background: var(--tief); color: var(--weiss); }
.fuss-raster {
  display: grid; gap: 2rem clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.fuss-raster h2 {
  margin: 0 0 0.75rem; font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--rot);
}
.fuss-raster address, .fuss-raster p {
  font-style: normal; color: #b4b4b4; line-height: 1.75; font-size: 0.9375rem; margin: 0;
}
.fuss-raster a { color: #b4b4b4; }
.fuss-raster a:hover { color: var(--weiss); }
.fuss-schluss {
  border-top: 1px solid #2c2c2c; padding-block: 1.25rem 2.5rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8a8a;
  list-style: none; margin: 0;
}
.fuss-schluss a { text-decoration: none; }
.fuss-schluss a:hover { color: var(--weiss); }

/* ==========================================================================
   Einzelne Ausstellung
   ========================================================================== */

.ausstellung-kopf { padding-block: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); }
.ausstellung-kopf .titel-gross { margin-top: 0.4rem; }
.ausstellung-angaben {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; padding: 0;
  border-top: 1px solid var(--kante);
}
.ausstellung-angaben > div {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.4rem 1.5rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--kante);
}
@media (max-width: 34rem) {
  .ausstellung-angaben > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}
.ausstellung-angaben dt {
  color: var(--still); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.ausstellung-angaben dd { margin: 0; }
.ausstellung-plakat { margin-block: clamp(1.5rem, 3vw, 2.5rem); }
.ausstellung-plakat figcaption {
  font-size: 0.8125rem; color: var(--still); margin-top: 0.6rem;
}

.zurueck {
  display: inline-block; margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--rot);
  border-bottom: 2px solid var(--rot); padding-bottom: 0.2rem;
}

/* Jahresüberschrift im Archiv */
.jahr-marke {
  font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700;
  letter-spacing: -0.03em; margin: clamp(2.5rem, 5vw, 4rem) 0 1.5rem;
  padding-top: 1rem; border-top: 3px solid var(--rot);
  font-variant-numeric: tabular-nums;
}
.jahr-marke:first-of-type { margin-top: 0; }

/* ==========================================================================
   Rücksicht auf Einstellungen des Betrachters
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .karte:hover, .karte:focus-within { transform: none; }
}

/* ==========================================================================
   Unterseiten — Titelband, zwei Spalten, Weiterlesen
   ==========================================================================

   Die Startseite lebt vom roten Band, dem großen Bild und der Infospalte. Die
   Unterseiten hatten davon nichts: Titel, Text, Ende — die halbe Seite blieb
   leer. Diese Regeln geben ihnen denselben Aufbau.
   ========================================================================== */

/* Der Auftakt einer Unterseite: dasselbe Motiv wie auf der Startseite —
   großes Bild, darin eine weiße Karte mit Marginalie und Titel. */
.seiten-auftakt { position: relative; }
.seiten-auftakt-bild img {
  width: 100%;
  height: clamp(16rem, 34vw, 26rem);
  object-fit: cover;
}
.karte-seite {
  max-width: 40rem;
  gap: 0.5rem;
  margin-top: clamp(-5rem, -7vw, -2.5rem);
}
.karte-seite .titel-gross { max-width: 20ch; }

/* Der Auftakt ohne Bild: eine ruhige Farbfläche in der eingestellten Farbe.
   Ein sehr flacher Verlauf nach unten gibt ihr Tiefe, ohne aufdringlich zu
   werden — eine reine Fläche wirkt flach, ein starker Verlauf billig. */
.seiten-auftakt-farbe .seiten-auftakt-flaeche {
  height: clamp(11rem, 22vw, 17rem);
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--kopffarbe) 88%, white) 0%,
      var(--kopffarbe) 100%);
}
/* Für Browser ohne color-mix: einfach die Farbe */
@supports not (background: color-mix(in srgb, red 50%, white)) {
  .seiten-auftakt-farbe .seiten-auftakt-flaeche { background: var(--kopffarbe); }
}

/* Bei heller Kopffarbe würde die weiße Karte darauf verschwimmen. Sie bekommt
   dann einen feinen Rahmen statt des Schattens — das setzt sie sauber ab, ohne
   dass ein Schlagschatten auf hellem Grund schmutzig wirkt. */
.seiten-auftakt-farbe.auf-hell .karte-seite {
  box-shadow: none;
  border: 1px solid var(--kante);
  border-top: 4px solid var(--rot);
}
/* Bei hellem Grund läuft die Fläche etwas höher, damit die Karte trotzdem
   sichtbar hineinragt */
.seiten-auftakt-farbe.auf-hell .seiten-auftakt-flaeche {
  height: clamp(9rem, 18vw, 14rem);
}

/* Ohne Kopfbild — bei Impressum und Datenschutz */
.seiten-kopf {
  background: var(--sand);
  border-bottom: 1px solid var(--kante);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.seiten-kopf .titel-gross { max-width: 22ch; }

/* Der erste Absatz einer Seite trägt sie an — größer gesetzt als der Rest */
.beitrag-inhalt > p:first-of-type {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--tief);
}
.beitrag-inhalt > h2:first-child + p {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
}

/* Die Infospalte läuft beim Scrollen mit — sie enthält die Angaben, die man
   an jeder Stelle der Seite brauchen kann. */
@media (min-width: 58rem) {
  .mit-spalte > .infospalte {
    position: sticky;
    top: 1.5rem;
  }
}

/* Rechtliche Seiten: nur Text, nichts drumherum */
.nur-text { max-width: 46rem; }

/* Die Ausstellung in der Seitenspalte */
.spalten-ausstellung { display: grid; gap: 0.3rem; }
.spalten-ausstellung a {
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em;
  text-decoration: none; color: var(--tief);
  border-bottom: 2px solid var(--rot); justify-self: start;
  padding-bottom: 0.1rem;
}
.spalten-ausstellung a:hover { color: var(--rot); }
.klein-grau { color: var(--still); font-size: 0.875rem; }

/* Weiterlesen — die übrigen Seiten des Vereins */
.weiter {
  border-top: 1px solid var(--kante);
  background: var(--sand);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.weiter-liste {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
/* Jede Kachel trägt ihren eigenen Rahmen. So bleibt keine graue Lücke, wenn
   die letzte Reihe nicht voll wird. */
.weiter-liste li {
  background: var(--weiss);
  border: 1px solid var(--kante);
  transition: border-color 0.2s;
}
.weiter-liste li:hover { border-color: var(--rot); }
.weiter-liste a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 1.35rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.weiter-liste a:hover { background: var(--rot); color: var(--weiss); }
.weiter-titel { font-weight: 700; letter-spacing: -0.01em; }
.weiter-pfeil { color: var(--rot); font-size: 1.1rem; transition: color 0.2s, transform 0.2s; }
.weiter-liste a:hover .weiter-pfeil { color: var(--weiss); transform: translateX(3px); }

/* Bilder im Fließtext einer Seite: nicht klein und verloren, sondern in
   gleicher Breite mit Bildunterschrift darunter. Mehrere kleine Bilder
   hintereinander stellen sich nebeneinander. */
.beitrag-inhalt > .wp-block-image {
  margin-block: clamp(1.75rem, 3vw, 2.5rem);
}
/* Bilder nie über ihre wirkliche Größe hinaus strecken — die Bilder der alten
   Website sind teils nur 300 bis 400 Pixel breit und würden sonst unscharf. */
.beitrag-inhalt > .wp-block-image img {
  width: auto;
  max-width: min(100%, 42rem);
  height: auto;
  background: var(--sand);
}
.beitrag-inhalt > .wp-block-image figcaption {
  font-size: 0.8125rem; color: var(--still); margin-top: 0.6rem;
  padding-left: 0.75rem; border-left: 2px solid var(--rot);
}

/* Stehen mehrere Bilder unmittelbar hintereinander, kommen sie nebeneinander */
@media (min-width: 46rem) {
  .beitrag-inhalt > .wp-block-image + .wp-block-image {
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
  }
}

/* Die erste Überschrift einer Seite steht schon im Titelband — die im Text
   darf deshalb ruhiger ausfallen */
.beitrag-inhalt > h2:first-child {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--still);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .weiter-liste a:hover .weiter-pfeil { transform: none; }
}
