/* ===== ROOT / DARK MODE ===== */
:root {
  --bg: #ffffff;
  --text: #000;
  --primary: #004d66;
}

body.dark {
  --bg: #121212;
  --text: #fff;
}

/* ===== BASIS ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ===== FOKUS ===== */
:focus {
  outline: 3px solid yellow;
  outline-offset: 2px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  background: #000;
  color: #fff;
  padding: 8px;
}

/* ===== HEADER / NAV ===== */
header {
  background: var(--primary);
  color: white; /* 🔥 DAS ist der entscheidende Fix */
}

header a,
header label,
header span,
header div {
  color: inherit;
} 

/* ===== HEADER / NAV ===== */
header {
  background: var(--primary);
  color: white;
}

header a,
header label,
header span,
header div {
  color: inherit;
} 

/* Die Navigation nutzt Flexbox mit wrap. 
   Das erlaubt stufenlosen Reflow bei JEDEM Zoom-Level ohne Layout-Bruch. */
nav {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  gap: 20px; /* Sicherer Mindestabstand zwischen den Blöcken */
}

/* Linker Block (Logo und Avatar) */
.nav-left {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Rechter Block (Sprachauswahl und Darkmode) */
.nav-right {
  display: flex !important;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

/* WCAG AAA konforme Touch- und Klickgrößen im rechten Bereich */
.nav-right select {
  min-height: 44px;
  padding: 6px 12px;
  box-sizing: border-box;
}

.nav-right button {
  background: none;
  border: 1px solid white;
  color: white;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border-radius: 6px;
  cursor: pointer;
}

.nav-right button:hover {
  background: rgba(255,255,255,0.2);
}

/* ===== MAXIMALER ZOOM & SCHMALE BILDSCHIRME ===== */
/* Wenn der Platz unter 850px fällt (oder durch Zoom simuliert wird), 
   stapeln sich die drei Hauptblöcke zentriert und barrierefrei untereinander. */
@media (max-width: 850px) {
  nav {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }

  .nav-center {
    width: 100%;
  }

  .nav-center ul {
    flex-direction: column !important; /* Schaltet auf Smartphones auf untereinander um */
    align-items: stretch !important;
    width: 100%;
    gap: 10px !important;
  }

  .nav-center a {
    display: block; /* Macht die Links zu vollflächigen Buttons auf dem Handy */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}
/* ===== LOGO-CONTAINER FIX ===== */
.logo {
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
}

/* Gilt NUR für das eigentliche Logo-Bild (logo2.png) */
.logo img:not(.menu-avatar) {
  height: 50px !important;
  width: auto !important;
  display: inline-block !important;
}

.nav-left.logo {
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.avatar-holder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.menu-avatar {
  width: 50px !important;
  height: 50px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ===== MAIN ===== */
main {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
}

h1 {
  text-align: center;
}

h2 {
  text-align: center;
  margin-bottom: 15px;
}

h3 {
  text-align: left;
}

/* ===== GRID ===== */
.grid,
.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 15px;
}

/* ===== CARDS ===== */
.card {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* ===== BILDER ===== */
.img-box {
  text-align: center;
}

.img-box img {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  margin: 10px auto;
  border-radius: 10px;
}

.img-box figcaption,
.img-box p {
  font-size: 14px;
  margin-top: 5px;
  color: #555;
}

body.dark .img-box figcaption,
body.dark .img-box p {
  color: #ccc;
}

.intro-image {
  text-align: center;
  margin: 20px auto;
  max-width: 400px;
}

.intro-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 15px auto;
}

/* ===== FORM / SELECT ===== */
select {
  background: white;
  color: black;
  border-radius: 6px;
  padding: 6px;
  font-size: 16px;
  border: 2px solid #000;
}

select:focus {
  outline: 3px solid yellow;
}

body.dark select {
  background: #333;
  color: white;
  border: 2px solid #fff;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  margin: 40px 0;
}

.hero p {
  color: #333;
}

body.dark .hero p {
  color: #ddd;
}

/* ===== MEHRSPRACHIG ===== */
/* 1. Jedes Element mit einer Sprache wird standardmäßig IMMER versteckt */
[data-lang] {
    display: none !important;
}

/* 2. NUR wenn es die aktive Klasse hat, darf es angezeigt werden */
[data-lang].active {
    display: inline !important; /* Für normalen Text im Menü */
}

/* 3. Falls Überschriften oder Blöcke die Klasse haben, als Block anzeigen */
h1[data-lang].active, 
h2[data-lang].active, 
div[data-lang].active, 
p[data-lang].active {
    display: block !important;
}
.multilang {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BUTTON ===== */
.btn-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: #121212; /* #0066cc */
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.btn-link:hover,
.btn-link:focus {
  background-color: #004499;
  outline: 3px solid #ffcc00;
}

.btn-center {
  text-align: center;
  margin-top: 20px;
}

/* ===== TOP BUTTON ===== */
#toTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;

  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);

  transition: all 0.3s ease;

  background: #0066cc;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;

  z-index: 9999;
}

#toTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#toTopBtn:focus {
  outline: 3px solid yellow;
}

.site-footer {
  background-color: #f8f9fa;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

.site-footer p {
  color: #2d3748;
  margin: 0;
  font-size: 0.95rem;
}

.site-footer a, 
.barrierefreier-link {
  color: #004085; /* Klares Navy-Blau, knackt die 7:1 Kontrastgrenze auf hellem Grau/Weiß */
  text-decoration: underline;
  font-weight: bold;
}

body.dark .site-footer {
  background: #1e1e1e;
}

body.dark .site-footer p {
  color: #ddd;
}

/* Container für alle Blogs */
#blogContainer {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
}

/* Die einzelne Blog-Karte - Jetzt mit dunklem Rand für garantierte Sichtbarkeit */
#blogContainer article {
  background-color: #ffffff !important; /* Erzwingt weißen Karten-Hintergrund */
  color: #1a1a1a !important;            /* Erzwingt dunkelgraue, lesbare Schrift */
  border: 2px solid #333333 !important;  /* Deutlicher, dunkler Rahmen */
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Barrierefreier Tastatur-Fokus */
#blogContainer article:focus-within {
  outline: 3px solid #0056b3 !important;
  outline-offset: 4px;
}

/* Bilder-Styling */
#blogContainer article img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cccccc;
}

