/* ============================================================
   public/assets/css/publico.css
   Estilo da área pública (torcedor)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700;800&display=swap');

:root {
  --verde:        #1a7a3c;
  --verde-escuro: #115c2c;
  --verde-claro:  #e8f5ed;
  --verde-mid:    #2ea05a;
  --amarelo:      #f5c518;
  --vermelho:     #d63031;
  --cinza-bg:     #f4f5f7;
  --cinza-borda:  #dde1e7;
  --cinza-texto:  #4a4e57;
  --branco:       #ffffff;
  --radius:       10px;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --font:         'Barlow', sans-serif;
  --font-cond:    'Barlow Condensed', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--cinza-bg);
  color: var(--cinza-texto);
  font-size: 15px;
  line-height: 1.5;
}

/* ---- HEADER PÚBLICO ---- */
.pub-header {
  background: var(--verde-escuro);
  padding: 0 20px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.pub-header-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  height: 56px;
}
.pub-logo {
  font-family: var(--font-cond);
  font-size: 20px; font-weight: 800;
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.pub-nav { display: flex; gap: 4px; margin-left: auto; }
.pub-nav a {
  color: rgba(255,255,255,.75); text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 6px;
  transition: background .15s;
}
.pub-nav a:hover, .pub-nav a.ativa { background: rgba(255,255,255,.15); color: #fff; }

/* ---- CONTAINER ---- */
.pub-container { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }

/* ---- HERO CAMPEONATO ---- */
.camp-hero {
  background: linear-gradient(135deg, var(--verde-escuro), var(--verde));
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 24px;
}
.camp-hero h1 { font-family: var(--font-cond); font-size: 28px; font-weight: 800; }
.camp-hero p  { font-size: 14px; opacity: .8; margin-top: 4px; }
.camp-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.camp-hero-badge {
  background: rgba(255,255,255,.15);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600;
}

/* ---- ABAS PÚBLICAS ---- */
.pub-abas {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--cinza-borda);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pub-abas::-webkit-scrollbar { display: none; }
.pub-aba {
  padding: 10px 16px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: #8a8f9c;
  text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s;
}
.pub-aba:hover { color: var(--cinza-texto); }
.pub-aba.ativa { color: var(--verde); border-bottom-color: var(--verde); }

/* ---- CARD ---- */
.pub-card {
  background: var(--branco);
  border-radius: var(--radius);
  border: 1px solid var(--cinza-borda);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.pub-card-titulo {
  padding: 14px 18px;
  font-family: var(--font-cond);
  font-size: 16px; font-weight: 700; color: #1e2330;
  border-bottom: 1px solid var(--cinza-borda);
  background: #fafbfc;
}

/* ---- JOGO CARD (ao vivo / próximos) ---- */
.jogo-card {
  background: var(--branco);
  border-radius: var(--radius);
  border: 1px solid var(--cinza-borda);
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.jogo-card.ao-vivo { border-color: var(--verde); border-width: 2px; }
.jogo-meta {
  font-size: 11px; color: #888; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.jogo-times {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.jogo-time { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.jogo-time.visitante { align-items: center; }
.jogo-escudo {
  width: 40px; height: 40px;
  object-fit: contain;
}
.jogo-escudo-ph {
  width: 40px; height: 40px;
  background: var(--verde-claro); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--verde);
}
.jogo-nome {
  font-size: 14px; font-weight: 700; color: #1e2330;
  text-align: center; line-height: 1.2;
}
.jogo-placar-box { text-align: center; }
.jogo-placar {
  font-family: var(--font-cond);
  font-size: 36px; font-weight: 800;
  color: #1e2330; line-height: 1;
}
.jogo-placar.ao-vivo { color: var(--verde); }
.jogo-hora {
  font-family: var(--font-cond);
  font-size: 22px; font-weight: 600;
  color: #aaa;
}
.badge-live {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--vermelho); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ---- CLASSIFICAÇÃO PÚBLICA ---- */
.class-table { width: 100%; border-collapse: collapse; }
.class-table th {
  background: #f4f5f7; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  color: #8a8f9c; padding: 8px 10px; text-align: center;
}
.class-table th:first-child { text-align: left; }
.class-table td {
  padding: 10px 10px; text-align: center;
  border-bottom: 1px solid var(--cinza-borda); font-size: 14px;
}
.class-table td:first-child { text-align: left; }
.class-table tr:last-child td { border-bottom: none; }
.class-table tr:hover td { background: #fafbfc; }
.class-pos {
  font-weight: 700; font-size: 14px;
  width: 28px; display: inline-block; text-align: center;
}
.class-pos.ouro   { color: #b7860a; }
.class-pos.prata  { color: #888; }
.class-pos.bronze { color: #a0522d; }
.class-pts { font-weight: 700; font-size: 16px; color: var(--verde); }
.class-saldo { font-weight: 600; }
.class-saldo.pos { color: var(--verde); }
.class-saldo.neg { color: var(--vermelho); }
.time-cell { display: flex; align-items: center; gap: 8px; }
.time-mini-escudo {
  width: 24px; height: 24px; object-fit: contain;
}
.time-mini-ph {
  width: 24px; height: 24px;
  background: var(--verde-claro); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--verde);
  flex-shrink: 0;
}

/* ---- ARTILHARIA ---- */
.art-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--cinza-borda);
}
.art-item:last-child { border-bottom: none; }
.art-pos { font-size: 13px; font-weight: 700; color: #aaa; width: 20px; flex-shrink: 0; }
.art-foto {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.art-foto-ph {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--verde-claro);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--verde);
  flex-shrink: 0;
}
.art-info { flex: 1; }
.art-nome  { font-weight: 700; font-size: 14px; }
.art-time  { font-size: 12px; color: #888; }
.art-gols  { font-family: var(--font-cond); font-size: 26px; font-weight: 800; color: var(--verde); }

/* ---- LISTA CAMPEONATOS HOME ---- */
.camp-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-bottom: 1px solid var(--cinza-borda);
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.camp-item:last-child { border-bottom: none; }
.camp-item:hover { background: #fafbfc; }
.camp-icone {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--verde-claro);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.camp-nome  { font-weight: 700; font-size: 15px; color: #1e2330; }
.camp-sub   { font-size: 12px; color: #888; margin-top: 2px; }
.camp-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.camp-badge.andamento { background: var(--verde-claro); color: var(--verde-escuro); }
.camp-badge.finalizado{ background: #e8f0fe; color: #1a3a8f; }
.camp-badge.planejamento{ background: #eef0f4; color: #5a5f6e; }

/* ---- FOOTER ---- */
.pub-footer {
  text-align: center; padding: 20px;
  font-size: 12px; color: #aaa;
  border-top: 1px solid var(--cinza-borda);
  margin-top: 20px;
}

/* ================================================================
   MOBILE — Responsivo completo
   ================================================================ */

/* Telas pequenas e médias */
@media (max-width: 700px) {

  /* Container */
  .pub-container { padding: 12px 10px 60px; }

  /* Header */
  .pub-header-inner { height: 50px; }
  .pub-logo { font-size: 16px; }
  .pub-nav a { font-size: 13px; padding: 5px 10px; }

  /* Grid de 2 colunas → 1 coluna */
  .pub-grid-2 { grid-template-columns: 1fr !important; }

  /* Card de jogo */
  .jogo-card { padding: 10px 12px; }
  .jogo-times { gap: 6px; }
  .jogo-time  { min-width: 0; }
  .jogo-nome  { font-size: 12px; line-height: 1.2; word-break: break-word; }
  .jogo-escudo, .jogo-escudo-ph { width: 36px; height: 36px; font-size: 14px; }
  .jogo-placar { font-size: 28px; padding: 0 6px; }
  .jogo-hora   { font-size: 18px; }
  .jogo-placar-box { min-width: 60px; }
  .jogo-meta  { font-size: 11px; margin-bottom: 6px; }

  /* Campeonatos na home */
  .camp-item { padding: 12px 14px; gap: 10px; }
  .camp-nome { font-size: 14px; }
  .camp-icone { width: 38px; height: 38px; font-size: 17px; }

  /* Hero do campeonato */
  .camp-hero { padding: 20px 14px 16px; }
  .camp-hero h1 { font-size: 20px; }
  .camp-hero-badge { font-size: 11px; padding: 3px 8px; }

  /* Abas */
  .pub-abas { gap: 2px; padding: 0 10px; }
  .pub-aba { font-size: 12px; padding: 10px 10px; white-space: nowrap; }

  /* Tabela de classificação */
  .class-table th, .class-table td { padding: 6px 5px; font-size: 11px; }
  .class-pos { width: 20px; height: 20px; font-size: 10px; }
  .time-mini-escudo, .time-mini-ph { width: 20px; height: 20px; }
  .time-cell { gap: 5px; }
  .class-pts { font-size: 13px; }

  /* Artilheiros */
  .art-item { padding: 8px 12px; gap: 8px; }
  .art-foto, .art-foto-ph { width: 34px; height: 34px; }
  .art-nome { font-size: 13px; }
  .art-gols { font-size: 22px; }

  /* Cards de times */
  .pub-card { border-radius: 8px; }
  .pub-card-titulo { font-size: 13px; padding: 10px 14px; }

  /* Card de jogo na classificação */
  .jogo-placar-box { flex-direction: column; gap: 0; }

  /* Placar ao vivo badge */
  .badge-live { font-size: 10px; padding: 2px 7px; }
}

/* Telas muito pequenas (320px) */
@media (max-width: 380px) {
  .pub-logo { font-size: 14px; }
  .pub-nav a { font-size: 12px; padding: 4px 8px; }
  .jogo-nome { font-size: 11px; }
  .jogo-placar { font-size: 24px; }
  .pub-aba { font-size: 11px; padding: 9px 8px; }
  .class-table th, .class-table td { padding: 5px 3px; font-size: 10px; }
}

/* ---- MELHORIAS GERAIS MOBILE ---- */

/* Imagens responsivas */
img { max-width: 100%; }

/* Cards de jogo — melhor espaçamento mobile */
.jogo-card {
  transition: box-shadow .15s;
}

/* Nome do time não quebra em posições estranhas */
.jogo-time {
  text-align: center;
  min-width: 0;
  flex: 1;
}

/* Placar central sempre visível */
.jogo-placar-box {
  flex-shrink: 0;
}

/* Card campeonato — badge não empurra texto */
.camp-item {
  flex-wrap: nowrap;
}
.camp-item > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.camp-nome {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.camp-badge {
  flex-shrink: 0;
}

/* Abas do campeonato — scroll horizontal */
.pub-abas {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.pub-aba {
  scroll-snap-align: start;
  flex-shrink: 0;
}
