.team-page {
    --team-text: #070707;
    --team-border: #dadbdc;
    --team-yellow: #ffd64b;
    color: var(--team-text);
    background: #fff;
    overflow: hidden;
}

.team-container {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.team-hero__title {
    margin: 0;
    padding: 48px 0 32px;
    font-family: var(--font-family-base, Inter, sans-serif);
    font-size: clamp(40px, 4.27vw, 64px);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.team-hero__image-wrap {
    position: relative;
    aspect-ratio: 1500 / 667;
    overflow: hidden;
    border-bottom: 4px solid #e5e5e5;
    background: #fff;
}

.team-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 135.23%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.team-directory {
    position: relative;
    padding: 64px 0 0;
    isolation: isolate;
}

.team-directory__dots {
    position: absolute;
    z-index: -1;
    top: 1228px;
    left: calc(50% + 445px);
    width: 976px;
    height: 976px;
    max-width: none;
    pointer-events: none;
}

.team-section {
    position: relative;
    padding: 24px 0;
}

.team-section:first-of-type {
    padding-top: 0;
}

.team-section__title {
    margin: 0 0 24px;
    font-family: var(--font-family-base, Inter, sans-serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 31px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

@media (min-width: 1024px) {
    .team-section--right .team-grid:has(.team-card:nth-child(2):last-child) .team-card:first-child {
        grid-column-start: 3;
    }

    .team-section--right .team-grid:has(.team-card:nth-child(3):last-child) .team-card:first-child {
        grid-column-start: 2;
    }
}

.team-section--finance .team-section__title,
.team-section--spb .team-section__title {
    text-align: right;
}

.team-section__finance-mark {
    position: absolute;
    z-index: -1;
    top: 79px;
    left: calc(50% - 877px);
    width: 393px;
    height: 298px;
    max-width: none;
    object-fit: contain;
    transform: rotate(-9.74deg);
    pointer-events: none;
}

.team-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    overflow: hidden;
    border: 0;
    box-shadow: inset 0 0 0 1px var(--team-border);
    border-radius: 16px;
    background: #fff;
}

.team-card__group {
    position: absolute;
    bottom: calc(100% + 24px);
    left: 0;
    margin: 0;
    font: 700 24px/31px var(--font-family-base, Inter, sans-serif);
    white-space: nowrap;
}

.team-card:has(.team-card__group) {
    margin-top: 55px;
    overflow: visible;
}

.team-card__photo {
    position: relative;
    width: 100%;
    aspect-ratio: 284 / 281;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.team-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card__image--alexey {
    position: absolute;
    top: -9.69%;
    left: 0;
    width: 100%;
    height: 151.91%;
    max-width: none;
    object-fit: fill;
}

.team-card__image--elvira {
    position: absolute;
    top: -31.54%;
    left: -20%;
    width: 120%;
    height: 182.21%;
    max-width: none;
    object-fit: fill;
}

.team-card__photo--note {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: linear-gradient(147.7906deg, rgba(255, 238, 179, .6), rgba(251, 196, 10, 0)), var(--team-yellow);
}

.team-card__note {
    max-width: 252px;
    color: rgba(0, 0, 0, .46);
    font: 600 14px/1.3 var(--font-family-base, Inter, sans-serif);
    text-align: center;
    white-space: pre-line;
}

.team-card__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
}

.team-card__placeholder-icon {
    position: absolute;
    top: 18.8612%;
    left: 0;
    display: block;
    width: 100%;
    height: 145.0224%;
    max-width: none;
    object-fit: fill;
    opacity: .1;
}

.team-card__body {
    padding: 12px 8px;
}

.team-card__name,
.team-card__position {
    margin: 0;
}

.team-card__name {
    font: 600 16px/21px var(--font-family-base, Inter, sans-serif);
}

.team-card__position {
    margin-top: 8px;
    color: #1e1e1f;
    font: 500 14px/20px var(--font-family-base, Inter, sans-serif);
}

.team-card--vacancy {
    gap: 0;
    justify-content: space-between;
    align-self: end;
    height: 358px;
    background: linear-gradient(141.4127deg, rgba(255, 238, 179, .6), rgba(251, 196, 10, 0)), var(--team-yellow);
}

.team-card--vacancy .team-card__photo {
    display: flex;
    flex: 1 1 auto;
    aspect-ratio: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: transparent;
}

.team-card__vacancy-mark {
    width: 160px;
    height: 108px;
}

.team-card__vacancy-text {
    display: block;
    padding: 12px 8px;
    font: 600 16px/1.3 var(--font-family-base, Inter, sans-serif);
    text-align: center;
}

.team-card__vacancy-link {
    display: flex;
    flex-shrink: 0;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: #1e1e1e;
    font: 700 11px/1 var(--font-family-base, Inter, sans-serif);
    letter-spacing: .33px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .2s ease;
}

.team-card__vacancy-link:hover {
    color: #1e1e1e;
    background: #fff;
}

.team-page-block {
    margin: 0;
    padding: 24px 0;
    background: #fff;
}

@media (max-width: 1023px) {
    .team-container {
        width: min(calc(100% - 40px), 760px);
    }

    .team-hero__image-wrap {
        min-height: 0;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .team-hero__image {
        position: static;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .team-directory__dots,
    .team-section__finance-mark {
        display: none;
    }

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

    .team-section--right .team-grid .team-card:first-child {
        grid-column-start: auto;
    }

    .team-section--finance .team-section__title,
    .team-section--spb .team-section__title {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .team-container {
        width: calc(100% - 32px);
    }

    .team-hero__title {
        padding: 32px 0 24px;
        font-size: 30px;
        line-height: 1.14;
    }

    .team-hero__title br {
        display: none;
    }

    .team-directory {
        padding: 24px 0 0;
    }

    .team-section {
        padding: 20px 0;
    }

    .team-section__title,
    .team-card__group {
        font-size: 20px;
        line-height: 1.3;
    }

    .team-section__title {
        margin-bottom: 16px;
    }

    .team-grid,
    .team-section--right .team-grid {
        gap: 10px;
    }

    .team-card {
        gap: 4px;
        padding: 7px;
        border-radius: 12px;
    }

    .team-card__photo {
        border-radius: 9px;
    }

    .team-card__body {
        min-height: 54px;
        padding: 8px 4px;
    }

    .team-card__name {
        font-size: 13px;
        line-height: 1.3;
    }

    .team-card__position {
        margin-top: 5px;
        font-size: 11px;
        line-height: 1.4;
    }

    .team-card__note {
        font-size: 10px;
    }

    .team-card__photo--note {
        padding: 9px;
    }

    .team-card--vacancy {
        height: auto;
        min-height: 225px;
    }

    .team-card__vacancy-mark {
        width: 86px;
        height: auto;
    }

    .team-card__vacancy-text {
        padding: 6px 3px;
        font-size: 12px;
    }

    .team-card__vacancy-link {
        height: 34px;
        border-radius: 9px;
        font-size: 9px;
    }

    .team-card__group {
        position: static;
        margin: 2px 0 8px;
    }

    .team-card:has(.team-card__group) {
        margin-top: 0;
    }
}

@media (max-width: 360px) {
    .team-grid,
    .team-section--right .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card--vacancy {
        min-height: 300px;
    }
}
