.team-grid {
    padding: var(--section-padding-y) 0;
    background: var(--white);
    color: var(--color-text);
    text-align: center;
}

.team-grid.background-white {
    background: var(--white);
    color: var(--color-text);
}

.team-grid.background-blue-smoke {
    background: #f8f9fa;
    color: var(--color-text);
}

.team-grid.background-black {
    background: #000;
    color: var(--white);
}

.team-grid.background-dark-blue {
    background: #0f1e2c;
    color: var(--white);
}

.team-grid__pre-title {
    margin: 0 0 0.7rem;
    color: var(--gold);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.team-grid__title {
    margin: 0 auto;
    color: var(--black);
    font-size: clamp(2.25rem, 4.2vw, 52px);
    font-weight: 400;
    line-height: 1.15;
}

.team-grid.background-black .team-grid__title,
.team-grid.background-dark-blue .team-grid__title {
    color: var(--white);
}

.team-grid__members {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.25rem 2.5rem;
    max-width: 900px;
    margin: 3rem auto;
}

.team-grid__member {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.team-grid__member picture {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 16px;
}

.team-grid__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.team-grid__name {
    margin: 1.15rem 0 0;
    color: var(--black);
    font-family: var(--font-family-heading);
    font-size: clamp(1.35rem, 2vw, 26px);
    font-weight: 400;
    line-height: 1.2;
}

.team-grid.background-black .team-grid__name,
.team-grid.background-dark-blue .team-grid__name {
    color: var(--white);
}

.team-grid__position {
    margin: 0.4rem 0 0;
    color: var(--gold);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.team-grid__email {
    margin-top: 0.35rem;
    color: var(--color-text);
    font-size: 0.9375rem;
    line-height: 1.4;
    text-decoration: none;
}

.team-grid.background-black .team-grid__email,
.team-grid.background-dark-blue .team-grid__email {
    color: var(--white);
}

.team-grid__email:hover,
.team-grid__email:focus-visible {
    color: var(--gold);
}

@media (max-width: 991px) {
    .team-grid__members {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem 1.5rem;
    }
}

@media (max-width: 767px) {
    .team-grid__members {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .team-grid__member picture {
        max-width: 320px;
    }
}
