/* ==========================================================================
   Team Page
   ========================================================================== */
.team-page-redesign {
    min-height: 100vh;
}

.team-page-hero {
    position: relative;
    overflow: hidden;
}

.team-page-hero-media,
.team-page-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.team-page-hero-media img {
    object-fit: cover;
    object-position: center top;
}

.team-page-hero-wash {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--team-color) 72%, transparent 28%) 0%, color-mix(in srgb, var(--team-color) 44%, transparent 56%) 42%, rgba(2, 6, 23, 0.72) 100%);
}

.team-page-hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.36) 56%, rgba(2, 6, 23, 0.82) 100%);
}

.team-page-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 34px;
    padding-bottom: 86px;
}

.team-page-breadcrumb {
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.68);
}

.team-page-breadcrumb a:hover {
    color: #fff;
}

.team-page-kickers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.team-page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.team-page-kicker-trend.is-win {
    color: #86efac;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.24);
}

.team-page-kicker-trend.is-loss {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.24);
}

.team-page-identity-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.team-page-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.team-page-logo {
    width: 136px;
    min-width: 136px;
    max-width: 136px;
    height: 136px;
    min-height: 136px;
    max-height: 136px;
    flex: 0 0 136px;
    border-radius: 28px;
    background-size: 84%;
    background-color: rgba(15, 23, 42, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.28);
}

.team-page-titleblock {
    min-width: 0;
}

.team-page-city {
    margin: 0 0 4px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 1.05rem;
    font-weight: 500;
}

.team-page-titleblock h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(3rem, 6vw, 4.8rem);
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: 0;
}

.team-page-record-callout {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 22px 28px;
    border-radius: 22px;
    background: var(--panel-dark-soft);
    backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border-soft);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.team-page-record-side,
.team-page-rank-side {
    text-align: center;
}

.team-page-record-side {
    padding-right: 26px;
    margin-right: 26px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.team-page-record-callout p {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.team-page-record-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.team-page-record-values span,
.team-page-rank-side strong {
    color: #fff;
    font-size: clamp(2.6rem, 4vw, 4.2rem);
    font-weight: 900;
    line-height: 1;
}

.team-page-record-values .is-losses {
    color: rgba(255, 255, 255, 0.5);
}

.team-page-record-values em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.28);
    font-size: 1.8rem;
    font-weight: 700;
}

.team-page-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 0;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.96rem;
}

.team-page-meta-row span:not(:last-child)::after {
    content: "В·";
    margin: 0 12px;
    color: rgba(255, 255, 255, 0.32);
}

.team-page-intro {
    max-width: 980px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.12rem;
    line-height: 1.8;
}

.team-page-colorbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--team-color), var(--team-accent), transparent 88%);
}

.team-page-tabs-shell {
    position: sticky;
    top: 72px;
    z-index: 20;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.65);
}

.team-page-tabs {
    display: flex;
    gap: 2px;
}

.team-page-tabs button {
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 16px 20px;
    font-size: 0.92rem;
    font-weight: 800;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.team-page-tabs button:hover {
    color: #cbd5e1;
}

.team-page-tabs button.is-active {
    color: #fff;
    border-bottom-color: #f97316;
}

.team-page-content {
    padding-top: 36px;
    padding-bottom: 56px;
}

.team-page-panel {
    display: none;
}

.team-page-panel.is-active {
    display: block;
}

.team-page-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 32px;
}

.team-page-maincol,
.team-page-sidecol {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.team-page-card,
.team-page-sidecard {
    background: var(--panel-dark-strong);
    border: 1px solid var(--panel-border-strong);
    border-radius: 18px;
}

.team-page-card {
    padding: 24px 26px;
}

.team-page-card h3,
.team-page-sidecard h3,
.team-page-stat-section h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.team-page-stat-grid,
.team-page-metrics-grid-wide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.team-page-metrics-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-page-stat-pill {
    padding: 14px 16px;
    border-radius: 14px;
    background: #1e293b;
    border: 1px solid rgba(51, 65, 85, 0.85);
}

.team-page-stat-pill.is-highlight {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.28);
}

.team-page-stat-pill span {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.team-page-stat-pill strong {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1.05;
}

.team-page-form-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.team-page-form-dots span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 900;
}

