.team-section {
    --team-card-width: 265px;
    --team-card-height: 395px;
    --team-scale: 1.1;
    --team-expand-x: calc(var(--team-card-width) * (var(--team-scale) - 1));
    --team-expand-y: calc(var(--team-card-height) * (var(--team-scale) - 1));
    margin-top: 200px;
    padding: 0 24px;
}

.team-section__container {
    width: 100%;
}

.service-team-section__container .team-section__lead {
    width: 50%
}

@media (max-width: 1100px) {
    .service-team-section__container .team-section__lead {
        width: 100%;
    }
}

.team-section__title {
    font-size: 48px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .team-section__title {
        font-size: clamp(1.4rem, 7vw, 1.85rem);
        line-height: 1.12;
    }
}

.team-section__lead {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    margin-top: 3rem;
}

.team-section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 80px;
    margin-top: 50px;
}

.team-card {
    display: grid;
    grid-template-columns: var(--team-card-width) 1fr;
    gap: 22px;
    align-items: start;
    max-width: 530px;
    overflow: visible;
}

.team-card__media {
    width: var(--team-card-width);
    height: var(--team-card-height);
    position: relative;
    overflow: visible;
}

.team-card__image-wrap {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--team-card-width);
    height: var(--team-card-height);
    overflow: hidden;
    transition: width 0.9s ease, height 0.9s ease, transform 0.9s ease;
}

.team-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(var(--team-scale));
    transform-origin: top center;
    transition: transform 0.9s ease;
}

.team-card:hover .team-card__image-wrap {
    width: calc(var(--team-card-width) * var(--team-scale));
    height: calc(var(--team-card-height) * var(--team-scale));
    transform: translateX(calc(-0.5 * var(--team-expand-x)));
}

.team-card:hover .team-card__image {
    transform: scale(1);
}

.team-card__name {
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.team-card__content {
    transition: transform 0.9s ease;
}

.team-card:hover .team-card__content {
    transform: translateX(var(--team-expand-x));
}

.team-card__role,
.team-card__text {
    font-size: 14px;
    font-family: "Inter", sans-serif;
    font-weight: 200;
    margin-bottom: 20px;
}

.team-card__link {
    display: inline-block;
    text-transform: uppercase;
    font-size: 14px;
    color: #111;
    text-decoration: none;
    font-family: "Inter", sans-serif;
    font-weight: 600;
}

.team-card__link:hover {
    text-decoration: underline;
}

.team-section__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    border-top: 2px solid #111;
    padding-top: 1.5rem;
    border-bottom: 3px solid #e0dccc;
    padding-bottom: 1.5rem;
}

.team-section__bottom span {
    font-weight: 500;
    font-family: "Inter", sans-serif;
    font-size: 18px;
}

.team-card__link-arrow {
    color: #c20512;
    margin-left: 0.5rem;
}

@media (max-width: 1100px) {
    .team-section {
        margin-top: 100px;
    }

    .team-section__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .team-section__title {
        line-height: 1;
    }

    .team-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        max-width: 100%;
    }

    .team-card__media {
        width: 100%;
        height: auto;
        max-width: 340px;
        margin: 0 auto;
    }

    .team-card__image-wrap {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 265 / 395;
        transform: none;
        transition: none;
    }

    .team-card__image {
        transform: none;
        transition: none;
    }

    .team-card__content {
        width: 100%;
        max-width: 340px;
    }

    .team-card:hover .team-card__content,
    .team-card:hover .team-card__image-wrap,
    .team-card:hover .team-card__image {
        transform: none;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 560px) {
        .team-card__media {
            max-width: 100%;
            margin-bottom: 1rem;
        }

        .team-card__content {
            max-width: 100%;
        }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .team-section {
        --team-card-width: 220px;
        --team-card-height: 330px;
        margin-top: 140px;
    }

    .team-section__grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px 28px;
    }

    .team-card__media {
        max-width: 300px;
    }

    .team-card__content {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .team-section__bottom {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;

        border-top-width: 2px;
        border-bottom-width: 2px;
    }

    .team-section__bottom span {
        font-size: 16px;
    }

    .team-card__link {
        font-size: 14px;
    }
}

