/* m31_vernetzt
   Layout: Breakout-Grid direkt auf der Section (Desktop) — das Bild ist ein
   regulaeres Grid-Item, dessen Spalte bis zur Viewport-Kante laeuft
   ([img-start] / [full-end]). Kein position:absolute, keine vw-Hacks.
   Mobile-first: einspaltiger Flow, Grid ab 1200px. */
.m31_vernetzt {
    position: relative;
    /* padding-bottom klein — die Cream-Box endet damit naeher am Bild,
       und der weisse Gap zur naechsten Section (m32) bleibt kompakt. */
    padding: clamp(60px, 6vw, 100px) 0 clamp(30px, 3vw, 50px);
    /* Spaltenraster (nur ≥1200 als display:grid aktiv):
       Seitenspuren = flexible Gutter (min. Container-Padding, zentrieren den
       Inhalt), Mitte = Text / Gap / Bild im 1.1:0.9-Verhaeltnis des Contents. */
    --m31-gap: clamp(40px, 5vw, 96px);
    --m31-content: calc(var(--hs-container-max) - 2 * var(--hs-container-px) - var(--m31-gap));
    grid-template-columns:
        [full-start] minmax(var(--hs-container-px), 1fr)
        [content-start] minmax(0, calc(var(--m31-content) * 0.55))
        var(--m31-gap)
        [img-start] minmax(0, calc(var(--m31-content) * 0.45))
        [content-end] minmax(var(--hs-container-px), 1fr)
        [full-end];
}

/* === Cream-BG Block links (dekorative Hintergrund-Ebene) — oben ueber das
   Bild hinaus (top: 0), unten ENDET BEVOR das Bild zu Ende ist, damit das
   Bild aus dem cream-Rahmen nach unten visuell herausragt. === */
.m31_bg {
    position: absolute;
    left: 0;
    top: 0;
    bottom: clamp(60px, 6vw, 110px);
    width: 100%;
    background: #F2EEE5;
    z-index: 0;
}

.m31_inner {
    position: relative;
    z-index: 1;
}

/* Mobile: Text und Bild einspaltig untereinander (Desktop: display:contents) */
.m31_grid {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* === Text-Spalte === */
.m31_text_col {
    padding: clamp(30px, 6vw, 110px) 0;
}
.m31_headline {
    margin: 0 0 36px;
    color: var(--hs-dark);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: 0.03em;
}
.m31_headline em {
    font-style: italic;
    font-family: var(--hs-font-display);
    font-weight: 600;
}
.m31_text {
    max-width: 553px;
    margin-bottom: 60px;
    color: var(--hs-text);
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.03em;
}
.m31_text p { margin: 0 0 14px; }
.m31_text p:last-child { margin-bottom: 0; }

/* === ProvenExpert-Kreise === */
.m31_items {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 36px clamp(40px, 5vw, 60px);
    align-items: center;
}
/* Schmaler Desktop: 2 Spalten passen nicht mehr in die Text-Spalte
   (max-content schrumpft nicht) — untereinander stapeln statt unters Bild laufen */
@media (min-width: 1200px) and (max-width: 1449.98px) {
    .m31_items { grid-template-columns: max-content; }
}
.m31_item {
    display: flex;
    align-items: center;
    gap: 20px;
}
.m31_item_circle {
    position: relative;
    width: 120px;
    height: 120px;
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Statische Kreise (ohne Animation) bekommen Border via Klasse */
.m31_item_circle:not(.is-animated) {
    border-radius: 50%;
    border: 4px solid var(--hs-gold);
}
.m31_item_value {
    position: relative;
    z-index: 1;
    font-family: var(--hs-font-display);
    font-weight: 600;
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0.03em;
    color: var(--hs-text);
}
.m31_item_circle img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

/* === Animierte Kreise === */
.m31_circle_svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    /* Start oben (12 Uhr), Drehung im Uhrzeigersinn */
    transform: rotate(-90deg);
}
.m31_circle_track {
    fill: none;
    stroke: #fff;
    stroke-width: 4;
}
.m31_circle_fill {
    fill: none;
    stroke: var(--hs-gold);
    stroke-width: 4;
    stroke-linecap: butt;
    /* Umfang = 2 * PI * r = 2 * PI * 56 ~= 351.86 */
    stroke-dasharray: 351.86;
    stroke-dashoffset: 351.86; /* initial komplett unsichtbar */
    transition: stroke-dashoffset 1.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.m31_item_body {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.m31_item_title {
    font-family: var(--hs-font-body);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    color: var(--hs-text);
    letter-spacing: 0.03em;
}
.m31_item_subtext {
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--hs-text);
    letter-spacing: 0.03em;
}

/* === Bild: mobile im normalen Flow, per negativem Margin auf die volle
   Container-Breite gezogen (kein vw noetig — das Padding ist bekannt). === */
.m31_image {
    position: relative; /* Bezug fuer die CTA-Overlay-Box */
    margin-left: calc(-1 * var(--hs-container-px));
    margin-right: calc(-1 * var(--hs-container-px));
    height: clamp(280px, 55vw, 480px);
    overflow: hidden;
}
.m31_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === CTA-Link-Box: ganz links-unten IM Bild (nicht im Column), folgt also dem
   Image-Bleed nach unten. Hover-Effekt: Strich waechst + wird gold. === */
.m31_cta_box {
    position: absolute;
    left: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 22px;
    background: #fff;
    padding: 30px clamp(20px, 5vw, 50px);
    width: clamp(240px, 30vw, 399px);
    max-width: 100%;
    min-height: 100px;
    white-space: nowrap;
    text-decoration: none;
    z-index: 3;
    transition: box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.m31_cta_box:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.m31_cta_mark {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 2px;
    flex: 0 0 50px;
    background: transparent;
}
.m31_cta_mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hs-text);
    transform-origin: left center;
    transform: scaleX(0.6);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
}
.m31_cta_box:hover .m31_cta_mark::before {
    transform: scaleX(1);
    background: var(--hs-gold);
}
.m31_cta_label {
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    color: var(--hs-text);
    line-height: 1;
    transition: color 0.35s ease;
}
.m31_cta_box:hover .m31_cta_label { color: var(--hs-gold); }

/* === Mobile: CTA-Overlay an das Container-Padding angleichen === */
@media (max-width: 1199.98px) {
    .m31_cta_box {
        left: var(--hs-container-px);
        bottom: 0;
        width: calc(100% - var(--hs-container-px));
    }
}

/* === Desktop: Breakout-Grid aktivieren ===
   .m31_inner/.m31_grid/.m31_image_col werden per display:contents transparent,
   damit Text-Spalte und Bild direkt im Section-Grid liegen. */
@media (min-width: 1200px) {
    .m31_vernetzt { display: grid; }
    .m31_inner,
    .m31_grid,
    .m31_image_col { display: contents; }

    .m31_text_col {
        grid-column: content-start;
        grid-row: 1;
        position: relative;
        z-index: 1;
    }
    .m31_image {
        grid-column: img-start / full-end;
        grid-row: 1;
        margin: 0;
        height: auto; /* streckt sich auf Zeilenhoehe (= Hoehe der Text-Spalte) */
        z-index: 1;
    }
    .m31_bg { width: 62%; }
}
@media (max-width: 700px) {
    .m31_items { grid-template-columns: 1fr; }
    .m31_item { min-width: 0; }
    .m31_item_body { min-width: 0; overflow: hidden; }
    .m31_item_title, .m31_item_subtext { word-break: break-word; overflow-wrap: break-word; }
}
