/* ==========================================================================
   BEYER Generalplaner GmbH — Stylesheet
   Farbwelt aus der Bildmarke: vier Grauwerte + Planblau auf Blauschwarz.
   Schriften lokal eingebunden (kein Google-CDN, DSGVO-konform).
   ========================================================================== */

/* --- Schriften ------------------------------------------------------------ */
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face { font-family:"IBM Plex Sans"; src:url("../fonts/plex-300.woff2") format("woff2"); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:"IBM Plex Sans"; src:url("../fonts/plex-400.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"IBM Plex Sans"; src:url("../fonts/plex-500.woff2") format("woff2"); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"IBM Plex Sans"; src:url("../fonts/plex-600.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Farben */
  --nacht:      #0d1419;   /* Blauschwarz — Hero, Fuß, Kontrastflächen       */
  --nacht-70:   #16212b;   /* aufgehellte Nachtfläche                        */
  --plan:       #1b4f8a;   /* Planblau — Handlung, Fakten, Links             */
  --plan-tief:  #143c69;   /* Planblau gedrückt                              */
  --plan-hell:  #6ba3de;   /* Planblau auf dunklem Grund                     */
  --grau-58:    #58595b;   /* Logo: Balken 4                                 */
  --grau-80:    #808285;   /* Logo: Wortmarke, Balken 3                      */
  --grau-a7:    #a7a9ac;   /* Logo: Balken 2                                 */
  --grau-d1:    #d1d3d4;   /* Logo: Balken 1, Subline                        */
  --linie:      #dfe1e3;   /* Hairline hell                                  */
  --papier:     #f4f5f6;   /* Flächenhintergrund                             */
  --weiss:      #ffffff;

  /* Typografie */
  --display: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --text: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --t-xs:  0.8125rem;
  --t-s:   0.9375rem;
  --t-m:   1.0625rem;
  --t-l:   1.3125rem;
  --t-xl:  1.65rem;
  --t-2xl: clamp(1.9rem, 1.2rem + 2.2vw, 2.6rem);
  --t-3xl: clamp(2.3rem, 1.3rem + 3.6vw, 3.7rem);

  /* Maße */
  --bahn: 1180px;          /* Satzspiegel                                    */
  --rand: clamp(1.25rem, 5vw, 3.5rem);
  --sprung: clamp(3.75rem, 7vw, 6.5rem);   /* Abstand zwischen Abschnitten   */
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--weiss);
  color: #23282d;
  font-family: var(--text);
  font-size: var(--t-m);
  font-weight: 400;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .005em;
  margin: 0 0 .6em;
  color: var(--nacht);
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); font-weight: 300; letter-spacing: -.005em; }
h2 { font-size: var(--t-2xl); font-weight: 300; }
h3 { font-size: var(--t-xl); font-weight: 400; }
h4 { font-size: var(--t-l); font-weight: 500; }

p { margin: 0 0 1.15em; max-width: 68ch; }
ul, ol { max-width: 68ch; }

a { color: var(--plan); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--plan-tief); }

:focus-visible {
  outline: 2px solid var(--plan);
  outline-offset: 3px;
}

strong { font-weight: 600; }
small { font-size: var(--t-xs); }

.bahn { width: 100%; max-width: var(--bahn); margin-inline: auto; padding-inline: var(--rand); }
.schmal { max-width: 760px; }

.springmarke {
  position: absolute; left: -9999px;
  background: var(--nacht); color: #fff; padding: .75rem 1.25rem; z-index: 100;
}
.springmarke:focus { left: 1rem; top: 1rem; }

/* --- Kopfzeile ------------------------------------------------------------ */
.kopf {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--linie);
}
.kopf__innen {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; min-height: 84px;
}
.kopf__logo { display: block; flex: none; }
.kopf__logo img { width: 178px; }

.nav__liste {
  display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem);
  list-style: none; margin: 0; padding: 0;
}
.nav__liste a {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: .03em;
  color: var(--nacht);
  text-decoration: none;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
  display: block;
}
.nav__liste a:hover { border-bottom-color: var(--grau-a7); }
.nav__liste a[aria-current="page"] { border-bottom-color: var(--plan); }

.nav__knopf {
  display: none;
  background: none; border: 1px solid var(--linie); border-radius: 2px;
  padding: .55rem .8rem; cursor: pointer; color: var(--nacht);
  font-family: var(--display); font-size: .95rem; letter-spacing: .04em;
}

