/* Configurações Globais e Reset Básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f9;
    color: #331010;
    line-height: 1.6;
    height: 100%;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: #007bff;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================================================= */
/* HEADER (Cabeçalho) - FIXO E CORRIGIDO O ALINHAMENTO */
/* [Regras do Header Mantidas] */
/* ================================================= */

.header {
    background-color: #004d99;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffcc00;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    margin-top: 5px;
}

.nav-menu {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    justify-content: center;

    flex-basis: auto;
    position: static;
    height: auto;
    padding: 0;
    background-color: transparent;
}

.nav-menu a {
    color: white;
    padding: 5px 15px;
    border-bottom: none;
    display: inline-block;
    margin: 0 5px;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-box {
    flex-basis: 250px;
    display: flex;
}

.search-box form {
    display: flex;
    width: 100%;
}

.search-box input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-box button {
    padding: 10px 15px;
    background-color: #ffcc00;
    color: #004d99;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Main Content - COMPENSAÇÃO PARA O HEADER FIXO */
.main-content {
    padding-top: 90px;
    padding-bottom: 30px;
    flex: 1;
}

/* ================================================= */
/* ARTIGOS E NOTÍCIAS (News Item) */
/* ================================================= */

.news-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 5px solid #ffcc00;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.news-item h3 {
    color: #004d99;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.news-item p {
    font-size: 0.9em;
    color: #555;
    margin-top: 8px;
}

.news-item a {
    display: inline-block;
    margin-top: 10px;
}

/* ================================================= */
/* TABELA DE CLASSIFICAÇÃO (ESTILO FINAL) */
/* [Regras de Tabela Mantidas] */
/* ================================================= */
.classification-table {
    width: 100%;
    min-width: 300px;
    border-collapse: collapse;
    background-color: white;
    font-size: 0.9em;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Cabeçalho da Tabela */
.classification-table thead {
    background-color: #004d99;
    /* Azul Primário */
    color: white;
}

.classification-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #ffcc00;
    /* Separador Amarelo/Ouro */
}

/* Células e Linhas */
.classification-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    /* Linha sutil entre as linhas */
}

/* Faixas Zebradas (alternadas) - Excluindo G4/Z4 */
.classification-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* SOBRESCREVE A FAIXA ZEBRA NAS ZONAS */
.classification-table .g4,
.classification-table .z4 {
    background-color: unset;
}


/* Destaque para Zonas - Posição e Pontos */
.classification-table tr td:first-child {
    font-weight: 700;
    text-align: center;
    width: 10%;
}

.classification-table tr td:last-child {
    font-weight: 700;
    text-align: center;
    width: 15%;
    color: #004d99;
    /* Destaque azul para os pontos */
}

/* Destaque G4 (Zona de Classificação - Libertadores) */
.classification-table .g4 {
    background-color: #d4edda !important;
    /* Verde Claro */
    color: #155724;
    /* Texto Verde Escuro */
    font-weight: 700;
    border-left: 4px solid #155724;
}

/* Destaque Z4 (Zona de Rebaixamento) */
.classification-table .z4 {
    background-color: #f8d7da !important;
    /* Vermelho Claro/Rosa */
    color: #721c24;
    /* Texto Vermelho Escuro */
    font-weight: 700;
    border-left: 4px solid #721c24;
}

/* Botão "Tabela Completa" */
.btn-full-table {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #ffcc00;
    color: #004d99;
    font-weight: 700;
    border-radius: 4px;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.btn-full-table:hover {
    background-color: #e6b800;
}

/* ================================================= */
/* OUTROS ESTILOS DE LAYOUT */
/* ================================================= */

/* Rodapé Padronizado (Footer) */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 30px;
}

.footer .container {
    padding-top: 15px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav,
.footer-contact {
    min-width: 250px;
}

.footer-nav h3,
.footer-contact h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    font-size: 1.2em;
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 5px;
}

.footer-nav ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
}

.footer-nav a {
    color: white;
    display: block;
    padding: 5px 0;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #ffcc00;
}

