/* ==========================================================================
   Mirau Bau — die Abschnitte des Live-Builders

   Wird auf der Website und im Builder geladen. Beide sehen dadurch gleich
   aus — es gibt keine zweite Darstellung, die abweichen könnte.

   Schriftgrössen kommen aus theme.json; wo ein Abschnitt sie überschreibt,
   steht eine --mb-bd-*-Variable an seiner Hülle.
   ========================================================================== */

.mb-abschnitt {
  position: relative;
  box-sizing: border-box;
}
.mb-abschnitt *,
.mb-abschnitt *::before,
.mb-abschnitt *::after { box-sizing: border-box; }

.mb-abschnitt__innen {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, .6rem + 1.8vw, 2.25rem);
}

/* Breite ---------------------------------------------------------------- */
.mb-breite-normal .mb-abschnitt__innen { max-width: 820px; }
.mb-breite-breit  .mb-abschnitt__innen { max-width: 1240px; }
.mb-breite-voll   .mb-abschnitt__innen { max-width: none; padding-inline: 0; }

/* Abstand --------------------------------------------------------------- */
.mb-luft-keiner { padding-block: 0; }
.mb-luft-klein  { padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.mb-luft-normal { padding-block: clamp(3rem, 1.8rem + 5vw, 5.5rem); }
.mb-luft-gross  { padding-block: clamp(4rem, 2.2rem + 7vw, 7.5rem); }

/* Hintergrund ----------------------------------------------------------- */
.mb-grund-weiss   { background: var(--wp--preset--color--weiss, #fff); }
.mb-grund-flaeche { background: var(--wp--preset--color--flaeche, #F9F9FB); }
.mb-grund-gruen   { background: var(--wp--preset--color--gruen, #2C4641); color: rgba(255,255,255,.86); }
.mb-grund-dunkel  { background: var(--wp--preset--color--dunkel, #16211F); color: rgba(255,255,255,.84); }

.mb-grund-gruen h1, .mb-grund-gruen h2, .mb-grund-gruen h3, .mb-grund-gruen strong,
.mb-grund-dunkel h1, .mb-grund-dunkel h2, .mb-grund-dunkel h3, .mb-grund-dunkel strong { color: #fff; }

/* Ausblenden ------------------------------------------------------------ */
@media (max-width: 640px)  { .mb-aus-handy   { display: none !important; } }
@media (max-width: 1024px) { .mb-aus-tablet  { display: none !important; } }
@media (min-width: 1025px) { .mb-aus-desktop { display: none !important; } }

/* Typografie je Abschnitt ------------------------------------------------ */
/* Nur wenn im Builder eine eigene Typografie gesetzt ist, greift sie hier.
   Ohne Einstellung bleibt die Groesse aus der theme.json stehen — ein
   "inherit" als Rueckfall hatte alle Ueberschriften auf Textgroesse
   gezogen, sobald das Preset nicht aufloeste. */
/* Eigene Typografie je Abschnitt — mit der richtigen Vorgabe je Ebene.
   Ein gemeinsamer Rueckfall ging nicht: h1, h2, h3 und Kacheltitel haben
   verschiedene Preset-Groessen. Vorher stand hier "inherit", und sobald das
   Preset nicht aufloeste, sassen alle Ueberschriften auf Textgroesse. */
.mb-abschnitt h1 {
  font-size: var(--mb-bd-titel-fs, var(--wp--preset--font-size--h-1, 3.5rem));
  font-weight: var(--mb-bd-titel-fw, 750);
  color: var(--mb-bd-titel-fc, inherit);
}
.mb-abschnitt h2 {
  font-size: var(--mb-bd-titel-fs, var(--wp--preset--font-size--h-2, 2.6rem));
  font-weight: var(--mb-bd-titel-fw, 750);
  color: var(--mb-bd-titel-fc, inherit);
}
.mb-abschnitt h3 {
  font-size: var(--mb-bd-titel-fs, var(--wp--preset--font-size--h-3, 1.5rem));
  font-weight: var(--mb-bd-titel-fw, 700);
  color: var(--mb-bd-titel-fc, inherit);
}
.mb-abschnitt .mb-kachel__titel {
  font-size: var(--mb-bd-titel-fs, var(--wp--preset--font-size--kachel, 1.13rem));
  font-weight: var(--mb-bd-titel-fw, 700);
  color: var(--mb-bd-titel-fc, inherit);
}
/*
 * Nur der schmucklose Fliesstext. .mb-lead und .mb-kachel__beschreibung
 * haben eigene Groessen — stuenden sie hier mit drin, zoege `inherit` sie
 * auf 16 px herunter.
 */
.mb-abschnitt p, .mb-abschnitt li {
  font-size: var(--mb-bd-text-fs, inherit);
  font-weight: var(--mb-bd-text-fw, inherit);
  color: var(--mb-bd-text-fc, inherit);
}

/* Lange deutsche Wörter dürfen umbrechen, statt aus dem Feld zu ragen. */
.mb-abschnitt h1, .mb-abschnitt h2, .mb-abschnitt h3,
.mb-abschnitt p, .mb-abschnitt li { overflow-wrap: break-word; hyphens: auto; }

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

.mb-hero {
  display: grid;
  align-items: center;
  min-height: var(--mb-hero-hoehe, 72vh);
  overflow: hidden;
  color: #fff;
}
.mb-hero > * { grid-area: 1 / 1; }
.mb-hero__bild { width: 100%; height: 100%; object-fit: cover; }
.mb-hero__schleier { background: #141617; }
.mb-hero__innen { position: relative; z-index: 2; }
.mb-hero__titel { margin: .25rem 0 .75rem; color: #fff; }
.mb-hero .mb-lead { max-width: 46rem; color: rgba(255,255,255,.86); }

.mb-vorzeile {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .5rem;
  font-size: var(--mb-fs-vorzeile, .78rem);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gruen, #2C4641);
}
.mb-vorzeile::before { content: ""; flex: 0 0 22px; height: 2px; background: var(--wp--preset--color--gold, #FFBB00); }
.mb-vorzeile.mb-hell { color: var(--wp--preset--color--gold, #FFBB00); }
.mb-vorzeile--mitte { justify-content: center; }

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

.mb-knopfreihe { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.mb-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  hyphens: none;
  cursor: pointer;
  transition: background-color .18s, color .18s, transform .18s;
}
.mb-knopf:hover { transform: translateY(-1px); }
.mb-knopf--gold { background: var(--wp--preset--color--gold, #FFBB00); color: #141617; }
.mb-knopf--gold:hover { background: #E0A400; color: #141617; }
.mb-knopf--rand { border-color: currentColor; color: inherit; }
.mb-knopf--rand:hover { background: rgba(255,255,255,.14); }
.mb-knopf--hell { border-color: rgba(255,255,255,.8); color: #fff; }
.mb-knopf--hell:hover { background: #fff; color: var(--wp--preset--color--gruen, #2C4641); }

/* --- Abschnittskopf ----------------------------------------------------- */

.mb-sektionskopf { max-width: 720px; }
.mb-mittig .mb-sektionskopf { margin-inline: auto; text-align: center; }
.mb-sektionskopf h2 { margin: 0 0 .5rem; }
.mb-sektionskopf .mb-lead { margin: 0; }
.mb-lead p { margin: 0 0 .6rem; }
.mb-lead p:last-child { margin-bottom: 0; }

.mb-freitext p { margin: 0 0 1rem; }
.mb-freitext p:last-child { margin-bottom: 0; }

/* --- Kacheln ------------------------------------------------------------ */

.mb-kacheln {
  display: grid;
  gap: clamp(1rem, .8rem + 1vw, 1.75rem);
  grid-template-columns: repeat(var(--mb-kacheln-spalten, 3), minmax(0, 1fr));
}
/* Die Umbruchpunkte stehen in lichtband.css, Abschnitt 5 — dort richten sie
   sich nach dem Platzbedarf der Kachel statt nach einer festen Fensterbreite. */

.mb-kachel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--wp--preset--color--linie, #E4E8E6);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(20,22,26,.06);
}
.mb-kachel__bild { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mb-kachel__text { padding: clamp(1rem, .85rem + .6vw, 1.4rem); }
.mb-kachel__titel { margin: 0 0 .35rem; font-size: clamp(1.02rem, .95rem + .3vw, 1.15rem); line-height: 1.28; }
.mb-kachel__titel a { color: inherit; text-decoration: none; }
.mb-kachel__titel a:hover { color: var(--wp--preset--color--gruen, #2C4641); }
.mb-kachel__beschreibung { margin: 0; font-size: .93rem; line-height: 1.65; color: var(--wp--preset--color--schrift-weich, #6B7570); }

/* --- Kennzahlen --------------------------------------------------------- */

.mb-erfahrung {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 2.25rem);
  grid-template-columns: repeat(var(--mb-erfahrung-spalten, 4), minmax(0, 1fr));
  text-align: center;
}
@media (max-width: 900px) { .mb-erfahrung { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .mb-erfahrung { grid-template-columns: minmax(0, 1fr); } }
.mb-erfahrung__zelle { min-width: 0; }
.mb-kennzahl {
  display: block;
  margin: 0 0 .3rem;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.mb-kennzahl-text { display: block; font-size: .87rem; line-height: 1.45; opacity: .72; }
.mb-erfahrung__fussnote { margin: 1.5rem 0 0; font-size: .84rem; text-align: center; opacity: .66; }

/* --- Schritte ----------------------------------------------------------- */

.mb-schritte {
  display: grid;
  gap: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  grid-template-columns: repeat(var(--mb-schritte-spalten, 4), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 1000px) { .mb-schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .mb-schritte { grid-template-columns: minmax(0, 1fr); } }
.mb-schritt { min-width: 0; }
.mb-schrittnummer {
  display: block;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--wp--preset--color--gruen, #2C4641);
}
.mb-grund-dunkel .mb-schrittnummer,
.mb-grund-gruen .mb-schrittnummer { -webkit-text-stroke-color: var(--wp--preset--color--gold, #FFBB00); }
.mb-schritt__titel { display: block; margin: .7rem 0 .3rem; font-size: 1.05rem; line-height: 1.3; }
.mb-schritt__text { display: block; font-size: .95rem; line-height: 1.65; opacity: .78; }

/* --- Fragen ------------------------------------------------------------- */

.mb-fragen { max-width: 860px; margin-inline: auto; }
.mb-fragen details {
  border: 1px solid var(--wp--preset--color--linie, #E4E8E6);
  border-radius: 10px;
  background: #fff;
}
.mb-fragen details + details { margin-top: .75rem; }
.mb-fragen summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.mb-fragen summary::-webkit-details-marker { display: none; }
.mb-fragen summary::after { content: "+"; flex: 0 0 auto; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--wp--preset--color--gruen, #2C4641); }
.mb-fragen details[open] summary::after { content: "\2013"; }
.mb-frage__antwort { padding: 0 1.25rem 1.25rem; }
.mb-frage__antwort p { margin: 0 0 .8rem; font-size: .96rem; line-height: 1.7; }
.mb-frage__antwort p:last-child { margin-bottom: 0; }

/* --- WhatsApp ----------------------------------------------------------- */

.mb-wa-reihe {
  display: grid;
  gap: clamp(1rem, .8rem + 1vw, 1.75rem);
  grid-template-columns: repeat(var(--mb-wa-spalten, 3), minmax(0, 1fr));
}
@media (max-width: 1000px) { .mb-wa-reihe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .mb-wa-reihe { grid-template-columns: minmax(0, 1fr); } }

/* --- CTA ---------------------------------------------------------------- */

.mb-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.25rem, 1rem + 1vw, 2rem);
  padding: clamp(1.6rem, 1rem + 2.4vw, 2.75rem);
  border-radius: 16px;
  background: linear-gradient(105deg, var(--wp--preset--color--gruen, #2C4641) 0%, var(--wp--preset--color--gruen-dunkel, #1B2B28) 100%);
  color: rgba(255,255,255,.86);
}
.mb-cta__text { flex: 1 1 320px; min-width: 0; }
.mb-cta__titel { margin: 0 0 .35rem; color: #fff; }
.mb-cta__lead { margin: 0; }
.mb-cta .mb-knopfreihe { margin: 0; }

/* --- Team --------------------------------------------------------------- */

.mb-team {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 2rem);
  grid-template-columns: repeat(var(--mb-team-spalten, 3), minmax(0, 1fr));
}
@media (max-width: 900px) { .mb-team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mb-team { grid-template-columns: minmax(0, 1fr); } }
.mb-person { min-width: 0; margin: 0; }
.mb-person__bild { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; }
.mb-person__text { display: flex; flex-direction: column; gap: .18rem; padding-top: .85rem; }
.mb-person__name { font-size: 1.05rem; line-height: 1.3; }
.mb-person__rolle { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--gruen, #2C4641); }
.mb-person__beschreibung { font-size: .9rem; line-height: 1.6; opacity: .78; }
.mb-grund-dunkel .mb-person__rolle, .mb-grund-gruen .mb-person__rolle { color: var(--wp--preset--color--gold, #FFBB00); }

/* --- Einzelbild --------------------------------------------------------- */

.mb-einzelbild { margin: 0; }
.mb-einzelbild img { width: 100%; height: auto; display: block; }
.mb-einzelbild--rund img { border-radius: 12px; }
.mb-einzelbild figcaption { margin-top: .6rem; font-size: .85rem; opacity: .7; }
