.team-list {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px 20px;
    justify-items: center;
}

.team-list li {
    list-style: none;
}

.team-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
}

.team-item__name {
    text-decoration: underline;
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
}

.team-item__name:hover {
    text-decoration: none;
}

.team-item__job-title {
    font-size: 14px;
    line-height: 21px;
    text-align: center;
}

.team-item__img {
    border-radius: 4px;
    border: 1px solid #DDDDDD;
    box-shadow: 0 33px 23px -32px #BBBBBB;
}

.team-item-popup.fancybox__content {
    display: flex !important;
    flex-direction: row;
    width: 900px;
    border-radius: 4px;
    gap: 35px;
    align-items: center;
}

.team-item-popup .team-item__name {
    text-decoration: none;
    text-align: left;
    margin-bottom: 20px;
}

.team-item-popup .team-item__job-title {
    font-weight: 600;
    text-align: left;
    margin-bottom: 20px;
}

.team-item-popup .is-close-btn {
    top: 15px;
    right: 15px;
    --f-button-color: #FF7316;
    --f-button-hover-color: #FF7316;
    opacity: 1;
    --f-button-outline-color: transparent;
    --f-button-bg: transparent;
    --f-button-active-bg: transparent;
    --f-button-hover-bg: transparent;
}

.team-item-popup .is-close-btn:hover {
    opacity: 0.5;
}

@media (max-width: 1200px) {
    .team-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .team-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .team-item__name {
        line-height: 18px;
        font-size: 14px;
    }

    .team-item__job-title {
        font-size: 12px;
    }

    .team-item-popup {
        flex-direction: column !important;
    }

    .team-item-popup .is-close-btn {
        top: 5px;
        right: 5px;
    }
}
