/* Hauptseite im Design „Falk 1“: Zeitleiste (7 Weltmeistertitel)
   + Wettkampf-Register (alle Wettkämpfe absteigend nach Jahren, nachladend) */
:root {
  --hintergrund: #12171d;
  --hintergrund-2: #1a2129;
  --text: #e8e4da;
  --text-hell: #9aa4b0;
  --gold: #c9a227;
  --linie: #2c3540;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.kopf {
  text-align: center;
  padding: 40px 20px 30px;
  background:
    radial-gradient(ellipse 60% 90% at 50% 0%, rgba(201, 162, 39, 0.14), transparent 70%),
    var(--hintergrund);
  border-bottom: 1px solid var(--linie);
}
.kopf img { height: 168px; width: 168px; border-radius: 50%; object-fit: cover; }
.kopf h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 400;
  margin: 18px 0 6px;
  letter-spacing: 0.02em;
}
.kopf .titel {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 13px;
  margin: 0;
}

.zahlen {
  max-width: 900px;
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
}
.zahl { background: var(--hintergrund-2); padding: 22px 12px; text-align: center; }
.zahl .wert {
  display: block;
  font-family: Georgia, serif;
  font-size: 40px;
  color: var(--gold);
  line-height: 1;
}
.zahl .label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-hell);
}

.abschnitts-titel {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 30px;
  text-align: center;
  color: var(--text);
  margin: 0 0 8px;
}
.abschnitts-titel::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin: 14px auto 0;
}
.abschnitts-notiz {
  text-align: center;
  color: var(--text-hell);
  font-size: 14px;
  margin: 18px 0 0;
}

/* --- Zeitleiste: 7 Weltmeistertitel --------------------------------------- */
.zeit { max-width: 980px; margin: 0 auto; padding: 64px 20px 30px; }
.linie {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.linie::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--gold) 0%, var(--linie) 12%, var(--linie) 88%, var(--gold) 100%);
  transform: translateX(-50%);
}
.punkt {
  position: relative;
  width: 50%;
  /* Karte endet an der Kante des 44 px Ankers, der die Mittellinie
     überstreift (22 px auf jeder Seite) */
  padding: 0 22px 56px 0;
}
.punkt.rechts {
  margin-left: 50%;
  padding: 0 0 56px 22px;
}
.anker {
  position: absolute;
  top: 6px;
  right: -22px;
  z-index: 2;
}
.punkt.rechts .anker { right: auto; left: -22px; }
.anker span {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hintergrund);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 15px;
  text-align: center;
  line-height: 40px;
}

/* Zeitleiste im JS-Betrieb (Klasse .aufgebaut): zwei eigenständige
   Spalten – ungerade Karten links, gerade rechts; die rechte Spalte
   beginnt in der Mitte der ersten Karte (Abstand setzt das Skript).
   Ohne JS (und mobil) bleibt die chronologische Fließliste stehen. */
.linie.aufgebaut {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.linie.aufgebaut .spalte {
  list-style: none;
  margin: 0;
  padding: 0;
}
.linie.aufgebaut .spalte .punkt {
  width: auto;
  margin-left: 0;
}
.linie.aufgebaut .spalte .punkt:last-child {
  padding-bottom: 0;
}

.karte {
  background: var(--hintergrund-2);
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 20px 22px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .karte { opacity: 0; transform: translateY(18px); }
.js .karte.sichtbar { opacity: 1; transform: none; }
.disziplin {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.karte h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 21px;
  margin: 0 0 8px;
}
/* „.detail“ kollidiert mit der Detailseiten-Wrapping-Klasse (main.detail):
   durch den .karte-Präfix bleibt die Regel auf die Zeitleisten-Karten
   beschränkt und überschreibt das Padding der Wrapper-Regel */
.karte .detail { margin: 0 0 14px; padding: 0; color: var(--text-hell); font-size: 14.5px; }
.karte .detail strong { color: var(--text); font-weight: 600; }
.bild img { width: 100%; height: auto; display: block; border-radius: 5px; }

/* Link „weitere Infos“ in der Zeitleisten-Karte: verweist auf die
   Wettkampf-Detailseite */
.karte .mehr {
  margin: 0 0 14px;
  font-size: 13.5px;
}
.karte .mehr a {
  color: var(--gold);
  text-decoration: none;
}
.karte .mehr a:hover { text-decoration: underline; }
.karte .mehr a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- Weitere Top-Erfolge --------------------------------------------------- */
.erfolge {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 20px 34px;
}
.erfolge-gruppen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 44px;
  margin-top: 36px;
  align-items: start;
}
.erfolge-gruppe h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 19px;
  color: var(--gold);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--linie);
}
.erfolge-gruppe ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.erfolge-gruppe li {
  position: relative;
  padding: 7px 0 7px 20px;
  border-bottom: 1px solid var(--linie);
  font-size: 14.5px;
  color: var(--text);
}
.erfolge-gruppe li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.erfolge-gruppe li:last-child { border-bottom: none; }

