/* ====================================================================
   Pflegeheim Raitz – Stylesheet (newExt)
   Moderne Fassung: Design-Tokens, Hell/Dunkel-Modus, fluide Typografie,
   Glas-Header, Animationen. Ohne externe Bibliotheken und Webfonts.
   Markenfarbe: #46688E · Akzent: Gold
   ==================================================================== */

/* ----------------------------------------------------- Design-Tokens */

:root {
  color-scheme: light;

  --blau: #46688e;
  --blau-tief: #2d4a6b;
  --blau-nacht: #1c3049;
  --gold: #b9985f;
  --gold-hell: #d8c096;

  --bg: #faf8f5;
  --bg-soft: #f1ede7;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #28303a;
  --text-soft: #5b6573;
  --linie: #e4e0d9;
  --invers-text: #f2f6fa;

  --grad-marke: linear-gradient(135deg, #46688e 0%, #2d4a6b 100%);
  --grad-gold: linear-gradient(135deg, #c7a76e 0%, #a98a50 100%);

  --schatten-1: 0 1px 3px rgba(28, 38, 51, .08), 0 4px 14px rgba(28, 38, 51, .06);
  --schatten-2: 0 6px 18px rgba(28, 38, 51, .12), 0 16px 40px rgba(28, 38, 51, .10);

  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 26px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --kopf-hoehe: 76px;
  --uebergang: .25s cubic-bezier(.4, 0, .2, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #11161d;
  --bg-soft: #161d26;
  --surface: #1a222d;
  --surface-2: #202936;
  --text: #e6ebf1;
  --text-soft: #a3afbd;
  --linie: #2c3644;
  --blau: #8db0d4;
  --blau-tief: #b7d0e8;
  --gold: #d2b27c;

  --grad-marke: linear-gradient(135deg, #33506f 0%, #23374d 100%);
  --schatten-1: 0 1px 3px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
  --schatten-2: 0 6px 18px rgba(0, 0, 0, .5), 0 16px 40px rgba(0, 0, 0, .4);
}

/* Sanfte Übergänge zwischen den Seiten (wo unterstützt) */
@view-transition { navigation: auto; }

/* ----------------------------------------------------- Grundlagen */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, .95rem + .25vw, 1.0625rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--blau-tief);
  line-height: 1.2;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin: 0 0 .8rem; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.6rem 0 .5rem; }

p { margin: 0 0 1em; }

a { color: var(--blau); text-underline-offset: 3px; }
a:hover { color: var(--blau-tief); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--blau); color: #fff; }

[id] { scroll-margin-top: calc(var(--kopf-hoehe) + 24px); }

.wrap {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

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

.skip-link {
  position: fixed; top: -100%; left: 1rem; z-index: 200;
  background: var(--blau-tief); color: #fff;
  padding: .7rem 1.2rem; border-radius: 0 0 var(--radius-s) var(--radius-s);
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ----------------------------------------------------- Abschnitte */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.getoent { background: var(--bg-soft); }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .9rem;
}
.kicker::before {
  content: ""; width: 2.2rem; height: 2px;
  background: var(--grad-gold); border-radius: 2px;
}

.lead {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  color: var(--text-soft); max-width: 46em;
  text-wrap: pretty;
}

.zentriert { text-align: center; }
.zentriert .kicker { justify-content: center; }
.zentriert .kicker::before { display: none; }
.zentriert .lead { margin-inline: auto; }

/* ----------------------------------------------------- Kopfbereich */

.topbar {
  background: var(--blau-nacht, #1c3049);
  background: linear-gradient(90deg, #24405e, #1c3049);
  color: #cfdcea; font-size: .84rem;
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; padding-block: .4rem;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: .25rem; }

header.kopf {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--linie) 60%, transparent);
  transition: box-shadow var(--uebergang);
}
@supports not (backdrop-filter: blur(1px)) {
  header.kopf { background: var(--surface); }
}
header.kopf.gescrollt { box-shadow: var(--schatten-1); }

.kopf-innen {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; height: var(--kopf-hoehe);
}

.logo { display: inline-flex; flex-shrink: 0; }
.logo img {
  height: 48px; width: auto;
  background: #fff; border-radius: 10px; padding: 3px 8px;
}

nav.hauptnav ul {
  list-style: none; display: flex; gap: .25rem;
  margin: 0; padding: 0;
}
nav.hauptnav a {
  display: block; text-decoration: none;
  color: var(--text); font-size: .95rem; font-weight: 500;
  padding: .45rem .8rem; border-radius: 999px;
  transition: background var(--uebergang), color var(--uebergang);
}
nav.hauptnav a:hover { background: var(--surface-2); color: var(--blau); }
nav.hauptnav a[aria-current="page"] {
  background: var(--grad-marke); color: #fff;
}

.kopf-aktionen { display: flex; align-items: center; gap: .6rem; }

.icon-knopf {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: transparent; color: var(--text);
  border: 1px solid var(--linie); border-radius: 999px;
  cursor: pointer; transition: background var(--uebergang), transform var(--uebergang);
}
.icon-knopf:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-knopf svg { width: 20px; height: 20px; }

#themaToggle .mond { display: none; }
html[data-theme="dark"] #themaToggle .sonne { display: none; }
html[data-theme="dark"] #themaToggle .mond { display: block; }

/* Burger-Menü (mobil) */
.burger { display: none; position: relative; }
.burger span, .burger span::before, .burger span::after {
  content: ""; display: block; position: absolute;
  width: 18px; height: 2px; border-radius: 2px;
  background: currentColor; left: 50%; translate: -50% 0;
  transition: transform .25s, opacity .2s, top .25s;
}
.burger span { top: 50%; translate: -50% -50%; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ----------------------------------------------------- Knöpfe */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--grad-marke); color: #fff !important;
  text-decoration: none; cursor: pointer;
  font: 600 1rem var(--sans);
  padding: .8rem 1.7rem; border: none; border-radius: 999px;
  box-shadow: 0 4px 14px color-mix(in srgb, #2d4a6b 35%, transparent);
  transition: transform var(--uebergang), box-shadow var(--uebergang), filter var(--uebergang);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px color-mix(in srgb, #2d4a6b 45%, transparent);
  filter: brightness(1.06);
}
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; transition: translate var(--uebergang); }
.btn:hover svg { translate: 3px 0; }

.btn.zart {
  background: transparent; color: var(--blau) !important;
  border: 1.5px solid color-mix(in srgb, var(--blau) 55%, transparent);
  box-shadow: none;
}
.btn.zart:hover { background: color-mix(in srgb, var(--blau) 10%, transparent); }

.btn.hell {
  background: #fff; color: var(--blau-tief) !important;
}
.btn.klein { padding: .55rem 1.2rem; font-size: .9rem; }

/* ----------------------------------------------------- Held (Start) */

.hero {
  position: relative; isolation: isolate;
  display: grid; align-items: center;
  min-height: min(88svh, 720px);
  color: #fff; overflow: hidden;
}
.hero .bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  animation: hero-zoom 22s ease-out forwards;
}
@keyframes hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(75deg, rgba(20, 36, 54, .88) 0%, rgba(28, 48, 73, .66) 45%, rgba(28, 48, 73, .25) 100%);
}
.hero-inhalt { padding-block: clamp(4rem, 10vw, 7rem); max-width: 640px; }

.hero .badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fde9c4; font-size: .85rem; font-weight: 600;
  padding: .4rem 1rem; border-radius: 999px; margin-bottom: 1.3rem;
}
.hero .badge svg { width: 15px; height: 15px; }

