/* Zeichenfabrik -- Kursübersicht, sektionsspezifische Stile. */

.uebersicht-hero { padding: 40px 24px 32px; border-bottom: 1px solid var(--farbe-rand); }
.uebersicht-hero h1 { max-width: 16em; letter-spacing: -0.02em; }
/* Strich unter "auf einen Blick" eine Spur tiefer als der Standard (-0.1em in basis.css) --
   die Modifier-Klasse wird nur auf der Kursübersicht gesetzt, andere Heros bleiben unberührt. */
.unterstrichen .strich--tiefer { bottom: -0.24em; }
.uebersicht-byline { margin: 20px 0 0; font-size: 18px; line-height: 1.55; color: #4A463F; max-width: 34em; }
@media (min-width: 1024px) { .uebersicht-hero { padding: 56px 56px 40px; } }
@media (min-width: 600px) { .uebersicht-hero h1 { font-size: 50px; } }

/* ---- Suche + Filter -- hellbraun hinterlegt, bleibt beim Scrollen sichtbar ---- */
.uebersicht-filter {
  padding: 22px 24px;
  border-bottom: 1px solid var(--farbe-rand);
  background: #F4F1EA;
  position: sticky;
  top: 61px;
  z-index: 15;
}
@media (min-width: 1024px) { .uebersicht-filter { padding: 22px 56px; } }
.filter-zeile { display: flex; align-items: stretch; gap: 14px; flex-wrap: wrap; }

.filter-suchfeld {
  flex: 1 1 420px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #D8D3C9;
  background: #fff;
  padding: 14px 18px;
}
.filter-suchfeld input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 18px;
  color: var(--farbe-tinte);
}
.filter-suchfeld-leeren { border: none; background: none; cursor: pointer; color: #8A8377; font-size: 20px; line-height: 1; padding: 0 2px; }
.filter-suchfeld-leeren[hidden] { display: none; }

.filter-details { align-self: flex-start; }
.filter-details summary { list-style: none; cursor: pointer; }
.filter-details summary::-webkit-details-marker { display: none; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #D8D3C9;
  background: #fff;
  color: #4A463F;
  cursor: pointer;
  transition: 0.14s;
}
.filter-btn:hover { filter: brightness(1.12); }
.filter-btn--aktiv, .filter-details[open] > .filter-btn {
  border-color: var(--farbe-teal);
  background: var(--farbe-teal);
  color: #fff;
}
.filter-anzahl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--farbe-terrakotta);
  color: #fff;
  font-family: var(--schrift-mono);
  font-size: 12px;
  font-weight: 700;
}
.filter-chevron { font-size: 15px; line-height: 1; transition: transform 0.18s ease; display: inline-block; }
.filter-details[open] .filter-chevron { transform: rotate(180deg); }

/* .filter-panel liegt im normalen Textfluss AUSSERHALB von <details> (siehe Template-Kommentar)
   -- Sichtbarkeit daher über :has() an den [open]-Zustand von .filter-details gekoppelt, statt
   sich auf natives <details>-Verschachteln zu verlassen. Dadurch bleibt die Zeilenbreite von
   .filter-zeile unabhängig vom aufgeklappten Panel, und der nachfolgende Inhalt (Kursraster)
   wird beim Öffnen normal nach unten verschoben (kein Überlappen). */
.filter-panel { display: none; }
.uebersicht-filter:has(.filter-details[open]) .filter-panel {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  border: 1px solid var(--farbe-rand);
  background: #fff;
}
/* Der scrollende Pill-Bereich; die Aktionsleiste (Button) liegt als getrennter Fuß darunter. */
.filter-panel-scroll { display: grid; gap: 26px 44px; padding: 26px 28px 24px; }
@media (min-width: 900px) {
  .filter-panel-scroll { grid-template-columns: 1fr 1fr; }
}
/* Mobil (Abnahme R2 I1): nur der Pill-Bereich scrollt, die Aktionsleiste bleibt als nicht
   scrollender, immer sichtbarer Fuß stehen -- der „x Kurse anzeigen"-Button war zuvor unten
   abgeschnitten. Ersetzt den früheren max-height auf dem ganzen Panel. */
