/**
 * Complete Team Profile Styles - Based on specification
 */

.team-profile-complete {
    max-width: 100%;
    margin-top: 0;
    /* Local design tokens (scoped to team profile) */
    --tp-text: #0f172a;
    --tp-muted: #64748b;
    --tp-border: #e2e8f0;
    --tp-surface: #ffffff;
    --tp-surface-2: #f8fafc;
    --tp-shadow: 0 1px 2px rgba(2, 6, 23, 0.06), 0 1px 1px rgba(2, 6, 23, 0.04);
    --tp-shadow-hover: 0 6px 18px rgba(2, 6, 23, 0.10);
    --tp-radius: 10px;
    --tp-radius-sm: 8px;
    --tp-accent: #1976d2;
}

/* Match Preview (Calendário) */
.match-preview-section {
    padding: 1.5rem;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    background: var(--tp-surface);
    box-shadow: var(--tp-shadow);
    margin-bottom: 1.5rem;
}

.match-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.match-preview-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tp-muted);
    margin-bottom: 0.25rem;
}

.match-preview-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tp-text);
}

.match-preview-meta {
    margin-top: 0.35rem;
    color: var(--tp-muted);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.match-preview-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin: 1rem 0 1.25rem;
}

.match-preview-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

/* Keep the layout symmetric around the "x" */
.match-preview-team:first-child {
    justify-content: flex-end;
}

.match-preview-team:last-child {
    justify-content: flex-start;
}

.match-preview-team-name {
    font-weight: 700;
    color: var(--tp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-preview-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.match-preview-vs {
    font-weight: 700;
    color: var(--tp-muted);
}

.match-predictions {
    background: var(--tp-surface-2);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    padding: 1rem;
}

.match-predictions-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--tp-text);
    font-size: 0.95rem;
}

.match-predictions-subtitle {
    margin-top: -0.4rem;
    margin-bottom: 0.75rem;
    color: var(--tp-muted);
    font-size: 0.875rem;
}

.prediction-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prediction-bar {
    display: grid;
    grid-template-columns: 28px 1fr 48px;
    gap: 0.75rem;
    align-items: center;
}

.prediction-label {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #0f172a;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.prediction-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.prediction-fill {
    height: 100%;
    background: var(--tp-accent);
    border-radius: 999px;
}

.prediction-bar.is-best .prediction-label {
    background: rgba(25, 118, 210, 0.14);
    color: var(--tp-accent);
}

.prediction-bar.is-best .prediction-fill {
    background: #0ea5e9;
}

.prediction-value {
    text-align: right;
    font-weight: 800;
    color: var(--tp-text);
    font-variant-numeric: tabular-nums;
}

.prediction-advice {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #334155;
}

.match-preview-context {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: #fff;
}

.match-context-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.match-context-label {
    font-size: 0.75rem;
    color: var(--tp-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.15rem;
}

.match-context-value {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 650;
}

.match-context-sep {
    margin: 0 0.35rem;
    color: #cbd5e1;
}

.match-preview-fallback {
    background: var(--tp-surface-2);
    border: 1px dashed var(--tp-border);
    border-radius: var(--tp-radius-sm);
    padding: 1rem;
    color: #334155;
}

.match-preview-footnote {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--tp-muted);
}

/* Odds comparison */
.match-odds {
    margin-top: 1rem;
    padding: 1.25rem;
}

.match-odds-empty .match-odds-subtitle {
    margin-top: 0.35rem;
}

.match-odds-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.match-odds-title {
    font-weight: 800;
    color: var(--tp-text);
}

.match-odds-subtitle {
    margin-top: 0.2rem;
    font-size: 0.875rem;
    color: var(--tp-muted);
}

.match-odds .odds-tabs {
    display: inline-flex;
    gap: 0.35rem;
    background: var(--tp-surface-2);
    border: 1px solid var(--tp-border);
    border-radius: 999px;
    padding: 0.25rem;
    flex-shrink: 0;
}

.match-odds .odds-tab {
    border: 0;
    background: transparent;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--tp-muted);
    cursor: pointer;
}

.match-odds .odds-tab.active {
    background: #fff;
    color: var(--tp-text);
    border: 1px solid var(--tp-border);
}

.match-odds .odds-panel {
    display: none;
}

.match-odds .odds-panel.active {
    display: block;
}

.match-odds .odds-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface-2, #f5f6f8); /* Match header bg to remove white line */
}

.match-odds .odds-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    background: #fff;
    table-layout: auto;
}

/* First column (CASA) - wide enough for bookmaker names */
.match-odds .odds-table th:first-child,
.match-odds .odds-table td:first-child {
    white-space: nowrap;
}

/* Odds columns - auto width, centered */
.match-odds .odds-table th:not(:first-child),
.match-odds .odds-table td:not(:first-child) {
    text-align: center;
    white-space: nowrap;
    padding-left: 1rem;
    padding-right: 1rem;
}

.match-odds .odds-table thead th {
    text-align: left;
    font-size: 0.75rem;
    color: var(--tp-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--tp-surface-2, #f5f6f8);
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--tp-border);
}

.match-odds .odds-table thead th:not(:first-child) {
    text-align: center;
}

.match-odds .odds-table tbody td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--tp-border);
    font-weight: 800;
    color: var(--tp-text);
    font-variant-numeric: tabular-nums;
}

.match-odds .odds-table tbody td:not(:first-child) {
    text-align: center;
}

.match-odds .odds-table tbody tr:last-child td {
    border-bottom: 0;
}

.match-odds .bookmaker-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
}

.match-odds .bookmaker-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--tp-border);
    flex-shrink: 0;
}

.match-odds .bookmaker-name a {
    color: inherit;
    text-decoration: none;
}

.match-odds .bookmaker-name a:hover {
    text-decoration: underline;
}

.match-odds .best-odd {
    background: rgba(14, 165, 233, 0.10);
}

/* Teaser on team root tab */
.match-preview-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.match-preview-teaser-kicker {
    font-size: 0.75rem;
    color: var(--tp-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.match-preview-teaser-title {
    font-weight: 800;
    color: var(--tp-text);
}

.match-preview-teaser-meta {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--tp-muted);
}

.match-preview-teaser-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    background: var(--tp-accent);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.match-preview-teaser-cta:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    /* Remove border and full width on mobile for match preview cards */
    .match-preview-section {
        border: none;
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 1.25rem 1rem;
        box-shadow: none;
    }
    
    /* Keep odds card styling simple on mobile - no extra border since it's inside the section */
    .match-preview-section .match-odds.card,
    .match-preview-section .match-odds-empty {
        border: none;
        border-radius: 0;
        margin: 1rem 0 0 0;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }
    
    /* Add subtle separator between sections instead */
    .match-preview-context {
        border-top: 1px solid var(--tp-border, #e0e0e0);
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .match-predictions {
        border-bottom: 1px solid var(--tp-border, #e0e0e0);
        padding-bottom: 1rem;
    }
    
    .match-preview-teaser {
        flex-direction: column;
        align-items: flex-start;
    }
    .match-preview-teams {
        grid-template-columns: 1fr auto 1fr;
        gap: 0.5rem;
    }
    .match-preview-vs {
        display: block;
    }
    .match-preview-team {
        gap: 0.5rem;
    }
    .match-preview-logo {
        width: 28px;
        height: 28px;
    }
    .match-preview-team-name {
        font-size: 0.95rem;
    }
    .match-odds-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Odds table - keep border and enable horizontal scroll on mobile */
    .match-odds .odds-table-wrapper {
        border: 1px solid var(--tp-border, #e0e0e0);
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--tp-surface-2, #f5f6f8);
    }
    
    .match-odds .odds-table {
        min-width: 340px;
    }
    
    /* Adjust column widths on mobile */
    .match-odds .odds-table th:first-child,
    .match-odds .odds-table td:first-child {
        white-space: nowrap;
    }
    
    .match-odds .odds-table th:not(:first-child),
    .match-odds .odds-table td:not(:first-child) {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .match-odds .odds-table thead th,
    .match-odds .odds-table tbody td {
        padding: 0.6rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .match-odds .bookmaker-logo {
        width: 24px;
        height: 24px;
    }
    
    .match-odds .bookmaker-cell {
        gap: 0.4rem;
    }
}

.team-profile-complete :where(p, li) {
    color: #334155;
}

.team-profile-complete :where(a):focus-visible,
.team-profile-complete :where(button):focus-visible {
    outline: 2px solid rgba(25, 118, 210, 0.45);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-top: -1rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    font-size: 0.875rem;
    min-width: max-content;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.breadcrumb-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-link:hover {
    color: #1a1a1a;
}

.breadcrumb-home-icon {
    display: inline-flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    flex-shrink: 0;
}

.breadcrumb-home-icon:hover {
    color: #1a1a1a;
}

.breadcrumb-home-icon svg {
    width: 13px;
    height: 13px;
    display: block;
}

.directory-page.team-profile-complete {
    padding-top: 0.7rem;
}

.directory-page.team-profile-complete .breadcrumbs {
    margin-top: 0;
}

.breadcrumb-current {
    color: #666;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #cbd5e1;
    padding: 0 0.5rem;
    font-weight: 400;
}

/* Two Column Layout */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .content-layout {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .main-content {
        order: 1 !important;
    }
    
    .sidebar {
        order: 2 !important;
    }
}

.main-content {
    min-width: 0; /* Prevent grid overflow */
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border-radius: var(--tp-radius-sm);
    box-shadow: var(--tp-shadow);
    padding: 1.5rem;
    border: 1px solid var(--tp-border);
}

/* Align sidebar top-line with main column:
   the first widget's default padding pushes its title down compared to the left column. */
.team-profile-page .sidebar > .sidebar-widget:first-child {
    padding-top: 0;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    padding-bottom: 0;
}

/* Upcoming Match Odds */
.upcoming-match-odds {
    margin-top: 1rem;
}

.match-teams-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: center;
    column-gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #1a1a1a;
    font-size: 0.9rem;
    min-width: 0;
}

.match-teams-display .match-team:first-child {
    justify-content: flex-end;
}

.match-teams-display .match-team:last-child {
    justify-content: flex-start;
}

.team-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.vs-text {
    color: #999;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
    padding: 0 0.25rem;
}

.match-date-display {
    text-align: center;
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.odds-table {
    margin-top: 1rem;
}

.odds-comparison {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.odds-comparison th {
    background: #f5f5f5;
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.odds-comparison td {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.odds-comparison td:first-child {
    text-align: left;
    font-weight: 500;
    color: #1a1a1a;
}

.highlight-odds {
    background: #fff3cd;
    font-weight: 700;
    color: #856404;
}

.odds-link {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.odds-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #013466;
}

.highlight-odds .odds-link {
    color: #856404;
}

.highlight-odds .odds-link:hover {
    background-color: rgba(255, 193, 7, 0.2);
    color: #856404;
}

/* Top Scorers */
.top-scorers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.scorer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scorer-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scorer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scorer-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1976d2;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.scorer-info {
    flex: 1;
    min-width: 0;
}

.scorer-name {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.scorer-position {
    font-size: 0.875rem;
    color: #666;
}

.scorer-goals-badge {
    margin-left: auto;
    min-width: 40px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar Banner */
.sidebar-banner {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}

/* Keep the banner visible while scrolling on desktop (requested). */
@media (min-width: 1024px) {
    .sidebar-banner {
        position: sticky;
        top: 90px; /* below header/nav */
        align-self: flex-start; /* sticky inside flex column */
    }
}

.banner-link {
    display: block;
    text-decoration: none;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border-radius: 8px;
}

.banner-placeholder {
    background: #f5f5f5;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    color: #999;
}

/* Top Sportsbooks */
.sportsbooks-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.sportsbook-card {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.sportsbook-rank {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sportsbook-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.sportsbook-logo-circle {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.sportsbook-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    background: #fff;
}

.sportsbook-logo-letter {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.sportsbook-content {
    flex: 1;
}

.sportsbook-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* align top-line with logo */
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.sportsbook-name {
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.sportsbook-name-link {
    color: inherit;
    text-decoration: none;
}

.sportsbook-name-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.sportsbook-rating {
    font-size: 0.8rem;
    color: #f59e0b;
    white-space: nowrap;
    line-height: 1.2;
}

.sportsbook-offer {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.35rem;
}

.sportsbook-cta {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    background: #ff6b35;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.sportsbook-cta:hover {
    background: #e65a2a;
}

/* Team Header */
.team-header-main {
    background: #fff;
    border-radius: var(--tp-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--tp-shadow);
    border: 1px solid var(--tp-border);
}

.team-header-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.team-crest {
    flex-shrink: 0;
}

.team-crest-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.team-header-info {
    flex: 1;
}

.team-name-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tp-text);
    margin: 0 0 1rem 0;
    line-height: 1;
    padding-top: 0;
    letter-spacing: -0.02em;
}

.team-meta-info {
    margin-top: 0.5rem;
}

.team-facts-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.1rem 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    border-radius: var(--tp-radius-sm);
    border: 1px solid var(--tp-border);
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.05);
}

.team-fact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.team-fact-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.team-fact-value {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.team-fact-subvalue {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.team-flag-icon {
    font-size: 1.1em;
    line-height: 1;
}

.flag-icon-inline {
    display: inline-block;
    vertical-align: middle;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* Navigation Tabs */
.team-nav-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.team-tab {
    padding: 1.1rem 1.75rem;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.team-tab:hover {
    color: var(--tp-accent);
    background: rgba(25, 118, 210, 0.04);
}

.team-tab.active {
    color: var(--tp-text);
    font-weight: 700;
    border-bottom-color: var(--tp-accent);
    background: rgba(25, 118, 210, 0.06);
}

/* Team Intro Text (short excerpt) */
.team-intro-text {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--tp-surface);
    color: #333;
    border-radius: var(--tp-radius-sm);
    font-size: 1.0625rem;
    line-height: 1.7;
    border: 1px solid var(--tp-border);
    box-shadow: var(--tp-shadow);
}

.team-intro-text p {
    margin: 0;
}

.team-intro-text strong {
    font-weight: 600;
}

.team-intro-text em {
    font-style: italic;
}

/* Team Full Content (longer article) */
.team-full-content {
    margin-top: 2.25rem;
    margin-bottom: 2rem;
}

.team-full-content h1,
.team-full-content h2,
.team-full-content h3 {
    color: #1a1a1a;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.team-full-content h1:first-child,
.team-full-content h2:first-child,
.team-full-content h3:first-child {
    margin-top: 0;
}

.team-full-content h1 {
    font-size: 1.75rem;
}

.team-full-content h2 {
    font-size: 1.5rem;
}

.team-full-content h3 {
    font-size: 1.25rem;
}

.team-intro-text h1,
.team-intro-text h2,
.team-intro-text h3 {
    color: #1a1a1a;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.team-intro-text h1:first-child,
.team-intro-text h2:first-child,
.team-intro-text h3:first-child {
    margin-top: 0;
}

.team-full-content p {
    margin-bottom: 1rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #333;
}

.team-full-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

.team-full-content em {
    font-style: italic;
}

/* Key Statistics Grid */
.key-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.key-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.3s;
}

.key-stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.key-stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.key-stat-content {
    flex: 1;
}

.key-stat-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.key-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.form-indicators {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-indicator {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.form-indicator.win {
    background: #4caf50;
    color: white;
}

.form-indicator.draw {
    background: #ff9800;
    color: white;
}

.form-indicator.loss {
    background: #f44336;
    color: white;
}

/* Recent Matches Section */
.recent-matches-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.section-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.section-link:hover {
    text-decoration: underline;
}

.matches-table-wrapper {
    overflow-x: auto;
}

.matches-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.matches-table thead {
    background: #f5f5f5;
}

.matches-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.matches-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.matches-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.7);
}

.matches-table tbody tr:hover {
    background: #f9f9f9;
}

.match-date-cell {
    color: #666;
    font-size: 0.875rem;
}

.match-result-cell {
    min-width: 200px;
}

.match-opponent {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.matches-table a.match-opponent {
    color: #111;
    text-decoration: none;
}

.matches-table a.match-opponent:hover,
.matches-table a.match-opponent:focus-visible {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 3px;
}

.opponent-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.opponent-name {
    font-weight: 500;
    color: #1a1a1a;
}

.match-score-cell {
    font-weight: 600;
    color: #111;
}

.score-result {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55em;
    padding: 0.22rem 0.42rem;
    border-radius: 8px;
    background: #0b1220;
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.score-sep {
    color: #6b7280;
    font-weight: 700;
    line-height: 1;
}

.match-xg-cell,
.match-to-cell {
    color: #999;
}

/* Official Jersey Section */
.official-jersey-section {
    background-image: url('../images/shirt-banner-ad-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    position: relative;
}

/* Ensure text is readable over background */
.official-jersey-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    z-index: 0;
}

.jersey-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.jersey-text {
    flex: 1;
}

.jersey-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.jersey-description {
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.jersey-button {
    display: inline-block;
    background: #1976d2;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.jersey-button:hover {
    background: #1565c0;
}

.jersey-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jersey-placeholder {
    color: #999;
    font-size: 0.875rem;
}

/* Summary Statistics Grid */
.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Inline ad banner in main column */
.inline-ad {
    margin: 2rem 0;
}

.inline-ad-link {
    display: block;
}

.inline-ad-image {
    width: 100%;
    height: auto;
    display: block;
}

.inline-ad-placeholder {
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
}

.summary-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.3s;
}

.summary-stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.summary-stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.summary-stat-content {
    flex: 1;
}

.summary-stat-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.summary-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Rivals Section */
.rivals-section {
    margin-bottom: 2rem;
}

.rivals-section .section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

.rivals-table-wrapper {
    overflow-x: auto;
}

.rivals-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.rivals-table thead {
    background: #f5f5f5;
}

.rivals-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rivals-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.rivals-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.7);
}

.rivals-table tbody tr:hover {
    background: #f9f9f9;
}

/* Transfers */
.team-transfers-section {
    margin-bottom: 2rem;
}

.transfers-empty {
    padding: 1rem 0.25rem;
    color: #64748b;
}

.transfers-cards {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.75rem;
}

.transfer-card {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.transfer-player {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.transfer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transfer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.transfer-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1976d2;
    color: #fff;
    font-weight: 700;
}

.transfer-player-meta {
    min-width: 0;
}

.transfer-player-name {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transfer-player-sub {
    margin-top: 0.2rem;
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.dot-sep {
    opacity: 0.7;
}

.transfer-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.transfer-route.is-single {
    grid-template-columns: 1fr;
}

.transfer-route.is-single .transfer-team {
    justify-content: flex-start;
}

.transfer-route.is-single .transfer-team-name {
    max-width: 100%;
}

.transfer-team {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.transfer-from {
    justify-content: flex-end;
}

.transfer-to {
    justify-content: flex-start;
}

.transfer-team-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.transfer-team-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.transfer-arrow {
    color: #94a3b8;
    font-weight: 700;
}

.transfer-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    white-space: nowrap;
}

.transfer-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
}

.transfer-badge-in {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #047857;
}

.transfer-badge-out {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.28);
    color: #b91c1c;
}

.transfer-badge-renewal {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #1d4ed8;
}

/* Same-team transfer route styling */
.transfer-route.is-same-team {
    justify-content: center;
}

.transfer-type {
    font-size: 0.9rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .transfer-card {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .transfer-meta {
        justify-content: flex-start;
    }

    .transfer-team-name {
        max-width: 100%;
    }
}

.rival-team-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.rival-team-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.rival-team-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.rival-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1; /* Show sidebar first on mobile */
    }
}

@media (max-width: 768px) {
    .team-header-main {
        /* Reduce side padding so the crest doesn't look left-biased */
        padding: 1.25rem 1rem;
    }
    
    .team-header-content {
        /* Mobile: let H1 span full width, then place crest + facts card on the same row */
        display: grid;
        /* Give facts-card a bit more width; reduce the gap instead of squeezing content */
        grid-template-columns: clamp(135px, 35vw, 168px) 1fr;
        grid-template-areas:
            "title title"
            "crest facts";
        align-items: start;
        /* tighter horizontal spacing between crest and facts */
        gap: 0.75rem 0.45rem;
        text-align: left;
    }
    
    .team-crest {
        grid-area: crest;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center; /* reduce perceived left-bias inside the crest column */
    }
    
    .team-crest-img {
        width: clamp(135px, 35vw, 168px);
        height: clamp(135px, 35vw, 168px);
    }
    
    .team-header-info {
        /* Flatten wrapper so its children can participate in the grid */
        display: contents;
    }
    
    .team-name-large {
        grid-area: title;
        font-size: 2rem;
        word-wrap: normal;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
        line-height: 1.2;
        margin: 0 0 0.5rem 0;
    }
    
    .team-meta-info {
        grid-area: facts;
        margin-top: 0;
    }
    
    .team-facts-card {
        background: #fff;
        border: 1px solid var(--tp-border);
        padding: 0.65rem;
        box-shadow: none;
        gap: 0.5rem;
        grid-template-columns: 1fr;
    }
    
    .team-fact {
        padding-bottom: 0.45rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .team-fact:last-child {
        border-bottom: none;
    }
    
    .breadcrumb-home-icon svg {
        width: 13px !important;
        height: 13px !important;
        min-width: 13px;
        min-height: 13px;
    }
    
    .breadcrumbs {
        margin-top: -1.5rem;
        margin-bottom: 1rem;
    }
    
    .team-nav-tabs {
        margin-bottom: 1.5rem;
    }
    
    .team-tab {
        padding: 0.9rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .team-nav-tabs {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .key-stats-grid,
    .summary-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .jersey-content {
        flex-direction: column;
    }
    
    .matches-table-wrapper,
    .rivals-table-wrapper {
        overflow-x: scroll;
    }
}

/* ========================================
   Team Classification Page Styles
   (Merged from team-classificacao.css)
   ======================================== */

.team-classification-section {
    margin-top: 2rem;
}

.league-name-subtitle {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

/* ========================================
   Team Comparisons Block
   Internal links to comparison pages
   SEO: Anchor text is "Team1 x Team2"
   ======================================== */

.team-comparisons-block {
    padding: 0;
    margin-bottom: 1.5rem;
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: var(--tp-shadow);
    overflow: hidden;
}

.team-comparisons-title {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--tp-text);
    background: #f8fafc;
    border-bottom: 1px solid var(--tp-border);
}

.team-comparisons-list {
    margin: 0;
    padding: 0;
}

.team-comparison-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.team-comparison-row:hover {
    background-color: #f8fafc;
}

.team-comparison-row.last {
    border-bottom: none;
}

.team-comparison-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.team-comparison-logos {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.team-comparison-logo {
    flex-shrink: 0;
    border-radius: 4px;
}

.team-comparison-link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tp-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.team-comparison-link:hover {
    color: #0369a1;
}

.team-comparison-row:hover .team-comparison-link {
    color: #0369a1;
}

.team-comparison-cta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.team-comparison-cta svg {
    transition: transform 0.15s ease;
}

.team-comparison-row:hover .team-comparison-cta {
    color: #0369a1;
}

.team-comparison-row:hover .team-comparison-cta svg {
    transform: translateX(2px);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .team-comparisons-title {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .team-comparison-row {
        padding: 0.75rem 1rem;
    }
    
    .team-comparison-link {
        font-size: 0.875rem;
    }
    
    .team-comparison-logo {
        width: 24px;
        height: 24px;
    }
    
    /* Hide "Ver comparação" text on mobile, only show arrow */
    .team-comparison-cta-text {
        display: none;
    }
    
    .team-comparison-cta {
        padding: 0.375rem;
        border-radius: 50%;
        background: #f1f5f9;
    }
    
    .team-comparison-cta svg {
        width: 16px;
        height: 16px;
        display: block;
    }
    
    .team-comparison-row:hover .team-comparison-cta {
        background: #e0f2fe;
    }
}