.hero h1 { color: #fff; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #f3d9a6, #d9b97c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero p {
  font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem);
  color: #e3ebf4; max-width: 34em; margin-bottom: 2rem;
}
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Kennzahlen unter dem Held */
.zahlen-band { position: relative; z-index: 5; margin-top: clamp(-3.5rem, -5vw, -2.5rem); }
.zahlen-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--linie); border: 1px solid var(--linie);
  border-radius: var(--radius-l); overflow: hidden;
  box-shadow: var(--schatten-2);
}
.zahl-karte {
  background: var(--surface); text-align: center;
  padding: 1.6rem 1rem 1.4rem;
}
.zahl-karte strong {
  display: block; font-family: var(--serif);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  color: var(--blau); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.zahl-karte span { font-size: .88rem; color: var(--text-soft); }

/* ----------------------------------------------------- Seitenkopf (Unterseiten) */

.seitenkopf {
  position: relative; isolation: isolate;
  background: var(--grad-marke); color: #fff;
  padding-block: clamp(3rem, 7vw, 4.5rem);
  overflow: hidden;
}
.seitenkopf::before, .seitenkopf::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, .1), transparent 70%);
}
.seitenkopf::before { width: 480px; height: 480px; top: -240px; right: -100px; }
.seitenkopf::after { width: 320px; height: 320px; bottom: -200px; left: 10%; }
.seitenkopf .kicker { color: var(--gold-hell); }
.seitenkopf .kicker::before { background: var(--gold-hell); }
.seitenkopf h1 { color: #fff; margin-bottom: .4rem; }
.seitenkopf p { color: #d7e2ee; max-width: 50em; margin: 0; font-size: 1.1rem; text-wrap: pretty; }

/* ----------------------------------------------------- Raster & Karten */

.spalten {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.spalten.oben { align-items: start; }

.karten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.4rem;
}

.karte {
  background: var(--surface);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.8rem 1.7rem;
  transition: transform var(--uebergang), box-shadow var(--uebergang), border-color var(--uebergang);
}
.karte:hover {
  transform: translateY(-5px);
  box-shadow: var(--schatten-2);
  border-color: color-mix(in srgb, var(--blau) 35%, var(--linie));
}
.karte h3 { margin-top: 0; }
.karte p:last-child { margin-bottom: 0; color: var(--text-soft); font-size: .96rem; }
.karte .karten-link { font-weight: 600; text-decoration: none; font-size: .95rem; }
.karte .karten-link::after { content: " →"; transition: margin var(--uebergang); }
.karte:hover .karten-link::after { margin-left: 4px; }

.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 1.1rem;
  background: color-mix(in srgb, var(--blau) 12%, transparent);
  color: var(--blau); border-radius: 14px;
}
.icon-chip svg { width: 26px; height: 26px; }

/* Nummerierte Karten (Leitbild) */
.karte .nummer {
  font-family: var(--serif); font-size: 2.4rem; font-weight: 700;
  background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  line-height: 1; display: block; margin-bottom: .7rem;
}

/* ----------------------------------------------------- Bilder & Galerie */

.bild-rahmen { position: relative; }
.bild-rahmen img {
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-2);
  width: 100%; object-fit: cover;
}
.bild-rahmen::before {
  content: ""; position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem;
  border: 2px solid color-mix(in srgb, var(--gold) 55%, transparent);
  border-radius: var(--radius-l); z-index: -1;
}

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem; margin-block: 1.8rem;
}
.galerie button {
  padding: 0; border: none; background: none; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--schatten-1);
}
.galerie img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}
.galerie button:hover img { transform: scale(1.06); }

