main {
    display: block;
}

.team-section {
    padding: 4rem 0;
}

.team-section.alt {
    background: #f6f6f6;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
}

.team-container {
    width: min(1140px, 90%);
    margin: 0 auto;
}

.team-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1.2;
}

.team-description {
    margin: 0 0 1.75rem;
    max-width: 76ch;
    color: #3a3a3a;
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 300;
}

.director-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.director-layout .left {
    flex: 1;
    min-width: 0;
}

.director-layout .right {
    width: min(200px, 100%);
    flex-shrink: 0;
}

.director-layout .team-description {
    margin-bottom: 0;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: flex-start;
}

.team-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-grid.cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.team-grid.cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.team-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-grid.cols-1 {
    grid-template-columns: minmax(0, 320px);
}

.team-card {
    margin: 0;
    width: min(200px, 100%);
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 0.35rem;
    overflow: hidden;
}

.team-card img {
    display: block;
    width: 100%;
    aspect-ratio: 25 / 37;
    object-fit: cover;
    background: #ddd;
}

.team-card figcaption {
    padding: 0.85rem 0.9rem;
    text-align: center;
}

.team-name {
    display: block;
    color: var(--primary-color);
    font-size: 0.92rem;
    font-weight: 300;
}

.team-role {
    display: block;
    margin-top: 0.35rem;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 300;
    line-height: 1.35;
}

@media (max-width: 1000px) {
    .team-grid.cols-6,
    .team-grid.cols-5,
    .team-grid.cols-4,
    .team-grid.cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .team-section {
        padding: 3rem 0;
    }

    .director-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .team-grid {
        justify-content: center;
    }

    .team-grid.cols-6,
    .team-grid.cols-5,
    .team-grid.cols-4,
    .team-grid.cols-3,
    .team-grid.cols-2,
    .team-grid.cols-1 {
        grid-template-columns: 1fr;
    }

    .team-description {
        margin-bottom: 1.3rem;
    }
}
