/*
  Wohngebäude v5 – ergänzende Bereiche
  ---------------------------------------------------------------
  Auftrag "Tarifchaos v5.0 – Wohngebäude – Implementierung 01"
  (23. September 2026, siehe qa/2026-09-23-wohngebaeude-v5-implementierung-01/).

  Wird ausschließlich von /wohngebaeude.html geladen (nach
  wohngebaeude-v2.css). Jede Regel ist unter `.page-wohngebaeude` gescopt –
  andere Vergleichsseiten laden diese Datei nicht und tragen diese Klasse
  nicht. Keine Änderung an wohngebaeude-v2.css oder globalen Styles.

  Farben ausschließlich über bestehende Tokens (tokens.css) bzw. die
  bereits in wohngebaeude-v2.css definierten --v2-*-Aliase; keine neuen
  Hexwerte. Icons: kein Filter, keine Freistellung – der dunkle
  Motivhintergrund ist Bestandteil der freigegebenen Motive.

  Breakpoints wie im Bestand: Mobil ≤767px, Tablet ≤1199px, Desktop ≥1200px.
*/

/* ---------- Gemeinsame v5-Bausteine ---------- */

.page-wohngebaeude .wg5-icon {
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 0;
  background: var(--v2-dark);
}
.page-wohngebaeude .wg5-icon picture,
.page-wohngebaeude .wg5-icon img {
  display: block;
  width: 100%;
  height: 100%;
}
.page-wohngebaeude .wg5-icon img { object-fit: contain; }
.page-wohngebaeude .wg5-icon--l { width: 64px; height: 64px; border-radius: 16px; }
.page-wohngebaeude .wg5-icon--m { width: 48px; height: 48px; border-radius: 12px; }

.page-wohngebaeude .wg5-note {
  max-width: 75ch;
  margin: 32px 0 0;
  padding: 18px 22px;
  border-left: 3px solid var(--v2-gold);
  border-radius: 0 12px 12px 0;
  background: var(--color-surface);
  font-size: .95rem;
  line-height: 1.65;
}

/* ---------- Bereich 2: Das Wichtigste ---------- */

.page-wohngebaeude .wg5-keyfacts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
}
.page-wohngebaeude .wg5-fact {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--color-border);
}
.page-wohngebaeude .wg5-fact h3 { margin: 4px 0 8px; }
.page-wohngebaeude .wg5-fact p { margin: 0; font-size: .95rem; line-height: 1.65; max-width: 52ch; }

/* ---------- Bereich 3: Grundlagen ---------- */

.page-wohngebaeude .wg5-basics__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}
.page-wohngebaeude .wg5-basics__block h3 { margin-bottom: 10px; }
.page-wohngebaeude .wg5-basics__block p { margin: 0 0 12px; font-size: .95rem; line-height: 1.7; max-width: 62ch; }
.page-wohngebaeude .wg5-basics__block p:last-child { margin-bottom: 0; }
.page-wohngebaeude .wg5-transition { margin: 24px 0 0; max-width: 75ch; font-size: .95rem; font-weight: 600; }

/* ---------- Bereich 5: Leistungsdetails ---------- */

.page-wohngebaeude .wg5-bridge {
  max-width: 75ch;
  margin-bottom: 40px;
  padding-top: 16px;
  border-top: 2px solid var(--v2-gold);
}
.page-wohngebaeude .wg5-bridge p { margin: 0; font-size: .95rem; line-height: 1.65; }
.page-wohngebaeude .wg5-bridge .wg5-bridge__title { margin-bottom: 6px; font-weight: 700; font-size: 1rem; }

.page-wohngebaeude .wg5-performance__list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
}
.page-wohngebaeude .wg5-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr);
  gap: 32px;
  padding: 32px 36px;
  border-top: 1px solid var(--color-border);
}
.page-wohngebaeude .wg5-detail:first-child { border-top: 0; }
.page-wohngebaeude .wg5-detail__head { display: flex; flex-direction: column; gap: 12px; }
.page-wohngebaeude .wg5-detail__head h3 { margin: 0; }
.page-wohngebaeude .wg5-detail__num {
  display: inline-block;
  width: 28px;
  padding-top: 3px;
  border-top: 2px solid var(--v2-gold);
  font-size: .8rem;
  font-weight: 700;
}
.page-wohngebaeude .wg5-detail__list { margin: 0; }
.page-wohngebaeude .wg5-detail__pair {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
}
.page-wohngebaeude .wg5-detail__pair:first-child { padding-top: 0; border-top: 0; }
.page-wohngebaeude .wg5-detail__pair:last-child { padding-bottom: 0; }
.page-wohngebaeude .wg5-detail dt {
  padding-top: 2px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.5;
}
.page-wohngebaeude .wg5-detail dd { margin: 0; font-size: .95rem; line-height: 1.65; max-width: 68ch; }

.page-wohngebaeude .wg5-conclusion {
  max-width: 75ch;
  margin: 32px 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--v2-gold);
  font-weight: 600;
  line-height: 1.6;
}

/* ---------- Bereich 6: Kompi – optionaler Sprunglink ---------- */

.page-wohngebaeude .v2-kompi-guide__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 6px;
  font-size: .9rem;
  font-weight: 700;
  color: inherit;
  text-underline-offset: 4px;
}
.page-wohngebaeude .v2-kompi-guide__link:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 4px; }

