/* Fortbildungsfinder – öffentliches Portal. Mobil zuerst, funktional, ohne Framework. */
:root {
  --text: #1f2933;
  --leise: #5f6b7a;
  --linie: #d9dee5;
  --flaeche: #f5f7fa;
  --akzent: #1d5fa8;
  --akzent-dunkel: #164a83;
  --gruen: #22743a;
  --rot: #b42318;
  --orange: #9a5b00;
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #fff;
}
a { color: var(--akzent); }

.kopf { padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.marke { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.marke span { font-weight: 400; color: var(--leise); }

.inhalt { max-width: 860px; margin: 0 auto; padding: 16px; }
.einleitung h1 { font-size: 1.5rem; line-height: 1.25; margin: 8px 0; }
.einleitung p { color: var(--leise); margin: 0 0 16px; }

/* Suchformular */
.suche {
  display: grid; gap: 12px;
  padding: 16px; background: var(--flaeche); border-radius: var(--radius); margin-bottom: 16px;
}
.feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feld label, .feld legend { font-size: 0.9rem; font-weight: 600; }
.feld input, .feld select {
  font: inherit; padding: 10px; border: 1px solid var(--linie); border-radius: 6px; background: #fff; width: 100%;
}
.feld-format { border: 0; padding: 0; margin: 0; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
.feld-format legend { width: 100%; margin-bottom: 4px; }
.feld-format label { font-weight: 400; display: flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; }
.weitere summary { cursor: pointer; font-weight: 600; padding: 10px 0; }   /* list-item behält den Aufklapp-Pfeil */
.weitere[open] { display: grid; gap: 12px; }

.knopf {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  padding: 10px 16px; min-height: 44px; border: 0; border-radius: 6px;
  background: var(--akzent); color: #fff; cursor: pointer;
}
.knopf:hover { background: var(--akzent-dunkel); }

/* Ergebnisse */
.anzahl { margin: 8px 0 12px; }
.hinweis { padding: 12px; background: #fff7e6; border-radius: var(--radius); }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.karte { border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; }
.datum { margin: 0; font-weight: 700; }
.zeit { font-weight: 400; color: var(--leise); margin-left: 6px; }
.titel { font-size: 1.1rem; line-height: 1.3; margin: 4px 0; overflow-wrap: anywhere; }
.thema { margin: 0 0 4px; color: var(--leise); font-size: 0.95rem; }
.anbieter { margin: 0; }
.eckdaten { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.km, .klein, .geprueft { color: var(--leise); font-size: 0.9rem; }
.preis { font-weight: 600; }
.frei { font-weight: 600; }
.frei-frei { color: var(--gruen); }
.frei-restplatze { color: var(--orange); }
.frei-ausgebucht { color: var(--rot); }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 0; }
.leer { padding: 16px; background: var(--flaeche); border-radius: var(--radius); }

.seiten { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0; }
.seiten a { min-height: 44px; display: inline-flex; align-items: center; }
.jederzeit { margin-top: 24px; }
.jederzeit h2 { font-size: 1.1rem; }
.jederzeit li { margin-bottom: 6px; }

/* Detailseiten */
.pfad { font-size: 0.9rem; color: var(--leise); margin-bottom: 8px; }
.detail h1 { font-size: 1.5rem; line-height: 1.25; margin: 4px 0 8px; overflow-wrap: anywhere; }
.detail h2 { font-size: 1.15rem; margin: 24px 0 8px; }
.detail .eckdaten.gross { font-size: 1rem; gap: 6px 20px; }
.text { white-space: pre-line; }
.quelle { margin-top: 24px; padding: 16px; background: var(--flaeche); border-radius: var(--radius); }
.kursliste li { margin-bottom: 6px; }
.titel a, .anbieter a { color: inherit; }
.titel a:hover, .anbieter a:hover { color: var(--akzent); }

/* Meldeformulare */
.meldung { display: grid; gap: 14px; max-width: 640px; }
.meldung textarea, .meldung input[type=email], .meldung input[type=url], .meldung input[type=text], .meldung select {
  font: inherit; padding: 10px; border: 1px solid var(--linie); border-radius: 6px; width: 100%; }
.feld-wahl fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.feld-wahl legend { font-weight: 600; margin-bottom: 4px; }
.feld-wahl label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; min-height: 36px; }
.feld input[type=radio], .feld input[type=checkbox] { width: auto; padding: 0; margin: 4px 0 0; flex: none; }
.fehler { color: var(--rot); }
.erfolg { padding: 12px; background: #e8f5ec; border-radius: var(--radius); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.meldung > .knopf { justify-self: start; }

/* Orts- und Themenseiten */
.verweise { margin-top: 32px; }
.verweise h2 { font-size: 1.1rem; margin: 20px 0 8px; }
.wolke { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px; }
.wolke a { white-space: nowrap; }
.spalten { columns: 2 160px; padding-left: 18px; margin: 0; }
.spalten li { margin-bottom: 4px; break-inside: avoid; }

/* Impressum, Datenschutz, Hinweise */
.rechtstext { max-width: 70ch; }
.rechtstext h1 { font-size: 1.5rem; margin: 8px 0 16px; }
.rechtstext h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.rechtstext ul { padding-left: 20px; }
.rechtstext li { margin-bottom: 6px; }
.rechtstext code { font-size: 0.9em; word-break: break-word; }
.fehlt { color: #b42318; }
.knopf-klein { font: inherit; padding: 4px 12px; border: 1px solid var(--linie); border-radius: 6px; background: #fff; cursor: pointer; }

.fuss { max-width: 860px; margin: 24px auto 0; padding: 16px; border-top: 1px solid var(--linie); color: var(--leise); font-size: 0.9rem; }

/* ab Tablet: Formular in Spalten */
@media (min-width: 700px) {
  .suche { grid-template-columns: 2fr 1fr; align-items: end; }
  .feld-format, .weitere { grid-column: span 2; }
  .weitere[open] { grid-template-columns: repeat(4, 1fr); }
  .weitere summary { grid-column: span 4; }
  .suche > .knopf { justify-self: start; padding: 10px 32px; }
  .einleitung h1 { font-size: 1.9rem; }
}

.htmx-request #ergebnisse, #ergebnisse.htmx-request { opacity: 0.6; transition: opacity 0.2s; }