/* Textelemente innerhalb der Karte absichern */
#blogContainer article h2 {
  color: #1a1a1a !important;
  margin: 0 0 10px 0;
  font-size: 1.6rem;
}

#blogContainer article p {
  color: #333333 !important;
  font-size: 1.05rem;
  line-height: 1.5;
}

.blog-date {
  color: #121212 !important; /*#666666 */
  font-size: 0.9rem;
}

.blog-caption {
  color: #121212 !important; /* #555555 */
  font-style: italic;
  font-size: 0.9rem;
}

/* Buttons sichtbar machen */
.read-more-btn, #loadMoreBtn {
  align-self: flex-start;
  padding: 12px 24px;
  background-color: #121212 !important; /* #0056b3 */
  color: #ffffff !important;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}

.read-more-btn:hover, #loadMoreBtn:hover {
  background-color: #003d82 !important;
}
/* Dark Mode Support (falls deine toggleDarkMode() Funktion die Klasse 'dark-mode' setzt) */
body.dark #blogContainer article {
  background-color: #121212 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

body.dark #blogContainer article * {
  color: #ffffff;
}

body.dark #blogContainer article h2 {
  color: #ffffff !important;
}
body.dark .blog-date {
  color: #ffffff !important;
}

/* readmore Button Dark Mode 

body.dark .read-more-btn, #loadMoreBtn {
  color: #ffffff !important;
} */

