/* ============================================================
   0) ROOT-VARIABLEN – Farben, Abstände, Radius, Schatten
   ============================================================ */
:root {
  --color-primary: #003366;
  --color-primary-light: #0055aa;
  --color-bg: #f5f7fa;
  --color-text: #222;
  --color-text-light: #666;
  --color-text-muted: #888;

  --color-chip: #e5e7eb;
  --color-chip-hover: #d1d5db;

  --radius: 12px;
  --radius-chip: 20px;

  --shadow: 0 2px 6px rgba(0,0,0,0.1);
  --transition: 0.2s ease;

  --kat-a: #ffdddd; /* Pastellrot */
  --kat-b: #fff4cc; /* Pastellgelb */
  --kat-c: #ddf5dd; /* Pastellgrün */

  --disz-meisterschaft: #4a90e2;
  --disz-sport: #50e3c2;
  --disz-americaine: #f5a623;
  --disz-sport-spezial: #d0021b;

  --uv-BE: #0055aa;
  --uv-BO: #008c45;
  --uv-EM: #c62828;
  --uv-EN: #9c27b0;
  --uv-FA: #ff9800;
  --uv-FR: #4caf50;
  --uv-GR: #3f51b5;
  --uv-MA: #795548;
  --uv-ML: #009688;
  --uv-SM: #e91e63;
  --uv-SH: #673ab7;
  --uv-SL: #2196f3;
  --uv-WS: #607d8b;

  --bp-mobile: 678px;
  --bp-mobile: 768px;
  --bp-tablet: 900px;
  --bp-desktop: 1024px;

}





/* ============================================================
   1) GLOBAL – Body, Typografie, Utility
   ============================================================ */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.page-title {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  padding: 10px 0;
  z-index: 20;
}

.home-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .home-title {
    font-size: 1.6rem;
    margin-top: 6px;
  }
}

.home-mobile-logo {
  display: none;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

.home-mobile-logo img {
  width: 90px;
  height: auto;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .home-mobile-logo {
    display: block;
  }
}

.section-title {
  grid-column: 1 / -1;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 80px 0 20px;
  padding-left: 18px;
  cursor: pointer;
  color: var(--text-strong);
  color: var(--color-primary);
  position: relative;
}


/* Vertikaler Balken links */
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 10px;
  height: 22px;
  border-radius: 3px;

  /* SFKV-Blau mit sportlichem Verlauf */
  background: linear-gradient(
    180deg,
    var(--color-primary-light),
    var(--color-primary)
  );

  box-shadow: 0 0 6px rgba(0, 51, 102, 0.25);
  opacity: 0.35; /* dezent, nicht knallig */
}

/* Horizontale Linie */
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: var(--color-primary);
  opacity: 0.35;
}


/* Hover-Effekt */
.section-title:hover {
  opacity: 0.7;
}

.month-content {
  grid-column: 1 / -1;
  overflow: hidden;
  transition: max-height 0.35s ease;
  position: relative;
  z-index: 1;
  height: auto;
}

.month-title {
  margin-top: 0px !important;
  cursor: pointer;
}

.news-card h3,
.news-card p,
.news-card .doc-meta {
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.flag-icon {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: contain;
}

.flag-icon-small {
  width: 22px;
  margin-right: 8px;
  border-radius: 3px;
  object-fit: cover;
}

.meta-date-line {
  display: inline-flex;
  align-items: center;
}

.meta-new {
  background: #e53935;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  margin-left: 4px;
  font-weight: 600;
  display: inline-block;
  white-space: normal !important;
}

.ms-subtitle {
  font-weight: 700;
  font-size: 1.12rem;
  margin-top: 60px;
  margin-bottom: 10px;
  color: var(--color-primary);
}



/* ============================================================
   2) SHARE-BUTTON + TOAST
   ============================================================ */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover {
  background: #f5f5f5;
}

.share-icon {
  width: 18px;
  height: 18px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #333;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .3s;
}

.toast.show {
  opacity: 1;
}


/* ============================================================
   3) LAYOUT – App, Sidebar, Content
   ============================================================ */
#app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  border-right: 1px solid rgba(255,255,255,0.1);
  z-index: 1500;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 20px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.logo img {
  width: 90px;
  margin-bottom: 10px;
}

.logo span {
  font-size: 1.3rem;
  font-weight: 600;
  opacity: 0.9;
}

#content {
  margin-left: 260px;
  padding: 30px;
  max-width: calc(1500px - 260px);
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  #content {
    width: calc(100% - 260px);
  }
}


@media (max-width: 768px) {
  #content {
    margin-left: 0 !important;
    padding: 20px !important;
    max-width: 100% !important;
  }
}


/* ============================================================
   4) NAVIGATION – Sidebar, Hamburger, Overlay
   ============================================================ */
nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-size: 1.05rem;
  opacity: 0.85;
  transition: 0.2s ease;
}

.nav-item:hover {
  background: rgba(255,255,255,0.12);
  opacity: 1;
}

.nav-item.active {
  background: rgba(255,255,255,0.18);
  opacity: 1;
}

