.team-grid {
    background: var(--color-greige-light);
    padding-top:    var(--pad-y-alt);
    padding-bottom: var(--pad-y-alt);
    padding-left:   var(--pad-x);
    padding-right:  var(--pad-x);
}

.team-grid__inner {
    width: 100%;
    max-width: var(--site-max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ── Header: divider-flanked heading + intro copy ───────────── */
.team-grid__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.team-grid__heading-row {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.team-grid__rule {
    flex: 1 1 0;
    height: 1px;
    background: var(--color-dark);
    opacity: 0.2;
}

.team-grid__heading {
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 48px;
    line-height: 54px;
    color: var(--color-dark);
    white-space: nowrap;
}

.team-grid__intro {
    max-width: 780px;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 28px;
    color: var(--color-dark);
}

/* ── Grid of members ─────────────────────────────────────────── */
.team-grid__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 40px;
}

.team-grid__member {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-grid__photo {
    width: 100%;
    aspect-ratio: 382 / 400;
    overflow: hidden;
}

.team-grid__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
}

.team-grid__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-grid__name {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 36px;
    line-height: 42px;
    color: var(--color-dark);
}

.team-grid__bio {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 26px;
    color: var(--color-dark);
}

/* ── Nav controls (tablet/mobile carousel only) ─────────────── */
.team-grid__nav {
    display: none;
}

.team-grid__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--color-dark);
    transition: var(--transition);
}

.team-grid__nav-icon {
    display: block;
    width: 36px;
    height: 18px;
}

.team-grid__nav-btn--prev .team-grid__nav-icon {
    transform: rotate(180deg);
}

.team-grid__nav-btn:hover {
    opacity: 0.65;
}

.team-grid__nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 1366px) {
    .team-grid__inner {
        gap: 40px;
    }

    .team-grid__heading {
        font-size: 40px;
        line-height: 46px;
    }

    .team-grid__row {
        gap: 40px 24px;
    }

    .team-grid__name {
        font-size: 30px;
        line-height: 36px;
    }
}

@media (max-width: 1024px) {
    /* Grid → horizontal scroll carousel (2 per view) with arrow controls. */
    .team-grid__row {
        display: flex;
        grid-template-columns: none;
        gap: 24px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .team-grid__row::-webkit-scrollbar {
        display: none;
    }

    .team-grid__member {
        flex: 0 0 calc((100% - 24px) / 2);
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .team-grid__nav {
        display: flex;
        justify-content: center;
        gap: 32px;
    }

    .team-grid__heading {
        font-size: 32px;
        line-height: 38px;
        white-space: normal;
    }
}

@media (max-width: 767px) {
    .team-grid__inner {
        gap: 32px;
    }

    .team-grid__heading-row {
        gap: 16px;
    }

    .team-grid__row {
        gap: 16px;
    }

    /* One member per view with a peek of the next. */
    .team-grid__member {
        flex-basis: 82%;
    }
}
