/*
 * Verschwendung-DB.de — Design-Ebene (Quark 2 custom.css)
 * Seriös, ruhig, gut lesbar. Loaded last -> überschreibt theme.css ohne !important.
 * Farbwelt bewusst neutral/seriös (kein DB-Rot).
 */

/* Konsistente Überschriftenfarbe: Quark färbt die erste H2 direkt nach der H1
   blau ein („Unterzeilen"-Effekt). Auf Textseiten (Impressum/Datenschutz) ist die
   erste H2 aber eine normale Abschnittsüberschrift -> gleiche dunkle Farbe wie alle. */
.content-item h1 + h2 { color: var(--q2-text-strong); }

:root {
  --vdb-accent: #1d4e74;          /* tiefes, seriöses Blau */
  --vdb-accent-strong: #163b58;
  --vdb-ink: #1b2733;
  --vdb-tint: color-mix(in srgb, var(--vdb-accent) 6%, transparent);
  --vdb-tint-strong: color-mix(in srgb, var(--vdb-accent) 12%, transparent);
  --vdb-measure: 42rem;           /* angenehme Lesebreite */
}

/* ---------- Grundtypografie / Lesbarkeit ---------- */
body { -webkit-font-smoothing: antialiased; }

.content-item { max-width: var(--vdb-measure); margin-inline: auto; }
.content-item.thema, .content-item { line-height: 1.7; }
.content-item h1 { letter-spacing: -0.02em; }
.content-item h2 { margin-top: 2.4em; letter-spacing: -0.01em; }
.content-item p, .content-item li { font-size: 1.05rem; }
.content-item .lead, .thema-lead {
  font-size: 1.2rem; line-height: 1.6; color: var(--pico-muted-color);
  margin-bottom: 1.5rem;
}
.lead-muted { color: var(--pico-muted-color); font-size: 1.1rem; }

/* Quellen-/Fußnoten dezent */
.content-item blockquote { border-left: 3px solid var(--vdb-accent); }

