/* Kontaktseite (Layout 2 + Subnav): Formular + Ansprechpartner-Band */

body.ahf-kontakt-page .ce_article.ahf-kontakt-seite {
  margin-bottom: 0;
}

body.ahf-kontakt-page #kontakt-ansprechpartner-band.mod_article,
body.ahf-kontakt-page .ce_article#kontakt-ansprechpartner-band {
  clear: both;
  float: none;
  overflow: visible;
  box-sizing: border-box;
}

body.ahf-kontakt-page #container:has(#kontakt-ansprechpartner-band),
body.ahf-kontakt-page #main:has(#kontakt-ansprechpartner-band),
body.ahf-kontakt-page #main .inside:has(#kontakt-ansprechpartner-band),
body.ahf-kontakt-page #main [class*="ce_"]:has(#kontakt-ansprechpartner-band),
body.ahf-kontakt-page #main [class*="ce_"]:has(#kontakt-ansprechpartner-band) > .inner {
  overflow: visible;
}

/*
 * Band sitzt in col-md-9 (Main): auf volle Container-Zeile (Subnav + Main) spreizen,
 * Grau Full-Bleed; Inhalt zentriert wie Header/Breadcrumb (max 1200px).
 */
@media (min-width: 992px) {
  body.ahf-kontakt-page #kontakt-ansprechpartner-band {
    /* 9er-Spalte → 12er-Zeile (Sidebar = 3/9 der Main-Breite) */
    width: calc(100% * 12 / 9);
    max-width: none;
    margin-left: calc(-100% * 3 / 9);
    margin-right: 0;
  }
}

body.ahf-kontakt-page #kontakt-ansprechpartner-band .ahf-contact-band {
  width: 100%;
  max-width: none;
  margin: 2rem 0 0;
  margin-left: 0;
  margin-right: 0;
  padding: var(--ahf-band-pad, 2.25rem) 0 2.5rem;
  box-sizing: border-box;
  background-color: #eceff1;
  box-shadow: 0 0 0 100vmax #eceff1;
  clip-path: inset(0 -100vmax);
}

body.ahf-kontakt-page #kontakt-ansprechpartner-band .ahf-contact-band__inner {
  width: 100%;
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

body.ahf-kontakt-page #kontakt-ansprechpartner-band .ahf-contact-band__grid {
  width: 100%;
}

@media (max-width: 991px) {
  body.ahf-kontakt-page #kontakt-ansprechpartner-band {
    width: 100%;
    margin-left: 0;
  }

  body.ahf-kontakt-page #kontakt-ansprechpartner-band .ahf-contact-band {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

/* Projektanfrage-Block wie GBF-Detail (#anfrage) — Kontakt + Anfahrt */
body.ahf-kontakt-page div#kontakt.gbf-projekt-anfrage-live,
body.ahf-kontakt-page .ahf-kontakt-anfahrt.gbf-projekt-anfrage-live {
  margin: 0 0 1.35rem;
  padding: 1.35rem 1.45rem 1.5rem;
  background: #f7fafb;
  border: 2px solid #1b978d;
  border-radius: 8px;
  box-sizing: border-box;
  clear: both;
}

body.ahf-kontakt-page div#kontakt.gbf-projekt-anfrage-live {
  margin-bottom: 2.5rem;
}

body.ahf-kontakt-page #kontakt.gbf-projekt-anfrage-live .gbf-projekt-anfrage__form-col > .ce_form {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  background: #fff;
  border: 2px dotted #b8c4ca;
  border-radius: 8px;
  padding: 0.85rem 1rem 1rem;
  box-shadow: none;
  box-sizing: border-box;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.ahf-kontakt-page #kontakt.gbf-projekt-anfrage-live .gbf-projekt-anfrage__form-col > .ce_form form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt.gbf-projekt-anfrage-live .gbf-projekt-anfrage__title {
  margin-bottom: 1rem;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__address,
body.ahf-kontakt-page .ahf-kontakt-anfahrt__map {
  box-sizing: border-box;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__company {
  margin: 0 0 0.45rem;
  font-weight: 700;
  color: #2a2a2a;
  font-size: 1.009rem;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__addr {
  margin: 0 0 0.85rem;
  line-height: 1.45;
  color: #404040;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__route {
  margin: 0;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__route a {
  font-weight: 600;
  color: #1b978d;
  text-decoration: none;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__route a:hover {
  text-decoration: underline;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__route i {
  margin-right: 0.35rem;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.ahf-kontakt-page .ahf-kontakt-anfahrt__map img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}

@media (max-width: 767px) {
  body.ahf-kontakt-page .ahf-kontakt-anfahrt__grid {
    grid-template-columns: 1fr;
  }
}
