.c-grid-teaser {
    position: relative;
    display: block;
    height: 100%;
    min-height: 26rem;
    color: #fff;
    transition: all $transition-time linear;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;

    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        z-index: 0;
        display: block;
        height: 100%;
        width: 100%;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 100%);
        opacity: .7;
        transition: background $transition-time linear;
    }

    &.c-grid-teaser--no-image {
        &::after {
            display: none;
        }
    }
}

.c-grid-teaser--no-image.c-grid-teaser--bordered {
    &::before {
        content: '';
        border: 4px solid white;
        position: absolute;
        width: calc(100% - 2rem);
        height: calc(100% - 2rem);
        margin: 1rem;
    }

    .c-grid-teaser__caption {
        padding: 1rem;
    }
}

.c-grid-teaser--gradient-50 {
    &::after {
        opacity: .5;
    }
}

.c-grid-teaser--gradient-20 {
    &::after {
        opacity: .2;
    }
}

.c-grid-teaser--gradient-0 {
    &::after {
        opacity: 0;
    }
}

.c-grid-teaser--primary-gradient {
    &::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--color-primary-500) 100%);
    }
}

.c-grid-teaser--secondary-gradient {
    &::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--color-secondary-500) 100%);
    }
}

.c-grid-teaser--accent-gradient {
    &::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--color-accent-500) 100%);
    }
}

.c-grid-teaser--cta-gradient {
    &::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--color-cta-500) 100%);
    }
}

.c-grid-teaser--ambient-gradient {
    &::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--color-ambient-500) 100%);
    }
}

a.c-grid-teaser,
div.c-grid-teaser {
    &:hover,
    &:focus {
        color: #fff;
    }

    &.c-grid-teaser--no-image {
        &.bg-primary-500 {
            &:hover {
                background: theme('colors.primary.600');
            }
        }

        &.bg-secondary-500 {
            &:hover {
                background: theme('colors.secondary.600');
            }
        }

        &.bg-accent-500 {
            &:hover {
                background: theme('colors.accent.600');
            }
        }

        &.bg-cta-500 {
            &:hover {
                background: theme('colors.cta.600');
            }
        }

        &.bg-ambient-500 {
            &:hover {
                background: theme('colors.ambient.600');
            }
        }
    }

    &.c-grid-teaser--round-edges {
        border-radius: 10px;
    }

    &.c-grid-teaser--text-color {
        color: theme('colors.gray.900');
        .c-grid-teaser__headline {
            color: theme('colors.gray.900');
        }
    }
}

.c-grid-teaser__image {
    position: absolute;
    object-fit: cover;
    height: 100%;
    width: 100%;
    transform: scale(1);
    transition: transform $transition-time--short ease-in;

    a.c-grid-teaser:hover & {
        transform: scale(1.05);
    }
    div.c-grid-teaser:hover & {
        transform: scale(1.05);
    }
}

.c-grid-teaser__decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

.c-grid-teaser__badge {
    right: 0;
    top: 0;
    position: absolute;
    max-width: 5rem;
    margin-right: 1rem;
    margin-top: 1rem;

    &.c-grid-teaser__badge--no-spacing {
        margin-top: 0;
        max-width: auto;
        max-height: 7rem;
    }
}

.c-grid-teaser__badge--left {
    right: unset;
    left: 0;
    margin-right: auto;
    margin-left: 1rem;
}

.c-grid-teaser__silhouette {
    padding: 6rem 3rem;
    margin: 0 auto;
}

.c-grid-teaser__caption {
    position: absolute;
    bottom: 2rem;
    left: 1rem;
    z-index: 5;
    width: calc(100% - 3rem);
}

.c-grid-teaser__caption--white-background {
    background: #fff;
    left: 0;
    bottom: 1.5rem;
    padding: .75rem;
    max-width: 20rem;

    .c-grid-teaser__topline {
        margin-top: 0;
    }

    .c-grid-teaser__headline {
        color: theme('colors.primary.500');
        text-transform: none;
    }

    .c-grid-teaser__subline {
        margin-top: .25rem;
    }

    .c-grid-teaser__topline,
    .c-grid-teaser__subline,
    .c-grid-teaser__price {
        color: theme('colors.gray.900');
    }

    @screen md {
        .o-grid__item--3\/3 & {
            max-width: 30rem;
            left: 2rem;
        }
    }
}

.c-grid-teaser__headline {
    color: #fff;
    font-size: 1.875rem;
    line-height: 1.25;
    font-family: 'BaseFontFamily', sans-serif;
    font-weight: bold;
    margin-top: theme('margin.1');
    hyphens: auto;
}

.c-grid-teaser__topline {
    font-size: 1rem;
    font-weight: bold;
}

.c-grid-teaser__topline-uppercase {
    text-transform: uppercase;
}

.c-grid-teaser__price {
    text-align: right;

    strong {
        font-size: theme('fontSize.xl');
    }
}
