/* ════════════════════════════════════════════════════════
   GP-127: Öffentliche Baurecht-Seiten (Einstieg, Landesseite, Gemeindeseite)
   Vorlagen: templates/baurecht/*.html

   Aufbau und Formen wie die Landing Page: Hero mit Verlauf, gerundete Karten mit
   weichem Schatten, Abschluss mit Landschaft, dunkler Footer. Kopfzeile und Knöpfe
   kommen aus kopfzeile.css. Ohne Login abrufbar (SecurityConfig).
════════════════════════════════════════════════════════ */

.baurecht, .baurecht *, .baurecht *::before, .baurecht *::after { box-sizing: border-box; }

body.baurecht {
  --green: #4a7c59; --green-dark: #3a6347; --green-soft: #e8f4ec; --green-tint: #f0f7f2;
  --ink: #1a1a1a; --muted: #5a6560; --linie: #e4f0e8;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: #fff;
}
.baurecht h1, .baurecht h2, .baurecht h3, .baurecht p, .baurecht ul { margin: 0; padding: 0; }
.baurecht a { color: var(--green); }
.baurecht .kopfzeile { position: sticky; top: 0; z-index: 100; }

/* ── Hero ── */
.baurecht .hero {
  background: linear-gradient(160deg, var(--green-tint) 0%, #ffffff 65%);
  padding: 44px 48px 56px;
}
.baurecht .hero-innen { max-width: 1040px; margin: 0 auto; }
.baurecht .pfad { font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; }
.baurecht .pfad a { color: var(--muted); }
.baurecht .hero-marke {
  display: inline-block; background: var(--green-soft); color: var(--green);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
}
.baurecht h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em; color: #111; margin-bottom: 20px;
  max-width: 820px;
}
.baurecht h1 em { color: var(--green); font-style: normal; }
.baurecht .einleitung { font-size: 1.08rem; line-height: 1.7; color: var(--muted); max-width: 680px; }

