.cb-hero {
    position: relative;
    z-index: 5;

    &:has(picture) {
        background: var(--color-dark);
    }

    border-radius: var(--border-radius);
    overflow: hidden;

    .link-icon {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        transform: translate(0,0);
        transition: transform 0.2s ease-in-out 0.15s;
    }

    picture {
        &::before {
            content: '';
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(0deg, #000000ee, transparent, transparent);
            z-index: 2;
        }
    }

    &:has(.hero-text.type-2) {
        picture {
            &::before {
                background: linear-gradient(0deg, #000000ee, transparent);
            }
        }
    }

    img {
        width: 100%;
    }

    .hero-text {
        display: flex;
        position: absolute;
        width: 100%;
        left: 0;
        bottom: 0;
        color: var(--color-white);
        font-weight: 600;
        z-index: 3;

        &.type-1 {
            flex-direction: row;
            justify-content: space-between;
            padding: 0 6rem 7rem 6rem;

            .hero-bannertext {
                display: flex;
                place-self: flex-end;
                justify-content: flex-end;
                flex: 0 1 30%;
                font-size: 20px;
            }
        }

        &.type-2 {
            height: 100%;
            top: -10%;
            flex-flow: column;
            justify-content: center;
            place-items: center;

            .hero-headline {
                margin-block-end: 1rem;
                text-align: center;
            }

            .hero-subheader {
                text-align: center;
                word-spacing: 1.75rem;
            }
        }

        .hero-headline, .hero-headline h1 {
            font-size: 100px;
        }

        p {
            margin: 0;
        }
    }
}

main#content {
    > .cb-hero {
        border-radius: 0;
        picture img {
            height: 100vh;
            object-fit: cover;
            object-position: top;
        }
        .link-icon {
            display: none;
        }
    }
}

.footer-link {
    .cb-hero {
        > a {
            picture img {
                transform: scale(1);
                transition: transform 0.3s ease-in-out;
            }
            &:hover, &:active, &:focus, &:focus-within {
                picture img {
                    transform: scale(1.035);
                }
                .link-icon {
                    transform: translate(5px,-5px);
                }
            }
        }
    }
}

.content-wrapper {
    .cb-hero {
        .hero-text {
            &.type-1, &.type-2 {
                padding: 0 3rem 3rem 3rem;

                .hero-headline {
                    font-size: 64px;
                }
            }
        }
    }
}

@media (max-width: 1399px) {
    .cb-hero .hero-text {
        &.type-1, &.type-2 {
            padding: 0 5rem 6rem 5rem;

            .hero-headline, .hero-headline h1 {
                font-size: 80px;
            }
        }

        &.type-2 {
            top: -5%;
        }
    }
}

@media (max-width: 1199px) {
    .cb-hero .hero-text {
        &.type-1, &.type-2 {
            padding: 0 3rem 4rem 3rem;

            .hero-headline, .hero-headline h1 {
                font-size: 64px;
            }

            .hero-bannertext {
                font-size: 18px;
            }
        }

        &.type-2 {
            top: 10%;
        }
    }

    .content-wrapper .cb-hero .hero-text {
        &.type-1, &.type-2 {

            .hero-headline, .hero-headline h1 {
                font-size: 56px;
            }
        }
    }
}

@media (max-width: 991px) {
    .cb-hero .hero-text {
        &.type-1 {
            padding: 0 3rem 4rem 3rem;

            .hero-headline, .hero-headline h1 {
                font-size: 38px;
            }

            .hero-bannertext {
                font-size: 16px;
            }
        }
    }

    .content-wrapper .cb-hero .hero-text {
        &.type-1, &.type-2 {
            padding: 0 2rem 2rem 2rem;

            .hero-headline, .hero-headline h1 {
                font-size: 38px;
            }
        }
    }
}

@media (max-width: 767px) {
    .cb-hero {
        .hero-text {
            &.type-1, &.type-2 {
                flex-direction: column;
                gap: 1rem;
                padding: 0 2rem 2rem 2rem;

                .hero-headline {
                    font-size: 32px;
                }

                .hero-bannertext {
                    place-self: flex-start;
                    font-size: 16px;
                }
            }

            &.type-2 {
                .hero-subheader {
                    word-spacing: 1rem;
                }
            }
        }
    }

    .content-wrapper .cb-hero {
        .hero-text {
            &.type-1, &.type-2 {
                .hero-headline {
                    font-size: 32px;
                }
            }
        }
    }
}
