/* =========================================================================
   Prüfungen · Kyu 8–4  |  Unterseite im Stil von karate-du.de
   Reines HTML + CSS, kein JavaScript.
   ========================================================================= */

:root {
  --ink:      #1d1d1b;
  --muted:    #565650;
  --bg:       #ffffff;
  --bg-alt:   #f4f3ef;
  --line:     #d9d7cf;
  --red:      #a4161a;          /* traditionelles Karate-/DKV-Rot als Akzent */
  --red-dark: #7d1013;

  /* Gürtelfarben je Kyu (gängige Konvention – variiert je nach Verband) */
  --belt-8: #e6b31e;
  --belt-7: #dc6b2f;
  --belt-6: #3e8e5a;
  --belt-5: #2f6ea8;
  --belt-4: #7a4ea8;

  --maxw: 1000px;
  --sans: Arial, "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 14px; z-index: 1000;
}
.skip:focus { left: 8px; top: 8px; }

/* =========================================================================
   Kopfbereich  (Logos + Claim, wie karate-du.de)
   ========================================================================= */
.site-head { border-bottom: 3px solid var(--red); background: var(--bg); }
.site-head .wrap {
  display: flex; align-items: center; gap: 20px;
  padding-block: 16px; flex-wrap: wrap;
}
.claim { flex: 1 1 auto; min-width: 200px; }
.claim .tagline {
  font-size: 1.7rem; font-weight: 700; letter-spacing: .5px; color: var(--ink);
  line-height: 1.1; margin: 0;
}
.claim .club { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.logos { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.logos img { height: 66px; width: auto; }
.logos .fallback {
  height: 66px; min-width: 66px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 6px; color: var(--muted);
  font-size: .7rem; padding: 6px; text-align: center;
}

/* =========================================================================
   Navigation  (CSS-only Dropdowns, mobil per <details>, kein JS)
   ========================================================================= */
.mainnav { background: var(--ink); position: sticky; top: 0; z-index: 100; }
.mainnav > .wrap { position: relative; }

/* Umschalter (Checkbox-Hack, kein JS) */
.nav-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  color: #fff; font-weight: 700; padding: 14px 0; user-select: none;
}
.nav-burger .bars, .nav-burger .bars::before, .nav-burger .bars::after {
  content: ""; display: block; width: 22px; height: 2px; background: #fff;
}
.nav-burger .bars { position: relative; }
.nav-burger .bars::before { position: absolute; top: -6px; }
.nav-burger .bars::after  { position: absolute; top:  6px; }
.nav-checkbox:focus-visible + .nav-burger { outline: 3px solid var(--red); outline-offset: 2px; }

.menu { list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; }
.menu a {
  display: block; color: #f2f0e9; text-decoration: none;
  padding: 12px 16px; font-size: .95rem; font-weight: 600;
}
.menu a:hover, .menu a:focus { background: #000; color: #fff; }
.menu .current > a { color: #fff; box-shadow: inset 0 -3px 0 var(--red); }

/* Untermenüs */
.submenu { list-style: none; margin: 0; padding: 0; }
.submenu a { font-weight: 500; font-size: .9rem; color: #d7d5cc; padding-left: 34px; }
.submenu a::before { content: "› "; color: var(--red); }

/* ---- Mobile (Standard): Menü eingeklappt, per Checkbox aufklappbar ---- */
.mainnav .menu { display: none; border-top: 1px solid #333; padding-bottom: 8px; }
.nav-checkbox:checked ~ .menu { display: block; }

/* ---- Desktop: horizontale Leiste mit Hover-Dropdowns ---- */
@media (min-width: 860px) {
  .nav-burger { display: none; }
  .mainnav .menu { display: flex !important; border-top: 0; padding-bottom: 0; }
  .menu > li > a { padding: 16px 16px; }
  .submenu {
    position: absolute; top: 100%; left: 0; min-width: 240px;
    background: var(--ink); border-top: 3px solid var(--red);
    box-shadow: 0 12px 24px -12px rgba(0,0,0,.5);
    display: none; z-index: 20;
  }
  .submenu a { padding: 11px 18px 11px 20px; }
  .submenu a::before { content: ""; }
  .menu > li:hover > .submenu,
  .menu > li:focus-within > .submenu { display: block; }
  .menu > li:has(.submenu) > a::after { content: " ▾"; font-size: .7em; opacity: .8; }
}

/* =========================================================================
   Inhalt
   ========================================================================= */
main { padding-block: 28px 10px; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin: 0 0 18px; }
.breadcrumb a { text-decoration: none; }

h1 {
  font-size: 2rem; line-height: 1.15; margin: 0 0 6px;
  border-bottom: 2px solid var(--line); padding-bottom: 12px;
}
.lead { color: var(--muted); max-width: 68ch; margin: 12px 0 4px; }

h2 {
  font-size: 1.55rem; margin: 44px 0 4px;
  padding-bottom: 8px; border-bottom: 2px solid var(--red);
}
h2 .sub { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }

/* Sprung-Übersicht zu den Graden */
.grade-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; padding: 0; list-style: none; }
.grade-jump a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 4px; padding: 7px 12px;
  font-weight: 700; font-size: .9rem; color: var(--ink); background: var(--bg-alt);
}
.grade-jump a:hover { border-color: var(--muted); }
.grade-jump .swatch { width: 22px; height: 10px; border-radius: 2px; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }

/* Kyu-Block */
.kyu {
  border: 1px solid var(--line); border-left: 6px solid var(--belt);
  border-radius: 6px; background: var(--bg);
  padding: 6px 22px 20px; margin: 22px 0 0; scroll-margin-top: 80px;
}
.kyu > h3 {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 1.4rem; margin: 16px 0 4px;
}
.kyu > h3 .num {
  background: var(--belt); color: #1d1d1b; font-weight: 700;
  border-radius: 4px; padding: 2px 10px; font-size: 1rem;
}
.kyu > h3 .stufe { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kyu > h3 .beltname { margin-left: auto; font-size: .82rem; color: var(--muted); font-weight: 600; }

.carry { font-size: .85rem; font-style: italic; color: var(--muted); margin: 2px 0 10px; }

h4 {
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red-dark); margin: 20px 0 8px;
}

ul.list { margin: 0 0 8px; padding-left: 22px; }
ul.list li { margin-bottom: 6px; }
ul.list ul { margin: 6px 0 8px; padding-left: 22px; }
ul.list ul li { color: var(--muted); margin-bottom: 4px; }
.term { font-weight: 700; }
.term-ital { font-style: italic; }
.ref {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--muted);
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 8px; margin-left: 4px;
}
.ref a { text-decoration: none; color: var(--red); }

/* Programm-Zeilen */
dl.prog { margin: 8px 0; display: grid; grid-template-columns: 160px 1fr; gap: 0; }
dl.prog dt { font-weight: 700; padding: 9px 0; border-top: 1px solid var(--line); }
dl.prog dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
dl.prog .kata { font-size: 1.1rem; font-weight: 700; }
dl.prog .hint { color: var(--muted); }
@media (max-width: 560px){
  dl.prog { grid-template-columns: 1fr; }
  dl.prog dd { padding-top: 0; border-top: 0; }
  dl.prog dt { border-top: 1px solid var(--line); padding-bottom: 2px; }
}

/* Tabellen */
.tbl-wrap { overflow-x: auto; margin: 8px 0 4px; border: 1px solid var(--line); border-radius: 6px; }
table.kumite { border-collapse: collapse; width: 100%; min-width: 460px; font-size: .93rem; }
table.kumite caption { caption-side: top; text-align: left; font-weight: 700; padding: 10px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
table.kumite th, table.kumite td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kumite thead th { background: var(--bg-alt); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
table.kumite tbody tr:last-child td { border-bottom: 0; }
table.kumite .phase td { background: color-mix(in srgb, var(--belt) 14%, #fff); font-weight: 700; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
table.kumite td.uke { color: var(--muted); }

/* Begriffe */
.glossary { columns: 3 240px; column-gap: 20px; margin: 12px 0; padding: 0; }
.glossary > div { break-inside: avoid; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px; background: var(--bg); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 2px 0 0; font-size: .86rem; color: var(--muted); }

/* Diagramme */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; margin: 14px 0; }
figure { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); }
figure img { width: 100%; background: var(--bg-alt); }
figure figcaption { padding: 10px 14px; font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); }
figure figcaption b { color: var(--ink); }

.callout { background: var(--bg-alt); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 4px; padding: 12px 16px; font-size: .9rem; margin: 16px 0; }

/* =========================================================================
   Fuß
   ========================================================================= */
.site-foot { margin-top: 40px; border-top: 3px solid var(--red); background: var(--bg-alt); }
.site-foot .wrap { padding-block: 24px 30px; }
.site-foot .belt { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.site-foot .belt span { flex: 1; }
.site-foot p { margin: 8px 0; font-size: .9rem; color: var(--muted); }
.site-foot .social a { margin-right: 16px; font-weight: 700; text-decoration: none; }
.site-foot .fineprint { font-size: .78rem; color: var(--muted); margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }

@media (prefers-reduced-motion: reduce){ html { scroll-behavior: auto; } }