/* Großansicht (Lightbox) */
dialog.lightbox {
  border: none; padding: 0; background: transparent;
  max-width: min(94vw, 1100px); max-height: 92svh;
  margin: auto; overflow: visible;
}
dialog.lightbox::backdrop {
  background: rgba(12, 19, 28, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
dialog.lightbox img {
  max-width: 100%; max-height: 84svh;
  border-radius: var(--radius); box-shadow: var(--schatten-2);
  margin-inline: auto;
}
.lightbox-leiste {
  display: flex; justify-content: center; gap: .8rem; margin-top: 1rem;
}
.lightbox-leiste .icon-knopf {
  background: rgba(255, 255, 255, .92); color: #28303a; border: none;
}
.lightbox-leiste .icon-knopf:hover { background: #fff; }

/* ----------------------------------------------------- Häkchen-Listen */

ul.liste { list-style: none; padding: 0; margin: 0 0 1.2rem; }
ul.liste li {
  position: relative; padding-left: 2rem; margin-bottom: .55rem;
}
ul.liste li::before {
  content: ""; position: absolute; left: 0; top: .32em;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a98a50' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E");
  background-size: 62%; background-position: center; background-repeat: no-repeat;
}

/* ----------------------------------------------------- Schritte (Konzept) */

.schritte { list-style: none; margin: 2rem 0; padding: 0; counter-reset: schritt; }
.schritte li {
  position: relative; counter-increment: schritt;
  padding: 0 0 1.8rem 4.2rem;
}
.schritte li::before {
  content: counter(schritt, decimal-leading-zero);
  position: absolute; left: 0; top: -2px;
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--grad-marke); color: #fff;
  font: 700 1rem var(--serif);
  box-shadow: var(--schatten-1);
}
.schritte li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.5rem; top: 3.1rem; bottom: .2rem;
  width: 2px; background: var(--linie); translate: -50% 0;
}
.schritte strong { color: var(--blau-tief); font-size: 1.06rem; }
.schritte p { margin: .2rem 0 0; color: var(--text-soft); font-size: .97rem; }

/* ----------------------------------------------------- Zitat & Zeitstrahl */

.zitat {
  position: relative;
  font-family: var(--serif); font-size: clamp(1.15rem, 1.05rem + .6vw, 1.45rem);
  line-height: 1.6; color: var(--blau-tief);
  padding-left: 1.6rem; border-left: 3px solid var(--gold);
}
.zitat::before {
  content: "„"; position: absolute; left: 1rem; top: -2.4rem;
  font-size: 5.5rem; line-height: 1; color: color-mix(in srgb, var(--gold) 38%, transparent);
}
.zitat-quelle { margin-top: 1.2rem; font-size: .92rem; color: var(--text-soft); }
.zitat-quelle strong { color: var(--text); }

.zeitstrahl { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.zeitstrahl li {
  position: relative; padding: 0 0 1.4rem 2.2rem;
}
.zeitstrahl li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: .85rem; height: .85rem; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent);
}
.zeitstrahl li:not(:last-child)::after {
  content: ""; position: absolute; left: .4rem; top: 1.5em; bottom: -.2em;
  width: 2px; background: var(--linie); translate: -50% 0;
}
.zeitstrahl strong { color: var(--blau-tief); display: block; }
.zeitstrahl span { color: var(--text-soft); font-size: .95rem; }

