/* ============================================
   Winga Eventos Destacados — CSS
   v1.8.0
   ============================================ */

.winga-eventos-seccion {
  margin: 2rem 0;
}

.winga-eventos-titulo {
  font-size: 1.4rem;
  color: #0c4da2;
  margin-bottom: 1rem;
}

/* Badge publicidad */
.winga-publi-badge {
  display: inline-block;
  background: #f1f3f4;
  color: #777;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
  margin-bottom: .7rem;
}

/* Grid */
.winga-eventos-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: .75rem;
}
.winga-eventos-1-cols { grid-template-columns: 1fr; max-width: 360px; }
.winga-eventos-2-cols { grid-template-columns: repeat(2, 1fr); }
.winga-eventos-3-cols { grid-template-columns: repeat(3, 1fr); }
.winga-eventos-4-cols { grid-template-columns: repeat(4, 1fr); }

/* Grid fluido (formato="fluid") — reparte las cards automáticamente.
   Ideal para mostrar muchos eventos en un solo grid. En desktop ancho
   caben varias por fila; según se estrecha el ancho, las cards bajan
   solas a 3 → 2 → 1 columnas sin media queries por número de cards.
   El mínimo por card es ajustable: para que quepan MÁS cards a lo ancho,
   baja --winga-card-min (ej: 180px ≈ 5 columnas); para menos, súbelo. */
.winga-eventos-fluid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--winga-card-min, 210px)), 1fr));
}

/* ============================================
   CARD BASE
   ============================================ */
.winga-evento-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e7f0;
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: box-shadow .22s, transform .22s;
  min-height: 200px;
}

.winga-evento-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  transform: translateY(-3px);
}