/* ===== READMORE BUTTON DARK MODE (KORRIGIERT) ===== */
body.dark .read-more-btn, 
body.dark #loadMoreBtn {
  background-color: #ffffff !important; /* Weißer Hintergrund */
  color: #121212 !important;            /* Dunkler Text für den Kontrast */
  border: 2px solid #ffffff !important;  /* Optional: Weißer Rahmen */
}

/* Hover- und Fokus-Effekt im Darkmode */
body.dark .read-more-btn:hover, 
body.dark .read-more-btn:focus,
body.dark #loadMoreBtn:hover,
body.dark #loadMoreBtn:focus {
  background-color: #e0e0e0 !important; /* Leichtes Grau beim Drüberfahren */
  color: #121212 !important;
}

/* ===== FORMULAR-LAYOUT (KONTAKT) ===== */
.form-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 30px auto;
  padding: 30px;
  background-color: #ffffff;
  border: 2px solid #333333;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Eingabefelder barrierefrei gestalten */
.form-box input,
.form-box textarea {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 2px solid #666666;
  border-radius: 4px;
  background-color: #ffffff;
  color: #1a1a1a;
  box-sizing: border-box; /* Verhindert das Herausragen aus dem Container */
}

/* WICHTIG FÜR WCAG/BITV: Deutlicher Kontrast-Fokus beim Reinklicken */
.form-box input:focus,
.form-box textarea:focus {
  outline: 3px solid #0056b3 !important;
  outline-offset: 2px;
  border-color: transparent;
}

/* Absenden-Button innerhalb des Formulars */
.form-box button[type="submit"] {
  align-self: flex-start;
  padding: 12px 30px;
  background-color: #004d66; /* Passt zu var(--primary) */
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.form-box button[type="submit"]:hover {
  background-color: #003344;
}

/* Status-Meldung Abstand */
#formStatus {
  font-weight: bold;
  font-size: 1.05rem;
  margin-top: 10px;
}

/* DARK MODE SUPPORT FÜR DAS FORMULAR */
body.dark .form-box {
  background-color: #1e1e1e;
  border-color: #ffffff;
}

body.dark .form-box input,
body.dark .form-box textarea {
  background-color: #2d2d2d;
  color: #ffffff;
  border-color: #888888;
}

body.dark .form-box input:focus,
body.dark .form-box textarea:focus {
  outline: 3px solid #ffcc00 !important; /* Gelber/Goldener Fokus im Darkmode für besseren Kontrast */
}

/* --- BASIS-STYLING FÜR DEN BUTTON --- */
.theme-toggle {
  background: padding-box;
  font-size: 1.2rem;
  padding: 8px;
  border-radius: 50%; /* Macht den Button rund */
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* --- HELLER MODUS (Standard) --- */
body:not(.dark-mode) .theme-toggle {
  background-color: #f0f0f0; /* Hellgrauer Kreis für besseren Kontrast */
  color: #333; /* Falls Text genutzt wird */
}

/* --- DUNKLER MODUS --- */
body.dark-mode .theme-toggle {
  background-color: #333; /* Dunkler Kreis im Darkmode */
  color: #fff;
}

/* --- TASTATUR-FOKUS (Extrem wichtig für Sehbehinderte!) --- */
.theme-toggle:focus-visible {
  outline: 3px solid #ffbf00; /* Deutlicher, dicker Rahmen bei Tab-Auswahl */
  outline-offset: 2px;
}

/* Flexibles Grid für die zwei Spalten */
.inklusion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 30px 0;
}

/* Boxen-Styling */
.hilfsmittel-info-box {
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
  height: auto;
}

.hilfsmittel-info-box.special-border {
  border-left: 4px solid #0056b3;
}

/* 1. Der Container muss in der Höhe komplett frei und flexibel sein */
figure.hilfsmittel-figure {
    width: 320px !important;
    height: auto !important;         /* Löscht die feste quadratische Höhe der Box */
    min-height: 450px !important;    /* Gibt dem Text nach unten hin Platz */
    display: flex !important;
    flex-direction: column !important; /* Zwingt Bild und Text untereinander */
    overflow: visible !important;    /* Verhindert, dass die Box Inhalte abschneidet */
}