.team-page-form-dots .is-win {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.team-page-form-dots .is-loss {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.team-page-player-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.team-page-player-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(51, 65, 85, 0.8);
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.team-page-player-link:hover {
    transform: translateY(-1px);
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(249, 115, 22, 0.42);
}

.team-page-player-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    overflow: hidden;
    border-radius: 999px;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.team-page-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.team-page-player-link strong,
.team-page-player-link em {
    display: block;
}

.team-page-player-link strong {
    color: #fff;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.2;
}

.team-page-player-link em {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.team-page-copy {
    color: #cbd5e1;
    font-size: 0.98rem;
    line-height: 1.85;
}

.team-page-sidecard {
    overflow: hidden;
}

.team-page-sidecard-topline {
    padding: 14px 18px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--team-color) 58%, transparent) 0%, transparent 100%);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.team-page-sidecard-body {
    padding: 18px;
}

.team-page-sidecard-body strong {
    display: block;
    color: #fff;
    font-size: 1.16rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.team-page-sidecard-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.92rem;
}

.team-page-facts {
    display: grid;
    gap: 12px;
    margin: 0;
}

.team-page-facts div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.team-page-facts dt {
    color: #94a3b8;
    font-size: 0.92rem;
}

.team-page-facts dd {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: right;
}

[data-theme='light'] .team-page-hero-wash {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--team-color) 72%, transparent 28%) 0%, color-mix(in srgb, var(--team-color) 44%, transparent 56%) 42%, rgba(2, 6, 23, 0.72) 100%);
}

[data-theme='light'] .team-page-hero-fade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.36) 56%, rgba(2, 6, 23, 0.82) 100%);
}

[data-theme='light'] .team-page-breadcrumb,
[data-theme='light'] .team-page-meta-row,
[data-theme='light'] .team-page-intro,
[data-theme='light'] .team-page-city {
    color: rgba(255, 255, 255, 0.76);
}

[data-theme='light'] .team-page-titleblock h1,
[data-theme='light'] .team-page-card h3,
[data-theme='light'] .team-page-sidecard h3,
[data-theme='light'] .team-page-stat-section h2 {
    color: #0f172a;
}

[data-theme='light'] .team-page-titleblock h1,
[data-theme='light'] .team-page-record-values span,
[data-theme='light'] .team-page-rank-side strong {
    color: #fff;
}

[data-theme='light'] .team-page-record-values .is-losses {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme='light'] .team-page-record-callout {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

[data-theme='light'] .team-page-record-callout p {
    color: rgba(255, 255, 255, 0.56);
}

[data-theme='light'] .team-page-record-side {
    border-right-color: rgba(255, 255, 255, 0.1);
}

[data-theme='light'] .team-page-record-values em {
    color: rgba(255, 255, 255, 0.28);
}

[data-theme='light'] .team-page-tabs-shell {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(203, 213, 225, 0.88);
}

[data-theme='light'] .team-page-tabs button {
    color: #64748b;
}

[data-theme='light'] .team-page-tabs button:hover {
    color: #0f172a;
}

[data-theme='light'] .team-page-card,
[data-theme='light'] .team-page-sidecard {
    background: var(--panel-light-strong);
    border-color: var(--panel-light-border);
    box-shadow: var(--panel-shadow-light);
}

[data-theme='light'] .team-page-stat-pill {
    background: #f8fafc;
    border-color: rgba(203, 213, 225, 0.9);
}

[data-theme='light'] .team-page-player-link {
    background: #f8fafc;
    border-color: rgba(203, 213, 225, 0.9);
}

[data-theme='light'] .team-page-player-link:hover {
    background: #fff7ed;
    border-color: rgba(249, 115, 22, 0.36);
}

[data-theme='light'] .team-page-player-avatar {
    background: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.34);
}

[data-theme='light'] .team-page-stat-pill strong,
[data-theme='light'] .team-page-sidecard-body strong,
[data-theme='light'] .team-page-facts dd,
[data-theme='light'] .team-page-player-link strong {
    color: #0f172a;
}

[data-theme='light'] .team-page-copy,
[data-theme='light'] .team-page-sidecard-body ul,
[data-theme='light'] .team-page-facts dt,
[data-theme='light'] .team-page-player-link em {
    color: #475569;
}

@media (max-width: 1024px) {
    .team-page-identity-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-page-columns {
        grid-template-columns: 1fr;
    }

    .team-page-metrics-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .team-page-hero-inner {
        padding-top: 26px;
        padding-bottom: 58px;
    }

    .team-page-logo {
        width: 98px;
        min-width: 98px;
        max-width: 98px;
        height: 98px;
        min-height: 98px;
        max-height: 98px;
        flex: 0 0 98px;
        border-radius: 20px;
    }

    .team-page-titleblock h1 {
        font-size: clamp(2.6rem, 10vw, 3.6rem);
    }

    .team-page-record-callout {
        width: 100%;
        padding: 18px 20px;
    }

    .team-page-record-side {
        padding-right: 18px;
        margin-right: 18px;
    }

    .team-page-stat-grid,
    .team-page-metrics-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-page-player-list {
        grid-template-columns: 1fr;
    }

    .team-page-card,
    .team-page-sidecard-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}
