/*
|--------------------------------------------------------------------------
| Публичная страница команды GCoop
|--------------------------------------------------------------------------
| staff.php: первый экран, карточки, состояния и подпись пагинации.
| Кнопки общей пагинации оформляются в pagination.css.
|--------------------------------------------------------------------------
*/

/* Первый экран */

.staff-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 5vw, 70px);

    min-height: 260px;
    margin-bottom: 24px;
    padding: clamp(28px, 5vw, 54px);

    border: 1px solid var(--border, #d9e0ea);
    border-radius: 24px;

    background:
        radial-gradient(
            circle at 90% 15%,
            rgb(37 99 235 / 14%),
            transparent 38%
        ),
        radial-gradient(
            circle at 8% 100%,
            rgb(37 99 235 / 5%),
            transparent 42%
        ),
        var(--surface, #ffffff);

    box-shadow: 0 16px 42px rgb(15 23 42 / 5%);
}

.staff-hero::before {
    position: absolute;
    z-index: -1;
    right: -80px;
    bottom: -130px;

    width: 310px;
    height: 310px;

    border: 1px solid rgb(37 99 235 / 12%);
    border-radius: 50%;

    content: "";
    pointer-events: none;
}

.staff-hero > div:first-child {
    min-width: 0;
    max-width: 720px;
}

.staff-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin: 0 0 16px;

    color: var(--primary, #2563eb);

    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.staff-hero .eyebrow::before {
    width: 19px;
    height: 2px;

    border-radius: 2px;

    background: currentColor;

    content: "";
}

.staff-hero h1 {
    margin: 0;

    color: var(--text, #172033);

    font-size: clamp(2.3rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.staff-hero p:not(.eyebrow) {
    max-width: 630px;
    margin: 20px 0 0;

    color: var(--text-soft, #64748b);

    font-size: clamp(0.98rem, 1.3vw, 1.08rem);
    line-height: 1.75;
}

.staff-hero-symbol {
    position: relative;

    display: grid;
    flex: 0 0 auto;
    place-items: center;

    width: clamp(94px, 13vw, 146px);
    aspect-ratio: 1;

    border: 1px solid rgb(37 99 235 / 24%);
    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgb(37 99 235 / 13%),
            rgb(37 99 235 / 3%)
        ),
        var(--bg-soft, #eff6ff);

    color: var(--primary, #2563eb);

    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;

    box-shadow:
        0 18px 35px rgb(37 99 235 / 10%),
        inset 0 1px 0 rgb(255 255 255 / 40%);

    transform: rotate(-7deg);
}

.staff-hero-symbol::after {
    position: absolute;
    inset: 9px;

    border: 1px solid rgb(37 99 235 / 11%);
    border-radius: 23px;

    content: "";
    pointer-events: none;
}

/* Список команды */

.staff-list {
    display: grid;
    gap: 16px;
}

.staff-card {
    display: grid;
    grid-template-columns: 174px minmax(0, 1fr);
    align-items: start;
    gap: clamp(22px, 3vw, 36px);

    padding: clamp(21px, 3vw, 30px);

    border: 1px solid var(--border, #d9e0ea);
    border-radius: 18px;

    background: var(--surface, #ffffff);

    box-shadow: 0 10px 28px rgb(15 23 42 / 4%);

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.staff-card:hover {
    border-color: rgb(37 99 235 / 30%);

    box-shadow: 0 16px 36px rgb(15 23 42 / 7%);

    transform: translateY(-2px);
}

/* Аватар и ранг */

.staff-avatar-column {
    display: flex;
    justify-content: center;

    min-width: 0;
    padding-bottom: 19px;
}

.staff-avatar-wrap {
    position: relative;

    display: block;
    flex: 0 0 auto;

    width: 144px;
    height: 144px;

    color: inherit;
    text-decoration: none;
}

.staff-avatar-image {
    display: block;

    width: 100%;
    height: 100%;

    border: 2px solid var(--border, #d9e0ea);
    border-radius: 20px;

    background: var(--bg-soft, #eff6ff);

    object-fit: cover;
    object-position: center;
}

.staff-avatar-wrap:hover .staff-avatar-image {
    border-color: var(--primary, #2563eb);
}

.staff-avatar-wrap:focus-visible {
    border-radius: 20px;
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 4px;
}

.staff-rank-badge {
    position: absolute;
    right: -8px;
    bottom: -13px;

    box-sizing: border-box;

    max-width: 165px;
    padding: 7px 10px;

    border: 2px solid var(--surface, #ffffff);
    border-radius: 999px;

    background: var(--primary, #2563eb);
    color: var(--primary-text, #ffffff);

    font-size: 0.69rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;

    overflow-wrap: anywhere;

    box-shadow: 0 5px 12px rgb(15 23 42 / 13%);
}

/* Имя, ранг и должность */

.staff-card-content {
    min-width: 0;
}

.staff-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.staff-card-heading > div {
    min-width: 0;
}

.staff-rank-label {
    margin: 0 0 7px;

    color: var(--primary, #2563eb);

    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.staff-card-heading h2 {
    margin: 0;

    color: var(--text, #172033);

    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;

    overflow-wrap: anywhere;
}

.staff-profile-name-link,
.staff-profile-link {
    color: inherit;
    text-decoration: none;
}

.staff-profile-name-link:hover,
.staff-profile-link:hover {
    color: var(--primary, #2563eb);

    text-decoration: underline;
    text-underline-offset: 4px;
}

.staff-profile-name-link:focus-visible,
.staff-profile-link:focus-visible {
    border-radius: 3px;
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 3px;
}

.staff-username {
    margin: 7px 0 0;

    color: var(--text-soft, #64748b);

    font-size: 0.87rem;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

.staff-position {
    box-sizing: border-box;
    flex: 0 1 auto;

    max-width: 260px;
    padding: 8px 12px;

    border: 1px solid rgb(37 99 235 / 12%);
    border-radius: 999px;

    background: var(--bg-soft, #eff6ff);
    color: var(--primary, #2563eb);

    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;

    overflow-wrap: anywhere;
}

.staff-role-description {
    margin-top: 18px;
    padding: 13px 16px;

    border-left: 3px solid var(--primary, #2563eb);
    border-radius: 0 11px 11px 0;

    background: var(--bg-soft, #eff6ff);
    color: var(--text, #334155);

    font-size: 0.9rem;
    line-height: 1.65;
}

/* Статусы участника */

.staff-member-inactive,
.staff-member-banned {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    max-width: 100%;
    margin-top: 14px;
    padding: 8px 11px;

    border: 1px solid var(--border, #d9e0ea);
    border-radius: 9px;

    background: var(--bg-soft, #f1f5f9);
    color: var(--text-soft, #64748b);

    font-size: 0.79rem;
    font-weight: 750;
    line-height: 1.4;
}

.staff-member-inactive > span,
.staff-member-banned > span {
    flex: 0 0 auto;
}

.staff-member-banned {
    border-color: #fecaca;

    background: #fff1f2;
    color: #b91c1c;
}

/* О себе и интересы */

.staff-info-section {
    margin-top: 20px;
}

.staff-info-title {
    display: block;

    margin-bottom: 9px;

    color: var(--text-soft, #64748b);

    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.staff-info-text {
    color: var(--text, #334155);

    font-size: 0.94rem;
    line-height: 1.75;

    overflow-wrap: anywhere;
}

.staff-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.staff-interests span {
    max-width: 100%;
    padding: 7px 10px;

    border: 1px solid rgb(37 99 235 / 10%);
    border-radius: 999px;

    background: var(--bg-soft, #eff6ff);
    color: var(--primary, #2563eb);

    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.4;

    overflow-wrap: anywhere;
}

/* Действия */

.staff-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid var(--border, #d9e0ea);
}

.staff-contact-button,
.staff-profile-button,
.staff-steam-link {
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 9px 13px;

    border: 1px solid var(--border, #d9e0ea);
    border-radius: 10px;

    background: var(--surface, #ffffff);
    color: var(--text, #172033);

    font-size: 0.87rem;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;

    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.staff-contact-button {
    border-color: var(--primary, #2563eb);

    background: var(--primary, #2563eb);
    color: var(--primary-text, #ffffff);
}

.staff-contact-button:hover {
    border-color: var(--primary-hover, #1d4ed8);

    background: var(--primary-hover, #1d4ed8);
    color: var(--primary-text, #ffffff);

    transform: translateY(-1px);
}

.staff-profile-button:hover,
.staff-steam-link:hover {
    border-color: var(--primary, #2563eb);

    background: var(--bg-soft, #eff6ff);
    color: var(--primary, #2563eb);

    transform: translateY(-1px);
}

.staff-contact-button:focus-visible,
.staff-profile-button:focus-visible,
.staff-steam-link:focus-visible {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 3px;
}

/* Подпись над общей пагинацией */

.staff-pagination-info {
    margin: 24px 0 12px;

    color: var(--text-faint, #94a3b8);

    font-size: 0.83rem;
    line-height: 1.5;
    text-align: center;
}

/* Пустое состояние */

.staff-empty {
    display: grid;
    justify-items: center;

    padding: clamp(38px, 7vw, 68px) 24px;

    border: 1px dashed var(--border-strong, #b8c5d4);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at 50% 0,
            rgb(37 99 235 / 7%),
            transparent 48%
        ),
        var(--surface, #ffffff);

    text-align: center;
}

.staff-empty > div {
    display: grid;
    place-items: center;

    width: 66px;
    height: 66px;
    margin-bottom: 18px;

    border: 1px solid rgb(37 99 235 / 15%);
    border-radius: 19px;

    background: var(--bg-soft, #eff6ff);
    color: var(--primary, #2563eb);

    font-size: 2rem;
    line-height: 1;
}

.staff-empty h2 {
    margin: 0;

    color: var(--text, #172033);

    font-size: 1.35rem;
    line-height: 1.3;
}

.staff-empty p {
    max-width: 440px;
    margin: 10px 0 0;

    color: var(--text-soft, #64748b);

    line-height: 1.65;
}

/* Мобильные экраны */

@media (max-width: 780px) {
    .staff-card {
        grid-template-columns: 136px minmax(0, 1fr);
        gap: 22px;
    }

    .staff-avatar-wrap {
        width: 120px;
        height: 120px;
    }

    .staff-rank-badge {
        max-width: 145px;
    }

    .staff-card-heading {
        flex-wrap: wrap;
    }
}

@media (max-width: 620px) {
    .staff-hero {
        align-items: flex-start;
        min-height: 0;
        padding: 27px 24px;
        border-radius: 19px;
    }

    .staff-hero-symbol {
        width: 78px;
        border-radius: 22px;
        font-size: 2.25rem;
    }

    .staff-hero-symbol::after {
        border-radius: 15px;
    }

    .staff-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;

        padding: 21px;
        border-radius: 16px;
    }

    .staff-avatar-column {
        justify-content: flex-start;
        padding: 0 0 14px 8px;
    }

    .staff-avatar-wrap {
        width: 106px;
        height: 106px;
    }

    .staff-rank-badge {
        right: -9px;
        max-width: 160px;
    }
}

@media (max-width: 520px) {
    .staff-hero {
        flex-direction: column-reverse;
        gap: 21px;
        padding: 25px 21px;
    }

    .staff-hero-symbol {
        width: 60px;
        border-radius: 18px;
        font-size: 1.8rem;
    }

    .staff-hero-symbol::after {
        inset: 6px;
        border-radius: 12px;
    }

    .staff-hero .eyebrow {
        margin-bottom: 12px;
    }

    .staff-hero p:not(.eyebrow) {
        margin-top: 14px;
    }

    .staff-card {
        padding: 19px 16px;
    }

    .staff-card-actions {
        align-items: stretch;
    }
}

@media (max-width: 390px) {
    .staff-card-actions > a {
        width: 100%;
    }
}

/* Тёмная тема: цвета берутся из переменных data-theme. */

html[data-theme="dark"] .staff-hero,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .staff-empty {
    box-shadow: none;
}

html[data-theme="dark"] .staff-hero-symbol,
html[data-theme="dark"] .staff-avatar-image,
html[data-theme="dark"] .staff-position,
html[data-theme="dark"] .staff-role-description,
html[data-theme="dark"] .staff-interests span,
html[data-theme="dark"] .staff-empty > div {
    background-color: var(--bg-soft, #172033);
}

html[data-theme="dark"] .staff-role-description,
html[data-theme="dark"] .staff-info-text {
    color: var(--text, #dbeafe);
}

html[data-theme="dark"] .staff-member-banned {
    border-color: #7f1d1d;

    background: #3b1419;
    color: #fca5a5;
}

@media (prefers-reduced-motion: reduce) {
    .staff-card,
    .staff-contact-button,
    .staff-profile-button,
    .staff-steam-link {
        transition: none;
    }

    .staff-card:hover,
    .staff-contact-button:hover,
    .staff-profile-button:hover,
    .staff-steam-link:hover {
        transform: none;
    }
}