/* ============================================================
   SCHWANENRITTERORDEN — Designsystem
   ------------------------------------------------------------
   Alle Farben, Schriften und Abstände stehen in einem Block
   ganz oben. Wer das Erscheinungsbild ändern will, ändert dort
   einen Wert — der Rest der Seite zieht automatisch nach.
   ============================================================ */

:root {

  /* --- Farben (aus dem Ordenswappen abgeleitet) --- */
  --blau-tief:    #0f3358;   /* Fußzeile, Überschriften */
  --blau:         #1c5488;   /* Wappenblau, Hauptfarbe */
  --blau-mittel:  #4a7fb0;   /* Linien, Nebentext auf Blau */
  --blau-zart:    #dce9f7;   /* Seitenhintergrund */
  --blau-nebel:   #eef4fb;   /* abgesetzte Flächen */

  --gold:         #b8912f;   /* Kranz, Zierlinien */
  --gold-hell:    #d9bd6e;
  --rot:          #a01c24;   /* Krone/Mantel, sparsam einsetzen */

  --weiss:        #ffffff;
  --text:         #23303d;
  --text-leise:   #5b6b7b;
  --linie:        #cfdcea;

  /* --- Schriften (Systemschriften, kein Google-Aufruf) --- */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
           Arial, sans-serif;

  /* --- Maße --- */
  --bahn:      1140px;   /* maximale Inhaltsbreite */
  --abstand:   clamp(2.75rem, 6vw, 5rem);   /* Abstand zwischen Abschnitten */
  --rand:      clamp(1.1rem, 4vw, 2.5rem);  /* Seitenrand */
  --radius:    6px;
  --schatten:  0 2px 4px rgba(15, 51, 88, .05),
               0 10px 28px rgba(15, 51, 88, .08);

  /* Breite der Bilder, die neben einem Textblock stehen (siehe .textbild).
     Gilt für die ganze Website — hier ändern, alle Seiten ziehen nach.
     240px schmal · 300px normal · 380px breit */
  --bildbreite: 300px;
}

/* ---------- Grundlagen ---------------------------------------------- */

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

html { scroll-behavior: smooth; }

/* Sprungziele nicht unter den festen Kopf rutschen lassen */
[id] { scroll-margin-top: 80px; }

body {
  margin: 0;
  background: var(--blau-zart);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.09rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blau); text-underline-offset: .18em; }
a:hover { color: var(--rot); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--blau-tief);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.95rem, 1.4rem + 2.2vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem); margin-top: 1.6em; }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); margin-top: 1.8em; }

p, ul, ol { margin: 0 0 1.15em; }
li { margin-bottom: .35em; }

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

.sprungmarke {
  position: absolute; left: -9999px;
  background: var(--blau-tief); color: #fff; padding: .7em 1.2em; z-index: 99;
}
.sprungmarke:focus { left: 1rem; top: 1rem; }

/* ---------- Kopfbereich ---------------------------------------------- */

.kopf { background: var(--weiss); }

/* --- Banner ----------------------------------------------------------
   Läuft mittig über die volle Seitenbreite.
   Größer/kleiner: den Wert bei max-width ändern (z. B. 1000px).        */

.kopf-banner {
  background: var(--weiss);
  padding: clamp(.6rem, 2vw, 1.4rem) var(--rand);
}
.kopf-banner a { display: block; }
.kopf-banner img {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  margin-inline: auto;
}

/* Ersatz, solange img/banner.jpg fehlt */
.kopf-banner .marke-text {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; text-decoration: none;
}

.marke-text { display: flex; flex-direction: column; }

.marke-name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, .95rem + 1vw, 1.65rem);
  color: var(--blau-tief);
  letter-spacing: .01em;
  line-height: 1.1;
}
.marke-zusatz {
  font-size: .8rem; color: var(--text-leise); letter-spacing: .02em;
}
.marke-motto {
  font-family: var(--serif);
  font-style: italic;
  font-size: .82rem;
  color: var(--gold);
  margin-top: .15rem;
}

/* ---------- Hauptmenü ------------------------------------------------ */

/* Die Menüleiste bleibt beim Scrollen oben stehen, das Banner scrollt weg. */
.menue {
  background: var(--weiss);
  border-top: 1px solid var(--linie);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 40;
}

.menue ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(.4rem, 1.6vw, 1.5rem);
}

/* Zeile mit dem Menü-Knopf — nur auf schmalen Bildschirmen sichtbar */
.menue-leiste { display: none; background: var(--weiss); padding-bottom: .8rem; }