/* --- Schaltflächen -------------------------------------------------------- */
.knopf {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-size: 1.05rem; font-weight: 400; letter-spacing: .02em;
  padding: .85rem 1.6rem;
  border: 1px solid var(--plan);
  border-radius: 2px;
  background: var(--plan); color: #fff; text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
  cursor: pointer;
}
.knopf:hover { background: var(--plan-tief); border-color: var(--plan-tief); color: #fff; }
.knopf--linie { background: transparent; color: var(--nacht); border-color: var(--grau-a7); }
.knopf--linie:hover { background: transparent; border-color: var(--nacht); color: var(--nacht); }
.knopf--hell { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.knopf--hell:hover { background: rgba(255,255,255,.09); border-color: #fff; color: #fff; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  background: var(--nacht);
  color: #e6e9ec;
  position: relative;
  overflow: hidden;
}
.hero__innen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero h1 { color: #fff; margin-bottom: .55em; }
.hero p { color: #b8c0c8; font-size: var(--t-l); font-weight: 300; max-width: 44ch; }
.hero__aktion { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero__bild { align-self: stretch; display: flex; align-items: center; }

/* Der Balken-Takt der Bildmarke als Seitenmotiv */
.takt { display: flex; align-items: flex-end; gap: 7px; height: 46px; margin-bottom: 2.1rem; }
.takt span { width: 11px; background: var(--grau-80); display: block; }
.takt span:nth-child(1) { height: 62%; background: var(--grau-d1); }
.takt span:nth-child(2) { height: 100%; background: var(--grau-a7); }
.takt span:nth-child(3) { height: 38%; background: var(--grau-80); }
.takt span:nth-child(4) { height: 76%; background: var(--plan-hell); }
.takt--dunkel span:nth-child(4) { background: var(--plan); }

@media (prefers-reduced-motion: no-preference) {
  .hero .takt span { transform-origin: bottom; animation: aufbau .7s cubic-bezier(.22,.8,.3,1) backwards; }
  .hero .takt span:nth-child(1) { animation-delay: .05s; }
  .hero .takt span:nth-child(2) { animation-delay: .14s; }
  .hero .takt span:nth-child(3) { animation-delay: .23s; }
  .hero .takt span:nth-child(4) { animation-delay: .32s; }
}
@keyframes aufbau { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* --- Seitenkopf der Unterseiten ------------------------------------------- */
.seitenkopf {
  background: var(--nacht);
  color: #e6e9ec;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.seitenkopf h1 { color: #fff; max-width: 22ch; }
.seitenkopf p { color: #b8c0c8; font-size: var(--t-l); font-weight: 300; max-width: 56ch; margin-bottom: 0; }

.brotkrume { font-size: var(--t-xs); color: var(--grau-a7); margin-bottom: 1.6rem; letter-spacing: .02em; }
.brotkrume a { color: var(--grau-a7); text-decoration: none; }
.brotkrume a:hover { color: #fff; text-decoration: underline; }
.brotkrume span { padding-inline: .45rem; color: #4a545e; }

/* --- Abschnitte ----------------------------------------------------------- */
.abschnitt { padding-block: var(--sprung); }
.abschnitt--papier { background: var(--papier); }
.abschnitt--nacht { background: var(--nacht); color: #c7ced5; }
.abschnitt--nacht h2, .abschnitt--nacht h3 { color: #fff; }

.abschnitt__kopf { max-width: 60ch; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.abschnitt__kopf p:last-child { margin-bottom: 0; }

/* --- Leistungsraster ------------------------------------------------------ */
.felder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
}
.feld {
  background: var(--weiss);
  padding: clamp(1.6rem, 3vw, 2.3rem);
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: background .18s ease;
}
a.feld:hover { background: #fbfcfc; }
.feld__marke { display: flex; align-items: flex-end; gap: 4px; height: 26px; margin-bottom: 1.35rem; }
.feld__marke i { width: 6px; display: block; background: var(--grau-a7); }
.feld__marke i:nth-child(1) { height: 55%; background: var(--grau-d1); }
.feld__marke i:nth-child(2) { height: 100%; }
.feld__marke i:nth-child(3) { height: 34%; background: var(--grau-80); }
.feld__marke i:nth-child(4) { height: 72%; background: var(--plan); }
.feld h3 { margin-bottom: .5rem; }
.feld p { font-size: var(--t-s); color: #4d5459; margin-bottom: 1.25rem; }
.feld__mehr { margin-top: auto; font-family: var(--display); font-size: var(--t-s); letter-spacing: .04em; color: var(--plan); }

/* --- Leistungsliste (Detailseiten) ---------------------------------------- */
.liste { list-style: none; margin: 0; padding: 0; max-width: none; border-top: 1px solid var(--linie); }
.liste > li {
  border-bottom: 1px solid var(--linie);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
}
.liste h3 { margin: 0; font-size: var(--t-l); }
.liste p:last-child { margin-bottom: 0; }
.liste__text > p:first-child { margin-top: 0; }

/* --- Merkmalsliste mit Balkenmarker --------------------------------------- */
.merkmale { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.merkmale li {
  position: relative; padding-left: 1.5rem; margin-bottom: .6rem;
}
.merkmale li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 2px; background: var(--plan);
}
.abschnitt--nacht .merkmale li::before { background: var(--plan-hell); }

/* --- Ablauf (echte Reihenfolge → Nummerierung gerechtfertigt) ------------- */
.ablauf { list-style: none; counter-reset: schritt; margin: 0; padding: 0; max-width: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--linie); border: 1px solid var(--linie); }
.ablauf li { counter-increment: schritt; background: var(--weiss); padding: 1.7rem clamp(1.2rem,2.4vw,1.8rem); }
.ablauf li::before {
  content: counter(schritt, decimal-leading-zero);
  display: block; font-family: var(--display); font-size: var(--t-s);
  color: var(--plan); letter-spacing: .08em; margin-bottom: .8rem;
  border-bottom: 1px solid var(--linie); padding-bottom: .55rem;
}
.ablauf h4 { margin-bottom: .35rem; }
.ablauf p { font-size: var(--t-s); color: #4d5459; margin: 0; }

/* --- Kennzahlen ----------------------------------------------------------- */
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); margin: 0; padding: 0; }
.zahlen div { border-left: 2px solid var(--plan); padding-left: 1.1rem; }
.abschnitt--nacht .zahlen div { border-left-color: var(--plan-hell); }
.zahlen dt { font-family: var(--display); font-size: clamp(2rem, 3.5vw, 2.7rem); font-weight: 300; line-height: 1; color: var(--nacht); }
.abschnitt--nacht .zahlen dt { color: #fff; }
.zahlen dd { margin: .5rem 0 0; font-size: var(--t-s); color: #4d5459; }
.abschnitt--nacht .zahlen dd { color: #9aa4ae; }

/* --- Zweispalter ---------------------------------------------------------- */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.duo--bild { align-items: center; }
.duo__figur { border: 1px solid var(--linie); background: var(--papier); }
.abschnitt--nacht .duo__figur { border-color: #24303a; background: var(--nacht-70); }
.duo__figur figcaption { font-size: var(--t-xs); color: var(--grau-80); padding: .8rem 1rem; border-top: 1px solid var(--linie); background: var(--weiss); }

/* --- Hinweiskasten -------------------------------------------------------- */
.hinweis {
  border-left: 3px solid var(--plan);
  background: var(--papier);
  padding: 1.35rem 1.6rem;
  margin: 2rem 0;
  font-size: var(--t-s);
}
.hinweis p:last-child { margin-bottom: 0; }
.hinweis h4 { margin-bottom: .4rem; }

/* --- Fragen und Antworten ------------------------------------------------- */
.faq { border-top: 1px solid var(--linie); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--linie); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-family: var(--display); font-size: var(--t-l); font-weight: 400; color: var(--nacht);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .5rem; top: 1.75rem;
  width: 13px; height: 13px;
  border-right: 1.5px solid var(--plan); border-bottom: 1.5px solid var(--plan);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.95rem; }
.faq__text { padding: 0 0 1.4rem; }
.faq__text p:last-child { margin-bottom: 0; }

/* --- Handlungsband -------------------------------------------------------- */
.band { background: var(--nacht); color: #c7ced5; padding-block: clamp(3rem, 6vw, 4.5rem); }
.band h2 { color: #fff; }
.band__innen { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
.band p { margin-bottom: 0; }
.band__aktion { display: flex; flex-wrap: wrap; gap: .9rem; }

/* --- Formular ------------------------------------------------------------- */
.formular { display: grid; gap: 1.25rem; max-width: 640px; }
.formular__reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1.25rem; }
.feldgruppe { display: grid; gap: .4rem; }
.feldgruppe label { font-size: var(--t-s); font-weight: 500; color: var(--nacht); }
.feldgruppe input, .feldgruppe select, .feldgruppe textarea {
  font-family: var(--text); font-size: var(--t-m); color: inherit;
  padding: .75rem .9rem;
  border: 1px solid var(--grau-a7); border-radius: 2px; background: var(--weiss);
  width: 100%;
}
.feldgruppe input:focus, .feldgruppe select:focus, .feldgruppe textarea:focus {
  border-color: var(--plan); outline: 2px solid rgba(27,79,138,.25); outline-offset: 0;
}
.feldgruppe textarea { min-height: 160px; resize: vertical; }
.pflichthinweis { font-size: var(--t-xs); color: var(--grau-80); }
.zustimmung { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: var(--t-s); }
.zustimmung input { margin-top: .35rem; width: 1.05rem; height: 1.05rem; }
.honigtopf { position: absolute; left: -9999px; }

/* --- Kontaktkarte --------------------------------------------------------- */
.kontaktdaten { list-style: none; margin: 0; padding: 0; }
.kontaktdaten li { padding-block: .9rem; border-bottom: 1px solid var(--linie); display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: baseline; }
.kontaktdaten li:first-child { border-top: 1px solid var(--linie); }
.kontaktdaten dt, .kontaktdaten .etikett { font-size: var(--t-xs); color: var(--grau-80); }

/* --- Fußzeile ------------------------------------------------------------- */
.fuss { background: var(--nacht); color: #8e99a4; padding-block: clamp(3rem, 5vw, 4rem) 2rem; font-size: var(--t-s); }
.fuss__raster { display: grid; grid-template-columns: minmax(0,1.3fr) repeat(auto-fit, minmax(170px, 1fr)); gap: clamp(2rem,4vw,3rem); }
.fuss img { width: 172px; margin-bottom: 1.4rem; }
.fuss h2 { font-size: var(--t-s); font-family: var(--text); font-weight: 600; color: #fff; letter-spacing: .01em; margin-bottom: .9rem; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: .5rem; }
.fuss a { color: #b8c0c8; text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }
.fuss__schluss {
  margin-top: clamp(2.5rem,5vw,3.5rem); padding-top: 1.5rem;
  border-top: 1px solid #23303b;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  font-size: var(--t-xs); color: #6f7b86;
}

/* --- Rechtstexte ---------------------------------------------------------- */
.rechtstext h2 { font-size: var(--t-xl); margin-top: 2.5rem; }
.rechtstext h3 { font-size: var(--t-l); margin-top: 1.8rem; }
.rechtstext h2:first-child { margin-top: 0; }
.platzhalter { background: #fff4d6; border-bottom: 1px dashed #c99b1e; padding: 0 .2em; }

/* --- Umbruchpunkte -------------------------------------------------------- */
@media (max-width: 940px) {
  .hero__innen, .band__innen { grid-template-columns: 1fr; }
  .hero__bild { order: -1; max-width: 460px; }
  .liste > li { grid-template-columns: 1fr; gap: .5rem; }
}

@media (max-width: 780px) {
  .nav { position: fixed; inset: 84px 0 auto; background: var(--weiss); border-bottom: 1px solid var(--linie);
         transform: translateY(-120%); transition: transform .25s ease; max-height: calc(100dvh - 84px); overflow-y: auto; }
  .nav[data-offen="ja"] { transform: translateY(0); }
  .nav__liste { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--rand) 1.5rem; }
  .nav__liste a { padding: .85rem 0; border-bottom: 1px solid var(--linie); }
  .nav__liste a[aria-current="page"] { color: var(--plan); }
  .nav__knopf { display: block; }
  .kopf__innen { min-height: 84px; }
}

@media print {
  .kopf, .band, .nav__knopf, .springmarke { display: none; }
  body { color: #000; font-size: 11pt; }
  .hero, .seitenkopf, .abschnitt--nacht, .fuss { background: #fff !important; color: #000 !important; }
  .hero h1, .seitenkopf h1, .abschnitt--nacht h2 { color: #000 !important; }
}

/* Textbasierte Variante: sichtbare Bild-/Grafikelemente wurden aus den Templates entfernt. */
.kopf__wortmarke { text-decoration: none; color: var(--nacht); line-height: 1; display: flex; flex-direction: column; gap: .18rem; }
.kopf__wortmarke strong { font-family: var(--schrift-display); font-size: 1.8rem; font-weight: 400; letter-spacing: .08em; }
.kopf__wortmarke span { font-family: var(--schrift-display); font-size: .72rem; letter-spacing: .13em; color: var(--grau-80); }
.fuss__wortmarke { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1.4rem; color: #fff; }
.fuss__wortmarke strong { font-family: var(--schrift-display); font-size: 2.1rem; font-weight: 400; letter-spacing: .08em; }
.fuss__wortmarke span { font-family: var(--schrift-display); font-size: .8rem; letter-spacing: .13em; color: #b8c0c8; }
.hero__innen--text { grid-template-columns: minmax(0, 760px); }
.hero__innen--text > div { max-width: 760px; }


/* --- Ergänzungen: Bildverwendung mit ursprünglichem Layout ---------------- */
.duo__figur img { width: 100%; height: auto; display: block; }
.duo__figur--ohne-caption { padding: 0; background: transparent; border: 0; }
.duo__figur--ohne-caption img { border: 1px solid rgba(255,255,255,.12); }
.themenbilder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 0 0 2.2rem;
}
.themenbilder--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bildkarte {
  margin: 0;
  border: 1px solid var(--linie);
  background: var(--weiss);
  overflow: hidden;
}
.bildkarte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.bildkarte figcaption { padding: .95rem 1rem 1rem; border-top: 1px solid var(--linie); }
.bildkarte figcaption strong { display: block; font-family: var(--display); font-size: var(--t-s); letter-spacing: .03em; color: var(--nacht); margin-bottom: .25rem; }
.bildkarte figcaption span { display: block; font-size: var(--t-xs); color: #4d5459; line-height: 1.55; }
@media (max-width: 860px) {
  .hero__bild { max-width: none; }
}


/* --- Finaler Headerstand -------------------------------------------------- */
.kopf__innen { min-height: 118px; }
.kopf__logo img {
  width: 82px;
  height: auto;
  max-height: 108px;
  object-fit: contain;
}
.fuss img {
  width: 92px;
  height: auto;
  max-height: 122px;
  object-fit: contain;
  margin-bottom: 1.4rem;
}

/* slide_2 als durchgängiges Headerbild auf Start- und Unterseiten */
.hero,
.seitenkopf {
  position: relative;
  background-color: var(--nacht);
  background-image: linear-gradient(rgba(8,18,26,.66), rgba(8,18,26,.66)), url("../img/header-slide-2.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.hero > .bahn,
.seitenkopf > .bahn {
  position: relative;
  z-index: 1;
}
.hero__innen--text {
  grid-template-columns: minmax(0, 780px);
  min-height: clamp(390px, 48vw, 570px);
  align-items: center;
}
.hero h1,
.seitenkopf h1 { text-shadow: 0 2px 14px rgba(0,0,0,.22); }
.hero p,
.seitenkopf p { color: #d6dce1; }
.seitenkopf { min-height: clamp(260px, 30vw, 390px); display:flex; align-items:center; }

@media (max-width: 780px) {
  .kopf__innen { min-height: 104px; }
  .kopf__logo img { width: 70px; max-height: 94px; }
  .nav { inset: 104px 0 auto; max-height: calc(100dvh - 104px); }
  .seitenkopf { min-height: 250px; }
}

/* --- Korrektur: Logoabstand und Headerbild ohne dunkle Überlagerung ------- */
.kopf__innen {
  min-height: 108px;
  padding-top: 9px;
  padding-bottom: 17px;
}
.kopf__logo img {
  width: 62px;
  height: auto;
  max-height: 82px;
  object-fit: contain;
}

/* slide_2 ersetzt die bisherige schwarze Hero-/Seitenkopffläche vollständig */
.hero,
.seitenkopf {
  background-color: transparent;
  background-image: url("../img/header-slide-2.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Das Motiv ist hell: dunkle Schrift sorgt ohne Overlay für klare Lesbarkeit. */
.hero h1,
.seitenkopf h1 {
  color: var(--nacht);
  text-shadow: 0 1px 2px rgba(255,255,255,.65);
}
.hero p,
.seitenkopf p {
  color: #26333d;
  text-shadow: 0 1px 2px rgba(255,255,255,.55);
}
.brotkrume,
.brotkrume a {
  color: #53606a;
}
.brotkrume span { color: #6f7b86; }
.brotkrume a:hover { color: var(--nacht); }
.hero .takt span:nth-child(4) { background: var(--plan); }

/* Zweiter Hero-Button auf dem hellen Foto */
.hero .knopf--hell {
  color: var(--nacht);
  border-color: rgba(8,18,26,.38);
  background: rgba(255,255,255,.58);
}
.hero .knopf--hell:hover {
  color: var(--nacht);
  border-color: var(--nacht);
  background: rgba(255,255,255,.78);
}

@media (max-width: 780px) {
  .kopf__innen {
    min-height: 98px;
    padding-top: 8px;
    padding-bottom: 14px;
  }
  .kopf__logo img { width: 56px; max-height: 74px; }
  .nav { inset: 98px 0 auto; max-height: calc(100dvh - 98px); }
}


/* --- V4 VERIFIED: Logo + slide_2 Header ----------------------------------- */
.kopf__innen{min-height:112px;padding-top:10px;padding-bottom:26px;}
.kopf__logo img{width:54px;height:auto;max-height:none;object-fit:contain;}
.hero,.seitenkopf{background-color:transparent;background-image:url("../img/header-slide-2-v4.jpg?v=4");background-size:cover;background-position:center;background-repeat:no-repeat;}
.hero h1,.seitenkopf h1{color:var(--nacht);text-shadow:0 1px 2px rgba(255,255,255,.72);}
.hero p,.seitenkopf p{color:#26333d;text-shadow:0 1px 2px rgba(255,255,255,.7);}
.seitenkopf{min-height:clamp(260px,30vw,390px);display:flex;align-items:center;}
@media(max-width:780px){.kopf__innen{min-height:102px;padding-top:9px;padding-bottom:22px}.kopf__logo img{width:48px}.nav{inset:102px 0 auto;max-height:calc(100dvh - 102px)}}

/* --- V1.0.6: saubere 5er-Raster auf Desktop ------------------------------ */
/* Fünf Kernleistungen stehen auf großen Bildschirmen bewusst in einer Reihe. */
.felder {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: transparent;
  gap: 0;
}
.feld {
  min-width: 0;
  border-right: 1px solid var(--linie);
}
.feld:last-child { border-right: 0; }
.feld h3,
.feld p,
.feld__mehr {
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Auch die fünf Projektstufen bleiben auf Desktop in einer vollständigen Reihe. */
.ablauf {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: transparent;
  gap: 0;
}
.ablauf li {
  min-width: 0;
  border-right: 1px solid var(--linie);
}
.ablauf li:last-child { border-right: 0; }
.ablauf h4 {
  font-size: clamp(1.12rem, 1.35vw, 1.38rem);
  line-height: 1.22;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.ablauf p {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Kontrollierte Responsive-Abstufung statt auto-fit. */
@media (max-width: 1180px) {
  .felder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feld:nth-child(3n) { border-right: 0; }
  .feld:nth-child(3n + 1):not(:first-child),
  .feld:nth-child(3n + 2):not(:nth-child(2)),
  .feld:nth-child(3n):not(:nth-child(3)) { border-top: 1px solid var(--linie); }

  .ablauf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ablauf li:nth-child(3n) { border-right: 0; }
  .ablauf li:nth-child(n + 4) { border-top: 1px solid var(--linie); }
}

@media (max-width: 760px) {
  .felder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feld { border-right: 1px solid var(--linie); border-top: 0; }
  .feld:nth-child(even) { border-right: 0; }
  .feld:nth-child(n + 3) { border-top: 1px solid var(--linie); }

  .ablauf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ablauf li { border-right: 1px solid var(--linie); border-top: 0; }
  .ablauf li:nth-child(even) { border-right: 0; }
  .ablauf li:nth-child(n + 3) { border-top: 1px solid var(--linie); }
}

@media (max-width: 520px) {
  .felder,
  .ablauf { grid-template-columns: 1fr; }
  .feld,
  .ablauf li {
    border-right: 0;
    border-top: 1px solid var(--linie);
  }
  .feld:first-child,
  .ablauf li:first-child { border-top: 0; }
}
