/* tkd-ellwangen.de – Design: Navy, Rot und Blau aus dem Taegeuk, viel Weißraum, keine externen Ressourcen (DSGVO) */
:root {
  --navy: #0e1726;
  --navy-2: #1a2740;
  --rot: #c8102e;
  --rot-dunkel: #a00d25;
  --rot-text: #c8102e; /* Rot für kleine Schrift, im Dunkelmodus heller (Kontrast) */
  --blau: #0b3d91;
  --bg: #ffffff;
  --bg-2: #f3f5f8;
  --text: #1b2333;
  --text-2: #5a6478;
  --linie: #e3e7ee;
  --karte: #ffffff;
  --radius: 14px;
  --schatten: 0 1px 2px rgba(14, 23, 38, .06), 0 8px 24px rgba(14, 23, 38, .08);
  --breite: 1180px;
  --schrift: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b111c;
    --bg-2: #121a29;
    --text: #e8ecf3;
    --text-2: #9aa5b8;
    --linie: #233049;
    --karte: #151f31;
    --rot-text: #ff6b7d;
    --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blau); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #7fa6ff; } }
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--breite); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--bg); padding: 8px 14px; border-radius: 8px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--linie); }
@media (prefers-color-scheme: dark) { .kopf { background: rgba(11, 17, 28, .9); } }
.kopf-innen { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
@media (prefers-color-scheme: dark) { .logo { color: var(--text); } }
/* DJK-Logo ist schwarz auf transparent, daher immer auf weißer Fläche (auch im Dunkelmodus) */
.djk-logo { flex: none; display: flex; align-items: center; background: #fff; border: 1px solid var(--linie); border-radius: 9px; padding: 4px 7px; }
.djk-logo img { height: 30px; width: auto; }
.djk-voll { display: inline-block; background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
.djk-voll img { height: 72px; width: auto; }
.logo span { display: flex; flex-direction: column; line-height: 1.05; }
.logo strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.logo small { font-size: .8rem; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.logo-hell { color: #fff; }
.logo-hell small { color: #aab4c6; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--rot-text); }
.nav .knopf { margin-left: 8px; color: #fff; }
.menue-knopf { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menue-knopf span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 900px) {
  .menue-knopf { display: block; }
  .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--linie); box-shadow: var(--schatten); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--linie); border-radius: 0; }
  .nav .knopf { margin: 14px 0 0; text-align: center; border-radius: 999px; border: 0; }
  .menue-offen .nav { opacity: 1; transform: none; pointer-events: auto; }
  .menue-offen .menue-knopf span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menue-offen .menue-knopf span:nth-child(2) { opacity: 0; }
  .menue-offen .menue-knopf span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--rot); color: #fff; text-decoration: none; font-weight: 700; padding: 13px 24px; border-radius: 999px; border: 2px solid var(--rot); transition: background .15s, transform .15s; }
.knopf:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); transform: translateY(-1px); }
.knopf-hell { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.knopf-hell:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.knopf-klein { padding: 8px 16px !important; font-size: .9rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.pfeil { font-weight: 700; text-decoration: none; white-space: nowrap; }
.pfeil::after { content: " →"; }
.vorzeile { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--rot-text); margin-bottom: .6em; }

/* Hero */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: flex-end; color: #fff; background: var(--navy); overflow: hidden; }
.hero-bilder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-bilder img.an { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 23, 38, .15) 0%, rgba(14, 23, 38, .55) 45%, rgba(14, 23, 38, .92) 100%); }
.hero-text { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 64px; width: 100%; }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4.4rem); margin-bottom: .35em; }
.hero h1 span { color: #ff5a6e; }
.hero p { max-width: 560px; font-size: 1.1rem; color: #dbe2ee; }
.hero .vorzeile { color: #fff; opacity: .85; }
.hero .knoepfe { margin-top: 24px; }

/* Zahlen */
.zahlen { background: var(--navy); color: #fff; }
.zahlen-raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255, 255, 255, .08); }
.zahlen-raster div { background: var(--navy); padding: 26px 16px; text-align: center; }
.zahlen strong { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.zahlen span { color: #aab4c6; font-size: .9rem; }
@media (min-width: 800px) { .zahlen-raster { grid-template-columns: repeat(4, 1fr); } }

/* Abschnitte */
.abschnitt { padding: 64px 0; }
@media (min-width: 800px) { .abschnitt { padding: 88px 0; } }
.grau { background: var(--bg-2); }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.abschnitt-kopf h2 { margin: 0; }
.zwei { display: grid; gap: 40px; }
@media (min-width: 900px) { .zwei { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; } }

.tae-kwon-do { display: grid; gap: 12px; }
.tae-kwon-do div { display: flex; align-items: baseline; gap: 16px; padding: 22px 24px; border-radius: var(--radius); background: var(--bg-2); border-left: 5px solid var(--rot); }
.tae-kwon-do div:nth-child(2) { border-color: var(--blau); }
.tae-kwon-do div:nth-child(3) { border-color: var(--navy); }
@media (prefers-color-scheme: dark) { .tae-kwon-do div:nth-child(3) { border-color: #8a96ab; } }
.tae-kwon-do strong { font-size: 1.8rem; font-weight: 800; min-width: 3.4em; }
.tae-kwon-do span { color: var(--text-2); }

/* Seitenkopf */
.seitenkopf { background: var(--navy); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.seitenkopf::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: conic-gradient(from 90deg, var(--rot) 0 50%, var(--blau) 50% 100%); opacity: .25; }
.seitenkopf h1 { margin: 0; max-width: 900px; position: relative; z-index: 1; font-size: clamp(1.8rem, 4.5vw, 3rem); }
.seitenkopf p { color: #c3cbd9; margin: .6em 0 0; position: relative; z-index: 1; }
.zurueck { color: #aab4c6; text-decoration: none; font-weight: 600; font-size: .9rem; display: inline-block; margin-bottom: 12px; position: relative; z-index: 1; }
.zurueck::before { content: "← "; }

/* Wochenplan */
.plan { display: grid; gap: 16px; }
@media (min-width: 700px) { .plan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1050px) { .plan { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan-tag { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; box-shadow: var(--schatten); }
.plan-tag h3 { color: var(--rot-text); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: 14px; }
.einheit { padding: 12px 0; border-top: 1px solid var(--linie); display: grid; gap: 2px; }
.einheit:first-of-type { border-top: 0; padding-top: 0; }
.zeit { font-weight: 800; font-size: 1.05rem; }
.gruppe { color: var(--text); }
.halle { color: var(--text-2); font-size: .85rem; }

/* Karten */
.karten { display: grid; gap: 22px; }
@media (min-width: 640px) { .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .karten { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); transition: transform .2s, box-shadow .2s; }
.karte:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(14, 23, 38, .06), 0 16px 36px rgba(14, 23, 38, .14); }
.karte-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.karte-bild { aspect-ratio: 16 / 10; background: var(--bg-2); overflow: hidden; }
.karte-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.karte:hover .karte-bild img { transform: scale(1.04); }
.karte-platzhalter { height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.karte-platzhalter .djk-logo { padding: 10px 14px; border: 0; }
.karte-platzhalter .djk-logo img { height: 56px; }
.karte-text { padding: 18px 20px 22px; }
.karte time { color: var(--rot-text); font-size: .82rem; font-weight: 700; }
.karte h3 { margin: 6px 0 8px; font-size: 1.12rem; }
.karte p { color: var(--text-2); font-size: .93rem; margin: 0; }

.jahre { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.jahre a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linie); background: var(--karte); }
.jahre a:hover { border-color: var(--text-2); }
.jahre a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .jahre a[aria-current="page"] { background: var(--rot); border-color: var(--rot); } }
.mehr { text-align: center; color: var(--text-2); margin-top: 32px; }

/* Trainer */
.gesichter { display: flex; flex-wrap: wrap; gap: 18px; }
.gesichter a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .88rem; }
.gesichter img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--karte); box-shadow: var(--schatten); }
.trainer-raster { display: grid; gap: 22px; }
@media (min-width: 640px) { .trainer-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1150px) { .trainer-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Die Originalfotos sind nur ~120 px breit, daher bewusst klein im Querformat */
.trainer { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); display: flex; gap: 18px; padding: 18px; align-items: flex-start; }
.trainer-bild { flex: none; width: 112px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.trainer-bild img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.trainer-text { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 400px) { .trainer { gap: 14px; padding: 14px; } .trainer-bild { width: 84px; } }
.grad { display: inline-block; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; border-left: 4px solid var(--rot); }
.trainer h3 { margin-bottom: 4px; font-size: 1.25rem; }
.rolle { color: var(--rot-text); font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.trainer ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: .92rem; }

/* Fließtext und Beiträge */
/* Lesespalte links bündig mit dem Seitenkopf */
.text, .blaettern { max-width: calc(760px + 56px); margin-left: max(0px, calc((100% - var(--breite)) / 2)); margin-right: auto; }
.text h2 { font-size: 1.6rem; margin-top: 1.4em; }
.text h3 { margin-top: 1.4em; }
.text { overflow-wrap: break-word; }
.text table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.text td, .text th { border: 1px solid var(--linie); padding: 8px 10px; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 24px 0; }
.galerie.einzeln { grid-template-columns: 1fr; }
.galerie a { display: block; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.galerie:not(.einzeln) a { aspect-ratio: 4 / 3; }
.galerie:not(.einzeln) img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.galerie a:hover img { transform: scale(1.03); }
.galerie.einzeln img { width: 100%; max-height: 560px; object-fit: contain; background: var(--bg-2); }
.blaettern { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding-bottom: 72px; }
.blaettern a { display: block; overflow-wrap: break-word; hyphens: auto; padding: 16px 18px; border: 1px solid var(--linie); border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 600; background: var(--karte); font-size: .95rem; }
.blaettern a:hover { border-color: var(--text-2); }
.blaettern small { display: block; color: var(--text-2); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.blaettern .neu { text-align: right; }

.infobox { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 28px; box-shadow: var(--schatten); }
.infobox ul { padding-left: 20px; }
.hinweis { padding: 18px 20px; border-radius: var(--radius); background: #fff4e5; color: #6b4300; border: 1px solid #f3d19c; }
@media (prefers-color-scheme: dark) { .hinweis { background: #2b2210; color: #f3d19c; border-color: #5a4518; } }

/* Aufruf */
.aufruf { background: linear-gradient(120deg, var(--rot) 0%, #8f0b21 55%, var(--blau) 140%); color: #fff; padding: 56px 0; }
.aufruf-innen { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.aufruf h2 { margin-bottom: .2em; }
.aufruf p { margin: 0; color: #ffe1e5; }
.aufruf .knopf { background: #fff; color: var(--rot); border-color: #fff; }
.aufruf .knopf-hell { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }

/* Fuß */
.fuss { background: var(--navy); color: #c3cbd9; font-size: .95rem; }
.fuss a { color: #fff; }
.fuss h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1em; }
.fuss ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fuss-raster { display: grid; gap: 36px; padding-top: 56px; padding-bottom: 40px; }
@media (min-width: 800px) { .fuss-raster { grid-template-columns: 1.3fr 1fr 1fr; } }
.fuss-unten { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 9, 16, .94); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.offen { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lb-zu { top: 12px; right: 12px; }
.lb-zurueck { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-weiter { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-zahl { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #aab4c6; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

.rechtstext h2 { font-size: 1.35rem; }
.rechtstext h3 { font-size: 1.05rem; margin-top: 1.6em; }
.rechtstext { font-size: .97rem; }