figure.hilfsmittel-figure img {
    width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: contain !important;
    aspect-ratio: auto !important;
    display: block !important;
    
    /* HIERZU FÜGEN: Schafft den barrierefreien Abstand nach unten zum Text */
    margin-bottom: 14px !important; 
}
/* Button Container & Design */
.cta-container {
  text-align: center;
  margin: 40px 0;
}

.btn-kontakt {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0056b3;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-kontakt:hover, .btn-kontakt:focus {
  background-color: #003d82;
}

/* ==========================================================================
   FIX FÜR DIE HILFSMITTEL-INFOS & ÜBERSCHRIFTEN (STARTEN.HTML & STARTEN2.HTML)
   ========================================================================== */

/* 1. Normaler Modus für die Infoboxen (Hintergrund hell) */
.hilfsmittel-info,
.hilfsmittel-info-box {
    background-color: #f9f9f9 !important;
    color: #1a1a1a !important;
    padding: 15px;
    border-radius: 4px;
}

/* Sicherstellen, dass im hellen Modus alle Texte in den Boxen dunkel sind */
.hilfsmittel-info p, .hilfsmittel-info span, .hilfsmittel-info strong,
.hilfsmittel-info-box p, .hilfsmittel-info-box span, .hilfsmittel-info-box strong {
    color: #1a1a1a !important;
}

/* 2. AKTIVER DARK MODE für die Infoboxen (Gesteuert über body.dark) */
body.dark .hilfsmittel-info,
body.dark .hilfsmittel-info-box {
    background-color: #2a2a2a !important; /* Dunkler Box-Hintergrund */
    color: #ffffff !important;            /* Weißer Text */
}

/* Erzwingt weißen Text für alle Unterelemente in den Boxen im Darkmode */
body.dark .hilfsmittel-info p, body.dark .hilfsmittel-info span, body.dark .hilfsmittel-info strong,
body.dark .hilfsmittel-info-box p, body.dark .hilfsmittel-info-box span, body.dark .hilfsmittel-info-box strong {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* 3. Bildüberschriften (h3) & Bildunterschriften (figcaption) korrigieren */

/* Heller Modus */
.hilfsmittel-figure h3,
.hilfsmittel-figure h3 span {
    color: #000000 !important; /* Schwarz auf weißem Grund */
}

.hilfsmittel-figure figcaption,
.hilfsmittel-figure figcaption span {
    color: #555555 !important; /* Lesbares Grau im hellen Modus */
}

/* Dunkler Modus (Zwingt ALLES unter den Bildern auf Weiß) */
body.dark h3,
body.dark h3 span,
body.dark .hilfsmittel-figure h3,
body.dark .hilfsmittel-figure h3 span,
body.dark .hilfsmittel-figure figcaption,
body.dark .hilfsmittel-figure figcaption span {
    color: #ffffff !important; /* Klares Weiß auf Schwarz im Darkmode */
}

/* ===== AUTOMATISCHE BILDANPASSUNG (GLEICHE GRÖSSE) ===== */
.hilfsmittel-figure img {
    width: 100% !important;
    max-width: 350px !important;
    height: 250px !important;
    object-fit: cover !important;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== GARANTIERTES STYLING FÜR DIE INFOBOXEN ===== */
/* Heller Modus (Standard) */
.hilfsmittel-info-box {
    background-color: #f9f9f9 !important;
    color: #1a1a1a !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
}
.hilfsmittel-info-box p, 
.hilfsmittel-info-box span, 
.hilfsmittel-info-box strong,
.hilfsmittel-info-box h3 {
    color: #1a1a1a !important; /* Erzwingt dunklen Text auf hellem Grund */
}

/* Dunkler Modus (Gesteuert über body.dark) */
body.dark .hilfsmittel-info-box {
    background-color: #2a2a2a !important; /* Dunkler Hintergrund */
    border-color: #444 !important;
}
body.dark .hilfsmittel-info-box p, 
body.dark .hilfsmittel-info-box span, 
body.dark .hilfsmittel-info-box strong,
body.dark .hilfsmittel-info-box h3 {
    color: #ffffff !important; /* Erzwingt weißen Text auf dunklem Grund */
}

/* ===== FIX FÜR DAS DYNAMISCHE MENÜ ===== */
/* Zwingt die Menüpunkte nebeneinander und bricht die Listenpunkte auf */
.nav-center ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.nav-center li {
    display: inline-block !important;
}

/* FALLBACK: Falls JS beim Laden die Sprache im Menü noch nicht aktiv geschaltet hat,
   zeigen wir die deutschen Begriffe ('de') als Standard an, anstatt alles zu verstecken! */
/* FALLBACK: Zeigt 'de' NUR an, solange NOCH KEINE Sprache die Klasse '.active' hat.
   Sobald JS läuft und '.active' vergibt, schaltet sich dieser Fallback automatisch ab! */
#header-container:not(:has(.active)) [data-lang="de"] {
    display: inline-block !important;
}
/* ===== IMPRESSUM BARRIEREFREI ===== */
.impressum-content h2 {
    text-align: left; /* Überschriften im Fließtext immer linksbündig für bessere Lesbarkeit */
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.impressum-content p {
    text-align: left; /* Kein Blocksatz! Blocksatz erzeugt "Flusslandschaften", die Legasthenikern das Lesen erschweren */
    line-height: 1.6; /* Großzügiger Zeilenabstand */
    margin-bottom: 15px;
}

/* Links im Impressum extrem deutlich sichtbar machen */
.barrierefreier-link {
    color: #0056b3;
    text-decoration: underline !important;
    font-weight: bold;
}

.barrierefreier-link:focus {
    outline: 3px solid yellow !important;
    outline-offset: 2px;
}

/* Darkmode-Sicherheit */
body.dark .barrierefreier-link {
    color: #66b2ff;
}

/* ===== LAYOUT & FORMATIERUNG FÜR DAS IMPRESSUM ===== */
.impressum-layout {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column; /* Bringt Überschrift und Blöcke sauber untereinander */
    gap: 20px;
}

.impressum-content {
    display: flex;
    flex-direction: column; /* Zwingt die einzelnen Abschnitte untereinander */
    gap: 30px; /* Abstand zwischen den Blöcken */
}

.impressum-block {
    text-align: left; /* Garantiert linksbündig für barrierefreies Lesen */
}

.impressum-block h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.impressum-block p {
    line-height: 1.6; /* Erhöhter Zeilenabstand erleichtert das Erfassen */
    font-size: 1.1rem;
    margin: 0;
}

/* Schutz vor Word-Lila-Links im Menü und Inhalt */
a {
    text-decoration: none;
}

/* Barrierefreie E-Mail-Links */
.barrierefreier-link {
    color: #0056b3 !important;
    text-decoration: underline !important;
    font-weight: bold;
}

/* Darkmode-Anpassungen für das Impressum */
body.dark .impressum-block h2 {
    border-color: #444;
}

body.dark .barrierefreier-link {
    color: #66b2ff !important;
}

/* Card-Container auf der Seite zentrieren */
.contact-card {
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 2rem;
  max-width: 400px;
  
  /* Das zentriert die Card horizontal auf der Seite, 
     solange sie in einem breiteren Element liegt */
  margin: 2rem auto; 
  
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-family: system-ui, -apple-system, sans-serif;
  color: #1f2937; /* Hoher Kontrast für Barrierefreiheit */
  
  /* Text innerhalb der Card ebenfalls zentrieren */
  text-align: center; 
}

.contact-card h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: #111827;
}

/* Address-Styling (standardmäßig oft kursiv, hier zurückgesetzt) */
.contact-details {
  font-style: normal;
  line-height: 1.6;
}

.contact-company {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-address {
  margin-bottom: 1.5rem;
}

/* Barrierefreie Liste ohne Aufzählungspunkte */
.contact-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-links li {
  margin-bottom: 0.75rem;
}

/* Links & Tastatur-Fokus (Wichtig für Barrierefreiheit!) */
.contact-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
  display: inline-block; /* Wichtig für die korrekte Ausrichtung des Fokus-Rahmens */
}

.contact-link:hover {
  color: #1d4ed8;
}

/* Deutlicher Fokus-Indikator für Tastatur-Nutzer (WCAG-konform) */
.contact-link:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Hilfsklasse für Screenreader (unsichtbar für sehende Nutzer) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== DARK MODE FIX FÜR DIE KONTAKT-KARTE ===== */
/* Geändert von body.dark-mode zu body.dark */
body.dark .contact-card {
  background-color: #1e1e1e !important; /* Dunkler Hintergrund für die Box */
  color: #ffffff !important;            /* Weiße Schrift für die Adresse */
  border: 1px solid #444444 !important; /* Deutlicherer Rahmen im Dunkeln */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Überschrift in der Card im Darkmode weiß färben */
body.dark .contact-card h2 {
  color: #ffffff !important;
}

/* Die Links INNERHALB der Karte im Darkmode gut lesbar machen */
body.dark .contact-card .contact-link {
  color: #66b3ff !important;            /* Ein angenehmes, barrierefreies Hellblau */
}

/* Hover-Effekt für die Links im Darkmode */
body.dark .contact-card .contact-link:hover {
  color: #99ccff !important;
}

/* 🔥 FIX für den grauen Blog-Text im Darkmode */
body.dark #blogContainer article p {
  color: #ffffff !important;
}

/* Blog Caption im Darkmode */
body.dark #blogContainer article .blog-caption {
  color: #ffffff !important;
}

/* Cookie-Hinweis */

/* Cookie Banner Fixierung und Barrierefreiheit */
.cookie-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dunkler Hintergrund blendet Rest aus */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Immer ganz oben */
}

