/* ІЗОЛЬОВАНІ СТИЛІ БЛОКУ 5 (TEAM / НАМ ДОПОМАГАЮТЬ) */

#team.team-section {
    padding: var(--section-space-y) 0;
    background-color: var(--section-bg-unified);
    position: relative;
}

#team .team-header {
    text-align: center;
    margin-bottom: 60px;
}

#team .team-title {
    font-family: var(--font-family-display);
    font-size: var(--type-display-lg);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: var(--tracking-title);
    color: #f4f1ea;
    margin-bottom: 20px;
}

#team .team-title::after {
    content: '';
    display: block;
    width: 70px; height: 4px;
    background: var(--color-gold);
    margin: 15px auto 0;
}

#team .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    justify-items: center;
}

@media (min-width: 1024px) {
    #team .team-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 28px;
    }

    #team .team-card {
        width: 100%;
        max-width: 250px;
    }
}

@media (min-width: 1024px) and (max-width: 1200px) {
    #team .team-grid {
        gap: 20px;
    }

    #team .team-photo-wrap {
        width: 200px;
        height: 200px;
    }

    #team .team-name {
        font-size: 1.08rem;
    }

    #team .team-role {
        font-size: 0.84rem;
    }
}

#team .team-card {
    cursor: pointer;
    text-align: center;
    padding: 0;
    transition: var(--transition-smooth);
}

#team .team-card::before {
    content: none;
}

#team .team-card:focus-visible {
    outline: 2px solid rgba(252, 246, 186, 0.9);
    outline-offset: 4px;
    border-radius: 16px;
}

#team .team-photo-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid var(--color-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition-smooth);
    background: #1a1d16;
    padding: 8px;
}

#team .team-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(0.5);
    transition: var(--transition-smooth);
    border-radius: 50%;
}

#team .team-card:hover .team-photo-wrap {
    transform: scale(1.12);
    box-shadow: 0 18px 45px rgba(179, 135, 40, 0.45);
    border-color: var(--color-gold-light);
}

#team .team-card:hover {
    transform: translateY(-8px);
}

#team .team-card:hover img {
    filter: grayscale(0);
    transform: scale(1.03);
}

#team .team-name {
    font-family: var(--font-family-display);
    font-size: var(--type-title-md);
    font-weight: 800;
    color: #f4f1ea;
    margin-bottom: 5px;
    text-transform: uppercase;
    line-height: 1.28;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

#team .team-role {
    font-family: var(--font-family-text);
    font-size: var(--type-body-sm);
    color: var(--color-gold);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.38;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

/* Адаптація всередині Блоку 5 */
@media (max-width: 600px) {
    #team .team-header {
        margin-bottom: 40px;
    }

    #team .team-title {
        font-size: clamp(1.6rem, 4vw, 2.2rem);
    }

    #team .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 32px;
    }
}

@media (max-width: 480px) {
    #team .team-photo-wrap {
        width: 180px;
        height: 180px;
        padding: 6px;
    }

    #team .team-grid {
        gap: 28px;
    }

    #team .team-card {
        max-width: 260px;
        padding: 12px 10px 14px;
    }

    #team .team-name {
        font-size: 1.05rem;
    }

    #team .team-role {
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #team .team-card,
    #team .team-card::before,
    #team .team-photo-wrap,
    #team .team-photo-wrap img {
        transition: none;
    }

    #team .team-card:hover,
    #team .team-card:hover .team-photo-wrap,
    #team .team-card:hover img {
        transform: none;
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    #team.team-section {
        padding-top: var(--section-space-y-compact);
        padding-bottom: calc(var(--section-space-y-compact) - 14px);
    }
}

@media (min-width: 1440px) {
    #team.team-section {
        padding-top: calc(var(--section-space-y) + 6px);
        padding-bottom: calc(var(--section-space-y) - 14px);
    }
}

@media (min-width: 1280px) and (max-width: 1439px) and (max-height: 820px) {
    #team.team-section {
        padding-top: 64px;
        padding-bottom: 38px;
    }

    #team .team-header {
        margin-bottom: 46px;
    }
}