/* Jahreszahlen in den Erfolgs-Zeilen: verweisen direkt auf die
   Wettkampf-Detailseite; gleicher Stil wie die „mehr“-Links im
   Wettkampf-Register */
.erfolge-gruppe li a {
  color: var(--text-hell);
  text-decoration: none;
  border-bottom: 1px solid var(--linie);
  padding-bottom: 1px;
}
.erfolge-gruppe li a:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.erfolge-gruppe li a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- Wettkampf-Register ---------------------------------------------------- */
.register {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 20px 40px;
}
.register-raster {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 44px;
}

.jahre-nav {
  position: sticky;
  top: 24px;
  min-width: 0;
}
.nav-titel {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-hell);
  margin: 0 0 10px;
}
.jahre-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
}
.jahre-nav a {
  display: block;
  padding: 4px 0 4px 10px;
  font-family: Georgia, serif;
  font-size: 14px;
  color: var(--text-hell);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.jahre-nav a:hover { color: var(--text); }
.jahre-nav a.aktiv {
  color: var(--gold);
  border-left-color: var(--gold);
}

.jahr {
  padding: 0 0 46px;
  transition: opacity 0.55s ease, transform 0.55s ease;
  scroll-margin-top: 24px;
}
.js .jahr { opacity: 0; transform: translateY(14px); }
.js .jahr.sichtbar { opacity: 1; transform: none; }
/* Noch nicht geladene Jahresblöcke: nur im JS-Betrieb unsichtbar, werden
   per JS nacheinander eingeblendet. Ohne JS (Klasse .no-js) sind alle
   Blöcke sichtbar und die Ladeanzeige ausgeblendet. */
.js .charge { display: none; }
.js .charge.sichtbar { display: block; animation: jahr-einsblenden 0.55s ease; }
.no-js .fortschritt, .no-js #sentinel { display: none; }
@keyframes jahr-einsblenden {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.jahr-kopf {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  color: var(--gold);
  margin: 0 0 6px;
}
.jahr-kopf small {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-hell);
}
.jahr-kopf::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--linie);
  align-self: center;
}

.eintraege {
  list-style: none;
  margin: 0;
  padding: 0;
}
.eintrag {
  display: grid;
  grid-template-columns: 118px 1fr 132px;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--linie);
}
.eintrag:last-child { border-bottom: none; }
.art {
  align-self: center;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.5);
  padding: 4px 8px;
  text-align: center;
  justify-self: start;
}
.eintrag h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 17.5px;
  margin: 0 0 3px;
}
.eintrag .meta {
  margin: 0;
  color: var(--text-hell);
  font-size: 13.5px;
}
/* Trenner zwischen Datum, Distanz und Platzierung */
.eintrag .meta span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--linie);
}
.eintrag.hoch .meta .platz { color: var(--gold); }

/* Link zu weiteren Fotos / Presse / Berichten auf der Wettkampf-Detailseite */
.eintrag .mehr {
  margin: 5px 0 0;
  font-size: 12.5px;
}
.eintrag .mehr a {
  color: var(--text-hell);
  text-decoration: none;
  border-bottom: 1px solid var(--linie);
  padding-bottom: 1px;
}
.eintrag .mehr a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.mini {
  width: 132px;
  height: 96px;
  object-fit: contain;
  background: var(--hintergrund-2);
  display: block;
  border: 1px solid var(--linie);
  border-radius: 4px;
}
.mini.leer {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hintergrund-2);
  color: rgba(201, 162, 39, 0.55);
  font-size: 16px;
}

/* Foto-Link im Register: verweist auf die Wettkampf-Detailseite */
.eintrag .bildlink { display: block; text-decoration: none; }
.eintrag .bildlink:hover .mini { border-color: var(--gold); }
.eintrag .bildlink:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.fortschritt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 0 6px;
  color: var(--text-hell);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.fortschritt .lader {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  flex: none;
}
.fortschritt.laedt .lader { opacity: 1; animation: pulsieren 1s ease-in-out infinite; }
@keyframes pulsieren { 50% { opacity: 0.25; } }
#sentinel { height: 1px; }

.fuss {
  border-top: 1px solid var(--linie);
  padding: 26px 20px 40px;
  text-align: center;
  color: var(--text-hell);
  font-size: 13px;
}
.fuss a {
  color: var(--text-hell);
  text-decoration: none;
  border-bottom: 1px solid var(--linie);
  padding-bottom: 1px;
}
.fuss a:hover { color: var(--gold); border-color: var(--gold); }

/* --- Top-Button (nur Startseite) ------------------------------------------- */
.top-taste {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--linie);
  background: rgba(18, 23, 29, 0.92);
  color: var(--text-hell);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.top-taste:hover { border-color: var(--gold); color: var(--gold); }
.top-taste:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.top-taste[hidden] { display: none; }

