/* KMG BAU – LEISTUNGEN DESIGN V2 */

/* Seitenkopf */
.pagehead {
    padding: 65px 0 55px;
    background: #f0f5fb;
}

.pagehead h1 {
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin-bottom: 16px;
}

.pagehead .lead {
    font-size: 16px;
    line-height: 1.7;
    max-width: 680px;
    color: #526276;
}

/* Leistungsbereich */
.service {
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding: 38px 0;
    border-bottom: 1px solid #e0e8f0;
}

.service > img {
    width: 100%;
    height: 290px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.service > div {
    min-width: 0;
}

.service .eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    color: #087af2;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.service h2 {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -.6px;
    margin: 0 0 16px;
}

.service p {
    font-size: 16px;
    line-height: 1.75;
    color: #526276;
    max-width: 530px;
    margin-bottom: 22px;
}

.service .textlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
    background: #087af2;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0;
    transition: background .2s ease;
}

.service .textlink:hover {
    background: #075fc0;
    color: #fff;
}

/* Desktop: abwechslungsreiche Bildanordnung */
@media (min-width: 801px) {
    .service:nth-of-type(even) > img {
        order: 2;
    }

    .service:nth-of-type(even) > div {
        order: 1;
    }
}

/* Tablet */
@media (max-width: 800px) {
    .service {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        gap: 25px;
    }

    .service > img {
        height: 240px;
    }
}

/* Smartphone */
@media (max-width: 600px) {
    .pagehead {
        padding: 42px 0 36px;
    }

    .pagehead h1 {
        font-size: 31px;
        letter-spacing: -.7px;
    }

    .pagehead .lead {
        font-size: 14px;
    }

    .service {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
        padding: 28px 0 34px;
    }

    .service > img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        order: 0;
    }

    .service > div {
        order: 1;
    }

    .service h2 {
        font-size: 27px;
        margin-bottom: 12px;
    }

    .service p {
        font-size: 15px;
        line-height: 1.7;
    }

    .service .textlink {
        width: 100%;
        box-sizing: border-box;
        min-height: 48px;
    }
}
/* KMG – EINHEITLICHE LEISTUNGSBILDER */
.service > img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 0 !important;
}

@media (max-width: 600px) {
    .service > img {
        width: 100% !important;
        aspect-ratio: 4 / 3 !important;
    }
}
/* KMG LEISTUNGEN – EXAKTE BILD- UND FELDGRÖSSEN */

@media (min-width: 801px) {
    .service {
        display: grid !important;
        grid-template-columns: 440px minmax(0, 1fr) !important;
        gap: 48px !important;
        min-height: 340px !important;
        box-sizing: border-box !important;
        align-items: center !important;
        padding: 20px 0 !important;
    }

    .service > img {
        width: 440px !important;
        height: 300px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
        object-position: center !important;
        max-width: 100% !important;
    }

    .service:nth-of-type(even) {
        grid-template-columns: minmax(0, 1fr) 440px !important;
    }
}

@media (min-width: 601px) and (max-width: 800px) {
    .service {
        display: grid !important;
        grid-template-columns: 42% minmax(0, 1fr) !important;
        gap: 24px !important;
        min-height: 290px !important;
        align-items: center !important;
    }

    .service > img {
        width: 100% !important;
        height: 240px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }
}

@media (max-width: 600px) {
    .service {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 20px !important;
        padding: 28px 0 !important;
    }

    .service > img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        object-fit: cover !important;
        flex-shrink: 0 !important;
    }

    .service > div {
        width: 100% !important;
    }
}
/* KMG LEISTUNGEN – 2 X 2 GRID */

@media (min-width: 701px) {
    .service {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        min-height: 0 !important;
        height: 100% !important;
        padding: 0 !important;
        border: 1px solid #e1e8f0 !important;
        background: #fff !important;
        box-sizing: border-box !important;
    }

    .service > img {
        order: 0 !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        object-fit: cover !important;
        display: block !important;
        max-width: none !important;
    }

    .service > div {
        order: 1 !important;
        padding: 26px !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    .service .textlink {
        align-self: flex-start !important;
        margin-top: auto !important;
    }

    .service:nth-of-type(even) > img,
    .service:nth-of-type(even) > div {
        order: unset !important;
    }
}

@media (max-width: 700px) {
    .service {
        min-height: 0 !important;
        height: auto !important;
    }
}
/* LEISTUNGSKARTEN RASTER */
@media (min-width: 701px) {
    .services-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 28px !important;
        align-items: stretch !important;
    }
}

@media (max-width: 700px) {
    .services-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}
/* KMG LEISTUNGEN – KOMPAKTES 2x2 LAYOUT */

@media (min-width: 701px) {
    .services-grid {
        width: calc(100% - 32px) !important;
        max-width: 900px !important;
        margin: 0 auto !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px !important;
    }

    .services-grid .service {
        height: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .services-grid .service > img {
        width: 100% !important;
        height: 190px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }

    .services-grid .service > div {
        padding: 18px 20px !important;
    }

    .services-grid .service h2 {
        font-size: 23px !important;
        margin-bottom: 9px !important;
    }

    .services-grid .service p {
        font-size: 14px !important;
        line-height: 1.55 !important;
        margin-bottom: 15px !important;
    }

    .services-grid .service .textlink {
        min-height: 38px !important;
        padding: 9px 15px !important;
        font-size: 13px !important;
    }
}

/* Smartphone: eine kompakte Spalte */
@media (max-width: 700px) {
    .services-grid {
        max-width: 440px !important;
        margin: 0 auto !important;
        gap: 18px !important;
    }

    .services-grid .service > img {
        height: 190px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }

    .services-grid .service > div {
        padding: 18px !important;
    }
}
/* KMG LEISTUNGEN – BILDER WIE UNSERE ARBEITEN */

@media (min-width: 901px) {
    .services-grid .service > img {
        width: 100% !important;
        height: 245px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .services-grid .service > img {
        width: 100% !important;
        height: 220px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }
}

@media (min-width: 401px) and (max-width: 700px) {
    .services-grid .service > img {
        width: 100% !important;
        height: 170px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }
}

@media (max-width: 400px) {
    .services-grid .service > img {
        width: 100% !important;
        height: 140px !important;
        aspect-ratio: auto !important;
        object-fit: cover !important;
    }
}