/* Autohaus Buchmann | custom.css | © Werbeagentur Schulz-Design */

/* 01 | Lokale Schriften */
@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-100.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-200.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-300.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-800.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/roboto-condensed-v31-latin-900.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-100.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-200.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-300.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-800.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/barlow-condensed-v13-latin-900.woff2") format("woff2");
}

@font-face {
  font-family: "Kaushan Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/kaushan-script-v19-latin-regular.woff2") format("woff2");
}

/* 02 | Zentrale Farben und Masse */
:root {
  --bm-logo-blue: #2fa4f7;
  --bm-logo-blue-light: #59bafb;
  --bm-logo-gray: #8d8e8c;
  --bm-primary: #0064f5;
  --bm-primary-hover: #004fc4;
  --bm-cyan: #00b7ee;
  --bm-navy: #001b2e;
  --bm-navy-deep: #00121f;
  --bm-text: #092238;
  --bm-muted: #4c6172;
  --bm-white: #ffffff;
  --bm-page-gradient: linear-gradient(to right, #ffffff 0%, #dff0fc 100%);
  --bm-surface: #f2f7fb;
  --bm-border: #d4dee7;
  --bm-font-body: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  --bm-font-heading: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --bm-font-script: "Kaushan Script", cursive;
  --bm-radius: 6px;
  --bm-content-width: 1280px;
  --bm-gutter: clamp(20px, 4vw, 48px);
  --bm-section-space: clamp(40px, 6vw, 80px);

  /* Bootstrap-Variablen fuer Joomla/Helix; direkte Regeln folgen unten. */
  --bs-body-font-family: var(--bm-font-body);
  --bs-body-color: var(--bm-text);
  --bs-body-bg: var(--bm-white);
  --bs-primary: var(--bm-primary);
  --bs-primary-rgb: 0, 100, 245;
  --bs-link-color: var(--bm-primary);
  --bs-link-hover-color: var(--bm-primary-hover);
}

/* 03 | Helix: den standardmaessigen oberen 100-px-Abstand entfernen.
   Headerhoehe und Sticky-Header-Platzhalter werden nicht angefasst. */
body #sp-main-body {
  padding-top: 0 !important;
}

/* 04 | Grundtypografie */
body {
  font-family: var(--bm-font-body) !important;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bm-text);
  background: var(--bm-page-gradient) !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Helix-Layout transparent halten, damit der Grundverlauf sichtbar ist. */
.body-wrapper,
.body-wrapper .body-innerwrapper {
  background: transparent !important;
}

/* Keine pauschale *-Fontregel: Icon-Schriften bleiben funktionsfaehig. */
#sp-main-body :where(p, li, dt, dd, label, input, textarea, select),
.bm-copy,
.bm-copy :where(p, li) {
  font-family: var(--bm-font-body) !important;
}

body :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--bm-font-heading) !important;
  font-style: normal;
  font-weight: 800 !important;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--bm-text);
  margin-block: 0 0.45em;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); }
h2 { font-size: clamp(2rem, 3.7vw, 3.25rem); }
h3 { font-size: clamp(1.55rem, 2.5vw, 2.15rem); }
h4 { font-size: 1.45rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

.bm-uppercase,
.bm-uppercase :is(h1, h2, h3, h4, h5, h6) {
  text-transform: uppercase !important;
}

.bm-copy { font-size: 1.125rem; line-height: 1.5; }
.bm-copy p { margin-block: 0 1em; }
.bm-copy p:last-child { margin-bottom: 0; }

a { color: var(--bm-primary); }
a:hover { color: var(--bm-primary-hover); }

/* Gut sichtbarer Tastaturfokus auf hellen und dunklen Flaechen. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--bm-primary) !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 2px var(--bm-white) !important;
}

/* 05 | Helix-Header und Navigation: Hoehen in Helix einstellen */
#sp-header,
#sp-header.header-sticky {
  background-color: var(--bm-white) !important;
  box-shadow: 0 2px 16px rgb(0 27 46 / 8%);
}

#sp-header .logo img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

#sp-header .sp-megamenu-parent > li > :is(a, span) {
  font-family: var(--bm-font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--bm-text) !important;
}

#sp-header .sp-megamenu-parent > li:hover > :is(a, span),
#sp-header .sp-megamenu-parent > li.active > :is(a, span),
#sp-header .sp-megamenu-parent > li.current-item > :is(a, span) {
  color: var(--bm-primary) !important;
}

#sp-header .sp-megamenu-parent > li > a:focus-visible {
  color: var(--bm-primary) !important;
}

.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner {
  background-color: var(--bm-white);
  border-top: 3px solid var(--bm-primary);
  border-radius: 0 0 var(--bm-radius) var(--bm-radius);
  box-shadow: 0 12px 32px rgb(0 27 46 / 14%);
}

.sp-megamenu-parent .sp-dropdown li.sp-menu-item > :is(a, span) {
  font-family: var(--bm-font-body) !important;
  color: var(--bm-text);
}

.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a:hover,
.sp-megamenu-parent .sp-dropdown li.sp-menu-item.active > a {
  color: var(--bm-primary) !important;
}

