/**
 * Team Block
 *
 * Three cards per row on large screens, two on tablets and one on mobile.
 */

.team-block {
    --team-card-background: var(--white, #fff);
    --team-card-color: var(--text-color, #1f2933);
    --team-card-muted: var(--text-muted, #667085);
    --team-card-radius: 0.75rem;
    --team-card-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
    --team-card-shadow-hover: 0 1rem 2.75rem rgba(0, 0, 0, 0.13);
}

.team-block__header {
    width: 100%;
    max-width: 50rem;
    margin: 0 auto 5rem;
    text-align: center;
}

.team-block__topline {
    display: block;
    margin-bottom: 0.75rem;
}

.team-block__title {
    margin: 0;
}

.team-block__intro {
    max-width: 43.75rem;
    margin: 1rem auto 0;
}

.team-block__intro > :last-child {
    margin-bottom: 0;
}

.team-block__column {
    display: flex;
    margin-bottom: 1.5rem;
}

.team-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    color: var(--team-card-color);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.team-card:hover {
    transform: translateY(-0.375rem);
}

.team-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius:25px;
}

.team-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 300ms ease;    
}

.team-card:hover .team-card__image {
    transform: scale(1.025);
}

.team-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
}

.team-card__name {
    margin: 0;
    color: inherit;
    font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.5rem);
    line-height: 1.25;
}

.team-card__role {
    margin-top: 0.5rem;
    color: var(--team-card-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.team-card__button{
    margin-top:15px;
}

.team-card__qualifikation{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    padding: 35px 25px;
    align-content: end;
    background:rgba(0,0,0,0.7);
    opacity:0;
    color:var(--white);
}
.team-card:hover .team-card__qualifikation{
    opacity:1;
}
.team-card__qualifikation ul{
    margin:0;
}
.team-card__qualifikation li{
    padding:0;
    margin:0;
}

.team-card__steckbrief-overlay{
    display:none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-color:rgba(0,0,0,0.7);
    margin:0;
    padding:0;
    z-index: 9998;
}
.team-card__steckbrief{
    display:none;
    position: fixed;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    background-color:var(--white);
    padding:25px;
    max-width: 75%;
    max-height: 75%;
    z-index: 9999;
    border-radius: 35px;
    margin:0;
}
.team-card__steckbrief .steckbrief__close{
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: var(--brand-secondary-color);
    border: none;
    border-radius:50%;
    width:50px;
    height:50px;
    font-weight:600;
    color:var(--green);
    font-size: 150%;
    text-align: center;
    align-content: center;
    cursor: pointer;
}
.team-card__steckbrief.active, .team-card__steckbrief-overlay.active {
    display:block;
}

.team-card__role > :last-child {
    margin-bottom: 0;
}

.team-block__buttons {
    margin-top: 2.5rem;
    text-align: center;
}

.team-block__nav .link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin: 0;
}

/* Dark-background treatment based on the original block styles. */
.has-dark-bg .team-block__header,
.has-dark-bg .team-block__title,
.has-dark-bg .team-block__topline,
.has-dark-bg .team-block__intro,
.has-dark-bg .team-block__intro p {
    color: var(--white, #fff);
}

.has-dark-bg .team-card {
    --team-card-color: var(--white, #fff);
    --team-card-muted: rgba(255, 255, 255, 0.78);
}

.has-dark-bg .team-card__name,
.has-dark-bg .team-card__role,
.has-dark-bg .team-card__role p {
    color: inherit;
}

/* Tablet. Bootstrap changes the columns to two cards per row at this size. */
@media (max-width: 991.98px) {
    .team-block__header {
        margin-bottom: 2.5rem;
    }

    .team-card__content {
        padding: 1.25rem;
    }
}

/* Mobile. Bootstrap changes the columns to one card per row. */
@media (max-width: 575.98px) {
    .team-block__header {
        margin-bottom: 2rem;
    }

    .team-block__column {
        max-width: 28rem;
        margin-right: auto;
        margin-left: auto;
    }

    .team-card__media {
        aspect-ratio: 1;
        border-radius:25px;
    }

    .team-block__buttons {
        margin-top: 2rem;
    }
    .team-card__qualifikation{
        position: absolute;
        top: unset;
        left: 25px;
        bottom: 25px;
        right: 25px;
        padding: 15px;
        background: rgba(0,0,0,0.7);
        opacity: 1;
        color: var(--white);
        font-size: 80%;
        border-radius: 15px;        
        align-content: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-card,
    .team-card__image {
        transition: none;
    }

    .team-card:hover {
        transform: none;
    }

    .team-card:hover .team-card__image {
        transform: none;
    }
}