.nav-icon {
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.hamburger {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  font-size: 2rem;
  padding: 10px 15px;
  background: var(--color-primary);
  color: white;
  border-radius: 12px;
  cursor: pointer;
  display: none;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1400;
  display: none;
}


/* ============================================================
   5) CHIPS (Filter + Breadcrumbs)
   ============================================================ */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  padding: 6px 12px;
  background: var(--color-chip);
  border-radius: var(--radius-chip);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chip:hover {
  background: var(--color-chip-hover);
}

.chip.active {
  background: var(--color-primary);
  color: white;
}

#gallery-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

#gallery-breadcrumb .chip {
  padding: 4px 10px;
  background: #f0f0f0;
}

#gallery-breadcrumb .chip.active {
  background: var(--color-primary);
  color: white;
}


/* ============================================================
   6) DETAIL-PANEL – Overlay, Header, Close
   ============================================================ */
#detail-panel {
  position: fixed;
  top: 0;
  right: -70%;
  width: 70%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  z-index: 2000;
  overflow-y: auto;
  border-radius: 16px 0 0 16px;
  box-shadow: -6px 0 20px rgba(0,0,0,0.15);
}

#detail-panel.open {
  right: 0;
}

#detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1500;
}

#detail-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

#detail-overlay-2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9000;
}

#detail-overlay-2.show {
  opacity: 1;
  pointer-events: auto;
}

#detail-panel-2.open {
  display: block !important;
}


@media (max-width: 1024px) {
  #detail-panel {
    width: 100%;
    right: -100%;
  }
}

.detail-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.close-btn {
  font-size: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  opacity: 0.7;
  transition: var(--transition);
  margin-right: 30px;
}

.close-btn:hover {
  opacity: 1;
}

#detail-panel-2 {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 1000px;
  height: 100%;
  background: #fff;
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  border-radius: 16px 0 0 16px;
  box-shadow: -6px 0 20px rgba(0,0,0,0.15);
}

#detail-panel-2.open {
  right: 0;
}

@media (max-width: 768px) {
  #detail-panel-2.open .detail-header {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid #ddd;
    z-index: 9999;
  }

  #detail-panel-2:not(.open) .detail-header {
    display: none;
  }

  /* Platz schaffen, damit der Header nichts überlappt */
  #detail-panel-2.open .news-detail-inner {
    padding-bottom: 80px;
  }
}



/* Detail-Header unten NUR wenn Panel offen ist */
@media (max-width: 768px) {
  #detail-panel.open .detail-header {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ddd;
    z-index: 9999;
    flex-direction: row-reverse;
  }

  /* Optional: etwas Abstand zwischen den Buttons */
  #detail-panel.open .detail-header .share-btn {
    margin-right: auto;
  }

  /* Wenn Panel NICHT offen → Header verstecken */
  #detail-panel:not(.open) .detail-header {
    display: none;
  }

  /* Platz schaffen, damit der Header nichts überlappt */
  #detail-panel.open .news-detail-inner {
    padding-bottom: 80px;
  }
}




/* ============================================================
   7) META – Einheitliche Icons & Ausrichtung
   ============================================================ */
.meta-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #e0e0e0;
  margin-top: 6px;
  padding-top: 6px;
  margin-top: auto;
}

.meta-detail {
  display: flex;
  gap: 20px;
  margin: 10px 0 20px;
  font-size: 0.9rem;
  color: var(--color-text-light);
  opacity: 0.8;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.meta-line span {
  white-space: normal;
  word-break: break-word;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color-text-light);
  font-size: 0.73rem;
  opacity: 0.8;
}

.meta-icon,
.meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  vertical-align: -2px;
}


/* ============================================================
   8) NEWS – Grid, Karten, Detailansicht
   ============================================================ */
.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 35px;
  margin-bottom: 60px;
}

/* Basis: alle Cards sind Flex-Container, Inhalt in Spalte */
.news-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;   /* Standard: Bild oben, Text darunter */
}

/* Dokumente: Bild links, Text rechts */
.news-card.doc-card {
  flex-direction: row;      /* überschreibt column */
  align-items: stretch;
  contain: content; /* verhindert Reflow beim Scrollen */
  will-change: transform;
}

.news-card h3 {
//  font-size: 1rem;
  line-height: 1.25rem;
  max-height: calc(1.25rem * 2); /* 2 Zeilen */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
}

.news-card:hover {
  transform: translateY(-3px);
}

.news-thumb {
  width: calc(100% + 24px); /* 12px Padding links + rechts ausgleichen */
  margin-left: -12px;
  margin-right: -12px;
  margin-top: -12px;
  height: 160px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px 12px 0 0; /* nur oben rund */
  display: block;
}

.news-date {
  color: var(--color-text-light);
  opacity: 0.7;
  font-size: 0.85rem;
}

.news-detail {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.news-detail-inner {
  max-width: 600px;
  width: 100%;
}


/* Lead nur bei RSS-Feed-Artikeln hervorheben */
.news-detail-inner p.lead {
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.55;
  padding-left: 14px;
  border-left: 4px solid var(--color-primary);
  margin-bottom: 18px;
}


.news-detail-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin: 20px 0;
  object-position: top;
}

.news-original-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 0;
  margin-top: 30px;
  border: 2px solid var(--color-primary);
  border-radius: 10px;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.news-original-btn:hover {
  background: var(--color-primary);
  color: white;
}

/* Nur im Ranglisten-Layout: Rangliste linksbündig statt zentriert */
.detail-layout .news-detail {
  justify-content: flex-start;
}

.detail-layout .news-detail-inner {
  margin-left: 0;
}



