/* capira Fachwahl: vier Kacheln, ein Klick, dann nur die Infos zum Fach. */
.fachwahl { padding: 8px 0 24px; }
.fw-titel { margin: 0 0 20px; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.03em; }
.fw-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; perspective: 900px; }

.fw-kachel { --bild-s: #fff; --bild-a: var(--accent); --rx: 0deg; --ry: 0deg; position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 12px; height: 236px; padding: 24px; border: 0; border-radius: var(--radius-card); background: var(--ink); color: #fff; font: inherit; text-align: left; cursor: pointer; overflow: hidden; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 180ms var(--kurve-standard), height 520ms var(--kurve-standard), padding 520ms var(--kurve-standard), box-shadow 220ms var(--kurve-standard); -webkit-tap-highlight-color: transparent; }
.fw-kachel:hover { box-shadow: 0 18px 36px -18px rgba(17, 17, 17, 0.55); }
.fw-kachel:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.fw-fuell { position: absolute; inset: 0; z-index: 0; background: var(--accent); clip-path: circle(0% at var(--px, 50%) var(--py, 50%)); transition: clip-path 650ms var(--kurve-standard); }
.fw-kachel > *:not(.fw-fuell) { position: relative; z-index: 1; }
.fw-kachel.gewaehlt { --bild-s: var(--ink); --bild-a: #fff; color: var(--ink); }
.fw-kachel.gewaehlt .fw-fuell { clip-path: circle(150% at var(--px, 50%) var(--py, 50%)); }

.fw-bild { width: 76px; height: 76px; flex: 0 0 auto; overflow: visible; transition: width 520ms var(--kurve-standard), height 520ms var(--kurve-standard); }
.fw-bild .s { fill: none; stroke: var(--bild-s); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 400ms; }
.fw-bild .f { fill: var(--bild-s); transition: fill 400ms; }
.fw-bild .a { fill: var(--bild-a); stroke: none; transition: fill 400ms; }
.fw-bild .al { fill: none; stroke: var(--bild-a); stroke-width: 6; stroke-linecap: round; transition: stroke 400ms; }
.fw-bild .bew { transform-box: fill-box; transform-origin: center; transition: transform 420ms var(--kurve-einrasten); }
.fw-kachel:hover .fw-bild .bew, .fw-kachel:focus-visible .fw-bild .bew { transform: rotate(-9deg) scale(1.12); }

.fw-text { display: grid; gap: 2px; }
.fw-name { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.fw-kurz { font-size: 14px; line-height: 1.4; opacity: 0.72; transition: opacity 300ms, max-height 400ms; max-height: 2.8em; overflow: hidden; }
.fw-pfeil { position: absolute !important; right: 20px; top: 20px; z-index: 1; font-weight: 800; font-size: 20px; transition: transform 220ms var(--kurve-standard), opacity 300ms; }
.fw-kachel:hover .fw-pfeil { transform: translate(3px, -3px); }

/* Nach der Wahl: die Kacheln ziehen sich zu einer Leiste zusammen */
.hat-wahl .fw-kachel { height: 76px; padding: 14px 18px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
.hat-wahl .fw-bild { width: 44px; height: 44px; }
.hat-wahl .fw-kurz { opacity: 0; max-height: 0; }
.hat-wahl .fw-pfeil { opacity: 0; }
.hat-wahl .fw-name { font-size: 18px; }
.hat-wahl .fw-titel { margin-bottom: 14px; }

/* Platzhalter und Panel */
.fw-leer { margin: 24px 0 0; padding: 20px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-card); color: var(--ink-body); background: var(--surface); }
.fw-leer strong { color: var(--ink); }
.fw-panel { margin-top: 36px; scroll-margin-top: 96px; }
.fw-panel[hidden] { display: none; }
.fw-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 20px; }
.fw-kopf h2 { margin: 0; font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -0.035em; }
.fw-kopf p { margin: 0; color: var(--ink-body); }
.fw-fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 8px; }
.fw-fakt { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface-raised); min-width: 0; }
.fw-fakt .l { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.fw-fakt strong { font-size: 18px; line-height: 1.35; font-weight: 800; letter-spacing: -0.01em; }
.fw-fakt span.z { color: var(--ink-body); font-size: 15px; line-height: 1.45; }
.fw-fakt.breit { grid-column: 1 / -1; }
.fw-hinweis { margin: 28px 0 0; padding: 16px 20px; border-radius: var(--radius-card); background: var(--accent-subtle); border: 1px solid var(--accent-soft); color: var(--ink-body); max-width: 46rem; }
.fw-panel .fw-fakten + .prosa { margin-top: 36px; }

.fw-panel.fw-neu > * { animation: fw-rein 560ms var(--kurve-standard) backwards; }
.fw-panel.fw-neu > *:nth-child(1) { animation-delay: 80ms; }
.fw-panel.fw-neu > *:nth-child(2) { animation-delay: 160ms; }
.fw-panel.fw-neu > *:nth-child(3) { animation-delay: 240ms; }
.fw-panel.fw-neu > *:nth-child(4) { animation-delay: 320ms; }
.fw-panel.fw-neu > *:nth-child(n+5) { animation-delay: 380ms; }
@keyframes fw-rein { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (max-width: 880px) {
  .fw-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fw-kachel { height: 200px; padding: 20px; }
  .fw-bild { width: 68px; height: 68px; }
  .fw-kopf h2 { font-size: 30px; }
}
@media (max-width: 480px) {
  .fw-kacheln { gap: 10px; }
  .fw-kachel { height: 176px; padding: 16px; }
  .fw-name { font-size: 18px; }
  .hat-wahl .fw-kachel { height: 64px; padding: 10px 12px; gap: 10px; }
  .hat-wahl .fw-bild { width: 34px; height: 34px; }
  .hat-wahl .fw-name { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .fw-kachel, .fw-bild, .fw-fuell, .fw-bild .bew { transition: none; }
  .fw-panel.fw-neu > * { animation: none; }
}

/* Grosse Überschrift für den Teil, der für alle Fächer gilt */
.fw-alle { margin-top: 56px; padding: 56px 0 8px; border-top: 1px solid var(--line); background: linear-gradient(var(--surface-muted), var(--surface) 90%); }
.fw-alle h2 { margin: 0 0 12px; font-size: 48px; line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; }
.fw-alle h2::after { content: ""; display: inline-block; width: 0.19em; height: 0.19em; margin-left: 0.06em; border-radius: 0.03em; background: var(--accent); }
.fw-alle p { margin: 0; max-width: 40rem; font-size: 18px; color: var(--ink-body); }
@media (max-width: 720px) { .fw-alle { margin-top: 40px; padding-top: 40px; } .fw-alle h2 { font-size: 34px; } }