@media (max-width: 899px) {
  .filter-panel-scroll {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .uebersicht-filter:has(.filter-details[open]) .filter-aktionen {
    position: sticky;
    bottom: 0;
    background: #fff;
  }
}
.filter-gruppe { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.filter-label { font-family: var(--schrift-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #8A8377; margin-bottom: 8px; }

.pillgruppe { display: flex; flex-wrap: wrap; gap: 9px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid #D8D3C9;
  font-size: 13px;
  font-weight: 600;
  color: #4A463F;
  background: #fff;
}
.pill:has(input:checked) span { background: var(--farbe-teal); border-color: var(--farbe-teal); color: #fff; }
.pill:has(input:focus-visible) span { outline: 2px solid var(--farbe-teal); outline-offset: 2px; }
/* H5: Optionen, die unter den anderen Filtern kein Ergebnis liefern, ausgrauen und sperren. */
.pill:has(input:disabled) { cursor: default; pointer-events: none; }
.pill:has(input:disabled) span { opacity: 0.38; }

.filter-aktionen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-top: 1px solid #EDE8DE;
}
.filter-zuruecksetzen { color: #8A8377; font-size: 13px; text-decoration: underline; }
.filter-aktionen .btn { font-size: 14px; padding: 11px 22px; }

/* H4: Reset-„×" direkt in der Filterzeile, sichtbar sobald ein Filter aktiv ist. */
.filter-reset-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  align-self: stretch;
  border: 1px solid var(--farbe-rand);
  background: #fff;
  color: #8A8377;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}
.filter-reset-x:hover { color: var(--farbe-terrakotta); border-color: var(--farbe-terrakotta); }

/* ---- Ergebnisse ---- */
.uebersicht-ergebnisse { padding: 32px 24px 56px; }
@media (min-width: 1024px) { .uebersicht-ergebnisse { padding: 40px 56px 64px; } }
.ergebnis-anzahl {
  font-family: var(--schrift-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--farbe-muted);
  margin: 0 0 24px;
}
.kurs-karten { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .kurs-karten { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kurs-karten { grid-template-columns: repeat(3, 1fr); } }

/* =====================================================================
   Kurs-Finder (Etappe 3): Anstoß-Band + Overlay-Quiz.
   Token-Werte gespiegelt aus basis.css; die paar Finder-Eigentöne stehen
   als Literale (mit Klartext-Kommentar), um :root nicht aufzublähen.
   ===================================================================== */

/* ---- Anstoß-Band zwischen Filter und Ergebnissen ---- */
.finder-anstoss { padding: 24px 24px 4px; }
@media (min-width: 1024px) { .finder-anstoss { padding: 30px 56px 4px; } }
.finder-divider { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; }
.finder-divider .line { height: 1px; flex: 1; background: var(--farbe-rand); }
.finder-divider .label {
  font-family: var(--schrift-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #8A8377; white-space: nowrap;
}
.finder-band {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: #eef5f5;               /* zartes Teal-Band */
  border: 1px solid #cfe0e0; padding: 16px 22px; cursor: pointer;
  font-family: inherit; text-align: left; text-decoration: none; color: inherit;
}
.finder-band:hover { border-color: var(--farbe-teal); color: inherit; }
.finder-band-left { display: flex; align-items: center; gap: 14px; }
.finder-band-stift { font-size: 24px; line-height: 1; transform: rotate(-8deg); display: inline-block; }
.finder-band-hand { display: block; font-family: var(--schrift-hand); font-size: 20px; color: var(--farbe-teal); line-height: 1; }
.finder-band-headline { display: block; font-size: 16px; font-weight: 700; margin-top: 2px; color: var(--farbe-tinte); }
.finder-band-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--farbe-teal); white-space: nowrap; }
@media (max-width: 620px) {
  .finder-band { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---- Overlay ---- */
.finder { position: fixed; inset: 0; z-index: 900; display: none; }
.finder.is-open { display: block; }
.finder-backdrop { position: fixed; inset: 0; background: rgba(22, 33, 31, 0.42); backdrop-filter: blur(3px); animation: kfBackdrop 0.2s ease; }
.finder-center { position: fixed; inset: 0; z-index: 901; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.finder-panel {
  pointer-events: auto; width: 720px; max-width: 100%; max-height: 92vh;
  background: var(--farbe-creme); display: flex; flex-direction: column;
  border: 1px solid var(--farbe-rand);
  box-shadow: 0 40px 90px -32px rgba(20, 18, 15, 0.55);
  animation: kfPanel 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.finder-head { padding: 18px 26px; border-bottom: 1px solid var(--farbe-rand); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 0 0 auto; }
.finder-head-left { display: flex; align-items: center; gap: 12px; }
.finder-brand { font-family: var(--schrift-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--farbe-teal); }
.finder-close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6B665E; }
.finder-close:hover { color: var(--farbe-tinte); }
.finder-progress { display: flex; align-items: center; gap: 6px; }
.finder-progress .dot { display: block; height: 8px; width: 8px; border-radius: 4px; background: #D8D3C9; transition: all 0.2s ease; }
.finder-progress .dot.done { background: var(--farbe-teal); }
.finder-progress .dot.active { width: 22px; background: var(--farbe-terrakotta); }
.finder-body { overflow-y: auto; min-height: 0; }
.finder-step { padding: 28px 24px 32px; animation: kfStep 0.28s ease; }
.finder-step[hidden] { display: none; }
@media (min-width: 720px) { .finder-step { padding: 38px 40px 42px; } }
.finder-eyebrow { font-family: var(--schrift-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8A8377; margin-bottom: 10px; }
.finder-frage { margin: 0 0 6px; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
@media (min-width: 720px) { .finder-frage { font-size: 34px; } }
.finder-sub { margin: 0 0 26px; font-size: 15px; color: #6B665E; }

/* Stimmungsfrage */
.finder-moods { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .finder-moods { grid-template-columns: 1fr 1fr; } }
.finder-mood { text-align: left; padding: 24px; cursor: pointer; font-family: inherit; background: #fff; border: 2px solid var(--farbe-rand); transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.finder-mood:hover { transform: translateY(-4px); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.28); }
.finder-mood--ruhig:hover { border-color: var(--farbe-teal); }
.finder-mood--energie:hover { border-color: var(--farbe-terrakotta); }
.finder-mood-ic { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; margin-bottom: 18px; }
.finder-mood--ruhig .finder-mood-ic { background: #eef5f5; color: var(--farbe-teal); }
.finder-mood--energie .finder-mood-ic { background: #f7ede6; color: var(--farbe-terrakotta); }
.finder-mood-name { display: block; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.finder-mood-desc { display: block; font-size: 14px; line-height: 1.45; color: #6B665E; }

/* Bildpaar */
.finder-pair { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.finder-tile { position: relative; padding: 0; border: 2px solid var(--farbe-rand); background: #fff; cursor: pointer; font-family: inherit; overflow: hidden; transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.finder-tile:hover { transform: translateY(-4px); border-color: var(--farbe-terrakotta); box-shadow: 0 18px 38px -18px rgba(0, 0, 0, 0.32); }
.finder-tile-media { display: block; position: relative; aspect-ratio: 4 / 5; background: #F1EEE8; background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0 9px, transparent 9px 18px); overflow: hidden; }
.finder-tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.finder-tile-slot { position: absolute; left: 12px; top: 12px; font-family: var(--schrift-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: #8A8377; background: var(--farbe-creme); padding: 3px 8px; border: 1px dashed #CFC9BD; }
.finder-tile-cap { display: block; padding: 14px 15px; text-align: left; font-size: 16px; font-weight: 700; color: var(--farbe-tinte); }
.finder-oder { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) rotate(-4deg); font-family: var(--schrift-hand); font-size: 26px; color: #22403F; background: var(--farbe-creme); border: 1px solid var(--farbe-rand); border-radius: 999px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.3); z-index: 2; }
.finder-pair-foot { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.finder-hint { font-family: var(--schrift-mono); font-size: 11px; color: #B7B0A4; }
.finder-back { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: #8A8377; text-decoration: underline; text-underline-offset: 3px; }
.finder-back:hover { color: var(--farbe-teal); }
@media (max-width: 560px) {
  .finder-pair { grid-template-columns: 1fr; }
  .finder-oder { position: static; transform: none; margin: 4px auto; }
}

@keyframes kfBackdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes kfPanel { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes kfStep { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