.footer-contact ul li {
    padding: 5px 0;
    font-size: 0.9em;
}

.copyright-info {
    text-align: center;
    font-size: 0.8em;
    padding-top: 10px;
}

/* Layout Principal e Elementos Compartilhados */
.flex-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section-title,
.section-title-sidebar {
    font-size: 1.4em;
    color: #004d99;
    border-bottom: 3px solid #ffcc00;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

.team-article-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}


/* ================================================= */
/* MEDIA QUERY: LAYOUT DESKTOP (901px ou mais) */
/* [Regras de Desktop Mantidas] */
/* ================================================= */

@media (min-width: 901px) {

    /* Layout Principal - COLUNAS */
    .flex-container {
        flex-direction: row;
    }

    .main-column {
        flex: 3;
        flex-basis: 0;
        min-width: 0;
    }

    .sidebar-column {
        flex: 1.5;
        flex-basis: 0;
        min-width: 0;
        max-width: 300px;
    }
}


/* ================================================= */
/* MEDIA QUERY: LAYOUT MOBILE (max-width: 900px) */
/* CORREÇÃO DO RODAPÉ (Regras Fortes) */
/* ================================================= */

@media (max-width: 900px) {

    .header .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
        order: 2;
    }

    .logo {
        order: 1;
    }

    .nav-menu {
        display: none;
        order: 4;
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        flex-direction: column;
        background-color: #004d99;
        transition: height 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-menu.active {
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
        display: flex;
    }

    .nav-menu a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        width: 100%;
    }

    .search-box {
        order: 3;
        flex-basis: 100%;
        margin-top: 15px;
        margin-left: 0;
    }

    .footer-content {
        /* CENTRALIZA O BLOCO PRINCIPAL */
        align-items: center;
        text-align: center;
        width: 100%;
    }

    /* FORÇA A CENTRALIZAÇÃO DO TEXTO E DOS BLOCOS INTERNOS */
    .footer-nav,
    .footer-contact {
        min-width: 100%;
        text-align: center !important;
        /* Força o texto para o centro */
    }

    /* CENTRALIZA OS LINKS NA NAVEGAÇÃO RÁPIDA E REMOVE MARGENS DA LISTA */
    .footer-nav ul,
    .footer-contact ul {
        list-style: none !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        text-align: center !important;
        /* CHAVE: Centraliza o texto no contêiner da lista */
    }

    .footer-nav a {
        /* Garante que o texto dentro do link seja centralizado no mobile */
        text-align: center !important;
        display: block;
    }

    /* CENTRALIZA ITENS DE CONTATO */
    .footer-contact ul li {
        text-align: center !important;
        list-style-type: none !important;
    }
}

/* ================================================= */
/* PÁGINA DE TIME - ESTILOS MODERNOS (ADICIONAIS) */
/* ================================================= */

/* === Seção Hero (Cabeçalho do Time) === */
.team-hero {
    background-color: #111;
    /* Cor de fundo escura para contraste */
    color: white;
    padding: 40px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* Sombra para profundidade */
}

.team-shield-large {
    width: 100px;
    /* Tamanho controlado */
    height: 100px;
    margin-bottom: 20px;
    border: 3px solid #ffcc00;
    /* Borda dourada/amarela */
    border-radius: 50%;
    /* Deixa o escudo redondo (se a imagem for quadrada) */
    background-color: white;
    /* Fundo branco para escudos com transparência */
    padding: 5px;
    /* Espaçamento interno */
}

.team-page-title {
    font-size: 2.5em;
    /* Título maior */
    font-weight: 700;
    color: #ffcc00;
    /* Cor dourada/amarela */
    margin-bottom: 5px;
}

.team-motto {
    font-size: 1.2em;
    font-style: italic;
    color: #f4f7f9;
    /* Branco-acinzentado */
}

/* === Barra Lateral (Ficha Técnica) === */
.team-detail-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    /* Reutiliza o estilo do .team-article-container */
}