/* ============================================================
   9) DOKUMENTE – Kacheln
   ============================================================ */

.doc-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  will-change: transform;
}

.doc-card-left {
  width: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Weniger Abstand bei Dokumenten- und Termine-Karten */
.doc-card h3 {
  margin-top: 0px;
  margin-bottom: 12px;
}

.doc-card .doc-meta,
.doc-card p {
  margin-top: 2px;
  margin-bottom: 2px;
}


.doc-card-left.ms-date {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  padding: 0; /* wichtig */
}

.doc-card-right {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
}


.doc-bundle {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px;
}




/* ============================================================
   AGENDA – Grundstyles
============================================================ */

.date-box {
  display: flex;
  width: 44px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1.1;
}

.date-day {
  font-size: 17px;
}

.date-month {
  font-size: 12px;
  opacity: 0.7;
}

/* Farben */
.termin-date .date-box {
  background: #c62828;
  color: #fff;
}

.ms-jahres .date-box {
  background: var(--color-termin, #2a6fdb);
  color: #fff;
}

.ms-externe .date-box {
  background: #2e7d32;
  color: #fff;
}

.hidden {
  display: none !important;
}


/* ============================================================
   MOBILE – Wochenansicht
============================================================ */

.mobile-only {
  display: none;
}

@media (max-width: 768px) {

  .mobile-only {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }

  #agenda-week-view {
    display: block;
  }

  .week-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .week-cell {
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    min-height: 80px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .wc-date {
    font-weight: bold;
    margin-bottom: 4px;
  }

  .wc-event {
    background: rgba(0,0,0,0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
    margin-bottom: 2px;
    cursor: pointer;
  }

  .wc-event.ms {
    background: rgba(198,40,40,0.15);
  }

  .wc-event.termin {
    background: rgba(42,111,219,0.15);
  }
}


/* ============================================================
   DESKTOP – Monatsansicht (Option A)
============================================================ */

.desktop-only {
  display: none;
}

@media (min-width: 1024px) {

  .desktop-only {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }

  #agenda-month-view {
    display: block;
  }

  /* Monatsraster */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 90px;
    gap: 6px;
}

  /* Tageszellen */
  .month-cell {
    background: #fff;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 70px;
  }

  .mc-date {
    font-weight: bold;
    margin-bottom: 4px;
    position: relative;
    z-index: 5;
    height: 22px; /* fixieren */
  }

  .mc-day {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }

  /* Event-Balken (Grid-Items) */
.month-event {
  position: relative;
  opacity: 1;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 14px;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto; /* Events fangen Klicks ab */
  margin-left: 6px;
  margin-right: 6px;
}

/* Basis-Abstand unter dem Datum */
.event-stack-0 { margin-top: 30px; }

/* Weitere Events */
.event-stack-1 { margin-top: 50px; }
.event-stack-2 { margin-top: 75px; }
.event-stack-3 { margin-top: 100px; }
.event-stack-4 { margin-top: 125px; }
.event-stack-5 { margin-top: 150px; }
.event-stack-6 { margin-top: 175px; }
.event-stack-7 { margin-top: 200px; }
.event-stack-8 { margin-top: 225px; }
.event-stack-9 { margin-top: 250px; }
.event-stack-10 { margin-top: 275px; }
.event-stack-11 { margin-top: 300px; }
.event-stack-12 { margin-top: 325px; }
.event-stack-13 { margin-top: 350px; }
.event-stack-14 { margin-top: 375px; }
.event-stack-15 { margin-top: 400px; }
.event-stack-16 { margin-top: 425px; }
.event-stack-17 { margin-top: 450px; }
.event-stack-18 { margin-top: 475px; }
.event-stack-19 { margin-top: 500px; }
.event-stack-20 { margin-top: 525px; }
.event-stack-21 { margin-top: 550px; }
.event-stack-22 { margin-top: 575px; }
.event-stack-23 { margin-top: 600px; }
.event-stack-24 { margin-top: 625px; }

/* Falls du mehr brauchst, einfach erweitern */


.month-events-layer {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 90px;
    gap: 6px;
    pointer-events: none;
}

.month-wrapper {
  position: relative;
}

}





.doc-thumb {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}







/* ============================================================
   10) GALERIE – Grid, Karten, Detailansicht
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 35px;
}

.gallery-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-card:hover {
  transform: translateY(-3px);
}

.gallery-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #f2f2f2;
  display: block;
}

.folder-icon {
  background: url("media/folder.svg") center/50% no-repeat;
  background-color: #f2f2f2;
  width: 100%;
  height: 200px;
  border-radius: 8px;
  display: block;
}

.gallery-card-body {
  padding: 12px 14px 16px;
}

.gallery-card-body h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.image-detail-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
}

/* Galerie Navigation */
.image-nav-desktop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0;
}

