.team_container {
    background-color: var(--melon);
    border-radius: 60px;
    padding: 120px 0 150px;
}

.team_container h2 {
    margin-top: 0;
    margin-bottom: 60px;
    text-align: center;
}

/************************ Team List ***************************/
.team_wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 1;
    margin-top: -20px;
}

/************ Team Members *************/
.team_member,
.team_bio_member {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc((100% - 120px) / 3);
    margin-right: 60px;
    margin-top: 40px;
    box-sizing: border-box;
    /* transition: 0.2s all ease-in-out; */
}

.team_member:nth-of-type(3n) {
    margin-right: 0;
}

.team_member:nth-of-type(1) {
    margin-top: 80px;
}

.team_member:nth-of-type(3) {
    margin-top: 100px;
}

.team_thumbnail {
    position: relative;
    width: 100%;
    border: 2px solid var(--black);
    aspect-ratio: 0.9;
    box-sizing: border-box;
}

.team_member:nth-of-type(1) .team_thumbnail,
#Modal_1 .team_bio_member .team_thumbnail {
    background-color: var(--yellow);
}

.team_member:nth-of-type(2) .team_thumbnail,
#Modal_2 .team_bio_member .team_thumbnail {
    background-color: var(--pink);
}

.team_member:nth-of-type(3) .team_thumbnail,
#Modal_3 .team_bio_member .team_thumbnail {
    background-color: var(--orange);
}

.team_member:nth-of-type(4) .team_thumbnail,
#Modal_4 .team_bio_member .team_thumbnail {
    background-color: var(--blue);
}

.team_member:nth-of-type(5) .team_thumbnail,
#Modal_5 .team_bio_member .team_thumbnail {
    background-color: var(--melon);
}

.team_member:nth-of-type(6) .team_thumbnail,
#Modal_6 .team_bio_member .team_thumbnail {
    background-color: var(--yellow);
}

.team_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    transition: 0.2s all ease-in-out;
}

.team_member .corner,
.team_bio_member .corner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--black);
    background-color: var(--white);
    box-sizing: border-box;
    position: absolute;
}

.team_member .top_left,
.team_bio_member .top_left {
    left: -12px;
    top: -12px;
}

.team_member .top_right,
.team_bio_member .top_right {
    right: -12px;
    top: -12px;
}

.team_member .bottom_left,
.team_bio_member .bottom_left {
    left: -12px;
    bottom: -12px;
}

.team_member .bottom_right,
.team_bio_member .bottom_right {
    right: -12px;
    bottom: -12px;
}

.team_member .team_role {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    border: 2px solid var(--black);
    border-radius: 10px;
    width: max-content;
    margin: 0;
    font-weight: 600;
    text-transform: capitalize;
    padding: 15px 20px;
    box-shadow: 0px 5px 0px #00000026;
}

.team_member .team_name {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--blue);
    border: 2px solid var(--black);
    border-radius: 30px;
    height: 58px;
    width: max-content;
    padding: 0 25px;
    box-shadow: 0px 5px 0px #00000026;
}

.team_member:nth-child(odd) .team_name {
  transform: translate(-50%, 50%) rotate(7deg);
}

.team_member:nth-child(even) .team_name {
  transform: translate(-50%, 50%) rotate(-7deg);
}

.team_member .team_name h3 {
    font-size: 20px;
}

.team_details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(100% - 40px);
    margin-left: 20px;
    border: 2px solid var(--black);
    background-color: var(--white);
    border-radius: 0 0 40px 40px;
    padding: 45px 20px 20px;
    box-sizing: border-box;
    margin-top: -2px;
    box-shadow: 0px 5px 0px #00000026;
}

.team_details h3,
.team_details p {
    margin: 0;
    transition: 0.2s all ease-in-out;
}

.team_details h3 {
    font-size: 24px;
    margin-bottom: 5px;
    color: var(--black);
}

.team_details .team_role {
    font-weight: 500;
    margin: 0 0 10px 0;
}

.team_details .team_role i {
    width: 26px;
}

.team_details .team_role:first-of-type {
    color: var(--gold);
}

.team_details .team_bio {
    margin-bottom: 20px;
}

@media (max-width: 1330px) {
    .team_member,
    .team_member:nth-of-type(3n) {
        width: calc((100% - 60px) / 2);
        margin-right: 60px;
    }
    
    .team_member:nth-of-type(2n) {
        margin-right: 0;
    }

    .team_member:nth-of-type(3) {
        margin: 100px auto 0;
    }
}

@media (max-width: 1050px) {
    .team_container h2 {
        margin: 0 auto 40px;
        width: 500px;
    }
}

@media (max-width: 800px) {
    .family_wrapper p {
        width: 100%;
    }
}

@media (max-width: 750px) {
    .team_wrapper {
        flex-direction: column;
    }

    .team_member,
    .team_member:nth-of-type(2n),
    .team_member:nth-of-type(3n) {
        width: 100%;
        margin-right: 0 !important;
        margin: 30px auto 0;
    }

    .team_member:nth-of-type(2n),
    .team_member:nth-of-type(3n) {
        margin-top: 90px;
    }

    .team_container h2 {
        margin: 0 auto 20px;
    }
}

@media (max-width: 600px) {
    .team_container {
        margin-top: 130px;
        padding-bottom: 100px;
    }

    .team_container h2 {
        margin: 30px auto 20px;
        width: calc(100% - 40px);
    }
}