.team {
    /* margin → .section utility class */
    display: flex;
    flex-direction: column;
    gap: 100px;
    overflow: hidden; /* clips slides that peek past the right viewport edge */
}

.team-up {
    padding-top: calc(var(--pixel) * 100);
    padding-bottom: calc(var(--pixel) * 100);
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* background-image → inline <style> из team.php (ACF, адаптив) */
    background-repeat: no-repeat;
    background-size: cover;
}

.team-up__header {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.team-up__header h2 {
    max-width: calc(var(--pixel) * 955);
}

.team-up__bottom {
    display: flex;
    flex-direction: row;
    gap: calc(var(--pixel) * 60);
}

.team-up__bottom__logo {
    object-fit: contain;
    width: calc(var(--pixel) * 300);
    height: calc(var(--pixel) * 62);
}

.team-up__hr {
    display: block;
    width: 1px;
    height: calc(var(--pixel) * 61);
    background-color: var(--color-solar-gold);
}

.team-up__bottom p {
    max-width: calc(var(--pixel) * 630);
    font-weight: var(--fw-semibold);
}

.team-down {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.team-down__header {
    display: flex;
    flex-direction: column;
    gap: calc(var(--pixel) * 25);
}

.team-down__header h3 {
    max-width: calc(var(--pixel) * 958);
}

.team-down__header p {
    max-width: calc(var(--pixel) * 713);
    font-weight: var(--fw-medium);
}

/* ─── Swiper override ─────────────────────────────────────────────────────── */

.team-swiper {
    overflow: visible; /* slides extend past container; section clips them */
}

/* ─── Team card ───────────────────────────────────────────────────────────── */

.team-card {
    width: calc(var(--pixel) * 530); /* Swiper reads this for slidesPerView: 'auto' */
    display: flex;
    flex-direction: column;
    gap: calc(var(--pixel) * 25);
}

.team-card__photo {
    position: relative;
    overflow: hidden;
    height: calc(var(--pixel) * 600);
    width: 100%;
    background: radial-gradient(114.21% 110.31% at 47.74% 54.52%, #ffffff 0%, #888671 100%)
        /* warning: gradient uses a rotation that is not supported by CSS and may not behave as expected */;
}

.team-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-card__badge {
    position: absolute;
    bottom: calc(var(--pixel) * 25);
    left: calc(var(--pixel) * 25);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--gap-sm);
    background-color: var(--color-white);
    padding: calc(var(--pixel) * 10);
}

.team-card__badge .divider {
    display: block;
    width: calc(var(--pixel) * 7);
    height: calc(var(--pixel) * 7);
    background-color: var(--color-solar-gold);
    border-radius: 50%;
}

.team-card__info {
    display: flex;
    flex-direction: column;
    gap: calc(var(--pixel) * 16);
}

.team-card__name {
    font-style: italic;
    font-size: calc(var(--pixel) * 30);
}

.team-card__role {
    font-weight: var(--fw-medium);
}

/* ─── Navigation ──────────────────────────────────────────────────────────── */

.team-slider {
    position: relative;
}

.team-navigation {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: calc(var(--pixel) * 8);
    position: absolute;
    width: fit-content;
    top: -60px;
    right: 0;
}

.team-swiper__btn {
    position: static;
    width: calc(var(--pixel) * 45);
    height: calc(var(--pixel) * 45);
    background-color: var(--color-sapphire-deep);
    transition: 0.3s background-color ease;
}

.team-swiper__btn::after {
    content: '';
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: calc(var(--pixel) * 13);
    height: calc(var(--pixel) * 13);
    background-image: url('../img/arrow_white.svg');
    transition: 0.3s filter ease;
}

.team-swiper__btn--prev::after {
    transform: rotate(180deg);
}

.team-swiper__btn:hover {
    background-color: var(--color-solar-gold);
}

.team-swiper__btn:hover::after {
    filter: invert(1);
}

.team-swiper__btn.swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.team-swiper__btn.swiper-button-disabled:hover {
    background-color: var(--color-sapphire-deep);
}

.team-swiper__btn.swiper-button-disabled:hover::after {
    filter: invert(0);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1439px) {
    .team {
        gap: 80;
    }

    .team-up__header h2 {
        max-width: unset;
    }

    .team-up__bottom {
        flex-direction: column;
        gap: calc(var(--pixel) * 35);
    }

    .team-up__hr {
        width: calc(var(--pixel) * 61);
        height: calc(var(--pixel) * 1);
    }

    .team-down {
        gap: 45px;
    }

    .team-down__header h3 {
        max-width: unset;
    }

    .team-down__header p {
        max-width: unset;
    }

    /* ─── Swiper override ─────────────────────────────────────────────────────── */

    .team-swiper {
        margin-bottom: calc(var(--pixel) * 45);
    }

    /* ─── Navigation ──────────────────────────────────────────────────────────── */

    .team-navigation {
        width: 100%;
        position: relative;
        top: unset;
        right: unset;
        height: calc(var(--pixel) * 45);
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .team {
        gap: 80px;
    }

    .team-up {
        padding-top: calc(var(--pixel) * 60);
        padding-bottom: calc(var(--pixel) * 60);
        gap: calc(var(--pixel) * 45);
    }

    .team-up__bottom {
        gap: calc(var(--pixel) * 25);
    }

    .team-up__bottom__logo {
        width: calc(var(--pixel) * 246);
        height: calc(var(--pixel) * 50);
    }

    .team-up__bottom p {
        font-size: calc(var(--pixel) * 15);
    }

    .team-down {
        gap: calc(var(--pixel) * 45);
    }

    /* ─── Team card ───────────────────────────────────────────────────────────── */

    .team-card {
        width: calc(var(--pixel) * 320); /* Swiper reads this for slidesPerView: 'auto' */
    }

    .team-card__photo {
        height: calc(var(--pixel) * 435);
    }

    .team-card__badge {
        bottom: calc(var(--pixel) * 20);
        left: calc(var(--pixel) * 20);
        font-size: calc(var(--pixel) * 15);
    }
}