/* ----------------------------------------------------- Hinweis & CTA */

.hinweis {
  display: flex; gap: 1rem; align-items: flex-start;
  background: color-mix(in srgb, var(--blau) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--blau) 25%, transparent);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem; margin-block: 2rem;
}
.hinweis svg { flex-shrink: 0; width: 24px; height: 24px; color: var(--blau); margin-top: .15rem; }

.cta-band {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--grad-marke); color: #fff;
  border-radius: var(--radius-l);
  padding: clamp(2.4rem, 6vw, 4rem);
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .12), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(216, 192, 150, .18), transparent 45%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d9e3ee; max-width: 42em; margin-inline: auto; }
.cta-band .hero-knoepfe { justify-content: center; margin-top: 1.6rem; }
.cta-band a[href^="tel"] { color: #fff; font-weight: 600; }

/* ----------------------------------------------------- Preistabelle */

.tabelle-scroll {
  overflow-x: auto; border-radius: var(--radius);
  box-shadow: var(--schatten-1); border: 1px solid var(--linie);
  margin-block: 1.5rem;
}
table.preise {
  border-collapse: collapse; width: 100%;
  background: var(--surface); font-size: .95rem;
}
table.preise th, table.preise td {
  padding: .75rem 1rem; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--linie);
  font-variant-numeric: tabular-nums;
}
table.preise th:first-child, table.preise td:first-child {
  text-align: left; white-space: normal;
  position: sticky; left: 0;
  background: inherit;
}
table.preise thead th {
  background: var(--grad-marke); color: #fff;
  font-weight: 600; border-bottom: none;
}
table.preise tbody tr { background: var(--surface); }
table.preise tbody tr:nth-child(odd) { background: var(--surface-2); }
table.preise tbody tr:last-child td, table.preise tbody tr:last-child th { border-bottom: none; }
table.preise tr.summe td {
  font-weight: 700; color: var(--blau-tief);
  border-top: 2px solid var(--blau);
  background: color-mix(in srgb, var(--blau) 9%, var(--surface));
}