#offcanvas-toggler { color: var(--bm-text); }
#offcanvas-toggler > i { color: var(--bm-text) !important; }
.offcanvas-menu { background-color: var(--bm-white); }

.offcanvas-menu .offcanvas-inner ul.menu li a {
  font-family: var(--bm-font-body) !important;
  color: var(--bm-text);
}

.offcanvas-menu .offcanvas-inner ul.menu li.active > a,
.offcanvas-menu .offcanvas-inner ul.menu li a:hover {
  color: var(--bm-primary) !important;
}

/* 06 | Quix-Hilfsklassen fuer Sektionen */
.bm-section {
  padding-block: var(--bm-section-space);
}

.bm-container {
  width: 100%;
  max-width: var(--bm-content-width);
  margin-inline: auto;
  padding-inline: var(--bm-gutter);
  box-sizing: border-box;
}

.bm-light {
  background-color: var(--bm-surface) !important;
  color: var(--bm-text);
}

.bm-dark,
.bm-hero {
  --bm-accent-text: var(--bm-cyan);
  background-color: var(--bm-navy);
  color: var(--bm-white) !important;
}

.bm-dark :is(h1, h2, h3, h4, h5, h6, p, li),
.bm-hero :is(h1, h2, h3, h4, h5, h6, p, li) {
  color: var(--bm-white);
}

.bm-dark a:not(.btn):not(.bm-button),
.bm-hero a:not(.btn):not(.bm-button) {
  color: var(--bm-cyan);
}

/* Hero-Bild und dunkles Overlay in Quix setzen; kein Pseudoelement,
   das die Bedienelemente des Builders oder dessen Overlays verdeckt. */
.bm-hero {
  padding-block: clamp(56px, 8vw, 120px);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.bm-hero-title,
.bm-hero-title :is(h1, h2) {
  font-family: var(--bm-font-heading) !important;
  font-size: clamp(2.6rem, 5.6vw, 5rem) !important;
  font-weight: 800 !important;
  line-height: 1.02 !important;
  text-transform: uppercase !important;
}

/* Auf Weiss kraeftiges Blau, auf dunklen Sektionen Cyan. */
.bm-accent,
.bm-accent :is(h1, h2, h3, h4, p) {
  color: var(--bm-accent-text, var(--bm-primary)) !important;
}

.bm-eyebrow,
.bm-eyebrow :is(p, h2, h3, h4) {
  font-family: var(--bm-font-body) !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.065em !important;
  text-transform: uppercase !important;
  margin-bottom: 0.4rem;
}

.bm-script,
.bm-script :is(p, h1, h2, h3, h4, span) {
  font-family: var(--bm-font-script) !important;
  font-size: clamp(1.8rem, 3.5vw, 3.25rem) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* 07 | Buttons
   Joomla: .btn-primary
   Quix: bm-button am Button-Element; Wrapper und direkter Link gehen.
   Outline: zusaetzlich bm-button-outline am selben Element. */
.btn.btn-primary,
.bm-button:is(a, button, input[type="submit"]),
.bm-button :is(a, button, input[type="submit"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 46px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1.4rem !important;
  border: 2px solid var(--bm-primary) !important;
  border-radius: var(--bm-radius) !important;
  background: var(--bm-primary) !important;
  color: var(--bm-white) !important;
  font-family: var(--bm-font-heading) !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: normal;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.btn.btn-primary:hover,
.bm-button:is(a, button, input[type="submit"]):hover,
.bm-button :is(a, button, input[type="submit"]):hover {
  background: var(--bm-primary-hover) !important;
  border-color: var(--bm-primary-hover) !important;
  color: var(--bm-white) !important;
}

.bm-button.bm-button-outline:is(a, button),
.bm-button.bm-button-outline :is(a, button) {
  background: transparent !important;
  border-color: var(--bm-primary) !important;
  color: var(--bm-primary) !important;
}

:where(.bm-dark, .bm-hero, #sp-bottom, #sp-footer) .bm-button.bm-button-outline:is(a, button),
:where(.bm-dark, .bm-hero, #sp-bottom, #sp-footer) .bm-button.bm-button-outline :is(a, button) {
  background: rgb(0 18 31 / 45%) !important;
  border-color: var(--bm-cyan) !important;
  color: var(--bm-white) !important;
}

.bm-button.bm-button-outline:is(a, button):hover,
.bm-button.bm-button-outline :is(a, button):hover {
  background: var(--bm-primary) !important;
  border-color: var(--bm-primary) !important;
  color: var(--bm-white) !important;
}

/* Quix-Buttonbeschriftung erbt Typografie, Icon-Spans nicht ueberschreiben.
   Eventuelle eigene Font-/Farbangaben am Quix-Button zuruecksetzen. */
.bm-button svg {
  flex-shrink: 0;
}

/* 08 | Optionale Servicekarten mit Quix-Hintergrundbild und Overlay */
.bm-service-card {
  padding: 24px;
  border-radius: var(--bm-radius);
  overflow: hidden;
  background-color: var(--bm-navy);
  background-position: center;
  background-size: cover;
  color: var(--bm-white);
}

.bm-service-card :is(h2, h3, h4) {
  color: var(--bm-white);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  text-transform: uppercase;
}

.bm-service-card p { color: var(--bm-white); }
.bm-service-card a { color: var(--bm-white); }
.bm-service-card a:hover { color: var(--bm-cyan); }

/* 09 | Helix-Footer */
#sp-bottom,
#sp-footer {
  background-color: var(--bm-navy) !important;
  color: var(--bm-white) !important;
}

#sp-bottom :is(h2, h3, h4, .sp-module-title),
#sp-footer :is(h2, h3, h4, .sp-module-title) {
  font-family: var(--bm-font-heading) !important;
  font-weight: 700 !important;
  color: var(--bm-cyan) !important;
  text-transform: uppercase;
}

#sp-bottom a,
#sp-footer a {
  color: var(--bm-white);
}

#sp-bottom a:hover,
#sp-footer a:hover {
  color: var(--bm-cyan);
}

#sp-footer .container-inner {
  border-top-color: rgb(89 186 251 / 22%);
}