@media (max-width: 900px) {
  .register-raster { grid-template-columns: 1fr; gap: 0; }
  .jahre-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(18, 23, 29, 0.96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--linie);
    margin: 0 -20px;
    padding: 8px 20px 10px;
  }
  .nav-titel { display: none; }
  .jahre-nav ul {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .jahre-nav a {
    border: 1px solid var(--linie);
    border-left: 1px solid var(--linie);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .jahre-nav a.aktiv {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.12);
  }
  .register-inhalt { padding-top: 14px; }
}

@media (max-width: 760px) {
  .zahlen { grid-template-columns: repeat(2, 1fr); }
  .erfolge-gruppen { grid-template-columns: 1fr; gap: 30px; }
  .linie::before { left: 22px; transform: none; }
  .punkt, .punkt.rechts {
    width: 100%;
    margin-left: 0;
    padding: 0 0 40px 64px;
  }
  .anker, .punkt.rechts .anker { left: 0; right: auto; }
}

/* --- Detailseite: wetkkampf.php ------------------------------------------ */
.kopf.detail-kopf { padding: 26px 20px 28px; }
.kopf.detail-kopf img { height: 96px; width: 96px; }
.kopf.detail-kopf h1 {
  font-size: clamp(27px, 4.5vw, 40px);
  margin: 14px 0 6px;
}
.kopf .zurueck { margin: 0 0 16px; font-size: 13.5px; }
.kopf .zurueck a {
  color: var(--text-hell);
  text-decoration: none;
  border-bottom: 1px solid var(--linie);
  padding-bottom: 1px;
  letter-spacing: 0.04em;
}
.kopf .zurueck a:hover { color: var(--gold); border-color: var(--gold); }

.detail { max-width: 880px; margin: 0 auto; padding: 30px 20px 56px; }
.detail-info .meta {
  margin: 0;
  font-size: 15px;
  color: var(--text-hell);
}
.detail-info .meta span + span::before {
  content: "·";
  margin: 0 10px;
  color: var(--linie);
}
.detail-info .meta .platz.hoch { color: var(--gold); }
/* Gesamtzeit in der Meta-Zeile (Register und Detailseite): heller als die
   anderen Meta-Angaben, tabellarische Ziffern */
.meta .zeit { color: var(--text); font-variant-numeric: tabular-nums; }
.detail-notiz { color: var(--text-hell); font-size: 15px; }

.detail h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 27px;
  line-height: 1.25;
  color: var(--text);
  margin: 46px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}
.detail h2 small {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-hell);
  margin-left: 10px;
}

.detail-text { font-size: 15.5px; }
.detail-text p { margin: 0 0 14px; }
.detail-text ul, .detail-text ol { margin: 0 0 14px; padding-left: 22px; }
.detail-text li { margin-bottom: 4px; }
.detail-text h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 19px;
  margin: 22px 0 8px;
}
.detail-text a.extern {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 162, 39, 0.45);
}
.detail-text a.extern:hover { border-color: var(--gold); }
.detail-text a.intern {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--linie);
}
.detail-text a.intern:hover { color: var(--gold); border-color: var(--gold); }

.bericht + .bericht { margin-top: 28px; }
.bericht h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 4px;
}
.bericht-datum {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-hell);
  letter-spacing: 0.04em;
}

.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.foto {
  margin: 0;
  background: var(--hintergrund-2);
  border: 1px solid var(--linie);
  padding: 10px;
}
.foto img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  margin: 0 auto;
  cursor: zoom-in;
}
.foto figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-hell);
}
.foto:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.presse-notiz { margin: 0 0 16px; font-size: 13px; color: var(--text-hell); }
.presse-doku {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--hintergrund-2);
  border: 1px solid var(--linie);
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
}
.presse-doku:hover { border-color: var(--gold); }
.presse-doku .typ {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.5);
  padding: 4px 8px;
}
.presse-doku .t { font-size: 14px; }
.presse-doku .g {
  margin-left: auto;
  flex: none;
  font-size: 12.5px;
  color: var(--text-hell);
}

.presse-extern {
  margin: 6px 0 0;
  font-size: 13px;
}
.presse-extern a {
  color: var(--gold);
  text-decoration: none;
}
.presse-extern a:hover {
  text-decoration: underline;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 11, 15, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-inhalt { margin: 0; text-align: center; max-width: min(94vw, 1200px); }
.lb-inhalt img {
  display: inline-block;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
}
.lb-inhalt figcaption {
  margin-top: 14px;
  padding: 0 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.lb-taste {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--linie);
  background: rgba(18, 23, 29, 0.8);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-taste:hover { border-color: var(--gold); color: var(--gold); }
.lb-schliessen { top: 18px; right: 18px; }
.lb-vor { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-nach { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .eintrag { grid-template-columns: 1fr; gap: 8px; }
  .art { justify-self: start; }
  .mini { width: 100%; height: 180px; }
  .jahr-kopf { font-size: 36px; }
  .foto-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .foto { padding: 7px; }
  .foto figcaption { font-size: 11.5px; }
  .detail h2 { margin-top: 36px; }
  .lb-vor { left: 10px; }
  .lb-nach { right: 10px; }
}