.menue a {
  display: block;
  padding: .85rem .2rem;
  font-size: .82rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--blau-tief);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.menue a:hover { color: var(--rot); border-bottom-color: var(--gold-hell); }
.menue a[aria-current="page"] { color: var(--blau); border-bottom-color: var(--gold); }

.menue-akzent a {
  color: var(--rot);
  font-weight: 600;
}

.menue-knopf {
  display: inline-flex;
  align-items: center; gap: .55rem;
  background: none; border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: .55rem .9rem;
  font: inherit; font-size: .85rem; color: var(--blau-tief);
  cursor: pointer;
}
.menue-balken {
  width: 20px; height: 2px; background: currentColor; position: relative;
}
.menue-balken::before, .menue-balken::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px;
  background: currentColor;
}
.menue-balken::before { top: -6px; }
.menue-balken::after  { top:  6px; }

@media (max-width: 900px) {
  .menue-leiste { display: block; }
  .menue { display: none; position: static; border-top: 0; }
  .menue.menue-offen { display: block; }
  .menue ul { flex-direction: column; justify-content: flex-start; gap: 0; padding-block: .5rem; }
  .menue a { padding: .8rem 0; border-bottom: 1px solid var(--linie); margin: 0; }
}

/* ---------- Inhaltsbereich ------------------------------------------- */

.inhalt { display: block; }

/* Ein Abschnitt = ein <section class="teil">.
   Zusatzklassen: teil-hell (weiße Karte), teil-blau (blaue Fläche) */

.teil { padding-block: var(--abstand); }

.teil > .bahn > :first-child { margin-top: 0; }

.teil-hell {
  background: var(--weiss);
}

.teil-nebel { background: var(--blau-nebel); }

.teil-blau {
  background: var(--blau-tief);
  color: #e6eef7;
}
.teil-blau h1, .teil-blau h2, .teil-blau h3 { color: var(--weiss); }
.teil-blau a { color: var(--gold-hell); }

/* Seitentitel-Kopf jeder Unterseite */

.seitenkopf {
  background:
    linear-gradient(180deg, rgba(28,84,136,.10), rgba(28,84,136,0)),
    var(--blau-zart);
  padding-block: clamp(2.2rem, 5vw, 3.6rem) clamp(1.6rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--linie);
}
.seitenkopf h1 { margin-bottom: .25em; }
.seitenkopf .vorspann {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem);
  color: var(--blau);
  max-width: 62ch;
  margin: 0;
}

/* Zierlinie mit Raute */
.zierlinie {
  border: 0; height: auto; margin: 2.6rem auto;
  max-width: 220px; text-align: center; overflow: visible;
}
.zierlinie::before {
  content: "◆";
  display: block; color: var(--gold); font-size: .7rem;
  position: relative; top: -.62em; background: transparent;
}
.zierlinie { border-top: 1px solid var(--gold-hell); }

/* Fließtext angenehm schmal halten.
   .bahn.text behält die volle Bahnbreite, begrenzt aber die Zeilenlänge —
   so bleibt der Text bündig unter der Überschrift des Seitenkopfs. */
.text { max-width: 68ch; }
.bahn.text { max-width: var(--bahn); }
.bahn.text > * { max-width: 68ch; }
.bahn.text > .zweispalt,
.bahn.text > .tabelle-huelle,
.bahn.text > .galerie,
.bahn.text > .textbild,
.bahn.text > .zierlinie { max-width: none; }
.text-mitte { max-width: 68ch; margin-inline: auto; }

.vorspann-gross {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.05rem + .6vw, 1.45rem);
  line-height: 1.5;
  color: var(--blau-tief);
}

/* ---------- Startseite: Aufmacher ------------------------------------ */

.aufmacher {
  background: var(--blau-tief);
  color: #eaf1f9;
  position: relative;
  overflow: hidden;
}
.aufmacher::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hell), var(--gold));
}
.aufmacher-innen {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.aufmacher h1 { color: var(--weiss); }
.aufmacher .kicker {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-hell); margin-bottom: 1.1rem;
}
.aufmacher p { color: #cfdcea; max-width: 54ch; }
.aufmacher-bild figure { margin: 0; }
.aufmacher-bild img, .aufmacher-bild .wappen-svg {
  margin-inline: auto; max-height: 340px; width: auto;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.35));
}

