/* =====================================================================
   GESTALTUNG – Tokens zentral hier ändern (Farben, Schrift, Bilder)
   ===================================================================== */
:root {
  --canvas: #F7F6F0;          /* Seitenhintergrund, Knochen */
  --surface: #ffffff;
  --surface-2: #F1EAE6;       /* getönte Fläche */
  --ink: #5E1239;             /* Text, Aubergine */
  --ink-soft: #6B5560;        /* Sekundärtext, getönt */
  --line: #E3D7D9;
  --accent: #5E1239;          /* Akzent: Aubergine */
  --accent-strong: #3E0B26;
  --accent-ink: #ffffff;
  --amber: #b9791f;           /* Hinweise, letzter Platz */
  --amber-bg: #fbf1df;
  --ok: #2f6b3f;  --ok-bg: #e3f0e4;
  --warn: #8a5a10; --warn-bg: #fbf1df;
  --bad: #a33d2b;  --bad-bg: #f9e6e2;
  --info-bg: #e6eef3;
  --radius: 10px; --radius-s: 6px;
  --shadow: 0 6px 18px -8px rgba(28, 42, 38, .28);
  --font: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --maxw: 1120px;
  --img-hero: linear-gradient(160deg, #cfd9cf 0%, #9db5a6 55%, #6c8f7e 100%); /* [BETRIEBSBILD] hier durch url(...) ersetzen */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Demo-Hinweis ---------- */
.demo-bar { background: var(--ink); color: #e8eee9; font-size: .85rem; padding: 6px 16px; text-align: center; }
.demo-bar strong { color: #fff; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(243, 242, 236, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { font-weight: 700; letter-spacing: -.02em; text-decoration: none; color: var(--ink); font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--canvas); }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 6px; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--canvas); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 12px 14px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; font-size: 1.05rem; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; cursor: pointer; min-height: 46px; line-height: 1.2; }
.btn:hover { background: var(--accent-strong); color: #fff; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 7px 14px; min-height: 36px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; text-underline-offset: .15em; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding-top: clamp(40px, 7vw, 88px); }
.section.tight { padding-top: clamp(24px, 4vw, 48px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--ink-soft); }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.tinted { background: var(--surface-2); border-color: transparent; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.right { text-align: right; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: stretch; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; }
.hero-copy p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-visual { border-radius: 16px; background: var(--img-hero); background-size: cover; background-position: center; min-height: 380px; position: relative; overflow: hidden; }
.hero-visual .placeholder { position: absolute; left: 16px; bottom: 16px; background: rgba(255, 255, 255, .85); color: var(--ink-soft); font-size: .8rem; padding: 6px 10px; border-radius: 6px; }
.hero-next { position: absolute; right: 16px; top: 16px; width: min(340px, calc(100% - 32px)); background: rgba(255, 255, 255, .94); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.hero-next h3 { font-size: .95rem; margin-bottom: 8px; color: var(--ink-soft); font-weight: 500; }
.hero-next a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); padding: 8px 0; border-top: 1px solid var(--line); }
.hero-next a:first-of-type { border-top: 0; }
.hero-next a:hover strong { text-decoration: underline; }
.hero-next .when { color: var(--ink-soft); font-size: .85rem; white-space: nowrap; }
.hero-next strong { font-size: .95rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { min-height: 0; padding: 16px 16px 68px; } .hero-next { position: static; width: 100%; } .hero-visual .placeholder { left: 16px; bottom: 12px; right: 16px; text-align: center; } }

/* ---------- Kurskarten ---------- */
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
.course-card:hover { border-color: var(--accent); }
.course-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, hsl(var(--hue) 28% 78%), hsl(var(--hue) 30% 55%)); position: relative; }
.course-img span { position: absolute; left: 10px; bottom: 8px; font-size: .75rem; color: rgba(255, 255, 255, .85); }
.course-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body h3 { margin: 0; }
.course-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-soft); font-size: .9rem; }
.course-next { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; }
.course-next div { display: flex; justify-content: space-between; gap: 8px; }
.price { font-weight: 600; }

/* ---------- Tags / Status ---------- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: #2b4e63; }
.tag.neutral { background: var(--surface-2); color: var(--ink-soft); }

/* ---------- Filter ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 14px 0 18px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--ink-soft); }
.filters select, .filters input { min-width: 150px; }
.filters input[type=checkbox] { min-width: 0; width: 18px; height: 18px; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="search"], textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); width: 100%; min-height: 44px; }
textarea { min-height: 96px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--ink-soft); font-size: .85rem; }
.field.error input, .field.error select { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }
.form-narrow { max-width: 480px; }

/* ---------- Kursplan ---------- */
.week-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.week-nav .title { font-weight: 600; margin: 0 8px; }
.view-toggle { margin-left: auto; display: flex; gap: 4px; }
.view-toggle button { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 120px; }
.day h4 { font-size: .85rem; margin: 0 0 8px; color: var(--ink-soft); font-weight: 600; }
.day h4.today { color: var(--accent); }
.slot { display: block; text-decoration: none; color: inherit; border-radius: 6px; padding: 8px; border-left: 4px solid hsl(var(--hue) 30% 55%); background: var(--canvas); margin-bottom: 6px; font-size: .85rem; line-height: 1.35; }
.slot:hover { background: var(--surface-2); }
.slot strong { display: block; }
.slot .st { display: block; margin-top: 4px; font-size: .78rem; color: var(--ink-soft); }
.slot.full { opacity: .78; }
.slot.cancelled { text-decoration: line-through; opacity: .6; }
.slot.past { opacity: .5; }
@media (max-width: 860px) { .week { display: none; } }
.list-day { margin-bottom: 22px; }
.list-day h3 { font-size: 1rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.session-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.session-row .time { font-weight: 600; }
.session-row .time small { display: block; color: var(--ink-soft); font-weight: 400; }
.session-row .info strong { display: block; }
.session-row .info span { color: var(--ink-soft); font-size: .9rem; }
.session-row .act { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 600px) { .session-row { grid-template-columns: 70px 1fr; } .session-row .act { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } }
.empty { padding: 32px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Buchungsablauf ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: st; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-soft); padding: 6px 10px; border-radius: 999px; background: var(--surface-2); }
.steps li::before { counter-increment: st; content: counter(st); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font-size: .75rem; font-weight: 600; }
.steps li.active { background: var(--ink); color: #fff; }
.steps li.done { background: var(--ok-bg); color: var(--ok); }
.steps li.done::before { content: '✓'; }
.flow { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } .flow aside { order: -1; } }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .95rem; }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: #f2f6f3; }
.option input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.option .desc { color: var(--ink-soft); font-size: .9rem; }
.option.disabled { opacity: .55; cursor: not-allowed; }
.total { font-size: 1.35rem; font-weight: 700; }
.alert { padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid; margin: 0 0 14px; }
.alert.ok { background: var(--ok-bg); border-color: #b8d6bc; color: var(--ok); }
.alert.warn { background: var(--warn-bg); border-color: #e4cc9c; color: var(--warn); }
.alert.bad { background: var(--bad-bg); border-color: #e7b7ad; color: var(--bad); }
.alert.info { background: var(--info-bg); border-color: #c2d3de; color: #2b4e63; }
.sim { border: 2px dashed var(--amber); background: var(--amber-bg); border-radius: var(--radius); padding: 16px; }
.sim h3 { color: var(--amber); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
.confirm-box { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 26px; }
.confirm-box .num { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }
.sticky-cta { display: none; }
@media (max-width: 860px) { .sticky-cta { display: block; position: sticky; bottom: 0; background: var(--canvas); padding: 10px 0 12px; border-top: 1px solid var(--line); margin-top: 20px; } }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td .btn { white-space: nowrap; }

/* ---------- Bereiche mit Seitenleiste ---------- */
.area { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; padding-top: 24px; }
.area nav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 2px; }
.area nav a { text-decoration: none; color: var(--ink); padding: 9px 12px; border-radius: 6px; }
.area nav a[aria-current="page"], .area nav a:hover { background: var(--surface-2); }
.area nav .head { font-size: .8rem; color: var(--ink-soft); padding: 12px 12px 4px; }
@media (max-width: 860px) { .area { grid-template-columns: 1fr; } .area nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 6px; } .area nav a { white-space: nowrap; } .area nav .head { display: none; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--ink-soft); font-size: .85rem; }
.integ { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.integ:last-child { border-bottom: 0; }

/* ---------- FAQ / Sonstiges ---------- */
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin-top: 8px; }
.trainer-card { display: flex; gap: 16px; align-items: flex-start; }
.avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; background: hsl(var(--hue) 28% 68%); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.3rem; }
.footer { margin-top: clamp(48px, 8vw, 96px); background: var(--ink); color: #cfd8d2; padding: 40px 0 28px; }
.footer a { color: #e6ede8; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { color: #fff; margin-bottom: 8px; }
.footer p, .footer li { font-size: .92rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 4px 0; }
.footer .note { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 24px; padding-top: 16px; font-size: .82rem; color: #9fb0a8; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow); z-index: 90; max-width: min(92vw, 520px); }
.toast.bad { background: var(--bad); }
.detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-visual { border-radius: 14px; aspect-ratio: 16/9; background: linear-gradient(135deg, hsl(var(--hue) 28% 78%), hsl(var(--hue) 30% 52%)); margin-bottom: 18px; position: relative; }
.detail-visual span { position: absolute; left: 12px; bottom: 10px; font-size: .78rem; color: rgba(255, 255, 255, .85); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: .95rem; }
.facts div span { display: block; color: var(--ink-soft); font-size: .82rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.result { padding: 12px 14px; border-left: 4px solid var(--line); background: var(--surface); margin-bottom: 8px; border-radius: 0 6px 6px 0; }
.result.bestanden { border-left-color: var(--ok); }
.result.fehlgeschlagen { border-left-color: var(--bad); }
.result.nicht { border-left-color: var(--amber); }
pre.code { background: #eef1ec; padding: 12px; border-radius: 6px; overflow: auto; font-size: .82rem; }

/* Bereiche auf schmalen Bildschirmen: Tabellen scrollen innerhalb, nicht die Seite */
.area > div { min-width: 0; }
.tbl-wrap { max-width: 100%; }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } .filters { flex-wrap: wrap; } .filters label, .filters input, .filters select { max-width: 100%; } }
