@media (max-width: 640px) {
    #text-effect {
        margin-top: -25vh;
    }

    .image {
        width: 40vw !important;
    }

    #image1 {
        top: 45% !important;
        left: 5% !important;
    }

    #image2 {
        top: 15% !important;
        right: 5% !important;
    }

    #image3 {
        top: 40% !important;
        left: 70% !important;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .section-image-1 {
        margin-left: -30%;
    }

    .section-image-2 {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}

@media (max-width: 768px) {
    .before-after-container {
        height: 90vh;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
                margin-top: 2rem !important;
        margin-bottom: 1rem !important;
    }
    .second-section {
        margin-top: -280px !important;
    }

    .before-after-wrapper {
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    .before-img, .after-img {
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .slider {
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: white;
        z-index: 3;
        transform: translateX(-50%);
    }

    .slider-line {
        position: absolute;
        width: 28px;
        height: 28px;
        background: white;
        border-radius: 50%;
        border: 1px solid #333;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 4;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .after-img {
        clip-path: inset(0 50% 0 0);
        z-index: 1;
    }

    .text-container {
        position: relative;
        z-index: 10;
        background: white;
        padding: 1rem;
        margin-bottom: 40px; 
    }

    .text-container button {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .subpage-header.with-image {
        width: 100% !important;
        padding-top: 100px; /* <-- HIER liegt die Lösung */
    }

    .subpage-header-content {
        width: 100% !important;
        max-width: 100% !important;
        grid-column: span 1 / span 1 !important;
        box-sizing: border-box;
        padding: 0 1.25rem; /* entspricht px-5 */
    }

    .subpage-header-content img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        margin: 20px auto !important;
        display: block !important;
    }

    .subpage-header-content a {
        display: block !important;
        width: 100% !important;
        margin: 30px auto 0 auto !important;
        padding: 15px 20px !important;
        font-size: 1rem !important;
    }
}


@media (max-width: 400px) {
    .subpage-header.with-image {
        padding-top: 100px;
    }
}