/* Emoji decorativo de fondo via ::before + data attr simulado con JS */
.winga-evento-card::after {
  content: attr(data-emoji-bg);
  position: absolute;
  bottom: -10px;
  right: -4px;
  font-size: 90px;
  opacity: .07;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Todo el contenido sobre el emoji de fondo */
.winga-evento-card > * { position: relative; z-index: 1; }

/* Card destacada */
.winga-evento-destacado {
  border: 2px solid #0c4da2;
}

/* ============================================
   TEMAS POR DEPORTE
   Gradiente de fondo + acento de color
   ============================================ */

/* Fútbol — verde césped */
.winga-deporte-futbol {
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}
.winga-deporte-futbol .winga-cuota-item { background: #d1fae5; }
.winga-deporte-futbol .winga-cuota-item strong { color: #065f46; }
.winga-deporte-futbol .winga-evento-link { color: #065f46; }
.winga-deporte-futbol .winga-evento-link:hover { color: #047857; }
.winga-deporte-futbol .winga-evento-deporte { color: #059669; }
.winga-deporte-futbol.winga-evento-destacado { border-color: #059669; }

/* Tenis — tierra batida naranja */
.winga-deporte-tenis {
  background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
}
.winga-deporte-tenis .winga-cuota-item { background: #fed7aa; }
.winga-deporte-tenis .winga-cuota-item strong { color: #9a3412; }
.winga-deporte-tenis .winga-evento-link { color: #c2410c; }
.winga-deporte-tenis .winga-evento-link:hover { color: #9a3412; }
.winga-deporte-tenis .winga-evento-deporte { color: #ea580c; }
.winga-deporte-tenis.winga-evento-destacado { border-color: #ea580c; }

/* F1 — carbono oscuro y rojo */
.winga-deporte-f1 {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
  border-color: #e11d48;
  color: #e2e8f0;
}
.winga-deporte-f1 .winga-evento-deporte { color: #fb7185; }
.winga-deporte-f1 .winga-evento-equipos { color: #f1f5f9; }
.winga-deporte-f1 .winga-evento-fecha { color: #94a3b8; }
.winga-deporte-f1 .winga-evento-operador { color: #94a3b8; }
.winga-deporte-f1 .winga-evento-operador a { color: #7dd3fc; }
.winga-deporte-f1 .winga-cuota-item { background: rgba(255,255,255,.1); color: #e2e8f0; }
.winga-deporte-f1 .winga-cuota-item strong { color: #fb7185; font-size: 1rem; }
.winga-deporte-f1 .winga-evento-timestamp { color: #64748b; border-top-color: rgba(255,255,255,.1); }
.winga-deporte-f1 .winga-evento-links { border-top-color: rgba(255,255,255,.1); }
.winga-deporte-f1 .winga-evento-link { color: #7dd3fc; }
.winga-deporte-f1 .winga-evento-link:hover { color: #bae6fd; }
.winga-deporte-f1 .winga-evento-link-mercados { color: #94a3b8; }
.winga-deporte-f1.winga-evento-destacado { border-color: #e11d48; border-width: 2px; }
.winga-deporte-f1::after { opacity: .05; }

/* Baloncesto — naranja NBA */
.winga-deporte-baloncesto {
  background: linear-gradient(145deg, #fff7ed 0%, #fef3c7 100%);
  border-color: #fbbf24;
}
.winga-deporte-baloncesto .winga-cuota-item { background: #fde68a; }
.winga-deporte-baloncesto .winga-cuota-item strong { color: #92400e; }
.winga-deporte-baloncesto .winga-evento-link { color: #d97706; }
.winga-deporte-baloncesto .winga-evento-deporte { color: #d97706; }
.winga-deporte-baloncesto.winga-evento-destacado { border-color: #d97706; }

/* Champions League — azul galaxia */
.winga-deporte-champions,
.winga-deporte-champions-league {
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
  border-color: #818cf8;
  color: #e2e8f0;
}
.winga-deporte-champions .winga-evento-deporte,
.winga-deporte-champions-league .winga-evento-deporte { color: #a5b4fc; }
.winga-deporte-champions .winga-evento-equipos,
.winga-deporte-champions-league .winga-evento-equipos { color: #f1f5f9; }
.winga-deporte-champions .winga-evento-fecha,
.winga-deporte-champions-league .winga-evento-fecha { color: #94a3b8; }
.winga-deporte-champions .winga-cuota-item,
.winga-deporte-champions-league .winga-cuota-item { background: rgba(255,255,255,.1); color: #e2e8f0; }
.winga-deporte-champions .winga-cuota-item strong,
.winga-deporte-champions-league .winga-cuota-item strong { color: #c7d2fe; }
.winga-deporte-champions .winga-evento-links,
.winga-deporte-champions-league .winga-evento-links { border-top-color: rgba(255,255,255,.1); }
.winga-deporte-champions .winga-evento-link,
.winga-deporte-champions-league .winga-evento-link { color: #a5b4fc; }
.winga-deporte-champions::after,
.winga-deporte-champions-league::after { opacity: .05; }

/* Mundial — azul cielo global */
.winga-deporte-mundial,
.winga-deporte-mundial-2026 {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #60a5fa;
}
.winga-deporte-mundial .winga-cuota-item,
.winga-deporte-mundial-2026 .winga-cuota-item { background: #bfdbfe; }
.winga-deporte-mundial .winga-cuota-item strong,
.winga-deporte-mundial-2026 .winga-cuota-item strong { color: #1e40af; }
.winga-deporte-mundial .winga-evento-link,
.winga-deporte-mundial-2026 .winga-evento-link { color: #1d4ed8; }
.winga-deporte-mundial .winga-evento-deporte,
.winga-deporte-mundial-2026 .winga-evento-deporte { color: #2563eb; }
.winga-deporte-mundial.winga-evento-destacado,
.winga-deporte-mundial-2026.winga-evento-destacado { border-color: #1d4ed8; }

/* Boxeo / MMA — rojo y oscuro */
.winga-deporte-boxeo,
.winga-deporte-mma {
  background: linear-gradient(145deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fda4af;
}
.winga-deporte-boxeo .winga-cuota-item,
.winga-deporte-mma .winga-cuota-item { background: #fecdd3; }
.winga-deporte-boxeo .winga-cuota-item strong,
.winga-deporte-mma .winga-cuota-item strong { color: #9f1239; }
.winga-deporte-boxeo .winga-evento-link,
.winga-deporte-mma .winga-evento-link { color: #be123c; }
.winga-deporte-boxeo .winga-evento-deporte,
.winga-deporte-mma .winga-evento-deporte { color: #e11d48; }

/* Padel — verde pista indoor */
.winga-deporte-padel {
  background: linear-gradient(145deg, #f0fdf4 0%, #d1fae5 100%);
  border-color: #6ee7b7;
}
.winga-deporte-padel .winga-cuota-item { background: #a7f3d0; }
.winga-deporte-padel .winga-cuota-item strong { color: #064e3b; }
.winga-deporte-padel .winga-evento-link { color: #059669; }
.winga-deporte-padel .winga-evento-deporte { color: #10b981; }

/* ============================================
   TEMAS POR SUPERFICIE DE PISTA (TENIS)
   Se aplican por torneo vía clase winga-superficie-{clay|grass|hard}.
   Van DESPUÉS de los temas de deporte para sobrescribir el clay
   heredado de "tenis" cuando el torneo tiene una superficie propia
   (ej: Wimbledon → hierba, US/Australian Open → pista dura).
   ============================================ */

/* Tierra batida — Roland Garros, Madrid, Roma, Montecarlo... (naranja) */
.winga-superficie-clay {
  background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
}
.winga-superficie-clay .winga-evento-deporte { color: #ea580c; }
.winga-superficie-clay .winga-cuota-item { background: #fed7aa; }
.winga-superficie-clay .winga-cuota-item strong { color: #9a3412; }
.winga-superficie-clay .winga-evento-link { color: #c2410c; }
.winga-superficie-clay.winga-evento-destacado { border-color: #ea580c; }

/* Hierba — Wimbledon, Queen's, Halle... (verde césped) */
.winga-superficie-grass {
  background: linear-gradient(145deg, #f0fdf4 0%, #bbf7d0 100%);
  border-color: #4ade80;
}
.winga-superficie-grass .winga-evento-deporte { color: #15803d; }
.winga-superficie-grass .winga-cuota-item { background: #bbf7d0; }
.winga-superficie-grass .winga-cuota-item strong { color: #14532d; }
.winga-superficie-grass .winga-evento-link { color: #15803d; }
.winga-superficie-grass.winga-evento-destacado { border-color: #15803d; }

/* Pista dura — US Open, Australian Open, Indian Wells, Miami... (azul) */
.winga-superficie-hard {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #60a5fa;
}
.winga-superficie-hard .winga-evento-deporte { color: #2563eb; }
.winga-superficie-hard .winga-cuota-item { background: #bfdbfe; }
.winga-superficie-hard .winga-cuota-item strong { color: #1e40af; }
.winga-superficie-hard .winga-evento-link { color: #1d4ed8; }
.winga-superficie-hard.winga-evento-destacado { border-color: #1d4ed8; }

/* ============================================
   HEADER DE CARD (badges)
   ============================================ */
.winga-card-header {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  min-height: 0;
}

.winga-card-header:empty { display: none; }

.winga-evento-badge {
  display: inline-block;
  background: #0c4da2;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 9px;
  border-radius: 20px;
}

/* Badge "EN DIRECTO" de streaming */
.winga-stream-badge {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 9px;
  border-radius: 20px;
  animation: winga-pulse 2s infinite;
}

@keyframes winga-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ============================================
   CONTENIDO INTERIOR DE CARD
   ============================================ */
.winga-evento-deporte {
  font-size: .72rem;
  color: #888;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.winga-evento-equipos {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.25;
}

.winga-evento-fecha {
  font-size: .8rem;
  color: #555;
}

.winga-evento-cuotas {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* Píldora base (sigue usándose para la cuota; las filas reutilizan su fondo de tema) */
.winga-cuota-item {
  background: #eef2ff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .8rem;
  color: #444;
  display: flex;
  align-items: center;
  gap: 5px;
}

.winga-cuota-item strong {
  color: #0c4da2;
  font-size: .92rem;
}

/* ---- OPCIÓN A: filas comparativas (cada selección a todo el ancho) ---- */
.winga-cuota-fila {
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .7rem;
  border-radius: 10px;
}
.winga-cuota-sel {
  flex: 1;
  min-width: 0;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.2;
}
.winga-cuota-fila-right {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
}
.winga-cuota-fila .winga-cuota-val {
  font-size: 1.05rem;
  font-weight: 800;
}
.winga-cuota-chev {
  color: currentColor;
  opacity: .4;
  font-size: 1rem;
  line-height: 1;
}

/* Fila clicable (enlace de afiliado) */
a.winga-cuota-fila {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s;
}
a.winga-cuota-fila:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* Atribución del operador (nombre en texto cuando no hay logo) */
.winga-cuota-op-name {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  opacity: .7;
}
/* Logo del operador (altura fija + fondo blanco para uniformar los de fondo oscuro) */
.winga-cuota-logo {
  height: 16px;
  width: auto;
  max-width: 54px;
  object-fit: contain;
  background: #fff;
  border-radius: 3px;
  padding: 1px 3px;
  display: block;
}

.winga-evento-timestamp {
  font-size: .68rem;
  color: #aaa;
  font-style: italic;
  border-top: 1px dashed rgba(0,0,0,.08);
  padding-top: .35rem;
}

.winga-evento-operador {
  font-size: .78rem;
  color: #666;
}

.winga-evento-operador a {
  color: #0c4da2;
  font-weight: 700;
  text-decoration: none;
}

.winga-evento-operador a:hover { text-decoration: underline; }

/* ============================================
   STREAMING
   ============================================ */
.winga-evento-stream {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #1a1a2e 0%, #0c4da2 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: .82rem;
  padding: .55rem 1rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: opacity .2s, transform .15s;
}

.winga-evento-stream:hover {
  opacity: .88;
  transform: translateY(-1px);
}

/* Bloque de T&C de streaming bajo el grid completo */
.winga-stream-tc-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .7rem 1rem;
  margin-top: .5rem;
  font-size: .68rem;
  color: #888;
  line-height: 1.6;
}

.winga-stream-tc-label {
  font-weight: 700;
  color: #555;
  display: block;
  margin-bottom: .3rem;
}

.winga-stream-tc-text {
  display: block;
  font-style: italic;
}

/* ============================================
   ENLACES AL PIE
   ============================================ */
.winga-evento-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  border-top: 1px solid rgba(0,0,0,.07);
  padding-top: .6rem;
}

.winga-evento-link {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: #0c4da2;
  text-decoration: none;
  transition: color .15s;
}

.winga-evento-link:hover { color: #1560cc; }

.winga-evento-link-mercados {
  font-weight: 500;
  color: #777;
  font-size: .78rem;
}

.winga-evento-link-mercados:hover { color: #0c4da2; }

/* ============================================
   AVISO LEGAL COMPLIANCE
   ============================================ */
.winga-evento-aviso {
  font-size: .68rem;
  color: #bbb;
  text-align: center;
  margin-top: .4rem;
  line-height: 1.5;
}

.winga-evento-aviso a { color: #bbb; text-decoration: underline; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .winga-eventos-4-cols { grid-template-columns: repeat(2, 1fr); }
  .winga-eventos-3-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .winga-eventos-4-cols,
  .winga-eventos-3-cols,
  .winga-eventos-2-cols { grid-template-columns: 1fr; }
  /* En móvil el grid fluido también pasa a una sola columna para que
     las cards no queden demasiado estrechas */
  .winga-eventos-fluid { grid-template-columns: 1fr; }
  .winga-evento-card::after { font-size: 70px; }
}