.nav-btn {
  width: 36px;
  height: 36px;
  background: url('media/arrow-left.svg') center/60% no-repeat;
  background-color: #fff;
  border-radius: 50%;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn.right {
  background-image: url('media/arrow-right.svg');
}




/* ============================================================
   11) VIDEOS – Player, Kapitel, Thumbnails
   ============================================================ */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 20px 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Video-Thumbnails NICHT oben fixieren */
.video-thumb {
  width: calc(100% + 24px); /* 12px Padding links + rechts ausgleichen */
  margin-left: -12px;
  margin-right: -12px;
  margin-top: -12px;
  height: 160px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px 12px 0 0; /* nur oben rund */
  display: block;
}

.chapters {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

.chapter-link {
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  transition: var(--transition);
}

.chapter-link:hover {
  color: var(--color-primary-light);
}


/* ============================================================
   MOBILE SIDEBAR – Windows 11 Style
   ============================================================ */
@media (max-width: 768px) {

  #nav {
    position: static !important; /* verhindert, dass #nav die Sidebar einsperrt */
  }

  /* Sidebar als Bottom-Sheet, aber Inhalt normal von oben nach unten */
  .sidebar {
    position: fixed;
    top: auto !important;
    bottom: 100px !important; /* Abstand über dem Button */
    left: 50%;
    transform: translateX(-50%) scale(0.92);

    width: 90%;
    max-width: 380px;
    max-height: 70vh; /* oben bleibt Hintergrund sichtbar */
    height: auto;
    overflow-y: auto;

    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    border-radius: 22px;
    padding: 20px;

    box-shadow: 0 12px 40px rgba(0,0,0,0.18);

    display: flex;
    flex-direction: column;   /* WICHTIG: normale Reihenfolge */
    justify-content: flex-start; /* NICHT nach unten drücken */

    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }

  .sidebar.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
    animation: menuSlideUp .25s ease-out;
  }

  /* Logo wieder nach oben */
  .sidebar .logo {
    order: 0;
    margin-bottom: 16px;
    text-align: center;
  }

  /* Kacheln darunter, zweispaltig */
  .sidebar nav {
    order: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0;
  }

  .sidebar .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 10px;
    border-radius: 16px;

    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(10px);

    color: #000;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform .15s ease, background .2s ease;
  }

  .sidebar .nav-item .nav-icon {
    width: 32px;
    height: 32px;
    opacity: 0.9;
  }

  /* Icons größer */
  .sidebar .nav-item .nav-icon {
    width: 32px;
    height: 32px;
    opacity: 0.9;
  }

  /* Content nicht verschieben */
  #content {
    margin-left: 0;
    padding: 20px 20px 80px 20px;
  }

  /* Hamburger sichtbar */
  .hamburger {
    display: block;
  }

  /* Overlay */
  #overlay.show {
    display: block;
  }
}


/* ============================================================
   Termine
   ============================================================ */
.termin-meta-table {
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.95rem;
}

.termin-meta-row {
  display: flex;
  padding: 10px 14px;
}

.termin-meta-row:nth-child(odd) {
  background: rgba(0,0,0,0.03);
}

.termin-meta-label {
  width: 120px;
  font-weight: 600;
  color: var(--color-text-dark1);
}

.termin-meta-value {
  flex: 1;
  color: var(--color-text-dark2);
  word-break: break-word;
}



/* ============================================================
   Treeview
   ============================================================ */

/* Standard: Mobile-Elemente verstecken */
.treeview-mobile-btn,
.treeview-mobile-sheet {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px auto;
  column-gap: 20px; 
}


.treeview-sidebar {
  padding: 20px;
  margin: 0;
  position: sticky;
  top: 40px;
  align-self: start;
}

.treeview-sidebar ul {
  list-style: none;
  padding: 20px 10px;
  margin: 0;
}

.treeview-sidebar li {
  margin-bottom: 8px;
}

.treeview-sidebar strong {
  display: block;
  margin-top: 12px;
  font-weight: 700;
}

.tree-chip:hover {
  background: #e9e9e9;
}

.treeview-menu a.active,
.treeview-menu-mobile a.active {
  background: var(--color-primary) !important;
  color: white;
  font-weight: 600;
}


.treeview-category-title {
  font-weight: 700;
  margin: 16px 0 6px;
  font-size: 1rem;
}

.treeview-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.treeview-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.treeview-menu strong {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 700;
}

.treeview-menu li a {
  display: inline-block;
  padding: 6px 12px;
  margin: 6px 6px 0 0;
  background: var(--color-chip);
  border-radius: var(--radius-chip);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
  white-space: nowrap;
}

.treeview-menu li a:hover {
  background: #e9e9e9;
}

body.is-rangliste .news-detail {
  justify-content: flex-start;
}

body.is-rangliste .news-detail-inner {
  margin-left: 0;
}


@keyframes pulse-twice {
  0% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 0 rgba(0,0,0,0.0);
  }
  25% {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
  }
  50% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 0 rgba(0,0,0,0.0);
  }
  75% {
    transform: translateX(-50%) scale(1.08);
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
  }
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 0 rgba(0,0,0,0.0);
  }
}

.treeview-mobile-btn.pulse {
  animation: pulse-twice 2.2s ease-out;
}



