.team {
    margin-top: 50px;
    margin-bottom: 100px;
}

.team-container {
    min-height: 80vh;
    padding-top: 50px;
    padding-bottom: 50px;
    background-color: #fff;
    border-radius: 10px;
}

.team__title {
    margin: 0;
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: center;
}

.team-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.team-item {
    width: 21.9%;
    margin-bottom: 30px;
    border-radius: 25px;
    box-shadow: 0px 7px 13px 1px #0000001A;
    transition: all 0.2s ease-in-out;
}

.team-item:not(:nth-child(4n)) {
    margin-right: 25px;
}

.team-item__link {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 25px;
}

.team-item:hover {
    transform: scale(1.05);
}

.team-item__link:hover .team-item__color {
    color: rgb(125, 65, 180);
}

.team-item__img {
    width: 100%;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

.team-item-bottom {
    padding: 15px 25px 0px 15px;
}

.team-item__title {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 18px;
    color: var(--text-color);
}

.team-item__subtitle {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-color);
}

.team-item__time {
    margin-bottom: 10px;
    padding-left: 30px;
    margin-left: 15px;
    font-size: 16px;
    line-height: 165%;
    color: #838383;
    background: no-repeat url(../img/time.svg);
    background-position: left center;
    background-size: 25px;
}

.team-item__color {
    padding: 0px 15px 15px 15px;
    font-size: 18px;
    font-weight: 500;
    width: fit-content;
    color: var(--main-color);
    transition: all 0.2s ease-in-out;
}

.team-descr {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

@media(max-width: 1440px) {
    .team-item {
        width: 30%;
    }
    .team-item:not(:nth-child(3n)) {
        margin-right: 15px;
    }
}

@media(max-width: 1200px) {
    .team-item {
        width: 31.8%;
    }

    .team-item:nth-child(3n) {
        margin-right: 0;
    }
}

@media(max-width: 992px) {
    .team-item:not(:nth-child(3n)) {
        margin-right: 15px;
    }
}

@media(max-width: 776px) {
    .team-item {
        width: 48.5%;
    }

    .team-item:not(:nth-child(3n)) {
        margin-right: 0;
    }

    .team-item:not(:nth-child(2n)) {
        margin-right: 15px;
    }
}

@media(max-width: 576px) {
    .team-list {
        justify-content: center;
    }

    .team-item {
        width: 100%;
        max-width: 300px;
    }

    .team-item:not(:nth-child(3n)) {
        margin-right: 0;
    }

    .team-item:not(:nth-child(2n)) {
        margin-right: 0px;
    }

    .team__title {
        font-style: 24px;
    }
}