/*
 * components.css
 * CSS centralizzato per tutti i componenti condivisi del frontend.
 * Incluso in base.html — non ripetere queste classi nei singoli file.
 *
 * Indice:
 *  1. Reset e tipografia
 *  2. Hero — struttura comune
 *  3. Section header
 *  4. Prediction card
 *  5. Pc-stats pills
 *  6. Pc-tags
 *  7. League card / chip
 *  8. Empty state
 *  9. Load more
 * 10. Filtri comuni
 * 11. Animazioni
 * 12. Utility
 * 13. flag
 */

/* ═══════════════════════════════════════════════
   1. RESET E TIPOGRAFIA
═══════════════════════════════════════════════ */

h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════
   2. HERO — STRUTTURA COMUNE
   Usato in: home, today, predictions, league,
             leagues, country, archive_index,
             archive_league
═══════════════════════════════════════════════ */

.hero {
  background: var(--dark);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}

.hero-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--red));
}

/* variante archivio — gold */
.hero-accent-bar.archive {
  background: linear-gradient(90deg, var(--gold), var(--teal));
}

.hero-inner {
  padding: 28px 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-left { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
}

.hero-right { 
  text-align: center; 
}

.hero-ball-wrap {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-ball-wrap img {
  width: 32px;
  height: 32px;
  animation: float 1.5s ease-in-out infinite;
}

.hero-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-eyebrow::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
}

/* variante archivio */
.hero-eyebrow.archive {
  color: var(--gold);
}

.hero-eyebrow.archive::before {
  background: var(--gold);
}

.hero-text h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0 0 4px;
}

.hero-text p {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.counter-num {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}

.counter-num.archive {
  color: var(--gold);
}

.counter-lbl{
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════
   3. SECTION HEADER
   Usato in: home, today, predictions, league,
             country, archive_league
═══════════════════════════════════════════════ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.section-title::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--gray-3);
  display: inline-block;
}

.section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.section-link:hover { opacity: 0.75; }

.section-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ═══════════════════════════════════════════════
   4. PREDICTION CARD
   Usato in: home, today, predictions, league,
             country, archive_league
═══════════════════════════════════════════════ */

.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.prediction-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.prediction-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.1);
  border-color: var(--gray-3);
}

/* variante archivio — leggermente desaturata */
.prediction-card.archived {
  opacity: 0.92;
}

.prediction-card.archived:hover {
  opacity: 1;
}

.pc-header {
  background: var(--dark);
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.pc-date {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

.pc-league-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* variante archivio */
.pc-league-tag.archive {
  color: var(--gold);
}

/* dot OGGI */
.today-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
  display: inline-block;
  margin-right: 3px;
}

.pc-match {
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--gray-2);
}

.pc-team {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex: 1;
  line-height: 1.2;
}

.pc-team.away { text-align: right; }

