/**
 * Mundial FIFA 2026 — CSS
 * Estilos para archive-match, single-match, widgets y shortcodes
 * v2.2 — Premium Dark System
 */

:root {
  --mundial-dark: #1e293b;
  --mundial-navy: #0f172a;
  --mundial-red: #D1202F;
  --mundial-green: #006644;
  --mundial-gold: #BF9C57;
  --mundial-gold-light: #d4af71;
  --mundial-card-bg: rgba(255, 255, 255, 0.03);
  --mundial-glass: rgba(255, 255, 255, 0.05);
  --mundial-border: rgba(255, 255, 255, 0.1);
  --mundial-radius: 16px;
}

/* ================================================================
   Archive Page — Wrapper
   ================================================================ */
.cl26-archive-page {
  background: linear-gradient(180deg, #0f172a 0%, #0f172a 60%, #111827 100%);
  color: #f1f5f9;
  min-height: 100vh;
}

/* ================================================================
   Archive Hero Section
   ================================================================ */
.cl26-archive-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0f1e 0%, #1a1a2e 40%, #12312b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cl26-archive-hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(191, 156, 87, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(209, 32, 47, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(0, 102, 68, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.cl26-archive-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--mundial-gold);
  margin-bottom: 12px;
  opacity: 0.9;
}

.cl26-archive-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.cl26-archive-hero__sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ================================================================
   Stage Filter Pills
   ================================================================ */
.cl26-stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cl26-stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none !important;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all .2s;
  letter-spacing: .3px;
}

.cl26-stage-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.cl26-stage-pill.active {
  color: #000 !important;
  background: var(--mundial-gold);
  border-color: var(--mundial-gold);
  box-shadow: 0 4px 12px rgba(191, 156, 87, 0.4);
}

/* ================================================================
   Filter Bar Component
   ================================================================ */
.cl26-filterbar {
  background: var(--mundial-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--mundial-border);
  border-radius: var(--mundial-radius);
  padding: 20px 24px;
}

.cl26-filterbar__form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.cl26-filterbar__group {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cl26-filterbar__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

.cl26-filterbar__select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #f1f5f9;
  padding: 9px 14px;
  font-size: .85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  /* Native select styling */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23aaa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 36px;
}

.cl26-filterbar__select:focus {
  border-color: var(--mundial-gold);
  box-shadow: 0 0 0 3px rgba(191, 156, 87, 0.15);
}

.cl26-filterbar__select option {
  background: #1e293b;
  color: #f1f5f9;
}

.cl26-filterbar__actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

.cl26-filterbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.cl26-filterbar__btn--primary {
  background: var(--mundial-gold);
  color: #000;
}

.cl26-filterbar__btn--primary:hover {
  background: var(--mundial-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(191, 156, 87, 0.35);
}

.cl26-filterbar__btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cl26-filterbar__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Active filter strip */
.cl26-filter-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(191, 156, 87, 0.12);
  border: 1px solid rgba(191, 156, 87, 0.25);
  color: var(--mundial-gold);
  font-size: .8rem;
  font-weight: 600;
}

.cl26-filter-active__clear {
  color: var(--mundial-gold);
  margin-left: 4px;
  text-decoration: none;
  font-weight: 700;
  opacity: 0.7;
  transition: opacity .2s;
}

.cl26-filter-active__clear:hover {
  opacity: 1;
}

/* Empty State */
.cl26-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.4);
}

.cl26-empty-state p {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 8px;
}

/* Pagination */
.cl26-pagination .nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.cl26-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none !important;
  transition: all .2s;
}

/* Bug #5 Fix: next/prev links need width:auto since they contain text */
.cl26-pagination .page-numbers.next,
.cl26-pagination .page-numbers.prev {
  width: auto;
  padding: 0 16px;
  gap: 6px;
}

.cl26-pagination .page-numbers:hover,
.cl26-pagination .page-numbers.current {
  background: var(--mundial-gold);
  color: #000;
  border-color: var(--mundial-gold);
}


/* ================================================================
   Partido Card — Base (white context)
   ================================================================ */
.cl26-partido-card {
  background: #fff;
  border-radius: var(--mundial-radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
  padding: 20px;
  border: 1px solid #e8ecef;
  transition: box-shadow .25s, transform .25s;
}

.cl26-partido-card:hover {
  box-shadow: 0 8px 32px rgba(0, 102, 68, .15);
  transform: translateY(-3px);
}

/* Dark context card (inside cl26-archive-page) */
.cl26-archive-page .cl26-partido-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #f1f5f9;
}

.cl26-archive-page .cl26-partido-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cl26-archive-page .cl26-equipo-nombre {
  color: #f1f5f9;
}

.cl26-archive-page .cl26-partido-info {
  color: rgba(255, 255, 255, 0.5);
}

.cl26-equipo {
  min-width: 88px;
  text-align: center;
}

.cl26-partido-card[data-estado="en_vivo"] {
  border-color: var(--mundial-red);
  box-shadow: 0 0 0 2px rgba(209, 32, 47, .2), 0 4px 16px rgba(0, 0, 0, .1);
}

