/*---Header 1---*/
section.header-1, section.header-3 {
    padding-top: clamp(2rem, 12.5vw + -6rem, 6.5rem);
}

.header-1 .wp-block-group.is-vertical:has(h1),
.header-3 .wp-block-group.is-vertical:has(h1) {
    padding-left: 2.5rem;
}

.header-1 h1 {
    margin-bottom: 2rem;
}

.header-1 figure {
    margin: 0;
    height: 100%;
}

.header-1 figure img {
    object-fit: cover;
    height: 100%;
}


@media screen and (max-width: 768px) and (orientation: portrait) {
    .header-1 > .wp-block-group.wp-block-group-is-layout-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto 1fr;
        gap: 0 !important;
    }

    .header-1 h1 {
        margin-top: 1.5rem;
        margin-bottom: 0;
    }

    .header-1 .wp-block-group.is-vertical:has(h1),
    .header-3 .wp-block-group.is-vertical:has(h1) {
        padding-left: 0;
    }

    .header-1 > .wp-block-group > .wp-block-group:nth-of-type(2) {
        grid-column: 1 / span 6;
        grid-row: 1;
        margin-bottom: 3rem;
    }

    .header-1 > .wp-block-group > .wp-block-group:nth-of-type(1) {
        grid-column: 1 / span 6;
        grid-row: 2;

        position: relative;
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .header-1 figure img {
        object-fit: cover;
        width: 100%;
        height: auto;
    }

    .header-1 > .wp-block-group > .wp-block-group:nth-of-type(3) {
        grid-column: 3 / span 2;
        grid-row: 2;
        justify-self: center;
        z-index: 1;
    }
    .header-1 > .wp-block-group > .wp-block-group:nth-of-type(3) > div > p {
        right: unset;
        bottom: unset;
        transform: translateX(50%);
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 0;
    }

    .header-1 > .wp-block-group > .wp-block-group:nth-of-type(3) > div > p::before {
        content: url('data:image/svg+xml,<svg width="33" height="32" viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.5126 24.344L14.5126 -2.08809e-06L18.5461 -2.04691e-06L18.5461 24.344L29.3639 13.616L32.2156 16.444L16.5293 32L0.843029 16.444L3.69471 13.616L14.5126 24.344Z" fill="%23FAB31E"/></svg>');
        position: relative;
        left: unset;
        bottom: unset;
        width: unset;
        height: unset;

        rotate: 90deg;
        scale: 1;
        background-image: unset;
        z-index: 10;
        display: block;
    }
}

/*---Header 2---*/

section:has(.header-2) {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.header-2 {
    /* padding: 4rem; */
    border-radius: 1.5rem;
    /* opacity: 0.5; */
}

.header-2 figure {
    margin: 0;
}

.header-2 .wp-block-image.size-full.is-style-rounded {
    padding: 6rem 3rem;
}

.button-scroll {
    display: flex; /* Flexbox aktivieren */
    flex-direction: column; /* Text und Pfeil vertikal anordnen */
    align-items: center; /* Zentriert den Text und den Pfeil horizontal */
    justify-content: flex-end; /* Positioniert die Inhalte am unteren Rand */
    height: 100%; /* Container füllt die gesamte Höhe (anpassbar) */
    position: relative; /* Für die flexible Positionierung innerhalb des Containers */
    width: 100%;
}

.button-scroll p {
    position: relative;
    /* writing-mode: vertical-rl; */
    text-align: left; /* Text zentrieren */
    margin: 0; /* Entfernt den Standard-Margin */
    rotate: -90deg;
    right: -1.6rem;
    bottom: 6.4rem;
    hyphens: none;
}

.button-scroll p::before {
    content: ""; /* Kein Text, nur ein Pfeil */
    position: absolute;
    left: -3.2rem; /* Zentriert den Pfeil horizontal */
    /* bottom: -50px;  */
    width: 40px; /* Breite des Pfeils */
    height: 40px; /* Höhe des Pfeils */
    background-repeat: no-repeat;
    rotate: 90deg;
    scale: 0.85;
    background-image: url('data:image/svg+xml,<svg width="33" height="32" viewBox="0 0 33 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.5126 24.344L14.5126 -2.08809e-06L18.5461 -2.04691e-06L18.5461 24.344L29.3639 13.616L32.2156 16.444L16.5293 32L0.843029 16.444L3.69471 13.616L14.5126 24.344Z" fill="%23FAB31E"/></svg>');
    top: 2px;
}

.header-3 h1 {
    font-size: clamp(2.25rem, 5.2734vw + 0.3516rem, 5.625rem);
    margin-bottom: 0;
    hyphens: auto;
    width: 100%;
}

.header-3 p.is-style-paragraph-large {
    font-size: clamp(2.25rem, 5.2734vw + 0.3516rem, 5.625rem);
    margin: 0;
    line-height: 1em;
}


@media screen and (max-width: 1279px){
    .button-scroll p{
        right: clamp(1.5rem, -6.2622vw + 4.5059rem, -.5rem);
    }

    /* .wp-block-group.is-style-group-card2 {
        padding: clamp(2.5rem, 3.9063vw + 1.0938rem, 5rem) clamp(2.5rem, 7.8125vw + -.3125rem, 7.5rem);
    } */
}

@media screen and (max-width: 1080px){
    .header-4 .wp-block-group {
        grid-column: 2 / span 8;
    }
}

@media screen and (max-width: 768px) and (orientation: portrait) {
    .header-2{
        display: flex !important;
        flex-direction: column;
        padding: 1rem;
    }

    section:has(.header-2), section.header-3, section.header-1 {
        margin-top: 0;
    }

    .header-2 .wp-block-image.size-full.is-style-rounded{
        padding: 0;
    }

    .header-2 h1, .header-2 p {
        text-align: center;
        width: 100%;
    }

    .header-2 .button-scroll p, .header-3 .button-scroll p{
        writing-mode: unset;
        text-align: center;
        margin: 0;
        rotate: 0deg;
        right: 0;
        bottom: 0;
    }

    .header-3 .button-scroll p {
        right: -35px;
    }
    
    .button-scroll p::before{
        left: unset;
        bottom: -10px;
        width: 40px;
        height: 40px;
        background-repeat: no-repeat;
        rotate: 0deg;
        scale: 0.65;
        margin-left: -2.5rem;
    }

    .header-1 .button-scroll p::before{
        margin-left: 0;
    }

    .header-3 .wp-block-group:has(.wp-block-image.size-full) {
        grid-column: span 12;
    }

    .header-3 .wp-block-group.is-vertical:has(h1) {
        padding-left: 0;
        grid-column: span 12;
        gap: 0.5rem;
    }

    .header-3 .button-scroll{
        width: auto;
        padding-top: 0.5rem;
    }

    .header-4 .wp-block-group{
        grid-column: span 12;
    }
}
