/* ============================================================
   10-basis.css  -  Grundlayout wie Website 2.0 (Enfold "boxed")
   Stand: 2026-11-20
   Quelle der Werte: gerenderte 2.0 (Staging), bm-custom.css, Enfold dynamic CSS.
   - Seite als "Kasten": max. 1310 px bzw. 90 % breit, grauer Rand #ebebeb (2.0: html.html_boxed)
     unter 768 px volle Breite (wie 2.0 auf dem Handy)
   - Inhalt: max. 1160 px + 40 px Rand (2.0: .bm-wrap max-width 1240 / padding 40), ab 900 px abwaerts 22 px
   - Kurznamen der Markenfarben fuer eigenes CSS (--bm-*), Werte kommen aus der Palette (theme.json)
   ============================================================ */
:root {
  --bm-blau: var(--wp--preset--color--accent-1);        /* #296598 Buttons, Links */
  --bm-blau-dunkel: var(--wp--preset--color--accent-2); /* #1d4d76 Hover */
  --bm-gruen: var(--wp--preset--color--accent-3);       /* #2a8b3d "Jetzt anfragen" */
  --bm-gruen-dunkel: var(--wp--preset--color--gruen-dunkel); /* #1f6e2f */
  --bm-gruen-hell: var(--wp--preset--color--gruen-hell);     /* #eef3ee */
  --bm-tinte: var(--wp--preset--color--contrast);       /* #1c2420 Text */
  --bm-grau: var(--wp--preset--color--accent-4);        /* #5e6b64 Nebentext */
  --bm-linie: var(--wp--preset--color--accent-6);       /* #e2e6e2 */
  --bm-papier-2: var(--wp--preset--color--accent-5);    /* #ecefe9 */
  --bm-navblau: var(--wp--preset--color--navblau);      /* #006699 Navigationsleiste + Fusszeile */
  --bm-rot: var(--wp--preset--color--rot);              /* #cc342d */
  --bm-kasten: 1310px;                                  /* Seitenkasten max. */
  /* Schrift wie Shop 1.0 (Bootstrap-Systemschrift): Windows Segoe UI, Mac/iPhone San Francisco, Android Roboto.
     Open Sans liegt weiter in der Font-Bibliothek (Rueckweg: theme.json auf font-family--open-sans) */
  --bm-schrift: var(--wp--preset--font-family--system);
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Seitenkasten (boxed) */
.wp-site-blocks {
  width: 90%;
  max-width: var(--bm-kasten);
  margin-inline: auto;
  background: var(--wp--preset--color--base);
}
@media (max-width: 767px) {
  .wp-site-blocks { width: 100%; }
}

/* Seitenrand Inhalt wie 2.0: 40 px, ab 900 px abwaerts 22 px */
@media (max-width: 900px) {
  body {
    --wp--style--root--padding-left: 22px;
    --wp--style--root--padding-right: 22px;
  }
}

/* Kopf- und Fusszeile ohne Block-Abstand (den Abstand zum Inhalt setzt das Seiten-Template) */
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }

/* Ueberschriften: Systemschrift wie 1.0 (theme.json), keine Grossbuchstaben (2.0 setzt Enfold-Uppercase ausser Kraft) */
:where(h1, h2, h3, h4, h5) { text-wrap: balance; }

/* Nur fuer Vorleseprogramme (z. B. H1 einer Seite ohne sichtbaren Titel) */
.bm-nur-vorlesen {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fokus sichtbar */
:where(a, button, input, .wp-element-button):focus-visible {
  outline: 2px solid var(--bm-blau);
  outline-offset: 2px;
}
/* Kein Rahmen beim Klicken mit Maus oder Finger: WordPress setzt :where(.wp-site-blocks :focus) 2px solid
   in Textfarbe (in der blauen Leiste weiss). Tastatur behaelt den Fokus ueber :focus-visible. */
.wp-site-blocks :focus:not(:focus-visible) { outline: none; }

/* iPhone erkennt Telefonnummern/Adressen ohne Link selbst und faerbt sie blau (auf blauem Grund unsichtbar) */
a[x-apple-data-detectors] {
  color: inherit !important;
  font: inherit !important;
  text-decoration: none !important;
}

/* Standardvorlage templates/page.html (einfache Seiten mit Seitentitel, z. B. "Vertrag widerrufen"; Haupt 23.11.2026):
   Titel so gross wie im Kundenkonto, wenig Leerraum darueber. Seiten mit eigenem Kopfbereich nutzen page-no-title. */
.bm-seite { padding-bottom: 64px; }
.bm-seite .bm-seite-titel { margin: 30px 0 22px; font-size: 36px; font-weight: 600; line-height: 1.15; letter-spacing: .2px; }
.bm-seite .bm-seite-inhalt { margin-top: 0; }
@media (max-width: 781px) {
  .bm-seite { padding-bottom: 44px; }
  .bm-seite .bm-seite-titel { margin: 22px 0 16px; font-size: 28px; }
}