/* ── Inhalt ── */
.baurecht .seite { max-width: 1136px; margin: 0 auto; padding: 16px 48px 72px; }
.baurecht h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: #111; margin: 56px 0 18px; line-height: 1.2; }
.baurecht h3 { font-size: 1.05rem; font-weight: 700; color: #111; margin-bottom: 6px; }
.baurecht p { margin-bottom: 10px; }
.baurecht .seite > p { max-width: 720px; color: #374151; }
.baurecht .stand { font-size: 0.82rem; color: #8a948f; }

.baurecht .karte {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(30, 60, 40, 0.10);
  padding: 24px 28px 18px;
  max-width: 820px;
}
.baurecht .karte-schluss { margin-top: 10px; }

.baurecht .regeln { list-style: none; }
.baurecht .regeln li { padding: 12px 0; border-top: 1px solid #eef3f0; }
.baurecht .regeln .fundstelle { display: block; font-size: 0.8rem; color: #8a948f; margin-top: 2px; }

/* ── Einstieg: drei Ebenen, Zahlen, Bundesländer ── */
.baurecht .ebenen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.baurecht .ebenen .karte { padding: 26px 26px 20px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.baurecht .ebene-marke {
  display: inline-block; padding: 0.35em 0.9em; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 0.74rem; font-weight: 700; margin-bottom: 14px;
}
.baurecht .ebenen p { font-size: 0.93rem; color: var(--muted); }

.baurecht .zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.baurecht .zahlen div { background: var(--green-tint); border: 1px solid var(--linie); border-radius: 16px; padding: 24px 26px; }
.baurecht .zahlen b { display: block; font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--green); margin-bottom: 6px; }
.baurecht .zahlen span { font-size: 0.92rem; color: var(--muted); }
.baurecht .zahlen-stand { margin-top: 10px; }

.baurecht .laender { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.baurecht .laender a {
  display: block; background: #fff; border-radius: 8px; box-shadow: var(--knopf-schatten);
  padding: 12px 14px; text-decoration: none; color: var(--ink); transition: background 0.15s;
}
.baurecht .laender a:hover { background: var(--green-tint); }
.baurecht .laender b { display: block; font-size: 0.95rem; letter-spacing: -0.02em; }
.baurecht .laender span { font-size: 0.82rem; color: #8a948f; }

/* ── Befund der Gemeinde ── */
.baurecht .befund {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(30, 60, 40, 0.12);
  padding: 26px 30px 18px;
  margin-top: 32px;
  max-width: 720px;
}
.baurecht .befund-marke {
  display: inline-block; background: var(--green); color: #fff;
  font-size: 0.74rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; margin-bottom: 14px;
}
.baurecht .befund--keine .befund-marke { background: var(--green-soft); color: var(--green-dark); }
.baurecht .befund--ne .befund-marke,
.baurecht .befund--offen .befund-marke { background: #eceeed; color: #55605a; }
.baurecht .befund-kern { font-size: 1.15rem; line-height: 1.5; color: #111; }
.baurecht .befund ul { margin: 6px 0 12px 22px; }
.baurecht .befund p { color: #374151; }
.baurecht .befund .stand { color: #8a948f; margin-top: 12px; }

/* ── Verdeckte Vorschau der Baurecht-Prüfung ── */
.baurecht .vorschau {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(30, 60, 40, 0.12);
  max-width: 820px;
  overflow: hidden;
}
.baurecht .vorschau-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 26px;
  background: var(--green-tint);
  border-bottom: 1px solid var(--linie);
  font-weight: 800; font-size: 0.95rem;
}
.baurecht .vorschau-punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 8px; }
.baurecht .vorschau-spalte { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #8a948f; white-space: nowrap; }
.baurecht .vorschau-zeilen { list-style: none; padding: 4px 26px 8px; }
.baurecht .vorschau-zeilen li {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 12px 0; border-top: 1px solid #eef3f0; font-size: 0.92rem;
}
.baurecht .vorschau-zeilen li:first-child { border-top: 0; }
.baurecht .vorschau-zeilen .quelle { display: block; font-size: 0.78rem; color: #8a948f; }
.baurecht .vorschau-fuss {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 26px 20px;
  background: var(--green-tint);
  border-top: 1px solid #eef3f0;
}
.baurecht .vorschau-fuss p { margin: 0; font-size: 0.9rem; color: var(--muted); max-width: 440px; }
.baurecht .vorschau-fuss .knopf { width: 172px; justify-content: center; padding: 0; }

/* Kästchen in der Spalte „Werte im Planer“: alle gleich breit, im Stil der Knöpfe */
.baurecht .wert-kasten {
  display: inline-flex; align-items: center; gap: 8px;
  width: 172px; height: 36px; padding: 0 12px;
  background: #fff; border-radius: 8px; box-shadow: var(--knopf-schatten);
  font-size: 0.86rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
}
.baurecht .wert-kasten svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.baurecht .wert-haken { margin-left: auto; display: inline-flex; }
.baurecht .wert-haken svg { width: 16px; height: 16px; stroke-width: 2.4; }
.baurecht .wert-kasten--offen { color: var(--muted); }

.baurecht .danach { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 820px; margin-top: 18px; }
.baurecht .danach li { background: var(--green-tint); border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px; font-size: 0.88rem; color: var(--muted); }
.baurecht .danach b { display: block; color: #111; font-size: 0.92rem; margin-bottom: 2px; }

/* ── Baurecht im Klartext (nur angemeldet) ── */
.baurecht .auskunft { padding: 0; overflow: hidden; }
.baurecht .auskunft section { padding: 22px 28px 12px; border-top: 1px solid var(--linie); }
.baurecht .auskunft section:first-child { border-top: 0; }
.baurecht .auskunft h3 { font-size: 1.08rem; }
.baurecht .auskunft .regeln li:first-child { border-top: 0; }
.baurecht .auskunft .leise { color: #8a948f; }
.baurecht .auskunft-zusatz { font-size: 0.86rem; color: #6f7a73; }
.baurecht .auskunft-fuss {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 28px 20px; background: var(--green-tint); border-top: 1px solid var(--linie);
}
.baurecht .auskunft-fuss p { margin: 0; font-size: 0.9rem; color: var(--muted); max-width: 460px; }
.baurecht .auskunft-fuss .knopf { width: 172px; justify-content: center; padding: 0; }

/* ── Gemeindeliste der Landesseite ── */
.baurecht .legende { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; }
.baurecht .punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.baurecht .punkt--satzung { background: var(--green); }
.baurecht .punkt--keine { border: 2px solid #9bb5a3; }
.baurecht .punkt--ne { background: #cfcfcf; }
.baurecht .punkt--offen { border: 2px dotted #c3c9c5; }

.baurecht .sprung { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.baurecht .sprung a {
  width: 36px; height: 36px; line-height: 36px; text-align: center;
  background: #fff; border-radius: 8px; box-shadow: var(--knopf-schatten);
  text-decoration: none; font-size: 0.88rem; font-weight: 700;
}
.baurecht .sprung a:hover { background: var(--green-tint); }
.baurecht .buchstabe {
  background: #fff; border: 1px solid var(--linie); border-radius: 16px;
  padding: 16px 22px 14px; margin-bottom: 12px;
  scroll-margin-top: calc(var(--kopfzeile-h) + 12px);   /* Sprungmarke landet unter der Kopfzeile */
}
.baurecht .buchstabe h3 { color: var(--green); font-weight: 800; margin-bottom: 8px; }
.baurecht .buchstabe ul { list-style: none; columns: 3; column-gap: 28px; }
.baurecht .buchstabe li { break-inside: avoid; padding: 3px 0; font-size: 0.95rem; }
.baurecht .buchstabe li a { color: var(--ink); text-decoration: none; }
.baurecht .buchstabe li a:hover { color: var(--green); }
.baurecht .buchstabe li.leise a { color: #6f7a73; }

.baurecht .weitere { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.baurecht .weitere a {
  display: block; height: 36px; line-height: 36px; padding: 0 12px;
  background: #fff; border-radius: 8px; box-shadow: var(--knopf-schatten);
  font-size: 0.92rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.baurecht .weitere a:hover { background: var(--green-tint); }

.baurecht .hinweis { margin-top: 44px; font-size: 0.82rem; color: #8a948f; }

/* ── Abschluss wie auf der Landing Page: Landschaft ── */
.baurecht .abschluss {
  background: url(/img/start-landschaft.svg) center bottom / 100% auto no-repeat,
              linear-gradient(to bottom, #f2f8f3 0%, #eaf4ec 55%, #dfeee1 100%);
  padding: 80px 24px clamp(150px, 27vw, 420px);
  text-align: center;
}
.baurecht .abschluss h2 { font-size: 2rem; margin: 0 0 16px; }
.baurecht .abschluss p { font-size: 1rem; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }

.baurecht-fuss { background: #111; color: #888; padding: 28px 48px; text-align: center; font-size: 0.82rem; }

@media (max-width: 860px) {
  .baurecht .hero { padding: 32px 22px 44px; }
  .baurecht .seite { padding: 8px 22px 56px; }
  .baurecht .ebenen, .baurecht .zahlen, .baurecht .danach { grid-template-columns: 1fr; }
  .baurecht .laender { grid-template-columns: repeat(2, 1fr); }
  .baurecht .buchstabe ul { columns: 2; }
  .baurecht-fuss { padding: 24px 22px; }
}
@media (max-width: 600px) {
  .baurecht .buchstabe ul { columns: 1; }
  .baurecht h2 { font-size: 1.35rem; margin-top: 44px; }
  .baurecht .befund { padding: 22px 20px 14px; }
  .baurecht .vorschau-kopf, .baurecht .vorschau-fuss { padding-left: 18px; padding-right: 18px; }
  .baurecht .vorschau-zeilen { padding-left: 18px; padding-right: 18px; }
  .baurecht .vorschau-zeilen li { grid-template-columns: 1fr; gap: 8px; }
  .baurecht .vorschau-spalte { display: none; }
}