/* ----------------------------------------------------- Kostenrechner */

.rechner {
  background: var(--surface);
  border: 1px solid var(--linie);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  margin-block: 2rem;
}
.rechner-felder {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
  margin-block: 1.4rem;
}
.rechner-ergebnis {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem 1.2rem;
  background: color-mix(in srgb, var(--blau) 8%, transparent);
  border-radius: var(--radius); padding: 1.2rem 1.5rem; margin-top: 1.4rem;
}
.rechner-ergebnis strong {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  color: var(--blau); font-variant-numeric: tabular-nums;
}
.rechner-details { width: 100%; margin-top: .6rem; font-size: .92rem; color: var(--text-soft); }
.rechner-details td { padding: .15rem 0; font-variant-numeric: tabular-nums; }
.rechner-details td:last-child { text-align: right; padding-left: 2rem; }
.fussnote { font-size: .85rem; color: var(--text-soft); }

/* ----------------------------------------------------- Akkordeon */

details.akkordeon {
  background: var(--surface);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  margin-bottom: .8rem;
  transition: box-shadow var(--uebergang);
}
details.akkordeon[open] { box-shadow: var(--schatten-1); }
details.akkordeon summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer; list-style: none;
  font-weight: 600; color: var(--blau-tief);
  padding: 1.1rem 1.4rem;
}
details.akkordeon summary::-webkit-details-marker { display: none; }
details.akkordeon summary::after {
  content: ""; flex-shrink: 0;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: color-mix(in srgb, var(--blau) 12%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346688e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-size: 58%; background-position: center; background-repeat: no-repeat;
  transition: transform var(--uebergang);
}
details.akkordeon[open] summary::after { transform: rotate(45deg); }
details.akkordeon .akkordeon-inhalt { padding: 0 1.4rem 1.3rem; }
details.akkordeon .akkordeon-inhalt > :last-child { margin-bottom: 0; }

/* ----------------------------------------------------- Formular */

form.anfrage {
  background: var(--surface);
  border: 1px solid var(--linie);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-1);
  padding: clamp(1.5rem, 4vw, 2.2rem);
}
.feld { margin-bottom: 1.15rem; }
.feld label {
  display: block; font-size: .9rem; font-weight: 600;
  color: var(--blau-tief); margin-bottom: .35rem;
}
.feld input, .feld select, .feld textarea {
  width: 100%; padding: .7rem .9rem;
  font: inherit; font-size: .98rem;
  color: var(--text); background: var(--bg);
  border: 1.5px solid var(--linie); border-radius: var(--radius-s);
  transition: border-color var(--uebergang), box-shadow var(--uebergang);
}
.feld textarea { min-height: 140px; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus {
  outline: none; border-color: var(--blau);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blau) 18%, transparent);
}
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.zustimmung {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .9rem; color: var(--text-soft); margin-bottom: 1.3rem;
}
.zustimmung input { margin-top: .3rem; accent-color: var(--blau); width: 1.05rem; height: 1.05rem; }
.pflicht { color: #c0504d; }
.honig { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Kontakt-Schnellkarten */
.kontakt-karten { display: grid; gap: 1rem; margin-block: 1.5rem; }
.kontakt-karte {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  text-decoration: none; color: var(--text);
  transition: transform var(--uebergang), box-shadow var(--uebergang);
}
a.kontakt-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten-1); color: var(--text); }
.kontakt-karte .icon-chip { margin: 0; flex-shrink: 0; }
.kontakt-karte strong { display: block; color: var(--blau-tief); }
.kontakt-karte span { font-size: .92rem; color: var(--text-soft); }

/* ----------------------------------------------------- Karte (Anfahrt) */

.map-box {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--linie);
  border-radius: var(--radius-l);
  min-height: 440px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-platzhalter { padding: 2rem; max-width: 36em; }