/* ============================
   MOBILE TREEVIEW
============================ */
@media (max-width: 768px) {

  /* Desktop-Sidebar ausblenden */
  .treeview-sidebar {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 1fr !important;
  }

  /* Mobile Button */
  .treeview-mobile-btn {
    display: block;
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    padding: 9px 18px;
    border-radius: 6px;
    border: 1px solid #ccc;

    background: var(--color-primary); /* SFKV-Blau */
    color: white;
    font-weight: 600;
    font-size: 0.9rem;

    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .treeview-mobile-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    transition: bottom 0.3s ease;
    z-index: 9998;
    padding: 10px 10px 40px 10px;
    max-height: 70vh;
    overflow-y: auto;
  }

  .treeview-mobile-sheet.open {
    bottom: 0;
  }

  .treeview-mobile-sheet-inner {
    padding-bottom: 40px;
  }

  .treeview-menu-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .treeview-menu-mobile li a {
    display: inline-block;
    padding: 5px 10px;
    margin: 6px 6px 20px 0;
    background: var(--color-chip);
    border-radius: var(--radius-chip);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
    white-space: nowrap;
  }

  .treeview-menu-mobile strong {
    display: block;
    margin-top: 12px;
    margin-bottom: 2px;
    font-size: 1rem;
    font-weight: 700;
  }

  .treeview-menu-mobile li a:hover {
    background: #e9e9e9;
  }
}

#detail-panel:not(.open) .treeview-mobile-btn,
#detail-panel:not(.open) .treeview-mobile-sheet {
  display: none !important;
}






/* ============================================================
   Ranglisten
   ============================================================ */
.ms-header h2 {
  margin: 0 0 10px;
}

.ms-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-table {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;

  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ms-table .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto; /* Name flexibel, Resultat so breit wie nötig */
  align-items: center;
  column-gap: 12px;
}

