/* Kurssuche (seit 28.11.2026): Suchfeld-Baustein (includes/suche.php suche_feld), Live-Vorschläge (suche.js)
 * und Ergebnisseite (suche.php). Nutzt die Design-Variablen von zukunft.css/serioes.css, wirkt in beiden Stilen.
 * Feldschrift >= 16 px (kein Zoom auf iOS), Zeilen >= 44 px (WCAG 2.5.8). */
.suche-feld { position: relative; max-width: 720px; margin: 0 auto; text-align: left; }
.suche-label { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 8px; color: var(--zk-text, var(--text-white)); }
.suche-zeile { display: flex; align-items: center; gap: 0; background: var(--zk-surface, #fff); border: 1.5px solid var(--zk-line-strong, #b9c4d1);
  border-radius: 10px; padding: 4px 4px 4px 14px; transition: border-color .15s, box-shadow .15s; }
.suche-zeile:focus-within { border-color: var(--zk-cyan-text, #1b4d89); box-shadow: 0 0 0 3px color-mix(in srgb, var(--zk-cyan-text, #1b4d89) 22%, transparent); }
.suche-lupe { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--zk-muted, #475569); stroke-width: 2; stroke-linecap: round; }
.suche-eingabe { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--zk-text, #111827);
  font: inherit; font-size: 1.0625rem; padding: 12px 10px; min-height: 48px; }
.suche-eingabe::placeholder { color: var(--zk-faint, #596577); opacity: 1; }
.suche-eingabe::-webkit-search-cancel-button { cursor: pointer; }
.suche-knopf { flex: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem; min-height: 48px; padding: 0 22px;
  border-radius: 7px; color: var(--zk-btn-ink, #fff); background: var(--zk-grad-btn, #1b4d89); }
.suche-knopf:hover { filter: brightness(1.08); }
.suche-knopf:focus-visible, .suche-chip:focus-visible, .suche-option a:focus-visible { outline: 3px solid var(--zk-cyan-text, #1b4d89); outline-offset: 2px; }
.suche-feld--gross .suche-eingabe { font-size: 1.125rem; min-height: 54px; }
.suche-feld--gross .suche-knopf { min-height: 54px; padding: 0 28px; }

.suche-liste { position: absolute; z-index: 60; left: 0; right: 0; margin: 6px 0 0; padding: 6px; list-style: none;
  background: var(--zk-surface, #fff); border: 1px solid var(--zk-line, #d5dce4); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16); max-height: min(70vh, 460px); overflow: auto; }
.suche-option { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 7px; cursor: pointer; color: var(--zk-text, #111827); }
.suche-option[aria-selected="true"], .suche-option:hover { background: var(--zk-surface-2, #eef1f5); }
.suche-option-text { flex: 1; min-width: 0; }
.suche-option-titel { display: block; font-weight: 600; line-height: 1.3; }
.suche-option-titel mark { background: none; color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.suche-option-typ { display: block; font-size: .8125rem; color: var(--zk-muted, #475569); margin-top: 2px; }
.suche-option-preis { flex: none; font-size: .875rem; color: var(--zk-muted, #475569); white-space: nowrap; }
.suche-option--lehrgang { border: 1px solid color-mix(in srgb, var(--zk-cyan-text, #1b4d89) 35%, transparent); margin-bottom: 4px; }
.suche-option--lehrgang .suche-option-typ { color: var(--zk-cyan-text, #1b4d89); font-weight: 600; }
.suche-option--alle { justify-content: center; font-weight: 600; color: var(--zk-cyan-text, #1b4d89); }
.suche-leer { padding: 12px; color: var(--zk-muted, #475569); font-size: .9375rem; }
.suche-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.suche-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.suche-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; font-size: .9375rem;
  text-decoration: none; color: var(--zk-text, #111827); background: var(--zk-chip-bg, #fff); border: 1px solid var(--zk-line, #d5dce4); }
.suche-chip:hover { border-color: var(--zk-cyan-text, #1b4d89); color: var(--zk-cyan-text, #1b4d89); }
.suche-chip--alle { font-weight: 600; color: var(--zk-cyan-text, #1b4d89); }

/* Ergebnisseite */
.st-kopf { padding-bottom: 24px; }
.st-h1 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.2; margin: 0 0 20px; }
.st-h1:focus { outline: none; }
.st-anzahl { display: inline-block; font-size: .8rem; font-weight: 600; vertical-align: middle; padding: 2px 9px; border-radius: 999px;
  background: var(--zk-surface-2, #eef1f5); color: var(--zk-muted, #475569); }
.st-hinweis { margin: 12px 0 0; color: var(--zk-muted, #475569); font-size: .9375rem; }
.st-lehrgang { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 24px 26px; margin-bottom: 36px;
  background: var(--zk-surface, #fff); border: 1.5px solid var(--zk-cyan-text, #1b4d89); border-radius: 12px; }
.st-lehrgang-titel { margin: 6px 0 8px; font-size: 1.35rem; line-height: 1.25; }
.st-lehrgang-titel a { color: inherit; text-decoration: none; }
.st-lehrgang-titel a:hover { text-decoration: underline; }
.st-lehrgang-kauf { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.st-lehrgang-preis { font-size: 1.5rem; font-weight: 700; }
.st-typ { display: block; font-size: .8125rem; font-weight: 600; color: var(--zk-muted, #475569); }
.st-typ--lehrgang { color: var(--zk-cyan-text, #1b4d89); }
.st-text { color: var(--zk-lead, #334155); margin: 0; line-height: 1.55; }
.st-klein { font-size: .875rem; color: var(--zk-muted, #475569); }
.st-gruppe { margin-bottom: 32px; }
.st-gruppe-titel { font-size: 1.15rem; margin: 0 0 14px; }
.st-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.st-karte { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none; color: var(--zk-text, #111827);
  background: var(--zk-surface, #fff); border: 1px solid var(--zk-line, #d5dce4); border-radius: 10px; transition: border-color .15s; }
.st-karte:hover, .st-karte:focus-visible { border-color: var(--zk-cyan-text, #1b4d89); }
.st-karte .st-titel { font-weight: 600; line-height: 1.3; }
.st-karte .st-text { font-size: .9rem; }
.st-fuss { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; font-size: .875rem; color: var(--zk-muted, #475569); }
.st-preis { font-weight: 600; color: var(--zk-text, #111827); white-space: nowrap; }
.st-mehr { margin-top: 14px; }
.st-mehr > summary { cursor: pointer; font-weight: 600; color: var(--zk-cyan-text, #1b4d89); min-height: 44px; display: flex; align-items: center; }
.st-mehr .st-raster { margin-top: 6px; }
.st-null, .st-beliebt { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--zk-line, #d5dce4); }

@media (max-width: 640px) {
  .suche-zeile { padding-left: 10px; }
  .suche-knopf { padding: 0 14px; }
  .suche-lupe { display: none; }
  .st-lehrgang { grid-template-columns: 1fr; padding: 18px; }
  .st-lehrgang-kauf { align-items: stretch; text-align: left; }
  .st-lehrgang-kauf .btn { text-align: center; }
  .suche-option-preis { display: none; }
}

/* Suche im Menü oben (seit 28.11.2026) */
.nav-suchform { position: relative; display: flex; align-items: center; flex: 0 1 230px; min-width: 170px; }
.nav-suchform-lupe { position: absolute; left: 11px; width: 17px; height: 17px; fill: none; stroke: var(--zk-muted, #475569); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.nav-suchform .suche-eingabe { width: 100%; min-height: 40px; padding: 8px 12px 8px 34px; font-size: 16px; border: 1px solid var(--zk-line-strong, #b9c4d1);
  border-radius: 8px; background: var(--zk-surface, #fff); color: var(--zk-text, #111827); }
.nav-suchform .suche-eingabe:focus { outline: none; border-color: var(--zk-cyan-text, #1b4d89); box-shadow: 0 0 0 3px color-mix(in srgb, var(--zk-cyan-text, #1b4d89) 22%, transparent); }
.nav-suchform .suche-liste { width: min(440px, 92vw); left: auto; right: 0; }
.nav-suche-mobil { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; margin-right: 6px; border-radius: 8px; color: var(--zk-text, currentColor); }
.nav-suche-mobil svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 1280px) {
  .nav-suche-mobil { display: inline-flex; }
  .nav-menu .nav-actions .nav-suchform { order: -1; flex: none; width: 100%; }
  .nav-menu .nav-actions .nav-suchform .suche-eingabe { min-height: 48px; }
  .nav-suchform .suche-liste { width: 100%; left: 0; right: 0; }
}
.hero-suche { margin: 22px 0 18px; }
.hero-suche .suche-feld { margin: 0; }
.zk-hero-copy .hero-suche .suche-label { font-size: 1.05rem; }

/* Kopfzeile (29.11.2026): Logo bricht nicht um, Suche klappt zwischen 1281 und 1599 px erst beim Anklicken auf, damit Menü und Konto (Dashboard, Admin, Abmelden) Platz haben */
.nav-logo, .nav-logo-name { white-space: nowrap; flex-shrink: 0; }
@media (min-width: 1281px) and (max-width: 1599px) {
  .nav-suchform { flex: 0 0 44px; min-width: 44px; }
  .nav-suchform .suche-eingabe { width: 44px; padding-right: 0; cursor: pointer; color: transparent; }
  .nav-suchform .suche-eingabe::placeholder { color: transparent; }
  .nav-suchform:focus-within .suche-eingabe { position: absolute; right: 0; top: 0; width: 280px; padding-right: 12px; cursor: text; color: var(--zk-text, #111827); background: var(--zk-surface, #fff); z-index: 5; }
  .nav-suchform:focus-within .suche-eingabe::placeholder { color: var(--zk-muted, #475569); }
  .nav-suchform:focus-within .suche-liste { right: 0; }
}

/* Angemeldet als Admin (29.11.2026): Dashboard + Admin + Name + Abmelden passen ab 1600 px nicht neben das offene
   Suchfeld (Admin lief ins Feld) - die Suche bleibt dann auch breiter als 1599 px ein aufklappbares Symbol. */
@media (min-width: 1600px) {
  .nav-inner:has(.nav-admin) .nav-suchform { flex: 0 0 44px; min-width: 44px; }
  .nav-inner:has(.nav-admin) .nav-suchform .suche-eingabe { width: 44px; padding-right: 0; cursor: pointer; color: transparent; }
  .nav-inner:has(.nav-admin) .nav-suchform .suche-eingabe::placeholder { color: transparent; }
  .nav-inner:has(.nav-admin) .nav-suchform:focus-within .suche-eingabe { position: absolute; right: 0; top: 0; width: 280px; padding-right: 12px; cursor: text; color: var(--zk-text, #111827); background: var(--zk-surface, #fff); z-index: 5; }
  .nav-inner:has(.nav-admin) .nav-suchform:focus-within .suche-eingabe::placeholder { color: var(--zk-muted, #475569); }
  .nav-inner:has(.nav-admin) .nav-suchform:focus-within .suche-liste { right: 0; }
}
