/* ═══════════════════════════════════════════
   TEAM.CSS — Страница команды (flex, центровка)
   ═══════════════════════════════════════════ */

.team-page h2 {
    font-size: clamp(30px, 3vw, 48px);
    line-height: 1;
    font-weight: 800;
    margin-bottom: 12px;
}

.team-page__subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 600px;
}

.team-page {
    margin-top: 56px;
}

.team-page__top {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-content: start;
}

.team-grid > .member-card {
    width: calc((100% - 40px) / 3);
    min-width: 260px;
}

/* Центрирование когда в строке < 3 */
.team-grid::after {
    content: '';
    flex: auto;
}

.member-card {
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.member-card__photo {
    width: 100%;
    height: 340px;
    border-radius: 22px;
    background: linear-gradient(180deg, #d7d8ff, #c7c9f7);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}

.member-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.member-card h3 {
    font-size: 24px;
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.member-card h4 {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 10px;
}

.member-card p {
    font-size: 12px;
    line-height: 1.45;
    color: #2b2b35;
}

/* ── TEAM RESPONSIVE ─────────────────────── */
@media (max-width: 1180px) {
    .team-grid > .member-card {
        width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 768px) {
    .team-grid > .member-card {
        width: 100%;
        max-width: 420px;
    }

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

    .member-card__photo {
        height: 300px;
    }

    .team-page__top {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .team-page {
        margin-top: 28px;
    }

    .member-card__photo {
        height: 260px;
        border-radius: 16px;
    }

    .member-card h3 {
        font-size: 18px;
    }

    .member-card h4 {
        font-size: 14px;
    }

    .team-page__subtitle {
        font-size: 13px;
    }
}
