/*
 * custom.css – Ergänzungen zu styles.css (Start Bootstrap Agency / Bootstrap 5.1.3)
 * Wird NACH styles.css eingebunden und überschreibt nur, was für
 * Barrierefreiheit (WCAG 2.1 AA), Lesbarkeit und Datenschutz nötig ist.
 *
 * Schriften: Die Google-Fonts-Einbindung wurde entfernt (Datenschutz).
 * Montserrat und Roboto Slab fallen auf die in styles.css hinterlegten
 * Systemschriften zurück. Wer die Originalschriften wieder nutzen will,
 * legt die woff2-Dateien lokal ab und ergänzt hier @font-face, z. B.:
 *
 * @font-face {
 *   font-family: "Montserrat";
 *   font-weight: 700;
 *   font-display: swap;
 *   src: url("../assets/fonts/montserrat-700.woff2") format("woff2");
 * }
 */

/* ---------- Textfarben mit ausreichendem Kontrast ---------- */
.text-muted {
  color: #5c636a !important; /* ca. 6,3:1 auf Weiß, ca. 5,9:1 auf #f8f9fa */
}

a:hover,
a:focus-visible {
  color: #003d66;
}

/* ---------- Sichtbarer Fokus (auf hellem und dunklem Grund) ---------- */
a:focus-visible,
.btn:focus-visible,
.navbar-toggler:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid transparent; /* bleibt im Hochkontrastmodus sichtbar */
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #212529;
}

/* ---------- Skip-Link ---------- */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  background-color: #fff;
  color: #003d66;
  font-weight: 700;
  border-radius: 0.25rem;
}

/* ---------- Navigation ---------- */
.navbar-toggler,
.navbar-dark .navbar-toggler {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

#mainNav .navbar-nav .nav-item .nav-link:hover,
#mainNav .navbar-nav .nav-item .nav-link:focus-visible,
#mainNav .navbar-nav .nav-item .nav-link.active,
#mainNav .navbar-nav .nav-item .nav-link[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---------- Buttons ---------- */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #fff;
  background-color: #003d66;
  border-color: #003d66;
}

/* ---------- Header: dunkles Overlay sichert den Kontrast zum Bild ---------- */
header.masthead {
  /* Deckkraft des Overlays: 0 = Originalbild, 0.55 = sehr dunkel.
     Bei Bedarf hier anpassen. */
  --header-overlay: 0.18;
  background-image:
    /* weicher Verlauf nur oben: sichert die weißen Menülinks (Desktop) */
    linear-gradient(to bottom, rgba(0, 0, 0, 0.40) 0, rgba(0, 0, 0, 0) 180px),
    /* leichter Schleier über dem ganzen Bild */
    linear-gradient(rgba(0, 0, 0, var(--header-overlay)), rgba(0, 0, 0, var(--header-overlay))),
    url("../assets/img/header-bg.jpg");
}

/* Der Text bleibt über einen weichen Schatten lesbar,
   ohne dass das ganze Bild abgedunkelt werden muss. */
header.masthead .masthead-heading,
header.masthead .masthead-subheading {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.35);
}

header.masthead .masthead-heading {
  font-size: clamp(1.5rem, 7.5vw, 4.5rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  hyphens: auto;
}

header.masthead .masthead-subheading {
  line-height: 1.4;
}

/* Kompakter Header für Unterseiten (Impressum, Datenschutz) */
header.masthead.masthead-compact {
  padding-top: 7.5rem;
  padding-bottom: 3rem;
}

header.masthead.masthead-compact .masthead-heading {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 6vw, 3rem);
}

@media (min-width: 768px) {
  header.masthead.masthead-compact {
    padding-top: 9rem;
    padding-bottom: 4rem;
  }
}

/* ---------- Mitglieder-Icons (ersetzen Font Awesome) ---------- */
.member-icon {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* ---------- Timeline: Schrift in rem, damit sie mit der Textgröße skaliert ---------- */
.timeline > li .timeline-image time,
.timeline > li .timeline-image .timeline-range {
  display: block;
  padding: 0 0.25rem;
  overflow-wrap: anywhere;
}

.timeline > li .timeline-image .h4 {
  font-size: 0.625rem;
  line-height: 0.875rem;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .timeline > li .timeline-image .h4 {
    font-size: 0.8125rem;
    line-height: 1.125rem;
    margin-top: 1rem;
  }
}

@media (min-width: 992px) {
  .timeline > li .timeline-image .h4 {
    font-size: 1.125rem;
    line-height: 1.625rem;
    margin-top: 1.875rem;
  }
}

@media (min-width: 1200px) {
  .timeline > li .timeline-image .h4 {
    margin-top: 2.5rem;
  }
}

/* ---------- Rechtstexte: linksbündig, angenehme Zeilenlänge ---------- */
.legal {
  max-width: 46rem;
  margin: 0 auto;
  text-align: left;
}

.legal h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ---------- Footer ---------- */
.footer a[aria-current="page"] {
  font-weight: 700;
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  #mainNav,
  #mainNav .navbar-brand,
  #mainNav .navbar-brand img {
    transition: none !important;
  }
}

/* ---------- Windows-Hochkontrastmodus ---------- */
@media (forced-colors: active) {
  a:focus-visible,
  .btn:focus-visible,
  .navbar-toggler:focus-visible,
  .nav-link:focus-visible {
    outline: 3px solid Highlight;
  }
}
