/* ==========================================================================
   Wudang Dao e.V. – Tai Chi Videoplattform
   Eigenständiges, neues Design (keine Übernahme des alten WordPress-Themes).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ink:        #201f1c;   /* warmes, tiefes Schwarzbraun statt reinem Schwarz */
  --ink-soft:   #55524a;
  --paper:      #f6f2ea;   /* warmes Reispapier-Weiß */
  --surface:    #ffffff;
  --line:       #e4ddcd;
  --accent:     #a3242c;   /* Lack-Rot, aufgegriffen vom Drachen-Logo */
  --accent-dark:#7c1a20;
  --accent-wash:#f7e6e2;   /* zarte Rot-Fläche für Zebra-Abschnitte */
  --gold:       #9c7a3c;   /* dezenter Bronzeton für Auszeichnungen/Badges */
  --erfolg:     #3a6a4c;
  --fehler:     #a3242c;
  --radius: 10px;
  --wrap: 1160px;
  --font-head: "Source Serif 4", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1ede4; --ink-soft: #c9c2b3; --paper: #17140f; --surface: #221e17;
    --line: #3a3327; --accent: #e2626a; --accent-dark: #f2949a; --accent-wash: #2b1e1c;
    --gold: #c9a765;
  }
}
:root[data-theme="dark"] {
  --ink: #f1ede4; --ink-soft: #c9c2b3; --paper: #17140f; --surface: #221e17;
  --line: #3a3327; --accent: #e2626a; --accent-dark: #f2949a; --accent-wash: #2b1e1c;
  --gold: #c9a765;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
ul { margin: 0 0 1.1em; padding-left: 1.3em; color: var(--ink-soft); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--accent); color: #fff; padding: .8rem 1.2rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--eng { width: min(100% - 2.5rem, 720px); margin-inline: auto; }

/* --- Kopfbereich ---------------------------------------------------- */
.kopfbereich {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.kopfbereich__innen { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }
.marke { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.marke:hover { text-decoration: none; }
.marke img { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; }
.marke__text { line-height: 1.25; }
.marke__text strong { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.marke__text span { font-size: .8rem; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav__link {
  padding: .6rem .85rem; font-size: .95rem; color: var(--ink); text-decoration: none; border-radius: 999px;
  white-space: nowrap;
}
.nav__link:hover { background: var(--accent-wash); text-decoration: none; }
.nav__link--login { border: 1.5px solid var(--accent); color: var(--accent); }
.nav__link--login:hover { background: var(--accent); color: #fff; }
.nav-schalter { display: none; }

@media (max-width: 780px) {
  .nav { position: fixed; inset: 78px 0 auto; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.5rem; gap: .2rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s; }
  .nav.offen { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__link { padding: .8rem .5rem; }
  .nav-schalter {
    display: block; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line);
    border-radius: 8px; position: relative; cursor: pointer;
  }
  .nav-schalter span, .nav-schalter span::before, .nav-schalter span::after {
    content: ""; position: absolute; left: 11px; width: 20px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease;
  }
  .nav-schalter span { top: 21px; }
  .nav-schalter span::before { top: -6px; }
  .nav-schalter span::after { top: 6px; }
}

/* --- Hero ------------------------------------------------------------- */
.hero { background: var(--accent-wash); border-bottom: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero__raster { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .hero__raster { grid-template-columns: 1.1fr .9fr; } }
.hero__kicker { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--accent-dark); margin-bottom: .8rem; }
.hero__bild img { width: 100%; aspect-ratio: 4/3; object-fit: cover; box-shadow: 0 18px 40px -20px rgba(32,31,28,.35); }
.hero p.lead { font-size: 1.08rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none; transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; text-decoration: none; }
.btn--umriss { background: transparent; color: var(--accent); }
.btn--umriss:hover { background: var(--accent); color: #fff; }
.btn-reihe { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

/* --- Abschnitte / Zebra -------------------------------------------------- */
.abschnitt { padding-block: clamp(2.5rem, 5vw, 4rem); }
.abschnitt--wash { background: var(--accent-wash); }
.kopf { max-width: 700px; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.kopf--mitte { margin-inline: auto; text-align: center; }

/* --- Kurskarten ---------------------------------------------------------- */
.kurs-raster { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.kurs-karte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.kurs-karte__bild { aspect-ratio: 4/3; overflow: hidden; }
.kurs-karte__bild img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.kurs-karte__inhalt { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.kurs-karte__meta { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; background: var(--accent-wash); color: var(--accent-dark); }
.tag--rolle-voll { background: #efe6d3; color: var(--gold); }
.kurs-karte h3 { margin-bottom: .25rem; }
.kurs-karte h3 a { color: var(--ink); }
.kurs-karte h3 a:hover { color: var(--accent); }
.kurs-karte__fuss { margin-top: auto; padding-top: .5rem; font-size: .85rem; color: var(--ink-soft); }

/* --- Hinweisbox ----------------------------------------------------------- */
.hinweisbox {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem;
}
.hinweisbox--gold { border-left-color: var(--gold); }

/* --- Formulare ------------------------------------------------------------- */
.formular { display: grid; gap: 1.1rem; max-width: 560px; }
.feld { display: flex; flex-direction: column; gap: .4rem; }
.feld label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.feld .pflicht { color: var(--accent); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea {
  font: inherit; font-size: 1rem; padding: .75em 1em; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(163 36 44 / .15); }
textarea { min-height: 8rem; resize: vertical; }
.hp-feld { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formular-fehler { background: #fbeceb; border: 1px solid #e3b3b0; color: var(--fehler); padding: .9rem 1.1rem; border-radius: 8px; }
.formular-erfolg { background: #eaf3ee; border: 1px solid #b9d8c6; color: var(--erfolg); padding: .9rem 1.1rem; border-radius: 8px; }
.hinweis-klein { font-size: .88rem; color: var(--ink-soft); margin-top: 1.25rem; }

/* --- Login / Ersteinrichtung: schmale zentrierte Seite --------------------- */
.schmal-seite { padding-block: clamp(3rem, 8vw, 5rem); }
.schmal-seite h1 { margin-bottom: .4em; }

/* --- Mitgliederbereich ------------------------------------------------------ */
.dashboard-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.rollen-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--accent-wash); color: var(--accent-dark); }
.gesperrte-karte { opacity: .55; position: relative; }
.gesperrte-karte::after {
  content: "Nur für Vollmitglieder"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(246,242,234,.75); font-weight: 600; font-size: .85rem; color: var(--ink); text-align: center; padding: 1rem;
}
:root[data-theme="dark"] .gesperrte-karte::after { background: rgba(23,20,15,.75); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gesperrte-karte::after { background: rgba(23,20,15,.75); } }

/* --- Video-Player (responsive Vimeo-Einbettung) ---------------------------- */
.video-rahmen { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 1.5rem; }
.video-rahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.kurs-spieler-raster { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .kurs-spieler-raster { grid-template-columns: 1.5fr 1fr; } }

.kurs-detail-raster { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .kurs-detail-raster { grid-template-columns: 1.3fr .9fr; } }

.lektionen-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.lektionen-liste li { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.lektionen-liste a, .lektionen-liste .lektion-aktiv {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem;
  color: var(--ink); text-decoration: none; font-size: .95rem;
}
.lektionen-liste a:hover { color: var(--accent); text-decoration: none; }
.lektionen-liste .lektion-aktiv { color: var(--accent); font-weight: 600; }
.lektionen-liste .lektion-nr { color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: .6rem; }
.lektionen-liste .vorschau-chip { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; background: var(--gold); color: #fff; padding: .15rem .5rem; border-radius: 999px; }

/* --- Admin: Mitgliederverwaltung -------------------------------------------- */
.tabelle-wrap { overflow-x: auto; }
table.mitgliedertabelle { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.mitgliedertabelle th, table.mitgliedertabelle td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
table.mitgliedertabelle th { color: var(--ink-soft); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.inline-form { display: inline; }
.icon-btn { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: .2rem .4rem; }
.icon-btn:hover { text-decoration: underline; }

/* --- Fußbereich --------------------------------------------------------- */
.fussbereich { background: var(--ink); color: #d8d3c6; padding-block: 2.5rem 1.5rem; font-size: .9rem; margin-top: 3rem; }
.fussbereich a { color: #d8d3c6; }
.fussbereich a:hover { color: #fff; }
.fuss__raster { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; justify-content: space-between; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 1.25rem; }
.fuss__recht { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.fuss__unten { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: #a49c88; font-size: .82rem; }

@media print { .kopfbereich, .fussbereich, .nav-schalter, .btn { display: none !important; } }