@media (max-width: 820px) {
  .aufmacher-innen { grid-template-columns: 1fr; text-align: center; }
  .aufmacher p { margin-inline: auto; }
  .aufmacher-bild { order: -1; }
}

/* ---------- Kacheln --------------------------------------------------- */

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.8rem);
  margin-block: 1.5rem;
}

.kachel {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--schatten);
  display: flex; flex-direction: column;
}
.kachel h3 { margin-top: 0; }
.kachel p:last-child { margin-bottom: 0; }
.kachel .mehr { margin-top: auto; padding-top: .9rem; font-size: .9rem; }

.teil-hell .kachel { background: var(--blau-nebel); box-shadow: none; }

/* Kacheln fest in zwei Spalten — z. B. vier Kacheln im Quadrat neben
   einem Bild:  <div class="kacheln kacheln-2">                         */
.kacheln-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .kacheln-2 { grid-template-columns: 1fr; } }

/* Zahlenreihe */
.zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.4rem; margin: 2rem 0 0;
  list-style: none; padding: 0;
}
.zahl { text-align: center; }
.zahl b {
  display: block; font-family: var(--serif);
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  color: var(--gold); line-height: 1;
}
.zahl span { font-size: .9rem; color: var(--text-leise); }
.teil-blau .zahl span { color: #b9cbe0; }

/* ---------- Bilder und Galerien --------------------------------------- */

figure.bild { margin: 1.8rem 0; }
figure.bild img { border-radius: var(--radius); box-shadow: var(--schatten); }

/* Größenstufen für einzelne Bilder:
   bild('datei.jpg', 'Alt', 'Unterschrift', 'klein mitte'); */
figure.bild.klein  { max-width: 360px; }
figure.bild.mittel { max-width: 620px; }
figure.bild.gross  { max-width: 100%; }
figure.bild.mitte  { margin-inline: auto; }

/* 'frei' = freigestelltes Bild ohne Rahmen und Schatten (transparente PNGs
   wie Wappen oder Ordenskette):  bild('datei.png', 'Alt', '', 'frei');   */
figure.bild.frei img {
  box-shadow: none; border-radius: 0; background: transparent;
}
figure.bild figcaption,
.galerie figcaption {
  font-size: .85rem; color: var(--text-leise);
  margin-top: .55rem; line-height: 1.45;
}

.bildnachweis { color: #8a99a8; }

.bild-fehlt {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem; min-height: 170px;
  background: repeating-linear-gradient(45deg, #e7eef7 0 10px, #dfe9f4 10px 20px);
  border: 1px dashed var(--blau-mittel);
  border-radius: var(--radius);
  color: var(--blau); text-align: center; padding: 1rem;
}
.bild-fehlt span { font-size: .85rem; letter-spacing: .04em; }
.bild-fehlt code { font-size: .78rem; color: var(--text-leise); }

.galerie {
  display: grid; gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-block: 1.8rem;
  align-items: start;
}
.galerie-1 { grid-template-columns: 1fr; }
.galerie-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.galerie-3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.galerie-4 { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.galerie figure { margin: 0; display: flex; flex-direction: column; }

/* --- Alle Bilder einer Galerie gleich groß ---------------------------
   Die Bildfläche bekommt ein festes Seitenverhältnis (oder eine feste
   Höhe). Unterschiedliche Auflösungen der Originaldateien spielen damit
   keine Rolle mehr. Gesteuert wird das über den dritten Wert bei
   galerie(...) — siehe inc/bausteine.php.                              */

.galerie figure > img,
.galerie figure > .bild-fehlt {
  width: 100%;
  aspect-ratio: var(--bild-format, 4 / 3);
  height: var(--bild-hoehe, auto);
  object-fit: cover;
  object-position: center;
  background: var(--blau-nebel);
  border-radius: var(--radius);
}

.galerie figure > .bild-fehlt { min-height: 0; }

.galerie-quer    { --bild-format: 4 / 3; }
.galerie-breit   { --bild-format: 16 / 9; }
.galerie-quadrat { --bild-format: 1 / 1; }
.galerie-hoch    { --bild-format: 3 / 4; }

/* Originalproportionen behalten (dann sind die Bilder wieder verschieden hoch) */
.galerie-frei figure > img,
.galerie-frei figure > .bild-fehlt {
  aspect-ratio: auto; height: auto; object-fit: fill;
}
.galerie-frei figure > .bild-fehlt { min-height: 170px; }

/* Nichts abschneiden: Bild wird vollständig in die Fläche eingepasst */
.galerie-ganz figure > img { object-fit: contain; }

/* Bildunterschriften bündig unter der Bildfläche */
.galerie figcaption { margin-top: .55rem; }

/* ---------- Textblock mit Bild daneben --------------------------------
   Aufbau in der Seitendatei:

     <div class="textbild">
       <div>
         <h2>Überschrift</h2>
         <p>Text …</p>
       </div>
       <div>
         <?php bild('datei.jpg', 'Alt-Text', 'Bildunterschrift'); ?>
       </div>
     </div>

   Alle so gesetzten Bilder sind gleich breit. Die Breite steht als
   --bildbreite ganz oben im Einstellungsblock.

   Nur für einen einzelnen Block eine andere Breite:
     <div class="textbild" style="--bildbreite: 240px">

   Bild ausnahmsweise links, Text rechts:
     <div class="textbild textbild-links">
   -------------------------------------------------------------------- */

.textbild {
  display: grid;
  grid-template-columns: 1fr var(--bildbreite);
  gap: clamp(1.5rem, 3vw, 2.8rem);
  align-items: start;
}

/* Überschrift oben bündig zum Bild */
.textbild > * > :first-child { margin-top: 0; }
.textbild figure.bild { margin: .35rem 0 0; }

.textbild-links { grid-template-columns: var(--bildbreite) 1fr; }
.textbild-links > :first-child { order: 2; }
.textbild-links > :last-child  { order: 1; }

/* Auf schmalen Bildschirmen rutscht das Bild unter den Text */
@media (max-width: 900px) {
  .textbild, .textbild-links { grid-template-columns: 1fr; }
  .textbild-links > :first-child,
  .textbild-links > :last-child { order: 0; }
  .textbild figure.bild { max-width: var(--bildbreite); margin-top: 1.2rem; }
}

/* Ort mit Text + Bildern */
.ort { margin-block: var(--abstand); }
.ort:first-of-type { margin-top: 1rem; }
.ort > h3 {
  margin-top: 0;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--gold-hell);
}

/* ---------- Tabellen --------------------------------------------------- */

.tabelle-huelle {
  overflow-x: auto;
  margin-block: 1.6rem;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--weiss);
}
.tabelle { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabelle th, .tabelle td {
  text-align: left; padding: .7rem .95rem; vertical-align: top;
}
.tabelle thead th {
  background: var(--blau-tief); color: #fff;
  font-family: var(--sans); font-weight: 600;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  position: sticky; top: 0;
}
.tabelle tbody tr:nth-child(odd) { background: var(--blau-nebel); }
.tabelle tbody tr:hover { background: #e2ecf8; }
.tabelle td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--blau); }

@media (max-width: 620px) {
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr { border-bottom: 1px solid var(--linie); padding: .5rem 0; }
  .tabelle td { padding: .25rem .95rem; }
  .tabelle td::before {
    content: attr(data-spalte) ": ";
    font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-leise);
  }
  .tabelle td:first-child::before { content: ""; }
  .tabelle td:first-child { font-family: var(--serif); font-size: 1.05rem; }
}

/* ---------- Mitgliederstimmen ----------------------------------------- */

.stimmen {
  columns: 2 320px;
  column-gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-block: 2rem;
}
.stimme {
  break-inside: avoid;
  margin: 0 0 clamp(1.2rem, 2.5vw, 2rem);
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.2rem;
  box-shadow: var(--schatten);
}
.stimme blockquote {
  margin: 0; font-family: var(--serif); font-size: 1.03rem; line-height: 1.62;
  color: var(--text);
}
.stimme blockquote::before { content: "„"; color: var(--gold); font-size: 1.4em; line-height: 0; }
.stimme figcaption { margin-top: 1rem; }
.stimme-name {
  display: block; font-weight: 600; color: var(--blau-tief);
  letter-spacing: .05em; text-transform: uppercase; font-size: .8rem;
}
.stimme-zusatz { display: block; font-size: .82rem; color: var(--text-leise); }

/* ---------- Termine ---------------------------------------------------- */

.termine { list-style: none; margin: 1.5rem 0; padding: 0; }
.termin {
  display: grid;
  grid-template-columns: minmax(140px, 210px) 1fr;
  gap: .3rem 1.4rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--linie);
}
.termin-datum {
  font-family: var(--serif); font-size: 1.05rem; color: var(--blau);
  font-variant-numeric: tabular-nums;
}
.termin-titel { font-weight: 600; color: var(--blau-tief); }
.termin-ort { grid-column: 2; color: var(--text-leise); font-size: .92rem; }
.teil-blau .termin { border-bottom-color: rgba(255,255,255,.15); }
.teil-blau .termin-datum { color: var(--gold-hell); }
.teil-blau .termin-titel { color: #fff; }
.teil-blau .termin-ort { color: #b9cbe0; }

@media (max-width: 560px) {
  .termin { grid-template-columns: 1fr; }
  .termin-ort { grid-column: 1; }
}

/* ---------- Hinweise, Knöpfe, Aktionen --------------------------------- */

.hinweis {
  background: var(--blau-nebel);
  border-left: 3px solid var(--blau-mittel);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .95rem 1.2rem;
  font-size: .95rem;
  color: var(--text-leise);
  margin-block: 1.5rem;
}
.hinweis.entwurf {
  background: #fdf6e3; border-left-color: var(--gold);
  color: #6b5416;
}

.knopf {
  display: inline-block;
  background: var(--blau);
  color: #fff !important;
  text-decoration: none;
  padding: .85rem 1.9rem;
  border-radius: var(--radius);
  font-size: .88rem; letter-spacing: .09em; text-transform: uppercase;
  border: 1px solid var(--blau);
  transition: background .15s ease, border-color .15s ease;
}
.knopf:hover { background: var(--blau-tief); border-color: var(--gold); }

.knopf-hell {
  background: transparent; color: var(--gold-hell) !important;
  border-color: var(--gold);
}
.knopf-hell:hover { background: var(--gold); color: var(--blau-tief) !important; }

/* Der Knopf funktioniert auch als Absende-Schaltfläche im Formular */
button.knopf { font-family: inherit; cursor: pointer; }

.aktion { margin-block: 2rem; }
.aktion-unter { font-size: .9rem; color: var(--text-leise); margin-top: .8rem; }
.teil-blau .aktion-unter { color: #b9cbe0; }

/* Kontaktkarte */
.kontaktkarte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--schatten);
}
.kontaktkarte h3 { margin-top: 0; }
.kontaktkarte p:last-child { margin-bottom: 0; }

.zweispalt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.4rem);
}