.map-platzhalter p { color: var(--text-soft); font-size: .92rem; }
.map-reset {
  position: absolute; bottom: .75rem; right: .75rem; z-index: 10;
  background: #fff; border: 1px solid rgba(0,0,0,.25); border-radius: 4px;
  width: 2rem; height: 2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 5px rgba(0,0,0,.2); color: #333;
}
.map-reset:hover { background: #f0f0f0; }

/* ----------------------------------------------------- Fußbereich */

footer.fuss {
  background: linear-gradient(180deg, #233d59, #1a2e44);
  color: #c4d2e1; margin-top: clamp(3rem, 7vw, 5rem);
  font-size: .94rem;
}
footer.fuss .fuss-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.4rem, 5vw, 3.6rem);
}
footer.fuss h3 { color: #fff; margin-top: 0; font-size: 1.05rem; }
footer.fuss a { color: #e6edf5; text-decoration: none; }
footer.fuss a:hover { color: #fff; text-decoration: underline; }
footer.fuss ul { list-style: none; margin: 0; padding: 0; }
footer.fuss li { margin-bottom: .45rem; }
.bpa-logo { background: #fff; border-radius: var(--radius-s); padding: .5rem; width: 180px; margin-top: 1rem; }
.fuss-leiste {
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .82rem; color: #93a7bd;
}
.fuss-leiste .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: .5rem 1.5rem; padding-block: 1rem;
}

/* ----------------------------------------------------- Nach-oben-Knopf */

#nachOben {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-marke); color: #fff;
  border: none; cursor: pointer;
  box-shadow: var(--schatten-2);
  opacity: 0; translate: 0 12px; pointer-events: none;
  transition: opacity var(--uebergang), translate var(--uebergang);
}
#nachOben.sichtbar { opacity: 1; translate: 0 0; pointer-events: auto; }
#nachOben svg { width: 22px; height: 22px; }

/* ----------------------------------------------------- Einblenden beim Scrollen */

/* Nur wenn JavaScript läuft (html.js), werden Inhalte zunächst ausgeblendet –
   ohne Skript bleibt alles sofort sichtbar. */
html.js .reveal {
  opacity: 0; translate: 0 26px;
  transition: opacity .7s ease, translate .7s cubic-bezier(.25, .6, .3, 1);
  transition-delay: var(--verzoegerung, 0s);
}
html.js .reveal.sichtbar { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.js .reveal { opacity: 1; translate: 0 0; }
  .hero .bg { animation: none; }
}

/* ----------------------------------------------------- Responsiv */

@media (max-width: 960px) {
  .spalten { grid-template-columns: 1fr; }
  .bild-rahmen { max-width: 560px; }
  .zahlen-grid { grid-template-columns: repeat(2, 1fr); }
  .rechner-felder { grid-template-columns: 1fr; }
  footer.fuss .fuss-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobiles Menü: schmale Fenster sowie Tablets/Handys im Hochformat */
@media (max-width: 760px), (orientation: portrait) and (pointer: coarse) {
  .topbar .topbar-adresse { display: none; }
  .topbar .wrap { justify-content: center; }

  .burger { display: inline-flex; }
  .kopf-cta { display: none; }

  nav.hauptnav {
    position: absolute; top: calc(100% + .6rem); right: 1rem; z-index: 150;
    width: 33.33vw; min-width: 230px;
    background: var(--surface);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten-2);
    padding: .8rem;
    max-height: calc(100vh - var(--kopf-hoehe) - 2rem);
    overflow-y: auto;
    opacity: 0; visibility: hidden; translate: 0 -6px;
    transition: opacity .3s ease, visibility .3s, translate .3s ease;
  }
  body.nav-offen nav.hauptnav { opacity: 1; visibility: visible; translate: 0 0; }
  body.nav-offen { overflow: hidden; }
  body.nav-offen .burger { position: relative; z-index: 160; }

  nav.hauptnav ul { flex-direction: column; gap: .4rem; text-align: center; }
  nav.hauptnav a { font-size: 1.1rem; font-weight: 600; padding: .55rem 1rem; }

  .feld-reihe { grid-template-columns: 1fr; }
  footer.fuss .fuss-grid { grid-template-columns: 1fr; }
  .fuss-leiste .wrap { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .zahlen-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 78svh; }
}

/* ----------------------------------------------------- Druck */

@media print {
  .topbar, header.kopf, footer.fuss, #nachOben, .cta-band, .hero-knoepfe { display: none !important; }
  body { background: #fff; color: #000; }
}
