/* Alle sechs Homepages: sichtbare Wappenränder zentrieren, PNG-Dateien unverändert. */
@media screen {
  body[data-hp] {
    --hp-head-title-size: clamp(1.75rem, 3vw, 3rem);
    --hp-head-crest-slot: 184px;
    --hp-head-crest-height: 176px;
  }
  body[data-hp] .hp-content h1 {
    font-size: var(--hp-head-title-size);
    line-height: 1.2;
  }
  body[data-hp] .hp-content .bh-masthead {
    display: grid;
    grid-template-columns: var(--hp-head-crest-slot) minmax(0, 1fr) var(--hp-head-crest-slot);
    grid-template-rows: minmax(var(--hp-head-crest-height), auto);
    align-items: center;
    gap: 24px;
    min-height: 0;
    margin: 0 0 28px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--hp-radius);
    background: var(--subtle);
  }
  body[data-hp] .hp-content .bh-masthead > .bh-masthead-copy {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    text-align: center;
  }
  body[data-hp] .hp-content .bh-masthead h1 {
    font-size: var(--hp-head-title-size);
    line-height: 1.2;
    margin: 0;
    overflow-wrap: anywhere;
    hyphens: auto;
    text-wrap: balance;
  }
  body[data-hp] .hp-content .bh-masthead :is(.bh-kicker, .wp-kicker) {
    font-size: .75rem;
    line-height: 1.5;
    margin: 0 0 10px;
    text-align: center;
  }
  body[data-hp] .hp-content .bh-masthead .hp-masthead-subtitle {
    max-width: 64ch;
    margin: 12px auto 0;
    font-size: 1.05rem;
    line-height: 1.7;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest,
  body[data-hp] .hp-content .bh-masthead > .bh-crest:last-child {
    /* Dieses Bildfeld gehört zum Grid und wächst mit; keine feste Kopfrahmenhöhe. */
    position: relative;
    display: block;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    flex: none;
    width: var(--hp-head-crest-slot);
    height: var(--hp-head-crest-height);
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest:last-child {
    grid-column: 3;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest img,
  body[data-hp] .hp-content .bh-masthead > .bh-crest:last-child img {
    /* Alpha-Grenzen statt Dateirand: das sichtbare Motiv füllt sein Feld exakt.
       Die Maße stammen aus den unveränderten Quelldateien; nichts wird abgeschnitten. */
    position: absolute;
    display: block;
    box-sizing: content-box;
    flex: none;
    top: calc(50% - var(--hp-head-crest-height) * var(--hp-crest-center-y));
    left: calc(50% - var(--hp-head-crest-height) * var(--hp-crest-center-x));
    right: auto;
    bottom: auto;
    width: calc(var(--hp-head-crest-height) * var(--hp-crest-image-width));
    height: calc(var(--hp-head-crest-height) * var(--hp-crest-image-height));
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    transform: none;
    object-fit: contain;
    object-position: center;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest img[src$="familienwappen_bangert.png"] {
    --hp-crest-image-width: 0.924148606811;
    --hp-crest-image-height: 1.019349845201;
    --hp-crest-center-x: 0.463622291022;
    --hp-crest-center-y: 0.502321981424;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest img[src$="bangert-wappen-freigestellt.png"] {
    --hp-crest-image-width: 0.767032967033;
    --hp-crest-image-height: 1.100366300366;
    --hp-crest-center-x: 0.383150183150;
    --hp-crest-center-y: 0.549816849817;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest img[src$="bangert-zweigwappen-freigestellt.png"] {
    --hp-crest-image-width: 0.912844036697;
    --hp-crest-image-height: 1.006880733945;
    --hp-crest-center-x: 0.460626911315;
    --hp-crest-center-y: 0.506880733945;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest img[src$="waldeck-pyrmont-freigestellt.png"] {
    --hp-crest-image-width: 0.786127167630;
    --hp-crest-image-height: 1.044075144509;
    --hp-crest-center-x: 0.392341040462;
    --hp-crest-center-y: 0.500722543353;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest img[src$="twiste-freigestellt.png"] {
    --hp-crest-image-width: 0.678618857902;
    --hp-crest-image-height: 1.021912350598;
    --hp-crest-center-x: 0.342297476760;
    --hp-crest-center-y: 0.511288180611;
  }
  body[data-hp] .hp-content .bh-masthead .bangert-wappen-info-button {
    margin: 12px auto 0;
    font-size: .94rem;
    line-height: 1.3;
  }
  body[data-hp] .hp-content .hp-start-intro,
  body[data-hp] .hp-content .sw-compact-start > .sw-permanent-notice {
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.7;
  }
  body[data-hp] .hp-content .hp-start-intro > :is(p, h2),
  body[data-hp] .hp-content .sw-compact-start > .sw-permanent-notice > p {
    margin-inline: auto;
    max-width: 76ch;
  }
  body[data-hp] .hp-content .hp-start-intro .bh-intro {
    font-size: 1.05rem;
    line-height: 1.7;
  }
  body[data-hp] .hp-content .hp-start-intro .bh-tagline {
    font-size: 1.1rem;
    line-height: 1.5;
  }
  body[data-hp] .hp-content .hp-start-intro .bh-kicker {
    font-size: .75rem;
    line-height: 1.5;
  }
  body[data-hp] .hp-content .hp-start-intro .bh-actions {
    justify-content: center;
  }
  body[data-hp] .hp-content :is(.vm-hero > div:first-child, .wh-hero-copy) {
    text-align: center;
  }
  body[data-hp] .hp-content .wh-hero h1 {
    font-size: var(--hp-head-title-size);
    line-height: 1.2;
  }
  body[data-hp] .hp-content :is(.vm-hero .vm-actions, .wh-hero-copy .wh-actions) {
    justify-content: center;
  }
  body.hp-embedded-widget[data-hp] .hp-content .bh-masthead {
    display: none;
  }
}
@media screen and (max-width: 1200px) {
  body[data-hp] {
    --hp-head-crest-slot: 136px;
    --hp-head-crest-height: 144px;
  }
  body[data-hp] .hp-content .bh-masthead {
    grid-template-rows: minmax(var(--hp-head-crest-height), auto);
    gap: 18px;
    padding: 22px;
    min-height: 0;
  }
}
@media screen and (max-width: 800px) {
  body[data-hp] {
    --hp-head-crest-slot: 116px;
    --hp-head-crest-height: 128px;
  }
  body[data-hp] .hp-content .bh-masthead {
    grid-template-rows: minmax(var(--hp-head-crest-height), auto);
    gap: 16px;
    padding: 20px;
    min-height: 0;
  }
}
@media screen and (max-width: 640px) {
  body[data-hp] {
    --hp-head-title-size: 1.75rem;
    --hp-head-crest-slot: min(108px, calc((100vw - 120px) / 2));
    --hp-head-crest-height: var(--hp-head-crest-slot);
  }
  body[data-hp] .hp-content .bh-masthead {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(var(--hp-head-crest-height), auto) auto;
    gap: 18px 16px;
    padding: 20px;
    min-height: 0;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-masthead-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  body[data-hp] .hp-content .bh-masthead > .bh-crest:last-child {
    grid-column: 2;
  }
  body[data-hp] .hp-content .bh-masthead h1 {
    overflow-wrap: anywhere;
  }
  body[data-hp] .hp-content .hp-start-intro {
    padding: 20px;
  }
}