.ms-table .row span {
  min-width: 0;              /* wichtig für Ellipsis in Grid */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ms-table .row strong {
  white-space: nowrap;
  text-align: right;
}

.ms-table .row:last-child {
  border-bottom: none;
}

.rangliste-row {
  display: grid;
  grid-template-columns: 32px 1fr auto 28px;
  align-items: center;
  padding: 6px 2px;
  margin-bottom: 6px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 0.95rem;
}

.rang {
  font-weight: 700;
  text-align: center;
}

.kat {
  padding: 2px 6px;
  margin-right: 6px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 300;
  white-space: nowrap;
  color: #000;
  opacity: 1;
}


.kat[data-kat="A"] { background: var(--kat-a); }
.kat[data-kat="B"] { background: var(--kat-b); }
.kat[data-kat="C"] { background: var(--kat-c); }

.name {
  font-weight: 400;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.score {
  font-weight: 600;
  color: #444;
  white-space: nowrap;
  margin-right: 20px;
}

.info-btn {
  width: 20px;
  height: 20px;
  cursor: pointer;
}






/* ============================================================
   Heutige Resultate – kompaktere Darstellung
   ============================================================ */

.heute-resultate-list .rangliste-row {
  display: grid;
  grid-template-columns: 32px 1fr 70px; /* wie normale Rangliste, nur ohne Info */
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  box-shadow: none;
  margin-bottom: 0;
  background: transparent;
  border-radius: 0;
}



.heute-resultate-list .name-block {
  flex: 1;
  margin-left: 0px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}


.heute-resultate-list .score {
  width: 70px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  margin-right: 5px;
}

<input 
  type="date" 
  id="heute-date" 
  autocomplete="off"
  inputmode="none"
>


.stat-title {
  margin-top: 20px;
  font-size: 1.3em;
  font-weight: 600;
}

.stat-block {
  margin-bottom: 10px;
}

.stat-row {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.stat-kat {
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-info div {
  font-size: 0.9em;
  margin-bottom: 2px;
}


/* ============================================================
   Suche(UV)
   ============================================================ */
.heute-filter {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.heute-filter label {
  font-weight: 600;
  margin-bottom: -6px;
}

.heute-filter select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: var(--color-chip);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;

  /* Platz für Pfeil */
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.heute-filter select:focus {
  border-color: var(--color-primary);
  background: var(--color-chip-hover);
}

.heute-filter button {
  padding: 10px 16px;
  border-radius: 20px;
  border: none;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s ease, transform 0.1s ease;
}

.heute-filter button:hover {
  background: var(--color-primary-light);
}

.heute-filter button:active {
  transform: scale(0.97);
}

/* Chip-Style für Input-Felder (Text + Date) */
.heute-filter input[type="text"],
.heute-filter input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: var(--color-chip);
  font-size: 0.9rem;
  outline: none;
  cursor: text;

  transition: background 0.2s ease, border-color 0.2s ease;
}

/* Fokus-Effekt */
.heute-filter input[type="text"]:focus,
.heute-filter input[type="date"]:focus {
  border-color: var(--color-primary);
  background: var(--color-chip-hover);
}

/* Platzhalter etwas dezenter */
.heute-filter input::placeholder {
  color: var(--color-text-muted);
}

.heute-filter input[type="text"],
.heute-filter input[type="date"],
.heute-filter select {
  display: block;      /* WICHTIG */
  width: 100%;         /* WICHTIG */
  box-sizing: border-box;
}


/* ============================================================
   Statistik
   ============================================================ */
@media (min-width: 1024px) {
  .stat-block {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: center;
  }

  .stat-block canvas {
    width: 100%;
    height: 200px;
  }
}

#donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
}



/* ============================================================
   Akkordeon-Effekt
   ============================================================ */
.accordion-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  user-select: none;
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accordion-arrow {
  transition: transform 0.25s ease;
  opacity: 0.6;
}

.accordion-item.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 14px;
  border-top: 1px solid #eee;
}





/* ============================================================

   HOME – Seite

============================================================ */

/* ============================================================
   HOME – Basis Scroll-Row (News & Docs identisch)
============================================================ */
.scroll-row,
.scroll-row-docs {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;

  overflow-x: auto;
  overflow-y: hidden;

  padding-left: 6px;
  padding-bottom: 14px;
  padding-right: 12px;
  box-sizing: border-box;

  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-row > *,
.scroll-row-docs > .doc-group {
  scroll-snap-align: start;
}



/* ============================================================
   iOS Safari Fix – nur für horizontale Scroller
============================================================ */
@media (max-width: 768px) {
  @supports (-webkit-touch-callout: none) {
    .home-top-scroll,
    .scroll-row-docs {
      min-width: max-content;
      padding-right: 1px;
      margin-right: -1px;
    }
  }
}

/* iOS Safari Fix für verschachtelte Flex-Scroller */
@supports (-webkit-touch-callout: none) {
  .scroll-row-docs {
    min-width: max-content;
  }

  .scroll-row-docs > .doc-group {
    flex: 0 0 auto;
    min-width: max-content;
  }
}

/* Mobile: 88% Peek wie News */
@media (max-width: 768px) {
  .scroll-row-docs > .doc-group {
    width: 88%;
    max-width: 400px;
    flex-shrink: 0;
  }
}



/* ============================================================
   News-Cards – Peek-Effekt
============================================================ */
.news-card.small {
  width: 88%;
  min-width: 88%;
  flex-shrink: 0;
  box-sizing: border-box;
}


@media (min-width: 769px) {
  .news-card.small {
    width: 100%;
    min-width: 0px;
    max-width: 400px !important;
  }
}

.doc-card.small h3 {
  font-size: 1rem;
  line-height: 1.25rem;
  margin-bottom: 6px;
}


@media (max-width: 768px) {

  /* News-Cards */
  .news-card.small {
    width: min(88%, 400px);
    min-width: unset;
    max-width: 400px;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  /* Doc-Groups */
  .scroll-row-docs > .doc-group {
    width: min(88%, 400px);   /* 88% aber max 400px */
    min-width: unset;         /* alte Blockade entfernen */
    max-width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
  }

  /* Cards in Doc-Groups */
  .news-card.doc-card.small {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
}


/* Äußere News-Card für 3er-Bundles neutralisieren */
.news-card.doc-bundle {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  cursor: default !important;
  transition: none !important;
}

/* Hover deaktivieren */
.news-card.doc-bundle:hover {
  transform: none !important;
}

/* Abstand zwischen den inneren Doc-Cards */
.news-card.doc-bundle > .news-card.doc-card.small {
  margin-bottom: 16px;
}

/* Letzte Karte ohne extra Abstand */
.news-card.doc-bundle > .news-card.doc-card.small:last-child {
  margin-bottom: 0;
}



/* ============================================================
   scroll-row-docs – identisch zu scroll-row (Mobile)
============================================================ */
/* ============================================================
   MOBILE (≤ 768px) – horizontal scrollen, 88% Peek
============================================================ */
@media (max-width: 768px) {
  .scroll-row-docs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 24px;
  }

  .scroll-row-docs > .doc-group {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
}

/* ============================================================
   TABLET (769px – 1259px) – horizontal scrollen, max 400px
============================================================ */
@media (min-width: 769px) and (max-width: 1259px) {
  .scroll-row-docs {
    display: flex;
    flex-wrap: nowrap;      /* WICHTIG: kein Wrap */
    overflow-x: auto;       /* WICHTIG: Scrollbar */
    gap: 24px;
  }

  .scroll-row-docs > .doc-group {
    width: 100%;
    min-width: 400px;       /* WICHTIG: wie News-Cards */
    max-width: 400px;
    flex: 0 0 auto;         /* WICHTIG: echtes Scroll-Item */
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
}



/* ============================================================
   DESKTOP (≥ 1260px) – Grid-Feeling
============================================================ */
@media (min-width: 1260px) {
  .scroll-row-docs {
    display: flex;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 24px;
  }

  .scroll-row-docs > .doc-group {
    width: 100%;
    min-width: 0;
    max-width: 400px;
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
}

/* Cards darin füllen die Gruppe vollständig */
.scroll-row-docs .news-card.doc-card.small {
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}






/* ============================================================
   HERO-CARD – Top-RSS & Heutige Resultate
============================================================ */
.home-top-card {
  position: relative;
  width: 100%;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.home-top-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-top-overlay {
  position: absolute;
  inset: 0;
  padding: 28px 18px 32px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.60) 40%,
    rgba(0,0,0,0.25) 75%,
    rgba(0,0,0,0.0) 100%
  );

  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.home-top-overlay h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.3;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.60),
    0 0 12px rgba(0,0,0,0.40);
}

.heute-overlay {
  justify-content: flex-end;
}


/* ============================================================
   TOP-BEREICH GRID – Heutige Resultate + Top-RSS
============================================================ */
#home-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 0;
}

#home-top-grid > div {
  min-width: 0;
}

@media (max-width: 768px) {
  #home-top-grid {
    grid-template-columns: 1fr;
  }
}

#home-top-grid.single-col {
  grid-template-columns: 1fr !important;
}


/* 769px – 1023px: Sidebar berücksichtigen + einspaltig */
/* 769px – 1023px: einspaltig */
@media (min-width: 769px) and (max-width: 1023px) {
  #home-top-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 1024px – 1259px: auto-fit */
@media (min-width: 1024px) and (max-width: 1259px) {
  #home-top-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

/* Ab 1260px: volle Breite */
@media (min-width: 1260px) {
  #home-top-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}





/* ============================================================
   Mini-Cards
   Desktop: umbrechen
   Mobile: horizontal scrollen
============================================================ */

/* --- Wrapper: begrenzt Breite, erlaubt Scrollen auf Mobile --- */
.home-top-scroll-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden; /* Desktop: kein Scrollen */
}

/* --- MOBILE: horizontal scrollen --- */
@media (max-width: 1259px) {

  .home-top-scroll-wrapper {
    overflow-x: auto;      /* Mobile scrollt */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .home-top-scroll {
    display: flex;
    flex-wrap: nowrap;     /* NICHT umbrechen */
    gap: 12px;
    width: max-content;    /* darf breiter sein */
    min-width: max-content;
    padding-bottom: 14px;
  }

  .home-top-mini {
    flex-shrink: 0;        /* NICHT schrumpfen */
    width: 180px;
    min-width: 180px;
    height: 110px;
  }
}



/* --- DESKTOP: umbrechen statt scrollen --- */
@media (min-width: 1260px) {

  .home-top-scroll-wrapper {
    overflow: visible;
  }

  .home-top-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .home-top-mini {
    flex: 0 0 175px;
    height: 110px;
  }
}





/* --- Gemeinsame Styles --- */
.home-top-mini {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.home-top-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-top-mini-overlay {
  position: absolute;
  inset: 0;
  padding: 8px;
  font-size: 0.85rem;
  color: white;

     display: flex;
     flex-direction: column;
     justify-content: flex-end;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.60) 40%,
    rgba(0,0,0,0.25) 75%,
    rgba(0,0,0,0.0) 100%
  );
}




/* ============================================================
   DESKTOP HOME GRID
============================================================ */
@media (min-width: 1260px) {

  /* Hauptgrid */
  #home-grid {
    display: grid;
    grid-template-columns: 1fr clamp(240px, 264px, 380px);
    gap: 70px;
    margin-top: 40px;
  }

  .home-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }


  /* Scroll-Row wird zu normalem Block */
  .scroll-row {
    display: contents !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  /* Bundles werden normale Block-Elemente */
  .news-card.doc-bundle {
    width: 100% !important;
    max-width: 400px !important;
    margin-bottom: 0px;
  }

  /* Inner Cards füllen die Breite */
  .news-card.doc-bundle > .news-card.doc-card.small {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* News → 2-Spalten */
  #home-news {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  /* Ranglisten → 2-Spalten */
  #home-ranglisten-aktuell,
  #home-ranglisten-archiv {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  /* Events / Docs / Birthdays → 1-Spalte */
  #home-events,
  #home-docs,
  #home-birthdays {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}


/* ============================================================
   Externe Klassen für Feed
   ============================================================ */
.info-block {
  border-collapse: separate;   /* erlaubt Abstände zwischen Zellen */
  border-spacing: 15px;        /* Abstand zwischen den Spalten */
  width: 100%;
  margin-left: -15px;
}

.info-block td {
  width: 33%;                  /* gleichmäßige Spaltenbreite */
  vertical-align: top;
  text-align: center;
  padding: 15px;               /* Innenabstand */
  background-color: #f8f8f8;
}

@media (max-width: 768px) {
  .info-block td {
    display: block;            /* Zellen untereinander */
    width: 100%;               /* volle Breite */
    margin-bottom: 15px;       /* Abstand zwischen den gestapelten Zellen */
  }
}




/* ============================================================
   Dokument-Kacheln – Responsiv & Harmonisch (Fix)
============================================================ */

ul.dokument-kacheln {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0;
  list-style: none;
}

/* Basis: 2 Spalten auf kleinen Screens */
ul.dokument-kacheln li {
  flex: 1 1 calc(33.33% - 14px); /* 2 Spalten */
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  font-size: 1.0rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}

/* Hover */
ul.dokument-kacheln li:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* Link */
ul.dokument-kacheln li a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Icon */
ul.dokument-kacheln li a::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 60%;
  opacity: 0.9;
}

/* PDF */
ul.dokument-kacheln a:has(.k-icon-document-pdf)::before {
  background-image: url("media/pdf.svg");
}

/* Ordner */
ul.dokument-kacheln a:has(.k-icon-document-folder)::before {
  background-image: url("media/folder.svg");
}

/* Bild */
ul.dokument-kacheln a:has(.k-icon-document-image)::before {
  background-image: url("media/image.svg");
}

/* Fallback */
ul.dokument-kacheln a:not(:has(.k-icon-document-pdf)):not(:has(.k-icon-document-folder)):not(:has(.k-icon-document-image))::before {
  background-image: url("media/external.svg");
}






/* RSS-Feed Liste im Stil der Termin-Meta-Tabelle */
.rss-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.95rem;
  background: transparent;
  box-shadow: none;
  border: none;
}

/* Jede Zeile */
.rss-list li {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Striped rows */
.rss-list li:nth-child(odd) {
  background: rgba(0,0,0,0.03);
}

/* Externer Link-Pfeil im Flex-Layout */
.rss-list li a {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Abstand zwischen Text und Pfeil */
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Pfeil */
.rss-list li a::after {
  content: "";
  width: 14px;
  height: 14px;
  background: url("media/external.svg") center/contain no-repeat;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hover-Effekt: Pfeil bewegt sich leicht nach rechts */
.rss-list li a:hover::after {
  transform: translateX(3px);
  opacity: 1;
}


/* ============================================================
   RSS-Feed Tabellen (uk-table) – harmonisiert mit rss-list & ms-table
============================================================ */

.uk-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

/* Zeilen */
.uk-table tr {
  border-bottom: 1px solid #eee;
}

.uk-table tr:last-child {
  border-bottom: none;
}

/* Zellen */
.uk-table td,
.uk-table th {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  color: var(--color-text);
}

/* Kopfzeile */
.uk-table th {
  font-weight: 600;
  background: rgba(0,0,0,0.03);
  color: var(--color-text-light);
}

/* Alternierende Zeilen (wie ms-table) */
.uk-table tr:nth-child(odd) {
  background: rgba(0,0,0,0.02);
}

/* Links in Tabellen */
.uk-table a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.uk-table a:hover {
  text-decoration: underline;
}


/* ============================================================
   UK-TABLE – Mobile: Spalten umbrechen, ohne Layout-Tricks
============================================================ */

@media (max-width: 768px) {

  /* Kopfzeile ausblenden */
  .uk-table thead {
    display: none;
  }

  /* Jede Zeile wird ein Block */
  .uk-table tr {
    display: block;
    width: 100%;
    border-bottom: 1px solid #eee;
    padding: 10px 14px; /* <<< NEU: Padding für die ganze Zeile */
  }

  /* Jede Zelle untereinander */
  .uk-table td {
    display: block;
    width: 100%;
    padding: 6px 0; /* <<< NEU: vertikales Padding */
    white-space: normal;
    word-break: break-word;
  }

  /* Striped-Effekt */
  .uk-table tr:nth-child(odd) {
    background: rgba(0,0,0,0.02);
  }

  .uk-table tr:nth-child(even) {
    background: #fff;
  }
}




/* ============================================================
   Footer
============================================================ */
#app-footer {
  background: var(--color-primary);
  color: white;
  padding: 40px 30px 80px 30px;
  margin-top: 60px;
  font-size: 0.95rem;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
 max-width: 100%;
}

@media (min-width: 769px) and (max-width: 1259px){
  #app-footer {
  margin-left: 260px; /* Sidebar-Breite */
  max-width: calc(1410px - 260px);
  }
}

@media (min-width: 1260px) {
  #app-footer {
  margin-left: 260px; /* Sidebar-Breite */
  max-width: calc(1410px - 260px);
     margin-right: 30px;
  }
}


.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-col h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-col a {
  display: block;
  color: white;
  opacity: 0.85;
  text-decoration: none;
  margin: 4px 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 30px;
  }
}




/* ============================================================
   Sponsoren
============================================================ */
/* GRID-CONTAINER */
#sponsoren-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

/* BASIS-KARTE */
.sponsor-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  padding: 12px;
  border: 3px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* BILDER */
.sponsor-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.sponsor-card.clickable {
  cursor: pointer;
}

.sponsor-card.clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.sponsor-img-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* -----------------------------------
   KATEGORIE-GRÖSSEN + FARB-RÄNDER
   ----------------------------------- */

/* PLATIN – 4 SPALTEN */
.sponsor-card.platin {
  grid-column: span 4;
  border-color: #ffcc66;
  background: #fff7e6;
}

/* GOLD – 4 SPALTEN */
.sponsor-card.gold {
  grid-column: span 4;
  border-color: #ffd700;
  background: #fffbe6;
}

/* SILBER – 2 SPALTEN */
.sponsor-card.silber {
  grid-column: span 2;
  border-color: #c0c0c0;
  background: #f7f7f7;
}

/* BRONZE – 1 SPALTE */
.sponsor-card.bronze {
  grid-column: span 1;
  border-color: #cd7f32;
  background: #f8f1e7;
}

/* Text-Card (wenn kein Bild vorhanden) */
.sponsor-card.text-only {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 24px 18px;
  border-radius: 12px;

  font-family: "Segoe UI", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;

  color: #333;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border: 3px solid #e0e0e0;

  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-card.text-only:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Kategorie-Farben */
.sponsor-card.platin.text-only { border-color: #ffcc66; background: #fff7e6; }
.sponsor-card.gold.text-only   { border-color: #ffd700; background: #fffbe6; }
.sponsor-card.silber.text-only { border-color: #c0c0c0; background: #f7f7f7; }
.sponsor-card.bronze.text-only { border-color: #cd7f32; background: #f8f1e7; }



/* -----------------------------------
   RESPONSIVE
   ----------------------------------- */

@media (max-width: 1200px) {
  #sponsoren-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .sponsor-card.platin,
  .sponsor-card.gold {
    grid-column: span 3;
  }
  .sponsor-card.silber {
    grid-column: span 2;
  }
  .sponsor-card.bronze {
    grid-column: span 2;
  }
}

@media (max-width: 1024px) {
  #sponsoren-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .sponsor-card.platin,
  .sponsor-card.gold,
  .sponsor-card.silber {
    grid-column: span 2;
  }
  .sponsor-card.bronze {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  #sponsoren-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .sponsor-card {
    grid-column: span 1;
  }
}

.sponsor-list-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

