/* =========================================================
   IHF Trophy Puerto Rico 2026 — estilos propios del minisite
   (se carga después de base.css; usa las mismas variables de marca)
   ========================================================= */

:root {
  --live-red: #e30613;
}

/* ---------- Franja superior "vuelve a fprbm.com" ---------- */
.back-strip {
  background: #081328;
  color: rgba(255,255,255,0.72);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.back-strip .container { display: flex; align-items: center; gap: 8px; padding: 9px 24px; }
.back-strip a { color: var(--white); display: inline-flex; align-items: center; gap: 6px; }
.back-strip a:hover { color: var(--gold-500); }
.back-strip svg { width: 13px; height: 13px; }

/* ---------- Hero del evento ---------- */
.event-hero {
  position: relative;
  padding: 150px 0 96px;
  background: radial-gradient(120% 140% at 85% -10%, #2a0d10 0%, var(--navy-900) 45%, #081328 100%);
  color: var(--white);
  overflow: hidden;
}
.event-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 70% at 75% 20%, black, transparent);
  pointer-events: none;
}
.event-hero-inner { position: relative; z-index: 2; }
.event-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 18px 8px 8px; border-radius: 999px; margin-bottom: 26px;
}
.event-badge img { height: 30px; width: 30px; border-radius: 50%; background: var(--white); padding: 3px; }
.event-badge span { font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.event-hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); color: var(--white); max-width: 800px; margin-bottom: 20px; }
.event-hero h1 em { font-style: normal; color: var(--gold-500); }
.event-hero-lede { font-size: 18px; color: rgba(255,255,255,0.82); max-width: 620px; margin-bottom: 40px; }

.event-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px; }
.event-facts div { background: rgba(255,255,255,0.03); padding: 20px 20px; }
.event-fact-label { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.event-fact-label svg { width: 14px; height: 14px; }
.event-fact-value { font-family: var(--font-display); font-size: 17px; color: var(--white); }

/* ---------- Insignia EN VIVO ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--live-red); color: var(--white);
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px 5px 9px; border-radius: 999px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--white); animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.data-status { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--gray-500); margin-bottom: 26px; }
.data-status .dot-ok { width: 8px; height: 8px; border-radius: 50%; background: #1a9c5b; }
.data-status .dot-wait { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); }

/* ---------- Próximo / último partido (portada) ---------- */
.spotlight-match {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.spotlight-teams { display: flex; align-items: center; gap: 22px; }
.spotlight-team { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 130px; text-align: center; }
.spotlight-crest {
  width: 54px; height: 54px; border-radius: 50%; background: var(--navy-900); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 17px;
}
.spotlight-team strong { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.02em; }
.spotlight-score { font-family: var(--font-display); font-size: 32px; color: var(--navy-900); display: flex; align-items: center; gap: 10px; }
.spotlight-vs { font-size: 13px; color: var(--gray-500); letter-spacing: 0.08em; }
.spotlight-meta { text-align: right; }
.spotlight-meta .status-pill { margin-bottom: 8px; }
.spotlight-meta div { font-size: 13px; color: var(--gray-500); }
.spotlight-empty { color: var(--gray-500); font-size: 15px; }

/* ---------- Calendario / partidos en vivo ---------- */
.match-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between;
  margin-bottom: 14px;
}
.match-card-teams { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 260px; }
.match-card-team { display: flex; align-items: center; gap: 10px; width: 42%; }
.match-card-team.is-right { flex-direction: row-reverse; text-align: right; justify-content: flex-start; }
.match-card-crest { width: 34px; height: 34px; border-radius: 50%; background: var(--cream-100); color: var(--navy-900); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 12px; flex-shrink: 0; }
.match-card-score { font-family: var(--font-display); font-size: 22px; color: var(--navy-900); display: flex; align-items: center; gap: 8px; padding: 0 6px; white-space: nowrap; }
.match-card-info { text-align: right; min-width: 150px; }
.match-card-date { font-size: 12.5px; color: var(--gray-500); margin-bottom: 6px; }
.match-card-venue { font-size: 12px; color: var(--gray-500); margin-top: 6px; }
.status-pill.live { background: var(--live-red); color: var(--white); }

/* ---------- Tabla de posiciones ---------- */
.standings-group { margin-bottom: 44px; }
.standings-group h3 { font-size: 18px; margin-bottom: 16px; }
.standings-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.standings-table th, .standings-table td { padding: 13px 14px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14px; }
.standings-table th { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); background: var(--cream-100); }
.standings-table td.team-cell, .standings-table th.team-cell { text-align: left; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table td.pos { font-family: var(--font-display); color: var(--navy-900); }
.standings-table td.pts { font-family: var(--font-display); font-weight: 700; color: var(--navy-900); }
.team-cell-inner { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.team-cell-inner .match-card-crest { width: 26px; height: 26px; font-size: 10px; }

/* ---------- Estadísticas / rankings ---------- */
.ranking-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.ranking-table th, .ranking-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.ranking-table th { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); background: var(--cream-100); }
.ranking-table td:last-child, .ranking-table th:last-child { text-align: right; font-family: var(--font-display); color: var(--navy-900); }
.ranking-table tr:last-child td { border-bottom: none; }
.ranking-rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cream-100); font-family: var(--font-display); font-size: 12px; margin-right: 10px; }

