.cta {
    
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.cta.layout-1 {
    background-color: var(--light-gray);
    background-image: url(/theme/public/assets/frontend/img/transparenter-hintergrund.webp);
    background-size: cover;
    .container {
        display: grid;
        grid-template-columns: 1fr;
        .cta__text {
            grid-row: 1;
        }
        .cta__image {
            z-index: 1;
            grid-row: 2;
            margin: var(--spacing-13) 0 0;
            border-top-left-radius: clamp(9.375rem, 6.3312rem + 12.987vw, 18.75rem);
            overflow: hidden;
        }
        .cta__text_extra {
            grid-row: 3;
            position: relative;
            z-index: 1;
            padding: var(--spacing-08) 70px var(--spacing-08) 20px;
            display: flex;
            align-items: center;
            gap: var(--spacing-04);
            p:last-child {
                margin-bottom: 0;
            }
            * {
                position: relative;
                color: #fff;
                z-index: 100;
            }

            &::after {
                content: '';
                background-color: var(--dark-blue);
                position: absolute;
                top: 0px;
                left: 0px;
                height: 100%;
                width: 100%;
                z-index: 0;
                border-bottom-right-radius: clamp(9.375rem, 6.3312rem + 12.987vw, 18.75rem);
            }
            
        }
        .cta__claim {
            grid-row: 4;
            padding: var(--spacing-09) 0 0;
            text-transform: uppercase;
        }
    }        
}

.cta.layout-2 {
    background-color: #fff;
    .container {
        display: grid;
        .cta__text {
            grid-row: 1;
            margin-bottom: calc(var(--margin-medium) - var(--font-margin-p));
        }
        .cta__image {
            grid-row: 2;
            margin-bottom: var(--margin-medium);
            figure {
                figcaption {
                    left: initial;
                    right: 0px;
                }
            }
        }
        .cta__text_extra {
            grid-row: 3;
            background-color: var(--main-color);
            margin-left: calc(var(--gutter) * -1);
            padding: var(--font-margin-p) var(--gutter);
            z-index: 3;
            p {
                position: relative;
                padding-left: 15px;
                margin-bottom: 0;
                &::before {
                    content: '';
                    width: 1px;
                    background-color: var(--text-color);
                    position: absolute;
                    left: 0px;
                    top: 0px;
                    bottom: 0px;
                }
            }
        }
        .cta__claim {
            display: none;
        }
    }
}

.cta.layout-3 {
    background-color: #fff;
    .container {
        display: grid;
        .cta__text {
            grid-row: 1;
            margin-bottom: calc(var(--margin-medium) - var(--font-margin-p));
        }
        .cta__image {
            position: relative;
            grid-row: 2;
            margin-bottom: var(--margin-medium);
            padding-right: var(--picture-padding);
            padding-top: var(--picture-padding);
            &::after {
                content: '';
                z-index:  0;
                background-color: var(--main-color);
                position: absolute;
                top: 0px;
                right: 0px;
                bottom: 10%;
                left: 70%;
            }
            figure {
                z-index: 1;
                position: relative;
                height: 100%;
                picture {
                    height: 100%;
                    img {
                        object-fit: cover;
                        height: 100%;
                    }
                }
                figcaption {
                    left: initial;
                    right: 0px;
                }
            }
        }
        .cta__text_extra {
            position: relative;
            z-index: 3;
            grid-row: 3;
            background-color: var(--main-color);
            margin-left: calc(var(--gutter) * -1);
            padding: var(--font-margin-p) var(--gutter);
            p {
                position: relative;
                padding-left: 15px;
                margin-bottom: 0;
                &::before {
                    content: '';
                    width: 1px;
                    background-color: var(--text-color);
                    position: absolute;
                    left: 0px;
                    top: 0px;
                    bottom: 0px;
                }
            }
        }
        .cta__claim {
            grid-column: 1;
            grid-row: 4;
            align-self: center;
            justify-self: center;
            p {
                margin-bottom: 0;
            }
        }
    }
}


@media (min-width: 768px) {
    .cta.layout-2 {
        .container {
            grid-template-columns: 35fr 65fr;
            grid-template-rows: 2fr auto;
            column-gap: var(--gutter);

            .cta__text {
                grid-column: 1;
                grid-row: 1;
                margin-bottom: 0;
                align-self: center;
            }
            .cta__image {
                grid-column: 2;
                grid-row: 1 /span 2;
                margin-bottom: var(--picture-padding);
            }
            .cta__text_extra {
                grid-column: 1;
                grid-row: 2;
                background-color: var(--main-color);
                margin-left: 0;
                padding: var(--font-margin-p) var(--gutter);
                margin-right: calc((4 * var(--gutter)) * -1);
                p {
                    position: relative;
                    padding-left: 15px;
                    margin-bottom: 0;
                    &::before {
                        content: '';
                        width: 1px;
                        background-color: var(--text-color);
                        position: absolute;
                        left: 0px;
                        top: 0px;
                        bottom: 0px;
                    }
                }
            }
        }
    }

    .cta.layout-3 {
        .container {
            grid-template-columns: 40% 80px auto;
            grid-template-rows: auto 40px auto;

            .cta__text {
                grid-column: 1;
                grid-row: 1;
                margin-bottom: 0;
                align-self: center;
                padding-right: var(--gutter);
            }
            .cta__image {
                grid-column: 2 / span 2;
                grid-row: 1 /span 2;
                margin-bottom: 0;
            }
            .cta__text_extra {
                grid-column: 1 / span 2;
                grid-row: 2 / span 2;
                background-color: var(--main-color);
                margin-left: 0;
                padding: var(--font-margin-p) var(--gutter);    
                p {
                    position: relative;
                    padding-left: 15px;
                    margin-bottom: 0;
                    &::before {
                        content: '';
                        width: 1px;
                        background-color: var(--text-color);
                        position: absolute;
                        left: 0px;
                        top: 0px;
                        bottom: 0px;
                    }
                }
            }

            .cta__claim {
                grid-column: 3;
                grid-row: 3;
                align-self: center;
                justify-self: center;
                p {
                    margin-bottom: 0;
                }
            }
        }
    }
}

@media (min-width: 1024px) {
    .cta.layout-1 {
        .container {
            grid-template-columns: 63fr 37fr;
            grid-template-rows: auto 180px auto;
            column-gap: var(--gutter);
            width: calc(100% - var(--gutter));
            .cta__image {
                margin-top: 0;
                grid-column: 1;
                grid-row: 1 / span 2;
                
                figure {
                    height: 100%;
                    picture {
                        height: 100%;
                        img {
                            display: block;
                            height: 100%;
                            width: 100%;
                            object-fit: cover;
                        }
                    }
                }
            }
            .cta__text {
                grid-column: 2;
                grid-row: 1;
            }
            .cta__claim {
                grid-column: 1;
                grid-row: 3;
                text-align: center;
                padding-right: calc(2 * var(--gutter));
            }
            .cta__text_extra {
                position: relative;
                z-index: 0;
                grid-column: 2;
                grid-row: 2 / span 2;
                padding: 0;
                p {
                    position: relative;
                    padding-left: 15px;
                    margin-right: 15%;
                    &::before {
                        display: block;
                        content: '';
                        width: 1px;
                        position: absolute;
                        left: 0px;
                        top: 0px;
                        bottom: 0px;
                        background: var(--main-color, #8bd6e6);
                        z-index: 1;
                    }
                }
                &::after {
                    width: initial;
                    left: calc((3 * var(--gutter)) * -1);
                    right: 0;
                }
                &::before {
                    display: none;
                }
            }
        }
    }
}