/* ============================================================
   SSRL Hero-Sektion – datengetrieben
   Farb-Zustände über [data-zustand] auf .hero
   ============================================================ */

.hero {
  /* Standard-Tokens (werden je Zustand überschrieben) */
  --hero-fill:   #A32D2D;   /* Button / Akzentlinie   */
  --hero-bg:     #FCEBEB;   /* zarter Flächen-Hintergrund */
  --hero-text:   #791F1F;   /* Text auf --hero-bg      */
  --hero-accent: #A32D2D;   /* Badge- / Label-Text     */

  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 1.5rem;
  border-radius: 16px;
  background: #14110f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* --- Zustands-Paletten --------------------------------------- */
.hero[data-zustand="pause"] {
  --hero-fill:   #b8791a;
  --hero-bg:     rgba(186, 121, 26, 0.14);
  --hero-text:   #f0d9a8;
  --hero-accent: #f2c76b;
}

.hero[data-zustand="event"] {
  --hero-fill:   #c98a1e;
  --hero-bg:     rgba(201, 138, 30, 0.14);
  --hero-text:   #f5dda0;
  --hero-accent: #f2c300;
}

.hero[data-zustand="saison"] {
  --hero-fill:   #d21f24;
  --hero-bg:     rgba(210, 31, 36, 0.14);
  --hero-text:   #f3b5b6;
  --hero-accent: #ff5a5f;
}

/* --- Linke Textspalte ---------------------------------------- */
.hero-main {
  flex: 2 1 300px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--hero-bg);
  color: var(--hero-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-badge i { font-size: 14px; }

.hero-title {
  margin: 14px 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.1;
  color: #ffffff;
}

.hero-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

/* --- „Nächster Lauf/Rennen“-Block ---------------------------- */
.hero-next {
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--hero-fill);
  border-radius: 0 8px 8px 0;
  background: var(--hero-bg);
}

.hero-next-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--hero-accent);
}

.hero-next-value {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--hero-text);
}

.hero-next-desc {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

/* --- CTA ------------------------------------------------------ */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--hero-fill);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s, transform 0.1s;
}

.hero-cta:hover  { filter: brightness(1.1); }
.hero-cta:active { transform: scale(0.98); }
.hero-cta i { font-size: 16px; }

/* --- Rechte Bild-/Icon-Spalte -------------------------------- */
.hero-media {
  flex: 1 1 240px;
  min-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hero-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media-fallback {
  color: var(--hero-accent);
  font-size: 64px;
  opacity: 0.85;
}

/* --- Fehlerhinweis, falls JSON nicht lädt -------------------- */
.hero-error {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: rgba(210, 31, 36, 0.10);
  border: 1px solid rgba(210, 31, 36, 0.25);
  color: #d21f24;
  font-size: 14px;
}

/* --- Mobile --------------------------------------------------- */
@media (max-width: 640px) {
  .hero { padding: 1.1rem; gap: 1.1rem; }
  .hero-media { min-height: 160px; }
}

/* ============================================================
   Resultate-Sektion – datengetrieben
   Karten rendern automatisch 1→2→3 Spalten (auto-fit)
   ============================================================ */

.results {
  margin-top: 2rem;
}

.results-heading {
  font-size: 18px;
  font-weight: 600;
  color: #14110f;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-heading i {
  color: #d21f24;
  font-size: 20px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.result-card {
  min-width: 0;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: #14110f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
}

.result-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 0.8rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.result-medal {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d21f24;
  color: #ffffff;
  font-size: 18px;
}

.result-title-wrap {
  min-width: 0;
}

.result-badge {
  display: inline-block;
  margin-bottom: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f2c76b;
}

.result-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  overflow-wrap: break-word;
}

.result-podium {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0.9rem;
}

.result-rank {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.35;
  color: #ffffff;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, 0.05);
}

.result-rank strong { font-weight: 600; }

.result-rank .zusatz {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
}

.result-rank[data-rang="1"] { border-left-color: #ffd700; background: rgba(255, 215, 0, 0.12); }
.result-rank[data-rang="2"] { border-left-color: #c0c0c0; background: rgba(192, 192, 192, 0.12); }
.result-rank[data-rang="3"] { border-left-color: #cd7f32; background: rgba(205, 127, 50, 0.12); }

.result-link {
  margin-top: auto;
}

.result-link a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f2c76b;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}

.result-link a:hover { text-decoration: underline; }
.result-link a i { font-size: 15px; }

@media (max-width: 640px) {
  .result-card { padding: 1rem; }
}

/* ============================================================
   Community / Kontakt-Sektion – datengetrieben
   ============================================================ */

.community {
  margin-top: 2rem;
}

.community-body {
  padding: 1.5rem;
  border-radius: 16px;
  background: #14110f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.community-heading {
  font-size: 18px;
  font-weight: 600;
  color: #14110f;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.community-heading i {
  color: #d21f24;
  font-size: 20px;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

/* --- Social-Links ------------------------------------------- */
.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.community-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.community-link:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}

.community-link i { font-size: 17px; color: #f2c76b; }

.community-link--page {
  background: rgba(242, 199, 107, 0.10);
  border-color: rgba(242, 199, 107, 0.28);
}

.community-link--page:hover {
  background: rgba(242, 199, 107, 0.18);
  border-color: rgba(242, 199, 107, 0.45);
}

/* --- Über uns ------------------------------------------------ */
.ueberuns-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

/* --- Kontakt ------------------------------------------------- */
.community-contact {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.community-contact .verein {
  color: #ffffff;
  font-weight: 500;
}

.community-contact a {
  color: #f2c76b;
  text-decoration: none;
}

.community-contact a:hover { text-decoration: underline; }

/* --- Ko-fi-Button ------------------------------------------- */
.community-kofi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.kofi-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

.kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  background: #ff5e5b;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s, transform 0.1s;
}

.kofi-btn:hover  { filter: brightness(1.08); }
.kofi-btn:active { transform: scale(0.98); }
.kofi-btn i { font-size: 18px; }

@media (max-width: 640px) {
  .community-body { padding: 1.1rem; }
  .community-grid { gap: 1.2rem; }
}

/* ============================================================
   Banner-Header – datengetrieben
   ============================================================ */

.site-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.site-header img {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: inline-block;
}

/* --- Navigationsleiste unter dem Banner --------------------- */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 1.2rem auto 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #14110f;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  background: #241d19;
  border-color: rgba(242, 199, 107, 0.4);
}

.site-nav a i { font-size: 17px; color: #f2c76b; }

/* Aktive Seite hervorheben */
.site-nav a[aria-current="page"] {
  background: #d21f24;
  border-color: #d21f24;
}

.site-nav a[aria-current="page"] i { color: #ffffff; }

@media (max-width: 640px) {
  .site-nav a { padding: 9px 14px; font-size: 13px; }
}

/* ============================================================
   Lightbox (Bild vergrössern)
   ============================================================ */

.js-zoom { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox.is-open { display: flex; }

.lightbox-img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }
