/* ==========================================================================
   Teams + Shared Archive Hero
   ========================================================================== */
.teams-page {
    min-height: 100vh;
}

.teams-hero-band,
.news-hero-band {
    position: relative;
    overflow: hidden;
}

.teams-hero-band {
    background: #020617;
}

.teams-hero-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78) 55%, rgba(2, 6, 23, 0.42)),
        radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.16), transparent 26%),
        url("https://images.unsplash.com/photo-1556764420-e37ef4cdfa5c?w=1600&h=520&fit=crop&auto=format") center/cover no-repeat;
    opacity: 0.92;
}

.teams-hero-band::after,
.news-hero-band::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    z-index: 3;
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.45), rgba(239, 68, 68, 0.18), transparent);
}

.teams-hero-inner,
.news-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 24px;
    padding-bottom: 72px;
}

.teams-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(148, 163, 184, 0.85);
    font-size: 0.92rem;
    margin-bottom: 22px;
}

.teams-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.teams-breadcrumb a:hover {
    color: #fb923c;
}

.teams-hero-inner h1 {
    margin: 0;
    font-size: clamp(3.2rem, 8vw, 5.5rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
    color: #fff;
}

.teams-hero-inner h1 span {
    background: linear-gradient(90deg, #fb923c, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.teams-hero-inner > p {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(148, 163, 184, 0.92);
    font-size: 1.08rem;
    line-height: 1.72;
}

/* ==========================================================================
   Teams Index
   ========================================================================== */
.teams-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.teams-filter-pills button,
.teams-view-toggle button {
    border: 0;
    cursor: pointer;
    transition: all .22s ease;
}

.teams-filter-pills button {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, 0.92);
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 700;
}

.teams-filter-pills button:hover,
.teams-filter-pills button.is-active {
    color: #fff;
    background: rgba(51, 65, 85, 0.96);
}

.teams-filter-pills button.is-active {
    border: 1px solid rgba(249, 115, 22, 0.82);
    transform: translateY(-1px);
}

.teams-content-shell {
    padding-top: 26px;
    padding-bottom: 54px;
}

.teams-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 34px;
}

.teams-toolbar p {
    margin: 0;
    color: #93c5fd;
    font-size: 1rem;
}

.teams-toolbar strong {
    color: #fff;
}

.teams-view-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.teams-view-toggle button {
    min-width: 54px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    color: #cbd5e1;
    font-size: 0.84rem;
    font-weight: 700;
}

.teams-view-toggle button.is-active {
    background: rgba(148, 163, 184, 0.18);
    color: #fff;
}

.teams-view {
    display: none;
}

.teams-view.is-active {
    display: block;
}

.teams-conference-block + .teams-conference-block {
    margin-top: 42px;
}

.teams-conference-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.teams-conference-header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.04em;
    flex: 0 0 auto;
    white-space: nowrap;
}

.teams-conference-header span {
    color: #93c5fd;
    font-size: 0.96rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.teams-conference-line {
    height: 1px;
    flex: 1;
    background: rgba(148, 163, 184, 0.18);
}

.teams-division-stack {
    display: grid;
    gap: 18px;
}

.teams-division-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(124, 45, 18, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.18);
    color: #fb923c;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.teams-grid-card,
.teams-standings-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.teams-grid-card {
    display: flex;
    flex-direction: column;
    min-height: 228px;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.24);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.teams-grid-card:hover {
    transform: translateY(-3px);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.34);
}

.teams-grid-card-topline {
    height: 6px;
    width: 100%;
}

.teams-grid-card-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    padding: 20px;
}

.teams-grid-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "logo streak"
        "copy copy";
    align-items: start;
    gap: 14px 16px;
    min-height: 108px;
}

.teams-grid-logo {
    grid-area: logo;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    border-radius: 12px;
}

.teams-grid-head-copy {
    grid-area: copy;
    min-width: 0;
    align-self: start;
    padding-top: 0;
}

.teams-grid-head-copy p {
    margin: 0 0 2px;
    color: var(--muted-text);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
    min-height: 2rem;
}

.teams-grid-head-copy h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.6rem;
    line-height: 1.02;
    min-height: 2rem;
}

.teams-grid-streak,
.teams-standings-streak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.teams-grid-streak {
    grid-area: streak;
    align-self: start;
    justify-self: end;
}

.teams-grid-streak.is-win,
.teams-standings-streak.is-win {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
}

.teams-grid-streak.is-loss,
.teams-standings-streak.is-loss {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
}

.teams-grid-record {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.teams-grid-record-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.teams-grid-record-main span {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-color);
    line-height: 1;
}

.teams-grid-record-main .is-losses {
    color: var(--muted-text);
}

.teams-grid-record-main em {
    font-style: normal;
    font-size: 1.2rem;
    color: rgba(148, 163, 184, 0.4);
}

.teams-grid-record-meta {
    display: flex;
    align-items: flex-end;
    gap: 18px;
}

.teams-grid-record-meta small {
    display: block;
    margin-bottom: 3px;
    color: var(--muted-text);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.teams-grid-record-meta strong {
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.95rem;
}

.teams-view-standings {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.teams-view-standings.is-active {
    display: grid;
}

.teams-standings-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.24);
}

.teams-standings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

.teams-standings-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.teams-standings-legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #93c5fd;
    font-size: 0.8rem;
}

.teams-standings-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.teams-standings-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.teams-standings-legend .is-playoff { background: #f97316; }
.teams-standings-legend .is-playin { background: #facc15; }

.teams-standings-table-wrap {
    overflow-x: hidden;
}

.teams-standings-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.teams-standings-table th,
.teams-standings-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.teams-standings-table th {
    color: #93c5fd;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.teams-standings-table th:nth-child(2),
.teams-standings-table td:nth-child(2) {
    width: auto;
}

.teams-standings-table th:nth-child(1),
.teams-standings-table td:nth-child(1) {
    width: 44px;
}

.teams-standings-table th:nth-child(3),
.teams-standings-table td:nth-child(3),
.teams-standings-table th:nth-child(4),
.teams-standings-table td:nth-child(4) {
    width: 42px;
}

.teams-standings-table th:nth-child(5),
.teams-standings-table td:nth-child(5),
.teams-standings-table th:nth-child(6),
.teams-standings-table td:nth-child(6) {
    width: 54px;
}

.teams-standings-table th:nth-child(7),
.teams-standings-table td:nth-child(7) {
    width: 58px;
}

.teams-standings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.teams-rank-cell {
    font-size: 1.75rem;
    font-weight: 900;
    color: #fb923c;
    white-space: nowrap;
}

.teams-rank-cell.is-playoff {
    color: #fb923c;
}

.teams-rank-cell.is-playin {
    color: #facc15;
}

.teams-standings-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.teams-standings-logo {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    border-radius: 8px;
}

.teams-standings-team a {
    color: #fff;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teams-standings-team a:hover {
    color: #fdba74;
}

.teams-standings-table td {
    color: #e2e8f0;
    font-weight: 600;
    white-space: nowrap;
}

[data-theme='light'] .teams-hero-band {
    background: #020617;
}

[data-theme='light'] .teams-hero-band::before {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78) 55%, rgba(2, 6, 23, 0.42)),
        radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.16), transparent 26%),
        url("https://images.unsplash.com/photo-1556764420-e37ef4cdfa5c?w=1600&h=520&fit=crop&auto=format") center/cover no-repeat;
}

[data-theme='light'] .teams-breadcrumb,
[data-theme='light'] .teams-hero-inner > p {
    color: rgba(148, 163, 184, 0.92);
}

[data-theme='light'] .teams-hero-inner h1 {
    color: #fff;
}

[data-theme='light'] .teams-filter-pills button {
    background: rgba(226, 232, 240, 0.92);
    color: #475569;
}

[data-theme='light'] .teams-filter-pills button:hover,
[data-theme='light'] .teams-filter-pills button.is-active {
    background: #f8fafc;
    color: #0f172a;
}

[data-theme='light'] .teams-filter-pills button.is-active {
    border-color: rgba(249, 115, 22, 0.72);
}

[data-theme='light'] .teams-toolbar p,
[data-theme='light'] .teams-conference-header span,
[data-theme='light'] .teams-standings-legend,
[data-theme='light'] .teams-standings-table th {
    color: #2563eb;
}

[data-theme='light'] .teams-toolbar strong,
[data-theme='light'] .teams-conference-header h2,
[data-theme='light'] .teams-standings-header h2,
[data-theme='light'] .teams-standings-team a,
[data-theme='light'] .teams-standings-table td,
[data-theme='light'] .teams-grid-record-meta strong {
    color: #0f172a;
}

[data-theme='light'] .teams-conference-line {
    background: rgba(15, 23, 42, 0.14);
}

[data-theme='light'] .teams-view-toggle {
    background: rgba(226, 232, 240, 0.72);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .teams-view-toggle button {
    color: #475569;
}

[data-theme='light'] .teams-view-toggle button.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .teams-grid-card,
[data-theme='light'] .teams-standings-card {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .teams-standings-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.035);
}

@media (max-width: 1180px) {
    .teams-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .teams-view-standings.is-active {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .teams-hero-inner {
        padding-bottom: 48px;
    }

    .teams-toolbar,
    .teams-conference-header,
    .teams-standings-header {
        display: block;
    }

    .teams-toolbar p {
        margin-bottom: 14px;
    }

    .teams-grid {
        grid-template-columns: 1fr;
    }
}