/* ---------- Wortmarke ---------- */
.brand-text { text-decoration: none; font-family: 'Cal Sans', 'Inter', sans-serif; font-size: 1.35rem; }
.brand-strong { color: var(--vdb-accent); font-weight: 700; }
.brand-light  { color: var(--pico-color); font-weight: 700; opacity: .85; margin-left: .12em; }
[data-theme="dark"] .brand-strong { color: #6ea8d6; }

/* ---------- Abschnitts-Überschrift auf Übersichtsseiten ---------- */
.section-heading { max-width: var(--vdb-measure); margin: 3.5rem auto 1.5rem; text-align: center; }
.section-heading h2 { margin-top: 0; }

/* ---------- Themen-Karten (Grid) ---------- */
.topic-grid {
  display: grid; gap: 1.25rem; max-width: 68rem; margin: 1.5rem auto 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}
.topic-card {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.5rem 1.5rem 1.35rem; text-decoration: none;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 12px; color: var(--pico-color);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.topic-card:hover {
  transform: translateY(-3px);
  border-color: var(--vdb-accent);
  box-shadow: 0 12px 28px rgba(29, 78, 116, .14);
}
.topic-num {
  font-family: 'Cal Sans', sans-serif; font-size: 1.05rem; font-weight: 700;
  color: #fff; background: var(--vdb-accent);
  width: 2.2rem; height: 2.2rem; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.topic-title { margin: .4rem 0 0; font-size: 1.2rem; line-height: 1.25; }
.topic-teaser { margin: 0; color: var(--pico-muted-color); font-size: .98rem; line-height: 1.5; }
.topic-more { margin-top: auto; padding-top: .6rem; color: var(--vdb-accent); font-weight: 600; font-size: .95rem; }
[data-theme="dark"] .topic-more { color: #6ea8d6; }
.topic-more i { transition: transform .15s ease; }
.topic-card:hover .topic-more i { transform: translateX(4px); }

/* ---------- PDF-Download-Box ---------- */
.pdf-box {
  max-width: var(--vdb-measure); margin: 3rem auto 1rem; padding: 1.5rem 1.6rem;
  background: var(--vdb-tint); border: 1px solid var(--pico-muted-border-color);
  border-radius: 12px;
}
.pdf-box-title { margin: 0 0 1rem; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.pdf-box-title i { color: var(--vdb-accent); }
[data-theme="dark"] .pdf-box-title i { color: #6ea8d6; }
.pdf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.pdf-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 10px; padding: .85rem 1rem;
}
.pdf-icon i { font-size: 1.6rem; color: #b3261e; }   /* PDF-Icon rot ist hier Datei-Semantik, nicht DB-Bezug */
.pdf-meta { display: flex; flex-direction: column; line-height: 1.3; margin-right: auto; }
.pdf-name { font-weight: 600; word-break: break-word; }
.pdf-type { font-size: .8rem; color: var(--pico-muted-color); }
.pdf-download {
  white-space: nowrap; text-decoration: none; font-weight: 600; font-size: .92rem;
  color: #fff; background: var(--vdb-accent);
  padding: .5rem .9rem; border-radius: 8px; transition: background .15s ease;
}
.pdf-download:hover { background: var(--vdb-accent-strong); }

/* ---------- Zurück-Link ---------- */
.thema-back { max-width: var(--vdb-measure); margin: 2.5rem auto 0; }
.thema-back a { color: var(--vdb-accent); text-decoration: none; font-weight: 600; }
[data-theme="dark"] .thema-back a { color: #6ea8d6; }

/* ---------- Hinweis-/Distanzierungsbanner ---------- */
.notice {
  max-width: var(--vdb-measure); margin: 0 auto 2rem; padding: .9rem 1.1rem;
  background: var(--vdb-tint-strong); border-left: 4px solid var(--vdb-accent);
  border-radius: 6px; font-size: .95rem; color: var(--pico-color);
}

/* ---------- Kontaktformular ---------- */
.content-item form { max-width: var(--vdb-measure); margin-inline: auto; }
.content-item form label { font-weight: 600; }
.form-consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; font-size: .95rem; }
.form-consent input { margin-top: .25rem; }
/* Honeypot-Feld unsichtbar */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important; }

/* ---------- Footer ---------- */
#footer {
  border-top: 1px solid var(--pico-muted-border-color);
  margin-top: 4rem;
  text-align: left;                 /* Theme setzt center -> hier links */
  background: var(--vdb-tint);      /* dezente Tönung hebt den Footer ab */
}
.footer-cols {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 1rem 0 2rem;
}
.footer-logo { display: inline-block; text-decoration: none; font-size: 1.4rem; line-height: 1; }
.footer-logo .brand-strong { color: var(--vdb-accent); font-weight: 700; }
.footer-logo .brand-light  { color: var(--pico-color); font-weight: 700; opacity: .85; margin-left: .12em; }
[data-theme="dark"] .footer-logo .brand-strong { color: #6ea8d6; }
.footer-disclaimer {
  font-size: .85rem; color: var(--pico-muted-color);
  margin: .8rem 0 0; line-height: 1.6; max-width: 34rem;
}
.footer-col { display: flex; flex-direction: column; gap: .1rem; }
.footer-col-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .11em;
  color: var(--pico-muted-color); margin-bottom: .35rem;
}
.footer-col a {
  text-decoration: none; color: var(--pico-color); font-size: .95rem; font-weight: 500;
  min-height: 44px; display: inline-flex; align-items: center;
}
.footer-col a:hover { color: var(--vdb-accent); text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
  border-top: 1px solid var(--pico-muted-border-color);
  padding-top: 1.1rem;
  text-align: center;
}
.footer-copy { font-size: .82rem; color: var(--pico-muted-color); margin: 0; }
.footer-copy-muted { opacity: .8; }

@media (max-width: 720px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-cols { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ============================================================
   Barrierefreiheit (WCAG 2.1 AA / BITV 2.0)
   ============================================================ */

/* 1.4.3 Kontrast: dunkleres Grau für Sekundärtext (>= 4.5:1 auf Weiß).
   Für Dark-Mode wieder aufhellen. */
/* AAA (1.4.6): Sekundärtext auf >= 7:1 (hell) bzw. >= 7:1 (dunkel) */
:root:not([data-theme="dark"]),
:root[data-theme="light"] { --pico-muted-color: #474d58 !important; }
[data-theme="dark"] { --pico-muted-color: #aab1bf !important; }

/* 2.4.1 Bypass Blocks: Skip-Link, sichtbar nur bei Tastaturfokus */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  background: var(--vdb-accent); color: #fff; padding: .65rem 1.1rem;
  border-radius: 0 0 8px 8px; text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }
main:focus { outline: none; }

/* 2.4.7 Focus Visible: deutlich sichtbarer Fokusrahmen für Tastaturnutzer */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--vdb-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
[data-theme="dark"] a:focus-visible,
[data-theme="dark"] button:focus-visible,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] textarea:focus-visible,
[data-theme="dark"] select:focus-visible { outline-color: #6ea8d6; }

/* Themen-Überschrift (H1) auf den Themenseiten */
.thema-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.12;
  letter-spacing: -0.015em; margin: 0 0 .5rem;
}

/* 2.3.3 / Respekt vor reduzierter Bewegung */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Zusätzliche AAA-Verbesserungen
   ============================================================ */

/* 2.5.5 Zielgröße: interaktive Elemente mind. 44x44 px */
.navigation a,
.footer-nav a,
.pdf-download,
.thema-back a,
.breadcrumb a,
button, .btn,
input[type="submit"] {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a, .breadcrumb a { padding-block: .35rem; }

/* 2.4.8 Standort: Brotkrumen-Navigation */
.breadcrumb { max-width: var(--vdb-measure); margin: 0 auto 1.2rem; }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: .1rem .5rem; padding: 0; margin: 0; font-size: .92rem;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: .5rem; }
.breadcrumb li + li::before { content: "\203A"; color: var(--pico-muted-color); }
.breadcrumb a { color: var(--vdb-accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--pico-muted-color); }
[data-theme="dark"] .breadcrumb a { color: #6ea8d6; }

/* 3.3.5 Hilfetexte unter den Formularfeldern */
.form-description {
  display: block; font-size: .88rem; color: var(--pico-muted-color);
  margin-top: .3rem; line-height: 1.4;
}

/* 3.3.6 / 2.2.6 Prüf- und Timeout-Hinweis vor dem Absenden */
.form-review-note {
  font-size: .92rem; color: var(--pico-color);
  background: var(--vdb-tint); border-left: 3px solid var(--vdb-accent);
  padding: .75rem .95rem; border-radius: 6px; margin: .5rem 0 1rem;
}