.elenco-info div {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.elenco-info div:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.elenco-info .section-subtitle {
    font-size: 1.05em;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.elenco-info p,
.elenco-info ul {
    font-size: 0.9em;
    color: #555;
}

.elenco-info ul {
    list-style-position: inside;
    padding-left: 5px;
}

.elenco-info ul li {
    margin-bottom: 5px;
}

/* === NOVO ESTILO: Escalações (Lineup Comparison) === */
.lineup-comparison {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 10px;
    background-color: #f9f9f9;
    /* Fundo leve para destacar */
    border-radius: 4px;
    border: 1px solid #eee;
}

.lineup-comparison ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.lineup-comparison h4 {
    font-size: 1.1em;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #ffcc00;
}

.lineup-comparison li {
    font-size: 0.9em;
    margin-bottom: 4px;
    color: #333;
}

/* === Limpeza dos Estilos (Substituindo o "style=") === */
.team-article-container h2 {
    color: #AA0000;
    /* Vermelho do Flamengo */
    font-size: 1.8em;
    margin-bottom: 5px;
}

.team-article-container h5 {
    color: #444444;
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.team-article-container h3 {
    color: #004d99;
    /* Azul primário */
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.team-article-container p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* ================================================= */
/* ATUALIZAÇÕES - SEM BUSCA E FOCO TOTAL NO MOBILE */
/* ================================================= */

/* 1. Esconde permanentemente a caixa de busca (garantia) */
.search-box {
    display: none !important;
}

/* 2. Ajusta o menu no Desktop (alinhado à direita) */
.nav-menu {
    justify-content: flex-end;
    /* Alinha o menu à direita */
    flex-grow: 0;
    /* Impede de "crescer" e centralizar */
    padding-right: 15px;
    /* Espaço na direita */
}

/* 3. REGRAS DE OURO: Prioridade Mobile */
@media (max-width: 900px) {

    /* Força o header mobile a ser mais baixo (aprox 65-70px) */
    .header {
        padding: 12px 0;
    }

    /* * Ajusta o "top" do menu dropdown para começar 
     * exatamente abaixo do novo header mais baixo.
     */
    .nav-menu {
        top: 65px;
        /* Altura do novo header */
        order: 3;
        /* Ordem correta (Logo=1, Toggle=2, Menu=3) */
        padding-right: 0;
        /* Reseta o padding do desktop */
        justify-content: flex-start;
    }

    /* * A MUDANÇA MAIS IMPORTANTE PARA O MOBILE:
     * Reduz o padding-top do conteúdo principal para se 
     * ajustar ao novo header (que é mais baixo sem a busca).
     */
    .main-content {
        /* Antes era 90px. Agora 80px fica perfeito */
        padding-top: 80px;
    }

    /* Forçar a quebra da escalação em dispositivos móveis */
    .lineup-comparison {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
}

/* ================================================= */
/* NOVO ESTILO: CARD DE RESUMO DA PARTIDA (MODERNO) */
/* ================================================= */

.match-summary-card {
    /* Base do card */
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    /* Borda superior discreta, usando a cor do time (Vermelho de Derrota/Alerta) */
    border-top: 5px solid #AA0000;
}

.match-summary-card .summary-title {
    /* Título do sumário */
    color: #004d99;
    /* Azul primário para títulos */
    font-size: 1.6em;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffcc00;
    /* Linha amarela (dourada) para separação */
    margin-bottom: 20px;
}

.match-summary-card .summary-content p {
    font-size: 1em;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Destaque para os rótulos internos (Análise Tática RBB, Resultado) */
.match-summary-card .summary-content p strong {
    color: #AA0000;
    /* Cor de alerta/derrota para rótulos chave do Bragantino */
    font-weight: 700;
}

/* Estilo para destaque extra (como o Destaque Adversário) */
.match-summary-card .summary-highlight {
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-style: italic;
    border-left: 3px solid #ffcc00;
}

/* Regras de mobile */
@media (max-width: 900px) {
    .match-summary-card {
        padding: 15px;
    }

    .match-summary-card .summary-title {
        font-size: 1.4em;
    }
}