h1 {
    margin: 0;
}

#team-members {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 1em;
}

.team-member {
    overflow: hidden;
    position: relative;
    margin: 4px;
    width: calc(100% / 3 - 8px);
}

.member-name-role {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: var(--primary);
    padding: 22px 0;
    text-align: center;
    color: white;
}

.member-role {
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Josefin sans', sans-serif;
    font-size: 21px;
}

.member-photo {
    margin: 0;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    position: absolute;
    left: 0;
    top: -100%;
    transition: .5s cubic-bezier(.74,.08,.51,.95);
    width: 100%;
    height: calc(100% - 85px);
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--primary);
    font-weight: bold;
}
.member-photo:hover .member-info {
    top: 0;
}

.member-text {
    text-align: center;
    font-size: 17px;
    padding: 0 20px;
}

.card-links {
    display: flex;
    justify-content: space-around;
    padding: 8em 0;
}

.card {
    background-color: #fff;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    padding: 1em 2em 2em 2em;
    border-radius: 20px;
    width: 300px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.card i {
    font-size: 65px;
    color: var(--primary);
    background-color: white;
    margin-top: -58px;
    display: block;
    /* padding: 20px; */
    border-radius: 50%;
    box-shadow: rgba(99, 99, 99, 0.2) 0px -5px 8px 0px;
    width: 100px;
    height: 100px;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 0.4em;
}

.card-text {
    margin-bottom: 1.1em;
    font-family: 'Josefin sans', sans-serif;
    font-size: 17px;
    text-align: center;
}

.card .main-btn {
    font-size: 19px;
}

@media screen and (max-width: 1024px) {

    .team-member {
        margin-top: 1em;
        height: 560px;
    }

    .card {
        width: 230px;
        margin: 3em auto;
    }
}

@media screen and (max-width: 600px) {
    #team-members {
        flex-direction: column;
    }
    .team-member {
        width: 100%;
        margin: 0.4em 0;
    }
    .card-links {
        flex-direction: column;
    }
}
