.teams__heading {
    margin-bottom: 30px;
}

.teams__heading :last-child {
    margin-bottom: 0;
}

.team-flex {
    row-gap: 37px;
}

.team {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    height: 100%;
    color: var(--text);
    cursor: pointer;
}


.team__img {
    width: 200px;
    height: 250px;
    position: relative;
    margin: 0 auto;
    z-index: 1;
}

.team__img img {
    border-radius: 20px 40px 40px 40px;
}

.team__details {
    padding: 62px 20px 38px;
    text-align: center;
    position: relative;
    height: 194px;
    border-radius: 20px;
    background: var(--white);
    margin-top: -42px;
}

h4.team__title {
    color: var(--text);
    font-size: 20px;
    line-height: 1.4em;
    margin-bottom: 8px;
}

.team__description {
    margin-bottom: 0;
}

.team__hover {
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    bottom: -17px;
}

.team__cta {
    position: relative;
    display: inline-block;
    background: var(--twilight);
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4em;
    text-decoration: none;
    padding: 12px 45px 8px 20px;
    border-radius: 40px;
}

.team__cta::after {
    content: '\e90e';
    font-family: 'Village-Caregiving';
    position: absolute;
    font-size: 15px;
    line-height: 1em;
    font-weight: normal;
    right: 20px;
    top: 50%;
    transform: translate(0, -50%);
}

@media (min-width: 768px) {

    .team-flex {
        row-gap: 52px;
    }

    .team__img {
        width: 100%;
        height: 274px;
    }

    .team__details {
        padding: 20px 12px 40px;
        height: 183px;
        margin-top: 15px;
    }

    .team__description {
        margin-bottom: 0;
        font-size: 16px;
    }

    .team__hover {
        bottom: -20px;
    }

}

@media (min-width: 1200px) {

    .teams__heading {
        margin-bottom: 40px;
    }

    .team-flex {
        row-gap: 60px;
    }

    .team__img {
        height: 400px;
    }

    .team__details {
        padding: 22px 20px;
        height: 160px;
        margin-top: 25px;
    }


    .team__hover {
        bottom: -30px;
        opacity: 0;
    }

    .team__cta {
        font-size: 20px;
        padding: 17px 58px 13px 30px;
    }

    .team__cta::after {
        font-size: 18px;
        right: 30px;
    }

    .team:hover .team__hover {
        opacity: 1;
    }

    .team__cta:hover {
        background: var(--dark-blue);
        color: var(--white);
    }

}

/* Team bio modal (Fancybox content) */
.team-bio-modal__content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 600px;
    padding: 0.5rem;
}

.team-bio-modal__img {
    flex-shrink: 0;
    margin: 0 auto;
}

.team-bio-modal__img img {
    border-radius: 20px 40px 40px 40px;
    max-width: 200px;
    height: auto;
    display: block;
}

.team-bio-modal__body {
    flex: 1;
}

.team-bio-modal__title {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--text, #333);
}

.team-bio-modal__text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text, #333);
}

.team-bio-modal__text p:last-child {
    margin-bottom: 0;
}

.team-bio-modal {
    border-radius: 20px;
}

@media (min-width: 768px) {
    .team-bio-modal__content {
        flex-direction: row;
        max-width: 760px;
    }

    .team-bio-modal__img {
        margin: 0;
        width: 180px;
    }

    .team-bio-modal__img img {
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .team-bio-modal__content {
        max-width: 1000px;
    }    
}


@media (min-width: 1600px) {


    h4.team__title {
        font-size: 24px;
    }

    .team__description {
        font-size: 18px;
    }

    

}