.pc-vs {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  padding: 3px 7px;
  border: 1.5px solid rgba(230,57,70,0.3);
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

/* variante archivio */
.pc-vs.archive {
  color: var(--muted);
  border-color: var(--gray-3);
}

.pc-footer {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.pc-prob {
  display: flex;
  gap: 12px;
}

.pc-prob-item { text-align: center; }

.pc-prob-val {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}

.pc-prob-lbl {
  display: block;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.pc-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pc-cta svg {
  width: 13px;
  height: 13px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* variante archivio — cta grigia che diventa rossa all'hover */
.pc-cta.archive {
  color: var(--muted);
}

.pc-cta.archive svg {
  stroke: var(--muted);
}

.prediction-card:hover .pc-cta.archive {
  color: var(--red);
}

.prediction-card:hover .pc-cta.archive svg {
  stroke: var(--red);
}

/* ═══════════════════════════════════════════════
   5. PC-STATS PILLS
   Usato in: home, today, predictions, league,
             archive_league
═══════════════════════════════════════════════ */

.pc-stats {
  padding: 8px 14px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gray-2);
}

.pc-stat-pill {
  background: var(--gray-1);
  border: 1px solid var(--gray-3);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.pc-stat-pill.hot {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.pc-stat-pill.teal {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.pc-stat-pill.neutral {
  background: rgba(224,159,62,0.12);
  border-color: rgba(224,159,62,0.3);
  color: var(--gold);
}

/* variante archivio — pill più spente */
.pc-stat-pill.hot.archive {
  background: rgba(230,57,70,0.08);
  border-color: rgba(230,57,70,0.2);
  color: var(--red);
}

.pc-stat-pill.teal.archive {
  background: rgba(42,157,143,0.08);
  border-color: rgba(42,157,143,0.2);
  color: var(--teal);
}

/* ═══════════════════════════════════════════════
   6. PC-TAGS
   Usato in: home, today, predictions, league,
             archive_league
═══════════════════════════════════════════════ */

.pc-tags {
  padding: 8px 14px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gray-2);
}

.pc-tag {
  background: var(--dark);
  color: var(--white);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* variante archivio */
.pc-tag.archive {
  background: var(--gray-1);
  color: var(--muted);
  border: 1px solid var(--gray-3);
}

/* ═══════════════════════════════════════════════
   7. LEAGUE CARD / CHIP
   Usato in: home, leagues, country, archive_index
═══════════════════════════════════════════════ */

.league-chip {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: 6px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.league-chip:hover {
  border-color: var(--red);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.league-chip img {
  width: 20px;
  height: 20px;
  opacity: 0.6;
  flex-shrink: 0;
}

.league-chip-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.league-chip-count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.03em;
}

.league-chip mark {
  background: rgba(230,57,70,0.12);
  color: var(--red);
  border-radius: 2px;
  padding: 0 1px;
}

/* ─── League card (versione estesa con icona dark) */
.league-card {
  background: var(--white);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.league-card:hover { background: var(--gray-1); }

.league-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.league-icon img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.league-card-text { flex: 1; min-width: 0; }

.league-card-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dark);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.league-card-count {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.league-card-count .count-num {
  font-weight: 700;
  color: var(--red);
}

.league-card-count .count-num-archive {
  font-weight: 700;
  color: var(--gold);
}

.league-card mark {
  background: rgba(230,57,70,0.12);
  color: var(--red);
  border-radius: 2px;
  padding: 0 1px;
}

.league-arrow {
  width: 13px;
  height: 13px;
  stroke: var(--gray-3);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: stroke 0.15s, transform 0.15s;
}

.league-card:hover .league-arrow {
  stroke: var(--red);
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════
   8. EMPTY STATE
   Usato in: predictions, league, archive_league,
             today, country
═══════════════════════════════════════════════ */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 13px;
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  stroke: var(--gray-3);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 14px;
  display: block;
}

.no-filter-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  display: none;
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════
   9. LOAD MORE
   Usato in: predictions, league, archive_league
═══════════════════════════════════════════════ */

.load-more-container {
  text-align: center;
  margin-top: 28px;
  margin-bottom: 12px;
}

.load-more-btn {
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 12px 32px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-more-btn:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.load-more-btn:disabled {
  background: var(--gray-3);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

.load-more-btn .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.load-more-btn.loading .spinner { display: block; }
.load-more-btn.loading .btn-text { display: none; }

.load-more-info {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════
   10. FILTRI COMUNI
   Usato in: today, predictions, league
 
   Struttura HTML attesa:
   .filters-bar
     .filters-row.filters-row--date     ← bottoni data (solo predictions/league)
     .filters-row.filters-row--selects  ← select campionato + scenario + reset
     .filters-row.filters-row--active   ← pills filtri attivi (hidden di default)
═══════════════════════════════════════════════ */
 
/* ─── Container barra ────────────────────────── */
.filters-bar {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
 
/* ─── Riga generica ──────────────────────────── */
.filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
 
/* ─── Riga bottoni data ───────────────────────── */
.filters-row--date {
  flex-wrap: wrap;
  gap: 6px;
}
 
.filters-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2px;
}
 
.filter-btn {
  background: var(--gray-1);
  color: var(--muted);
  border: 1px solid var(--gray-2);
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
 
.filter-btn:hover {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
 
.filter-btn.active {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
 
/* ─── Riga select ────────────────────────────── */
.filters-row--selects {
  flex-wrap: nowrap;
}
 
/* gruppo etichetta + select */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
 
.filter-group-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  padding-left: 2px;
}
 
.filter-select {
  width: 100%;
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  border-radius: 6px;
  padding: 8px 28px 8px 10px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23656d76' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.filter-select:focus { border-color: var(--dark); }
 
.filter-select.active {
  border-color: var(--teal);
  background-color: rgba(42,157,143,0.06);
  color: var(--teal);
}
 
/* ─── Reset button ───────────────────────────── */
.reset-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--gray-3);
  border-radius: 5px;
  padding: 0 10px;
  height: 32px;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  margin-bottom: 0;
  line-height: 1;
}
 
.reset-btn:hover {
  background: rgba(230,57,70,0.08);
  border-color: var(--red);
  color: var(--red);
}
  
/* ─── Pills filtri attivi ────────────────────── */
.filters-row--active {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-2);
}
 
.filters-row--active.visible { display: flex; }
 
.active-filter-pill {
  background: var(--dark);
  color: var(--white);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.03em;
}
 
.active-filter-pill button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
 
.active-filter-pill button:hover { color: var(--white); }
 
/* ─── Info risultati ─────────────────────────── */
.filter-results-info {
  font-size: 11px;
  color: var(--muted);
  display: none;
  width: 100%;
}
 
.filter-results-info.visible { display: block; }
 
/* ─── RESPONSIVE ─────────────────────────────── */
 
/* tablet: i select vanno a capo se serve */
@media (max-width: 900px) {
  .filters-row--selects {
    flex-wrap: wrap;
  }
 
  .filter-group {
    min-width: 140px;
  }
}
/* mobile: tutto in colonna, full width */
@media (max-width: 600px) {
  .filters-bar {
    padding: 12px 14px;
    gap: 8px;
  }
 
  .filters-row--date {
    gap: 5px;
  }
 
  .filter-btn {
    padding: 6px 10px;
    font-size: 10px;
  }
 
  .filters-row--selects {
    flex-direction: column;
    gap: 8px;
  }
 
  .filter-group {
    width: 100%;
    flex: none;
  }
 
  .filter-select {
    font-size: 14px;
    padding: 10px 28px 10px 10px;
  }
 
  .reset-btn {
    width: 100%;
    height: 38px;
    justify-content: center;
    font-size: 12px;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
 
  .reset-btn::before {
    content: '✕  Rimuovi filtri  ';
    font-size: 11px;
  }
 
  .filter-count {
    margin-left: 0;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════
   11. NO-RESULTS+COUNTRY GROUP IN COMUNE CON
   LEAGUES E ARCHIVE_INDEX
═══════════════════════════════════════════════ */

  .no-results {
    background: var(--white);
    border: 1px solid var(--gray-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    display: none;
  }

  .country-group {
    background: var(--white);
    border: 1px solid var(--gray-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
  }

  .country-group.hidden { display: none; }

  .country-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
  }
  
  .country-header.archive {
    border-left: 3px solid var(--gold);
  }

  .country-header:hover { background: var(--gray-1); }

  .country-logo {
    width: 28px; height: 28px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.8;
  }

  .country-fallback {
    width: 28px; height: 28px;
    border-radius: 4px;
    background: var(--dark);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
  }

  .country-info { flex: 1; min-width: 0; }

  .country-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark);
    line-height: 1;
  }

  .country-sub {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0.04em;
  }

  .country-header mark {
    background: rgba(224,159,62,0.15);
    color: var(--gold);
    border-radius: 2px;
    padding: 0 1px;
  }

  .country-chevron {
    width: 16px; height: 16px;
    stroke: var(--muted); fill: none;
    stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.25s;
    flex-shrink: 0;
  }

  .country-group.collapsed .country-chevron { transform: rotate(-90deg); }

  /* ─── LEAGUES GRID ───────────────────────────── */
  .leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--gray-2);
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
  }

  .country-group.collapsed .leagues-grid {
    max-height: 0 !important;
    opacity: 0;
  }
  .country-group:not(.collapsed) .leagues-grid {
    border-top: 1px solid var(--gray-2);
  }

  /* ─── LEAGUE CARD ────────────────────────────── */
  .league-card mark {
    background: rgba(224,159,62,0.15);
    color: var(--gold);
    border-radius: 2px;
    padding: 0 1px;
  }

  .league-card:hover .league-arrow {
    stroke: var(--gold);
    transform: translateX(2px);
  }

/* ═══════════════════════════════════════════════
   12. ANIMAZIONI
═══════════════════════════════════════════════ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════
   13. UTILITY
═══════════════════════════════════════════════ */

/* search bar comune (leagues, archive_index) */
.search-bar {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  max-width: 440px;
  transition: border-color 0.2s;
}

.search-bar:focus-within { border-color: var(--dark); }

.search-bar svg {
  width: 15px;
  height: 15px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  flex-shrink: 0;
}

.search-bar input {
  border: none;
  outline: none;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: var(--dark);
  background: transparent;
  flex: 1;
  min-width: 0;
}

.search-bar input::placeholder { color: var(--muted); }

.search-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
  display: none;
}

.search-clear:hover { color: var(--red); }

.search-summary {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
  display: none;
}

/* descrizione campionato */
.league-description {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}


/* ═══════════════════════════════════════════════
   FLAGS
═══════════════════════════════════════════════ */

.fi-card {
  width: 14px;
  height: 10px;
  border-radius: 1px;
  margin-right: 4px;
  display: inline-block;
}

.fi-country {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}


/* ═══════════════════════════════════════════════
   BANNER
═══════════════════════════════════════════════ */
.banner-section {
  margin: 30px 0;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  overflow: hidden;
}

.banner-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 12px;
  background: var(--gray-1);
  border-bottom: 1px solid var(--gray-2);
  text-align: center;
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s;
}

.banner-img:hover { opacity: 0.9; }

/* ═══════════════════════════════════════════════
   DISCLAIMER
═══════════════════════════════════════════════ */
.disclaimer {
  background: #fff5f5;
  border: 1px solid #f5c1c1;
  border-left: 3px solid var(--red);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 12px; color: #7a3535;
  margin-bottom: 20px; line-height: 1.7;
  display: flex; align-items: center; gap: 12px;
}
.disclaimer svg {
  width: 18px; height: 18px; stroke: var(--red);
  fill: none; stroke-width: 2; flex-shrink: 0;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE COMUNI
═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  .predictions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero-inner { 
    padding: 20px 16px; 
  }
  .hero-ball-wrap {
    width: 40px;
    height: 40px;
  }
  .hero-ball-wrap img {
    width: 24px;
    height: 24px;
  }
  .hero-text h1 { font-size: 24px; }
  .counter-num {font-size: 34px;}
  .counter-lbl {font-size: 10px;}

  .filter-select { max-width: 100%; width: 100%; }
  .search-bar { max-width: 100%; }
  .filters-bar { gap: 6px; }
  .reset-btn { margin-left: 0; }

  .section-header { gap: 6px; }

  .leagues-grid { grid-template-columns: 1fr; }
}
