#card4 {
    scroll-margin-top: 80px;
}

#card4.background-parallax-wrapper {
    background-image: none;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    z-index: 0;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

#card4 .text-background-parallax {
    display: flex;
    align-items: end;
    flex-direction: column;
}

@media screen and (max-width: 1070px) {
    #card4.background-parallax-wrapper {
        background-image: url('../../images/Angebot/iStock-1135604261.jpg');
    }

    /* Apple devices (iOS Safari) - use scroll with center positioning */
    @supports (-webkit-touch-callout: none) {
        #card4.background-parallax-wrapper {
            background-attachment: scroll;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }
}

#card4.background-parallax-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 1;
    pointer-events: none;
}

#card4 .background-parallax {
    background: none !important;
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

#card4 .background-parallax.visible {
    opacity: 1;
    transform: translateY(0);
}

#card4 .container {
    padding: 0;
    width: 100%;
    box-sizing: content-box;
    max-width: var(--max-content-width);
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: calc(var(--max-content-width) + 60px);
}

#card4 .image-wrapper {
    overflow: hidden;
    width: 100%;
    order: 2;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

#card4 .image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 80% 25%;
    transform: scale(1);
    filter: brightness(1);
    transition: transform 0.7s ease-out, filter 0.7s ease-out;
    will-change: transform, filter;
}

#card4 .image-wrapper::before {
    z-index: 2;
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to right, white, transparent 150px, transparent calc(100% - 350px), white);
    mix-blend-mode: lighten;
}

#card4 .text-block {
    width: 46%;
    min-width: 46%;
    padding: var(--sections-vertical-spacing);
    box-sizing: border-box;
    order: 1;
    align-self: flex-end;
    background-color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 2;
    margin: var(--sections-vertical-spacing);
    border-radius: 4px;
}

#card4 .text-block .text-title-secondary,
#card4 .text-block .quote,
#card4 .text-block .text {
    max-width: 100%;
    word-wrap: break-word;
}

#card4 .quote {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4;
    text-align: left;
    color: #555555;
    margin-bottom: 2rem;
}

@media screen and (max-width: 1070px) {
    #card4 .image-wrapper::before {
        background: transparent;
    }
}

@media screen and (max-width: 1000px) {
    #card4.background-parallax-wrapper {
        background-image: none;
    }

    #card4.background-parallax-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: none;
        z-index: 1;
        pointer-events: none;
    }


    #card4-mobile.background-parallax-wrapper-mobile {
        background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
        url('../../images/Angebot/iStock-1135604261.jpg');
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        position: relative;
        z-index: 0;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
    }

    /* Apple devices (iOS Safari) - use scroll with center positioning */
    @supports (-webkit-touch-callout: none) {
        #card4-mobile.background-parallax-wrapper-mobile {
            background-attachment: scroll;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }

    #card4 .text-background-parallax-wrapper {
        background-image: url('../../images/Angebot/iStock-1270080274.jpg');
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        position: relative;
        z-index: 10;
        order: 2;
        width: 100%;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Apple devices (iOS Safari) - use scroll with center positioning */
    @supports (-webkit-touch-callout: none) {
        #card4 .text-background-parallax-wrapper {
            background-attachment: scroll;
            background-position: center;
            background-size: cover;
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }

    #card4 .text-background-parallax-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.45);
        z-index: 11;
        pointer-events: none;
    }

    #card4 .background-parallax {
        transform: none !important;
    }

    #card4 .text-background-parallax {
        background: none !important;
        position: relative;
        z-index: 12;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #card4 .container {
        flex-direction: column;
        align-items: center;
    }

    #card4 .image-wrapper {
        height: auto;
        order: 1;
        position: static;
    }

    #card4 .image-wrapper img {
        width: 100%;
        height: auto;
    }

    #card4 .text-block {
        width: 100%;
        min-width: 100%;
        padding: var(--horizontal-padding);
        margin: 0;

        align-self: center;
        background-color: transparent !important;
    }
}