/* Aufzählung mit Rauten */
ul.rauten { list-style: none; padding-left: 1.5rem; }
ul.rauten li { position: relative; }
ul.rauten li::before {
  content: "◆"; position: absolute; left: -1.5rem; top: .05em;
  color: var(--gold); font-size: .62em;
}

/* ---------- Formulare --------------------------------------------------
   Wird vom Anmeldeformular auf veranstaltungen.php verwendet.
   Aufbau dort: <div class="formularkarte"> … <form> … </div>
   ---------------------------------------------------------------------- */

.formularkarte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  max-width: 760px;
  margin-inline: auto;
}
.formularkarte > :first-child { margin-top: 0; }

/* Eckdaten der Veranstaltung */
.eckdaten {
  background: var(--blau-nebel);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.9rem;
}
.eckdaten dl {
  margin: 0; display: grid;
  grid-template-columns: auto 1fr; gap: .45rem 1.2rem;
  font-size: .96rem;
}
.eckdaten dt { font-weight: 600; color: var(--blau-tief); }
.eckdaten dd { margin: 0; }
@media (max-width: 560px) {
  .eckdaten dl { grid-template-columns: 1fr; gap: .1rem; }
  .eckdaten dd { margin-bottom: .7rem; }
}

/* Feldgruppen */
.formularkarte fieldset { border: 0; padding: 0; margin: 0 0 1.7rem; }
.formularkarte legend {
  font-family: var(--serif);
  font-size: 1.08rem; font-weight: 600; color: var(--blau-tief);
  padding: 0 0 .45rem; margin-bottom: .9rem;
  width: 100%; border-bottom: 1px solid var(--linie);
}