/* 10 | Mobil und reduzierte Bewegung */
@media (max-width: 767.98px) {
  body {
    font-size: 17px;
  }

  .bm-copy {
    font-size: 1.0625rem;
  }

  .bm-service-card {
    padding: 20px;
  }

  .bm-hero {
    padding-block: 48px;
    /* Fuer das konkrete Hero-Motiv den Ausschnitt in Quix einstellen. */
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.btn-primary,
  .bm-button,
  .bm-button :is(a, button, input[type="submit"]) {
    transition: none !important;
  }
}

/* 11 | Kompakte Vorteile-Blurb: CSS-Klasse bm-benefit am Blurb setzen.
   Bildbreite in Quix in px einstellen, z. B. 48 px.
   Den Abstand zum Text ueber Quix > Bild & Symbol > Abstand steuern. */
.bm-benefit .qx-element-blurb_wrapper.position-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  column-gap: 0;
}

.bm-benefit .position-left > .qx-element-blurb__media {
  flex: 0 0 auto;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
}

/* Die SVG-Groesse folgt der in Quix eingestellten Medienbreite. */
.bm-benefit .qx-element-blurb__media svg {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

.bm-benefit .position-left > .qx-element-blurb__content {
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
}

/* Der derzeit leere Titel soll keinen zusaetzlichen Abstand erzeugen. */
.bm-benefit .qx-element-blurb__title {
  margin-bottom: 0 !important;
}

.bm-benefit .qx-element-blurb__body p {
  margin: 0;
}

/* 12 | Leistungen: Klasse row-leistungen an der Quix-Reihe */
.row-leistungen {
  --bm-leistungen-button-space: 56px;
}

/* Unterstuetzt die Klasse am Reihen-Wrapper oder an der inneren Reihe. */
:is(.row-leistungen.qx-row, .row-leistungen > .qx-row) {
  align-items: stretch !important;
}

:is(.row-leistungen.qx-row, .row-leistungen > .qx-row) > .qx-column {
  display: flex !important;
  align-self: stretch !important;
}

:is(.row-leistungen.qx-row, .row-leistungen > .qx-row) > .qx-column > .qx-col-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  min-width: 0;
}

.row-leistungen .qx-col-wrap > .qx-elements-wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

/* Inhalt und Pfeilbutton liegen im selben Rasterfeld. */
.row-leistungen .qx-elements-wrap > .qx-element-wrap:has(> .qx-element-person-v2) {
  grid-area: 1 / 1;
  display: flex;
  min-width: 0;
}

.row-leistungen .qx-element-person-v2 {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.row-leistungen .qx-element-person__wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
}

/* Die grossen Leistungsicons bleiben an ihrer normalen Position. */
.row-leistungen .qx-element-person__image {
  position: static !important;
  top: auto !important;
  flex: 0 0 auto !important;
}

/* Titel beginnen oben auf gleicher Hoehe; Beschreibungen enden unten. */
.row-leistungen .qx-element-person__profile {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  width: 100%;
  min-width: 0;
  margin-top: 0 !important;
  padding-right: 0 !important;
}

.row-leistungen .qx-element-person__name {
  flex: 0 0 auto;
}

/* Zwei Titelzeilen reservieren; die Schriftgroesse bleibt in Quix regelbar. */
.row-leistungen .qx-element-person__name > :is(h1, h2, h3, h4, h5, h6) {
  min-height: 2lh;
}

/* Rechts Platz fuer den Pfeilbutton reservieren. */
.row-leistungen .qx-element-person__position {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 44px;
  margin-top: auto !important;
  padding-right: var(--bm-leistungen-button-space) !important;
}

/* Button direkt an der Unterkante des Beschreibungstextes ausrichten. */
.row-leistungen .qx-elements-wrap > .qx-element-wrap:has(> .qx-element-button-v2) {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 1;
}

.row-leistungen .qx-element-button-v2 {
  display: flex !important;
  justify-content: flex-end !important;
  width: auto !important;
  max-width: 100%;
}