/* Knueppel Fixed Hero 6.4 – 6.3 Skalierung + wieder aktivierbare Fixed-Funktion */
.knueppel-fixed-hero-41 {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    aspect-ratio: var(--kfh-ratio, 2.222222);
    padding-top: var(--kfh-pt, 80px);
    padding-bottom: var(--kfh-pb, 50px);
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    overflow: hidden;
    background-image: var(--kfh-bg, none);
    background-repeat: no-repeat;
    background-position: calc(var(--kfh-pos-x, 50%) + var(--kfh-offset-x, 0px)) calc(50% + var(--kfh-offset-y, 0px));
}
.wp-site-blocks > main { margin-block-start: 0 !important; }
.knueppel-fixed-hero-41.is-fixed { background-attachment: fixed; }
.knueppel-fixed-hero-41.is-scroll { background-attachment: scroll; }
.knueppel-fixed-hero-41.size-cover { background-size: cover; }
.knueppel-fixed-hero-41.size-viewport-width { background-size: 100% auto; }
.knueppel-fixed-hero-41.size-viewport-height { background-size: auto var(--kfh-zoom-vh, 105vh); }
.knueppel-fixed-hero-41 > .knueppel-fixed-hero__overlay {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: rgb(0 0 0 / var(--kfh-overlay, 0));
}
.knueppel-fixed-hero-41 > .knueppel-fixed-hero__content {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px;
}
.knueppel-fixed-hero-41 .knueppel-hero-text h1 {
    font-size: clamp(36px, 3.1vw, 64px) !important;
}
.knueppel-fixed-hero-41 .knueppel-hero-text h2 {
    font-size: clamp(22px, 1.7vw, 34px) !important;
}

.knueppel-fixed-hero-41 .knueppel-hero-text p {
    font-size: clamp(18px, 1.25vw, 26px) !important;
}
.knueppel-fixed-hero-41 > .kfh5-bg { display: none !important; }

/* 6.4: Die proportionale Skalierung aus 6.3 bleibt erhalten.
   Der gespeicherte Fixed-Schalter darf auf Desktop wieder background-attachment: fixed setzen.
   Keine feste 480px-Mindesthoehe; Browserbreite bleibt 100% auto. */
@media (min-width: 783px) {
    .knueppel-fixed-hero-41.size-viewport-width {
        background-size: 100% auto !important;
    }

    .knueppel-fixed-hero-41 .knueppel-hero-text h1 {
        font-size: clamp(58px, 4.2vw, 84px) !important;
    }

    .knueppel-fixed-hero-41 .knueppel-hero-text h2 {
        font-size: clamp(30px, 2.3vw, 46px) !important;
    }

    .knueppel-fixed-hero-41 .knueppel-hero-text p {
        font-size: clamp(24px, 1.8vw, 34px) !important;
    }
}

/* Mobil 6.4: Geometrie und Inhalts-Skalierung bleiben exakt wie in 6.3.
   Nur wenn im Block "Auch mobil fixieren" aktiv ist, darf mobile-fixed
   die Hintergrund-Fixierung einschalten. Standard mobile-scroll bleibt stabil scrollend. */
@media (max-width: 782px) {
    .knueppel-fixed-hero-41 {
        box-sizing: border-box !important;
        width: 100% !important;
        height: calc(100vw / var(--kfh-ratio, 2.222222)) !important;
        min-height: calc(100vw / var(--kfh-ratio, 2.222222)) !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-block-start: 0 !important;
        margin-block-end: 0 !important;
        background-color: #111;
        background-repeat: no-repeat !important;
        background-size: 100vw auto !important;
        background-position: center top !important;
    }
    .knueppel-fixed-hero-41.mobile-scroll { background-attachment: scroll !important; }
    .knueppel-fixed-hero-41.mobile-fixed { background-attachment: scroll !important; }
    .knueppel-fixed-hero-41 > .knueppel-fixed-hero__content {
        position: absolute !important;
        inset: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        padding: 8px !important;
        transform: scale(0.82) !important;
        transform-origin: center center !important;
        width: 121.95122% !important;
        height: 121.95122% !important;
        left: -10.97561% !important;
        top: -10.97561% !important;
    }
	.knueppel-fixed-hero-41 .knueppel-hero-text {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    .knueppel-fixed-hero-41 + * { margin-block-start: 0 !important; }
}
