/* ============================================================
   Aguia do Vale - CSS Mobile First
   Puro, sem bibliotecas
   ============================================================ */

/* Reset basico */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #f4f6f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #0d47a1;
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Container - mobile first: full width com padding */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   CABECALHO
   ============================================================ */
.cabecalho {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.container-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo:hover {
    text-decoration: none;
    opacity: 0.95;
}

.logo-icone {
    font-size: 1.6rem;
}

.logo-destaque {
    color: #ffd54f;
}

/* Menu toggle - apenas mobile */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .barra {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.ativo .barra:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.ativo .barra:nth-child(2) {
    opacity: 0;
}

.menu-toggle.ativo .barra:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Menu principal - escondido no mobile por padrao */
.menu-principal {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d47a1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.menu-principal.aberto {
    max-height: 600px;
}

/* estilos de itens do menu movidos para .menu-lista (ver final do arquivo) */

/* ============================================================
   CONTEUDO PRINCIPAL
   ============================================================ */
.conteudo-principal {
    flex: 1;
    padding: 1.25rem 0 2rem;
}

/* Titulos de secao */
.titulo-secao {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0d47a1;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid #ffd54f;
    display: inline-block;
}

.subtitulo {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.25rem;
}

/* Cards genericos */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 1rem;
    margin-bottom: 1rem;
}

.card-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

/* ============================================================
   TABELA DE CLASSIFICACAO - mobile first (cards em telas pequenas)
   ============================================================ */
.tabela-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.tabela-classificacao {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.85rem;
    min-width: 640px; /* forca scroll horizontal em telas muito pequenas se necessario */
}

.tabela-classificacao th,
.tabela-classificacao td {
    padding: 0.55rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid #e8ecef;
}

.tabela-classificacao th {
    background: #0d47a1;
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
}

.tabela-classificacao td.pos {
    font-weight: 700;
    width: 36px;
}

.tabela-classificacao td.time {
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    padding-left: 0.6rem;
}

.tabela-classificacao tr:nth-child(even) {
    background: #f8fafc;
}

.tabela-classificacao tr:hover {
    background: #e3f2fd;
}

/* Zonas de classificacao */
.zona-libertadores { background-color: #e8f5e9 !important; }
.zona-pre-liberta { background-color: #fff8e1 !important; }
.zona-sulamericana { background-color: #e3f2fd !important; }
.zona-rebaixamento { background-color: #ffebee !important; }

.legenda-zonas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legenda-cor {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* ============================================================
   JOGOS / AGENDA / RESULTADOS
   ============================================================ */
.lista-jogos {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jogo-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jogo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #666;
}

.jogo-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}




@keyframes pulsar {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.jogo-placar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.equipe {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.equipe.casa {
    align-items: flex-end;
    text-align: right;
}

.equipe.fora {
    align-items: flex-start;
    text-align: left;
}

.equipe-nome {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.equipe-sigla {
    font-size: 0.75rem;
    color: #777;
}

.placar {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0d47a1;
    min-width: 70px;
    text-align: center;
}

.placar span {
    display: inline-block;
    min-width: 1.4rem;
}

.placar .x {
    font-size: 0.9rem;
    color: #999;
    margin: 0 0.15rem;
}

/* ============================================================
   DESTAQUES / HOME
   ============================================================ */
.destaque-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.destaque-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.destaque-header {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    color: #fff;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.destaque-body {
    padding: 1rem;
}

/* ============================================================
   BOTOES
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primario {
    background: #0d47a1;
    color: #fff;
}

.btn-primario:hover {
    background: #1565c0;
    text-decoration: none;
    color: #fff;
}

.btn-secundario {
    background: #ffd54f;
    color: #1a1a1a;
}

.btn-secundario:hover {
    background: #ffca28;
    text-decoration: none;
}

/* ============================================================
   RODAPE
   ============================================================ */
.rodape {
    background: #0a2f6b;
    color: #e0e0e0;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.rodape-conteudo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.rodape-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd54f;
    margin-bottom: 0.4rem;
}

.rodape h3 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.rodape ul li {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.rodape a {
    color: #b3c7e6;
}

.rodape a:hover {
    color: #fff;
}

.rodape-copy {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: #90a4c8;
}

/* ============================================================
   UTILITARIOS
   ============================================================ */
.texto-centro { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.oculto { display: none !important; }

.alerta {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alerta-info {
    background: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid #1976d2;
}

.alerta-sucesso {
    background: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid #43a047;
}

/* ============================================================
   MEDIA QUERIES - progressive enhancement
   ============================================================ */

/* Tablets e acima (>= 600px) */
@media (min-width: 600px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

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

    .jogo-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .jogo-info {
        flex-direction: column;
        align-items: flex-start;
        min-width: 110px;
    }

    .jogo-placar {
        flex: 1;
        justify-content: center;
        max-width: 420px;
    }

    .equipe {
        flex-direction: row;
        gap: 0.5rem;
    }

    .equipe.casa {
        justify-content: flex-end;
    }

    .equipe.fora {
        justify-content: flex-start;
    }

    .equipe-nome {
        font-size: 0.95rem;
    }

    .rodape-conteudo {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Desktop (>= 900px) */
@media (min-width: 900px) {
    .container {
        max-width: 1100px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Menu horizontal no desktop - esconde toggle */
    .menu-toggle {
        display: none;
    }

    .menu-principal {
        position: static;
        max-height: none;
        overflow: visible;
        background: transparent;
    }

    /* menu horizontal: ver regras .menu-lista no final do arquivo */

    .titulo-secao {
        font-size: 1.6rem;
    }

    .tabela-classificacao {
        font-size: 0.9rem;
    }

    .tabela-classificacao th,
    .tabela-classificacao td {
        padding: 0.65rem 0.5rem;
    }

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

/* Telas grandes (>= 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* ============================================================
   CHAVEAMENTO VISUAL - COPA DO BRASIL
   ============================================================ */
.chaveamento {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.chave-lado,
.chave-centro {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
}

.chave-titulo {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0d47a1;
    margin-bottom: 0.5rem;
    text-align: center;
}

.chave-confronto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.chave-time {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
}

.chave-time.chave-vazio {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
    font-style: italic;
    border-style: dashed;
}

.chave-vs {
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.9rem;
}

.chave-seta {
    text-align: center;
    color: #0d47a1;
    font-size: 1.1rem;
    margin: 0.3rem 0;
}

.chave-proxima .chave-time,
.chave-semi .chave-time {
    min-width: 110px;
}

.chave-final-box {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.chave-final-box .chave-titulo {
    color: #ffd54f;
    font-size: 0.9rem;
}

.chave-final-grande {
    margin-top: 0.5rem;
}

.chave-final-grande .chave-time {
    background: rgba(255,255,255,0.95);
    min-width: 120px;
    font-size: 0.95rem;
}

.chave-final-grande .chave-vs {
    color: #ffd54f;
    font-size: 1.1rem;
}

/* Tablet e desktop - layout horizontal do chaveamento */
@media (min-width: 700px) {
    .chaveamento {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .chave-lado {
        flex: 1;
    }

    .chave-centro {
        flex: 1.2;
    }

    .chave-confronto {
        flex-direction: column;
        gap: 0.35rem;
    }

    .chave-vs {
        transform: rotate(90deg);
        margin: 0.15rem 0;
    }

    .chave-final-grande {
        flex-direction: row;
        gap: 0.75rem;
    }

    .chave-final-grande .chave-vs {
        transform: none;
    }
}


/* ============================================================
   MENU DROPDOWN - Competições
   ============================================================ */
.menu-lista {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
}

.menu-lista > li > a,
.menu-dropdown-btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1.25rem;
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    font-family: inherit;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}

.menu-lista > li > a:hover,
.menu-lista > li > a.ativo,
.menu-dropdown-btn:hover,
.menu-dropdown-btn.ativo {
    background: rgba(255,255,255,0.12);
    text-decoration: none;
    color: #fff;
}

.menu-dropdown-btn.ativo {
    border-left: 4px solid #ffd54f;
}

.seta-dropdown {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.menu-item-dropdown {
    position: relative;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0,0,0,0.2);
}

.submenu:not([hidden]) {
    display: block;
}

.submenu[hidden] {
    display: none !important;
}

.submenu a {
    display: block;
    padding: 0.7rem 1.25rem 0.7rem 2rem;
    color: #e3f2fd;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.submenu a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
}

/* Desktop (>= 900px) */
@media (min-width: 900px) {
    .menu-lista {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        padding: 0;
    }

    .menu-lista > li > a,
    .menu-dropdown-btn {
        width: auto;
        padding: 0.5rem 0.85rem;
        border-bottom: none;
        border-radius: 6px;
        font-size: 0.9rem;
    }

    .menu-lista > li > a.ativo,
    .menu-dropdown-btn.ativo {
        border-left: none;
        background: rgba(255,255,255,0.18);
    }

    .menu-item-dropdown {
        position: relative;
    }

    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: #0d47a1;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
        z-index: 1100;
        padding: 0.35rem 0;
    }

    .submenu a {
        padding: 0.65rem 1rem;
        color: #fff;
    }
}

/* ============================================================
   Layout competição: classificação + jogos
   Mobile first: empilhado; desktop: lado a lado
   ============================================================ */
.layout-comp {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.layout-comp .col-classificacao,
.layout-comp .col-jogos {
    width: 100%;
}

.layout-comp .col-jogos .jogo-card {
    padding: 0.55rem 0.7rem;
}

.paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pag-btn {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: #0d47a1;
    color: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.pag-btn:hover {
    background: #1565c0;
    text-decoration: none;
    color: #fff;
}

.pag-info {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

@media (min-width: 900px) {
    .layout-comp.com-classificacao {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .layout-comp.com-classificacao .col-classificacao {
        flex: 1 1 55%;
        min-width: 0;
    }

    .layout-comp.com-classificacao .col-jogos {
        flex: 1 1 40%;
        min-width: 280px;
        max-width: 420px;
    }

    .layout-comp.com-classificacao .col-classificacao .tabela-wrapper {
        overflow-x: auto;
    }
}

/* ============================================================
   Cabeçalho da competição
   ============================================================ */
.cabecalho-competicao {
    margin-bottom: 1.25rem;
}

.cabecalho-comp-linha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.cabecalho-comp-titulo {
    margin-bottom: 0;
}

.cabecalho-comp-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.cabecalho-comp-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.cabecalho-comp-select {
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.95rem;
    background: #fff;
}

.cabecalho-comp-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
    align-items: center;
}

.cabecalho-comp-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}