.cookie-content {
  background-color: #ffffff;
  color: #1a1a1a; /* Hoher Kontrast für Text */
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cookie-title {
  margin-top: 0;
  font-size: 1.5rem;
}

.cookie-links {
  margin: 15px 0;
}

.cookie-links a {
  color: #0056b3;
  text-decoration: underline;
  font-weight: bold;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Kontraststarke Buttons (Mind. 4.5:1) */
.btn-cookie-accept, .btn-cookie-decline {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  border: 2px solid #0056b3;
  border-radius: 4px;
  cursor: pointer;
}

.btn-cookie-accept {
  background-color: #0056b3;
  color: #ffffff;
}

.btn-cookie-accept:hover, .btn-cookie-accept:focus {
  background-color: #003d82;
}

.btn-cookie-decline {
  background-color: #ffffff;
  color: #004085; /* Dunkleres Blau für perfekten Kontrast auf weißem Grund */
}

.btn-cookie-decline:hover, .btn-cookie-decline:focus {
  background-color: #f0f5ff;
}

/* Stellt sicher, dass das Cookie-Banner immer sichtbar geschaltet werden kann */
#cookie-banner {
    display: none;
}
/* Im Banner selbst zeigen wir die Spans ganz normal an */
#cookie-banner [data-lang] {
    display: inline !important; 
}