/* ---------- Bereich 7: Gut vorbereitet für den Vergleich ---------- */

.page-wohngebaeude .wg5-preparation .wg5-note { margin: 0 0 32px; }
.page-wohngebaeude .wg5-preparation__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.page-wohngebaeude .wg5-prep {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
}
.page-wohngebaeude .wg5-prep h3 { margin: 0 0 8px; font-size: 1.05rem; }
.page-wohngebaeude .wg5-prep p { margin: 0; font-size: .9rem; line-height: 1.6; }
.page-wohngebaeude .wg5-prep .wg5-prep__examples-label { margin-top: 14px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.page-wohngebaeude .wg5-prep__examples { margin: 6px 0 0; padding: 0; list-style: none; }
.page-wohngebaeude .wg5-prep__examples li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
  font-size: .85rem;
  line-height: 1.5;
}
.page-wohngebaeude .wg5-prep__examples li::before { content: '—'; color: var(--color-gold); font-weight: 700; }
.page-wohngebaeude .wg5-preparation__cta { margin-top: 32px; }

/* ---------- Bereich 9: So funktioniert unser Vergleich ---------- */

.page-wohngebaeude .wg5-transparency__list { border-bottom: 1px solid var(--color-border); }
.page-wohngebaeude .wg5-faq-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
}
.page-wohngebaeude .wg5-faq-row h3 { margin: 0; font-size: 1.05rem; }
.page-wohngebaeude .wg5-faq-row p { margin: 0; font-size: .95rem; line-height: 1.65; max-width: 70ch; }
.page-wohngebaeude .wg5-transparency__footnote { margin: 20px 0 0; font-size: .85rem; max-width: 90ch; }

/* ---------- Bereich 11: Redaktion & Methodik (Quellen: source-disclosure.css) ---------- */

.page-wohngebaeude .wg5-editorial { padding-block: 48px; }
.page-wohngebaeude .wg5-editorial__inner {
  max-width: 800px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}
.page-wohngebaeude .wg5-editorial h2 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.3; letter-spacing: -.02em; }
.page-wohngebaeude .wg5-editorial__meta { margin: 0 0 18px; font-size: .85rem; font-weight: 600; }
.page-wohngebaeude .wg5-editorial__meta time { white-space: nowrap; }
.page-wohngebaeude .wg5-editorial__inner > p:not(.wg5-editorial__meta) { margin: 0 0 12px; font-size: .9rem; line-height: 1.65; max-width: 75ch; }

/* ---------- Tablet (≤1199px) ---------- */

@media (max-width: 1199px) {
  .page-wohngebaeude .wg5-keyfacts__grid { column-gap: 32px; }
  .page-wohngebaeude .wg5-basics__grid { gap: 32px; }
  .page-wohngebaeude .wg5-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 28px; }
  .page-wohngebaeude .wg5-detail__head { flex-direction: row; align-items: baseline; gap: 14px; }
  .page-wohngebaeude .wg5-preparation__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-wohngebaeude .wg5-faq-row { gap: 24px; }
}

/* Related Cards: v5-Soll Tablet 2+1 (Desktop bleibt 3, Mobil 1 über den
   unveränderten Bestand). Bewusst nur 768–1199px, damit die mobile
   Einspaltigkeit aus wohngebaeude-v2.css nicht überschrieben wird. Nur
   Rasterspalten – Inhalt, Motive, Reihenfolge und Kartengestaltung bleiben
   unverändert. */
@media (min-width: 768px) and (max-width: 1199px) {
  .page-wohngebaeude .v2-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Mobil (≤767px) ---------- */

@media (max-width: 767px) {
  .page-wohngebaeude .wg5-icon--l { width: 52px; height: 52px; border-radius: 12px; }

  .page-wohngebaeude .wg5-keyfacts__grid { grid-template-columns: minmax(0, 1fr); }
  .page-wohngebaeude .wg5-fact { grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; padding: 22px 0; }
  .page-wohngebaeude .wg5-fact h3 { margin-top: 2px; }

  .page-wohngebaeude .wg5-basics__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .page-wohngebaeude .wg5-note { margin-top: 24px; padding: 16px 18px; font-size: .9rem; }

  .page-wohngebaeude .wg5-bridge { margin-bottom: 28px; }
  .page-wohngebaeude .wg5-detail { padding: 22px 20px; gap: 14px; }
  .page-wohngebaeude .wg5-detail__pair { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; }
  .page-wohngebaeude .wg5-detail dd { font-size: .9rem; }
  .page-wohngebaeude .wg5-conclusion { margin-top: 24px; }

  .page-wohngebaeude .wg5-preparation .wg5-note { margin-bottom: 24px; }
  .page-wohngebaeude .wg5-preparation__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .page-wohngebaeude .wg5-prep {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
  }
  .page-wohngebaeude .wg5-preparation__cta { margin-top: 24px; }

  .page-wohngebaeude .wg5-faq-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 0; }
  .page-wohngebaeude .wg5-transparency__footnote { font-size: .8rem; }

  .page-wohngebaeude .wg5-editorial { padding-block: 36px; }
  .page-wohngebaeude .wg5-editorial h2 { font-size: 1.2rem; }
}