.reihe { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.feld  { margin-bottom: 1rem; flex: 1 1 220px; min-width: 0; }
.feld.klein { flex: 0 0 140px; }
.feld.voll  { flex: 1 1 100%; }
@media (max-width: 560px) { .feld.klein { flex: 1 1 100%; } }

.formularkarte label {
  display: block; font-weight: 600; font-size: .92rem;
  margin-bottom: .35rem; color: var(--blau-tief);
}
.formularkarte .opt { font-weight: 400; color: var(--text-leise); font-size: .85rem; }

.formularkarte input[type=text],
.formularkarte input[type=email],
.formularkarte input[type=tel],
.formularkarte textarea {
  width: 100%; padding: .65rem .8rem;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--weiss);
  border: 1px solid #b9c9dd; border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.formularkarte input:focus, .formularkarte textarea:focus {
  outline: 0; border-color: var(--blau);
  box-shadow: 0 0 0 3px rgba(28, 84, 136, .16);
}
.formularkarte textarea { min-height: 7rem; resize: vertical; }

.feldhinweis { font-size: .85rem; color: var(--text-leise); margin: .35rem 0 0; }
.feldfehler   { font-size: .85rem; color: var(--rot); margin: .35rem 0 0; font-weight: 600; }
.hat-fehler input, .hat-fehler textarea { border-color: var(--rot); background: #fdf6f6; }

/* Einwilligungs-Kästchen */
.einwilligung {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--blau-nebel); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: .9rem 1rem;
}
.einwilligung input {
  margin: .25rem 0 0; width: 18px; height: 18px;
  flex: 0 0 auto; accent-color: var(--blau);
}
.einwilligung label {
  font-weight: 400; font-size: .92rem; margin: 0; color: var(--text);
}
.hat-fehler .einwilligung { border-color: var(--rot); background: #fdf6f6; }

/* Aufklappbarer Datenschutzhinweis */
.dsgvo {
  margin: 1.4rem 0 0;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--blau-nebel);
}
.dsgvo summary {
  cursor: pointer; padding: .8rem 1rem;
  font-weight: 600; font-size: .92rem; color: var(--blau-tief);
}
.dsgvo summary:hover { color: var(--blau); }
.dsgvo-inhalt {
  padding: .9rem 1.1rem 1rem;
  border-top: 1px solid var(--linie);
  font-size: .89rem; line-height: 1.6;
}
.dsgvo-inhalt p { margin: 0 0 .7rem; }
.dsgvo-inhalt p:last-child { margin-bottom: 0; }
.dsgvo-inhalt strong { color: var(--blau-tief); }

