/* Leistungsseiten nach dem Original.
 * Layout 42: Einleitung; Layout 43: Leistungsliste mit Personenbild.
 * Die bestehende Zimmerei-Seite verwendet diese Gestaltung auch ohne
 * Umstellung ihrer ersten beiden Zeilen. Inhalte bleiben im Backend editierbar.
 */
body:has(.bosselmann-service-page) {
    background: #f4f4f4;
}

.bosselmann-service-subheader {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 145px;
    padding-block: 40px;
    background: url("../Images/wood-bg.jpg") center / cover no-repeat;
}

.bosselmann-breadcrumb ol {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 8px 15px;
    list-style: none;
    color: #eeeeee;
    background: rgba(25, 24, 20, 0.88);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
}

.bosselmann-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.bosselmann-breadcrumb li + li::before {
    display: inline-block;
    margin-right: 10px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid #e50000;
    content: "";
}

.bosselmann-service-page {
    padding-top: 0;
    padding-bottom: 0;
    color: #616161;
}

/* Die Hintergründe reichen über die Inhaltsbreite bis zum Fensterrand. */
:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) {
    position: relative;
    isolation: isolate;
    margin-bottom: 0 !important;
    padding-top: 65px;
    padding-bottom: 30px;
    --bs-gutter-y: 0;
}

:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row))::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: #f4f4f4;
    box-shadow: 0 0 0 100vmax #f4f4f4;
    clip-path: inset(0 -100vmax);
    content: "";
}

:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) .frame {
    margin: 0;
    font-size: 15px;
    line-height: 24px;
}

:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) .frame > header > :is(h1, h2):first-child {
    margin: 0;
    color: #cc1018;
    font-size: 26px;
    font-weight: 400;
    line-height: 40px;
}

:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) .frame > header > :is(h1, h2):first-child::after {
    display: block;
    width: 50px;
    height: 3px;
    margin-top: 20px;
    margin-bottom: 30px;
    background: #cccccc;
    content: "";
}

:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) p {
    margin: 0 0 20px;
}

:is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) .frame > header > :is(h2, h3, h4):not(:first-child) {
    margin: 0 0 20px;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    color: #2a1771;
    font-size: 22px;
    font-weight: 400;
    line-height: 35px;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) {
    position: relative;
    isolation: isolate;
    margin-bottom: 0 !important;
    padding-top: 35px;
    padding-bottom: 0;
    --bs-gutter-y: 0;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row))::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: #ffffff;
    box-shadow: 0 0 0 100vmax #ffffff;
    clip-path: inset(0 -100vmax);
    content: "";
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :first-child {
    padding-left: 95px;
    padding-top: 5px;
    padding-bottom: 45px;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) .frame {
    margin-bottom: 0;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :first-child .frame {
    position: relative;
    padding-left: 100px;
}

/* Haus-Symbol als dekorative Grafik, ohne Icon-Font oder externen Abruf. */
:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :first-child .frame::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border: 2px solid #cc1018;
    border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23cc1018' d='M3 23 24 3l21 20h-7v21H27V31h-7v13H10V23Z'/%3E%3C/svg%3E") center / 44px 44px no-repeat;
    content: "";
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) :is(h2, h3, h4) {
    margin: 15px 0 55px;
    color: #424242;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

/* Leere Abstandshalter aus dem HTML-Dump ersetzen wir durch CSS-Abstände. */
:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) p:has(> br:only-child) {
    display: none;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) ul {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 23px;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) ul::before {
    position: absolute;
    top: -28px;
    bottom: -20px;
    left: -60px;
    width: 1px;
    background: #eeeeee;
    content: "";
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) li {
    position: relative;
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) li::before {
    position: absolute;
    top: 8px;
    left: -63px;
    width: 8px;
    height: 8px;
    border: 2px solid #cc1018;
    border-radius: 50%;
    background: #ffffff;
    content: "";
}

:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :last-child img {
    position: relative;
    display: block;
    width: auto;
    max-width: 100%;
    height: 500px;
    margin-top: 0;
    object-fit: contain;
    object-position: bottom;
}

/* Die Überlappung wird am einzelnen Inhaltselement gepflegt. */
:is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :last-child {
    position: relative;
    margin-top: 0;
}

/* Der Bildbereich bleibt im normalen Inhaltsfluss und richtet sich am Inhalt aus. */
.bosselmann-main:has(> .bosselmann-service-subheader:first-child) {
    padding-top: 0;
}

body:has(.bosselmann-service-subheader) {
    overflow-x: clip;
}

.bosselmann-service-subheader-image {
    position: absolute;
    z-index: -1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 1200px) {
    .bosselmann-service-subheader > .container {
        max-width: 1170px;
    }
}

.bosselmann-service-page > .row:nth-child(3 of .row) {
    padding-top: 35px;
}

@media (min-width: 992px) {
    body:has(.bosselmann-service-page) .bosselmann-brand {
        flex-basis: 270px;
    }

    body:has(.bosselmann-service-page) .bosselmann-logo {
        width: 270px;
    }

    body:has(.bosselmann-service-page) .bosselmann-claim {
        margin-left: auto;
        margin-right: auto;
    }

    body:has(.bosselmann-service-page) .bosselmann-offer {
        background: #cc1018;
    }

    body:has(.bosselmann-service-page) .bosselmann-offer strong {
        font-size: 17px;
        line-height: 24px;
    }
}

@media (max-width: 767.98px) {
    .bosselmann-service-subheader {
        min-height: 110px;
        padding-block: 25px;
    }

    :is(.bosselmann-service-intro, .bosselmann-service-page > .row:nth-child(1 of .row)) {
        padding-top: 35px;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :first-child {
        width: 100%;
        padding-left: 12px;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :first-child .frame {
        padding-left: 80px;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :first-child .frame::before {
        width: 60px;
        height: 60px;
        background-size: 34px;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) ul::before {
        left: -50px;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) li::before {
        left: -53px;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :last-child {
        width: 100%;
        margin-top: 0;
    }

    :is(.bosselmann-service-details, .bosselmann-service-page > .row:nth-child(2 of .row)) > :last-child img {
        height: auto;
        max-height: 420px;
        margin: 0 auto;
    }
}


/* Individuelle CE-Überlappung. Die Galerie selbst erhält keinen Negativabstand. */
.bosselmann-overlap {
    display: flow-root;
}

@media (min-width: 768px) {
    .bosselmann-overlap {
        position: relative;
        z-index: 1;
        top: calc(-1 * var(--bosselmann-overlap, 0px));
        margin-bottom: calc(-1 * var(--bosselmann-overlap, 0px));
    }
}