/* Badges */
.cl26-badge-finished {
  background-color: #166534;
  color: #bbf7d0;
  font-weight: 700;
  font-size: .75rem;
  border-radius: 6px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cl26-bandera {
  font-size: 2.5rem;
  line-height: 1.1;
  display: block;
}

.cl26-equipo-nombre {
  font-weight: 700;
  font-size: .9rem;
  margin-top: 6px;
  color: #1a1a2e;
}

.cl26-score-display {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1a1a2e;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

.cl26-score-vs {
  font-size: 1.3rem;
  font-weight: 700;
  color: #bbb;
}

.cl26-live-badge {
  font-size: .72rem;
  font-weight: 800;
  background: var(--mundial-red);
  color: #fff !important;
  border-radius: 20px;
  padding: 6px 8px;
  animation: cl26-pulsebg 1.5s ease infinite;
}

@keyframes cl26-pulsebg {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .65;
  }
}

.cl26-grupo-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--mundial-green);
}

.cl26-match-fecha {
  font-size: .75rem;
  color: #888;
}

/* ================================================================
   Mini Card (Home Grid)
   ================================================================ */
.cl26-partido-mini {
  background: var(--mundial-card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--mundial-radius);
  padding: 16px;
  display: block;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cl26-partido-mini:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--mundial-gold);
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.cl26-partido-mini[data-estado="en_vivo"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--mundial-red);
  box-shadow: 0 0 10px var(--mundial-red);
}

.cl26-partido-mini .cl26-score-display {
  font-size: 1.5rem;
  color: var(--mundial-gold);
  text-shadow: 0 0 10px rgba(191, 156, 87, 0.3);
}

.cl26-partido-mini .cl26-bandera {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  transition: transform .3s;
}

.cl26-partido-mini:hover .cl26-bandera {
  transform: scale(1.1) rotate(5deg);
}

/* ================================================================
   Single Match — Hero
   ================================================================ */
.cl26-partido-hero {
  position: relative;
  overflow: hidden;
}

.cl26-match-team {
  min-width: 110px;
}

/* Custom badge for 'Programado' — High contrast (WCAG AA) */
.cl26-badge-scheduled {
  background-color: #334155;
  color: #ffffff;
  font-weight: 700;
  font-size: .75rem;
  border-radius: 6px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Unified button for match cards */
.btn-cl26-match {
  background: transparent;
  border: 2px solid var(--mundial-gold);
  color: var(--mundial-gold);
  border-radius: 8px;
  font-weight: 700;
  font-size: .8rem;
  padding: 7px 18px;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}

.btn-cl26-match:hover {
  background: var(--mundial-gold);
  color: #fff;
}

.cl26-single-section {
  background: var(--mundial-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--mundial-border);
  border-radius: var(--mundial-radius);
  padding: 24px;
  color: #fff;
  margin-bottom: 24px;
}

.cl26-single-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--mundial-gold);
  border-bottom: 1px solid var(--mundial-border);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cl26-single-section table {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
}

.cl26-single-section table th {
  padding: 8px 0;
  width: 120px;
  color: rgba(255, 255, 255, 0.5) !important;
}

.cl26-single-section table td {
  padding: 8px 0;
  color: #fff !important;
  font-weight: 500;
}

.cl26-section-title {
  color: var(--mundial-gold) !important;
}

.cl26-countdown-units {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cl26-countdown-unit {
  background: rgba(255, 255, 255, .1);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 64px;
  text-align: center;
}

/* Bug #2 Fix: countdown always white text regardless of parent background */
.cl26-countdown-banner,
.cl26-countdown-compact {
  color: #fff;
}

.cl26-countdown-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.cl26-countdown-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--mundial-gold);
  font-variant-numeric: tabular-nums;
}

.cl26-countdown-label {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
  font-weight: 600;
}

.cl26-countdown-sep {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--mundial-gold);
  opacity: .6;
  line-height: 1;
}

.cl26-mundial-logos {
  font-size: 1.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* Countdown divider */
.cl26-countdown-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mundial-gold), transparent);
  margin: 12px auto;
  opacity: 0.4;
}

/* Countdown compact variant (inside hero) */
.cl26-countdown-compact {
  text-align: left;
}

.cl26-countdown-compact .cl26-countdown-title--compact {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.cl26-countdown-compact .cl26-countdown-number {
  font-size: 2.4rem;
}

.cl26-countdown-compact .cl26-mundial-logos {
  justify-content: flex-start;
}

/* Sidebar 'Más Partidos' link hover */
.cl26-single-section a.d-flex {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  transition: background .15s;
  border-radius: 4px;
  padding-left: 4px;
  padding-right: 4px;
  color: rgba(255, 255, 255, 0.8);
}

.cl26-single-section a.d-flex:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ================================================================
   Tabla de Posiciones
   ================================================================ */
.cl26-tabla-posiciones .table thead th {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--mundial-green);
  border-bottom: 2px solid var(--mundial-green);
}

.cl26-tabla-posiciones .table td {
  font-size: .85rem;
  vertical-align: middle;
}

.cl26-tabla-posiciones .table .first-col {
  font-weight: 700;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 576px) {
  .cl26-bandera {
    font-size: 2rem;
  }

  .cl26-score-display {
    font-size: 1.8rem;
  }

  .cl26-countdown-number {
    font-size: 1.5rem;
  }

  .cl26-countdown-unit {
    min-width: 52px;
    padding: 8px 10px;
  }
}