/* ---------- Equipos ---------- */
.event-team-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.event-team-crest { width: 72px; height: 72px; border-radius: 50%; background: var(--navy-900); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; }
.event-team-card h3 { font-size: 17px; }
.event-team-card span { font-size: 12.5px; color: var(--gray-500); }

/* ---------- Arbitraje (PDF autoadministrable) ---------- */
.officiating-date { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--red-600); }

/* ---------- Aviso de error / sin datos ---------- */
.data-note {
  background: var(--cream-100); border: 1px dashed var(--line); border-radius: var(--radius-md);
  padding: 18px 22px; color: var(--ink-700); font-size: 14px; margin-bottom: 24px;
}
.data-note.is-error { background: rgba(227,6,19,0.06); border-color: rgba(227,6,19,0.3); color: var(--red-700); }

/* ---------- Calendario: tarjeta clicable + enlaces al detalle de partido ---------- */
.match-card { position: relative; text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.match-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.match-card-num { position: absolute; top: -10px; left: 20px; background: var(--navy-900); color: var(--white); font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.match-card-video-tag { display: inline-flex; align-items: center; color: var(--red-600); margin-left: 8px; }
.spotlight-link { display: inline-block; margin-top: 10px; font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.04em; color: var(--red-600); }
.spotlight-link:hover { text-decoration: underline; }

/* ---------- Transmisión: en vivo ---------- */
.stream-live-card {
  background: var(--navy-900); border-radius: var(--radius-lg); overflow: hidden;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 0; margin-bottom: 24px; box-shadow: var(--shadow-md);
}
.stream-live-card-novideo { grid-template-columns: 1fr; padding: 30px 34px; background: var(--white); border: 1px solid var(--line); }
.stream-live-card-novideo .spotlight-team strong { color: var(--ink-900); }
.stream-live-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.stream-live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-live-info { padding: 26px 28px; color: var(--white); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; justify-content: center; }
.stream-live-card-novideo .stream-live-info { align-items: center; text-align: center; width: 100%; }
.stream-live-info h3 { font-size: 17px; color: var(--white); line-height: 1.5; }
.stream-live-score { color: var(--gold-500); font-family: var(--font-display); font-size: 20px; margin: 0 6px; }
.stream-live-venue { font-size: 13px; color: rgba(255,255,255,0.7); }

/* ---------- Transmisión: ver de nuevo (grid tipo Netflix) ---------- */
.stream-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stream-card { display: block; text-decoration: none; color: inherit; border-radius: var(--radius-md); overflow: hidden; background: var(--white); border: 1px solid var(--line); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stream-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stream-card-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--navy-900); overflow: hidden; }
.stream-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stream-card-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--white); background: rgba(8,19,40,0.28); }
.stream-card-play svg { width: 42px; height: 42px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.stream-card-pill { position: absolute; top: 10px; left: 10px; background: rgba(8,19,40,0.75); color: var(--white); }
.stream-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stream-card-body strong { font-size: 13.5px; line-height: 1.4; }
.stream-card-body span { font-size: 12px; color: var(--gray-500); }

/* ---------- Detalle de partido: video + informe ---------- */
.match-video { margin-bottom: 8px; }
.match-video-badge { margin-bottom: 12px; }
.match-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-lg); overflow: hidden; }
.match-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.match-stats-block { margin-bottom: 36px; }
.match-stats-block h3 { font-size: 16px; margin-bottom: 14px; }
.match-stats-table td, .match-stats-table th { white-space: nowrap; }
.match-stats-table td:last-child, .match-stats-table th:last-child { white-space: normal; text-align: left; font-family: inherit; color: inherit; }
.match-play-video { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--red-600); white-space: nowrap; }
.match-play-video:hover { text-decoration: underline; }
.match-report-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; background: var(--cream-100); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 22px; margin: 30px 0 40px; }
.match-report-bar p { font-size: 13.5px; color: var(--ink-700); margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.back-link:hover { color: var(--white); }
.back-link svg { width: 13px; height: 13px; }

@media (max-width: 860px) {
  .stream-live-card { grid-template-columns: 1fr; }
  .stream-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .event-facts { grid-template-columns: 1fr 1fr; }
  .spotlight-match { flex-direction: column; align-items: stretch; text-align: center; }
  .spotlight-meta { text-align: center; }
  .match-card { flex-direction: column; align-items: stretch; }
  .match-card-info { text-align: center; }
  .stream-grid { grid-template-columns: 1fr; }
  .match-report-bar { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (max-width: 420px) {
  /* Evita que el marcador (portada / detalle de partido) se salga del
     ancho de la pantalla en teléfonos angostos (iPhone 390px y similares). */
  .spotlight-teams { gap: 10px; justify-content: center; }
  .spotlight-team { width: 92px; }
  .spotlight-crest { width: 44px; height: 44px; font-size: 14px; }
  .spotlight-team strong { font-size: 12px; }
  .spotlight-score { font-size: 24px; gap: 6px; }
  .stream-live-card-novideo .spotlight-teams { flex-wrap: wrap; }
}