/* Jedes data-lang-Element, das NICHT aktiv ist, MUSS komplett verschwinden */
[data-lang]:not(.active) {
    display: none !important;
}

/* ===== FIX FÜR DAS DYNAMISCHE MENÜ (BEREINIGT) ===== */

/* Mittlerer Block (Der Container) */
.nav-center {
  flex: 1 1 auto;
  display: flex !important;
  justify-content: center;
}

/* Der eigentliche Listen-Container */
.nav-center ul {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important; /* Wichtig für Zoom */
  justify-content: center !important;
  align-items: center !important;
  gap: 15px 25px !important; 
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: max-content;
}

/* Die Listenelemente verhalten sich rein als Flex-Kinder (KEIN inline-block mehr!) */
.nav-center li {
  display: flex !important; 
  margin: 0 !important;
  padding: 0 !important;
}

/* Die Links als stabile Flex-Flächen */
.nav-center a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: flex !important;
  align-items: center !important;
  padding: 10px 14px; 
  border-radius: 4px;
  transition: background 0.2s ease;
}

.nav-center a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Macht die Scrollleiste der Blog-Galerie sichtbar und dezent */
.blog-gallery::-webkit-scrollbar {
    height: 6px; /* Höhe der Leiste */
}
.blog-gallery::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
.blog-gallery::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}
.blog-gallery::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Zeigt einen sauberen Rahmen, wenn man mit der Tastatur auf die Galerie tabbt */
.blog-gallery:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

        /* Strukturierung der Vereinsliste */
        .vereins-liste {
            list-style: none;
            padding: 0;
        }

        .vereins-eintrag {
            margin-bottom: 40px;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        /* Fokus-Rahmen für Tastatur-Nutzer deutlich sichtbar machen */
        a:focus {
            outline: 3px solid #ffbf47;
            background-color: #fff9e6;
        }

        .logo-link {
            display: inline-block;
            margin-top: 10px;
        }

        .logo-img {
            max-width: 200px;
            height: auto;
            display: block;
        }

/* --- Audio-Player Design --- */

/* Die Box um den Player herum */
.hymn-box {
    background-color: #f4f6f9; /* Helles Grau-Blau als Hintergrund */
    border-left: 5px solid #0c2340; /* Dein Dunkelblau als Akzent */
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Leichter, moderner Schatten */
    margin-bottom: 2rem;
}

.hymn-box h3 {
    margin-top: 0;
    color: #0c2340;
}

.hymn-box p {
    margin-bottom: 1rem;
    color: #333;
}

/* Der Audio-Player selbst */
.custom-audio {
    width: 100%;
    max-width: 400px;
    outline: none;
    border-radius: 30px; /* Macht den Player schön rund */
    box-shadow: 0 2px 5px rgba(12, 35, 64, 0.2); /* Sanfter blauer Schatten unter dem Player */
}

/* Spezial-Anpassung für Chrome, Edge und Safari */
.custom-audio::-webkit-media-controls-panel {
    background-color: #e6edf5; /* Ein sehr zartes Blau für den Player-Hintergrund */
}

/* ==========================================================================
   Geschichten / Mutmacher Style
   ========================================================================== */
.geschichten-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* Sidebar Index */
.geschichten-sidebar {
    background: var(--card-bg, #ffffff);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: fit-content;
}

.geschichten-sidebar h2 {
    font-size: 1.25rem;
    color: var(--primary-color, #2c3e50);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-color, #e74c3c);
}

.index-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.index-list li {
    margin-bottom: 12px;
}

.index-list a {
    text-decoration: none;
    color: var(--text-color, #333333);
    font-weight: 500;
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.index-list a:hover, 
.index-list a.active {
    background-color: rgba(0, 86, 179, 0.1);
    color: #0044cc;
}

/* Story Cards */
.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.story-card {
    background: var(--card-bg, #ffffff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .story-card {
        flex-direction: row;
    }
}

.story-img-wrapper {
    flex: 0 0 35%;
    min-height: 220px;
    background-color: #eee;
}

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

.story-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.story-title {
    font-size: 1.5rem;
    color: var(--primary-color, #2c3e50);
    margin-bottom: 10px;
}

.story-excerpt {
    color: #555;
    margin-bottom: 15px;
    font-size: 0.98rem;
}

.story-socials {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #555;
}

.story-socials a {
    color: #0044cc;
    text-decoration: underline;
    font-weight: 600;
}

.btn-readmore {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 20px;
    background-color: #0044cc;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-readmore:hover {
    background-color: #003399;
}

@media (max-width: 768px) {
    .geschichten-layout {
        grid-template-columns: 1fr;
    }
}