/* Meldungen über dem Formular */
.meldung { border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0 0 1.6rem; }
.meldung p { margin: 0; }
.meldung p + p { margin-top: .5rem; }
.fehlerbox  { background: #fdf1f0; border: 1px solid #e2b5b3; color: #7d1a17; }
.warnbox    { background: #fdf6e6; border: 1px solid #e3cd93; color: #6d5312; }
.erfolgsbox { background: #eef7ee; border: 1px solid #b3d4b5; color: #1e5423; }

.pflichthinweis { font-size: .85rem; color: var(--text-leise); margin: .9rem 0 0; }

/* Falle für Spam-Programme — für Menschen unsichtbar */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Fußzeile --------------------------------------------------- */

.fuss {
  background: var(--blau-tief);
  color: #c6d6e6;
  margin-top: 0;
  border-top: 4px solid var(--gold);
}
.fuss-innen {
  display: grid;
  grid-template-columns: minmax(88px, 120px) repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.4rem, 3vw, 2.2rem);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  align-items: start;
}

/* Ordenswappen in der linken Fußzeilen-Spalte.
   Größer/kleiner: den Wert bei max-width ändern. */
.fuss-wappen img, .fuss-wappen .wappen-svg {
  display: block;
  width: 100%;
  max-width: 118px;
  height: auto;
}

@media (max-width: 760px) {
  .fuss-innen { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .fuss-wappen { grid-column: 1 / -1; }
  .fuss-wappen img, .fuss-wappen .wappen-svg { max-width: 96px; }
}
.fuss-titel {
  font-family: var(--sans);
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-hell); margin-bottom: .9rem;
  hyphens: auto; overflow-wrap: break-word;   /* lange Wörter umbrechen lassen */
}
.fuss p { font-size: .93rem; margin-bottom: .8rem; }
.fuss a { color: #dbe6f2; text-decoration: none; }
.fuss a:hover { color: var(--gold-hell); text-decoration: underline; }
.fuss-motto { font-family: var(--serif); font-style: italic; color: var(--gold-hell); }
.fuss-klein { font-size: .87rem; color: #9fb5cb; }
.fuss-liste { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.fuss-liste li { margin-bottom: .45em; }

.fuss-zeile {
  border-top: 1px solid rgba(255,255,255,.13);
  padding-block: 1.1rem;
}
.fuss-zeile p { margin: 0; font-size: .82rem; color: #8ea6bf; }

/* ---------- Druck ------------------------------------------------------ */

@media print {
  .kopf, .menue, .fuss, .sprungmarke, .aktion { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .teil { padding-block: 0; }
}
