/* Eliminar scroll interno en estadísticas de ficha de equipo */
#team-stats {
  overflow: visible !important;
  max-height: none !important;
}
/* === HEADER GOLEADORES TABLA === */
.alineacion-header-table {
  margin-bottom: 4px;
  width: auto;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0 2px;
}
.alineacion-header-table td {
  padding: 0 6px;
  vertical-align: middle;
}
.alineacion-header-escudo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.alineacion-goleadores-local, .alineacion-goleadores-visitante {
  font-size: 1em;
  font-weight: 700;
  color: #0b1c33;
  white-space: normal;
}
.alineacion-goleadores-local svg, .alineacion-goleadores-visitante svg {
  vertical-align: middle;
  margin-left: 6px;
  margin-right: 2px;
}
.alineacion-header-goleadores-row .minuto, .alineacion-goleadores-local .minuto, .alineacion-goleadores-visitante .minuto {
  color: #31507a;
  font-weight: 600;
}
/* === HEADER GOLEADORES NUEVO === */
.alineacion-header-equipos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 2px;
}
.alineacion-header-equipos-row .t {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #fff;
  min-width: 0;
}
.alineacion-header-equipos-row .t-time {
  color: #fff;
  font-weight: 800;
  font-size: 28px;
  margin: 0 8px;
  opacity: .95;
}
.alineacion-header-equipos-row img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  mix-blend-mode: normal;
}
.alineacion-header-goleadores-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: flex-start;
  justify-items: stretch;
  margin-bottom: 4px;
  font-size: 1.08em;
  font-weight: 700;
  color: #0b1c33;
  width: 100%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.alineacion-goleadores-local {
  text-align: left;
  padding-right: 10px;
  white-space: normal;
}
.alineacion-goleadores-visitante {
  text-align: right;
  padding-left: 10px;
  white-space: normal;
}
.alineacion-header-goleadores-row svg {
  vertical-align: middle;
  margin-left: 6px;
  margin-right: 2px;
}
.alineacion-header-goleadores-row .minuto {
  color: #31507a;
  font-weight: 600;
}
/*
  === Sistema de fondos de header por página ===
  Para usar un fondo diferente en el header de cada página:
  1. Añade una clase al <header> como: header-bg-campo, header-bg-club, etc.
  2. Define en este CSS la clase con la variable --header-bg-image apuntando a la imagen deseada.
  3. El CSS global usará esa variable para el background-image.
  Ejemplo:
    <header class="main-header has-bg-image header-bg-campo">
    .header-bg-campo { --header-bg-image: url('../img/cabecera_campo.png'); }
  Si no se define, usará header_bg.jpg por defecto.
*/
/* === Fondos de header por página === */
.header-bg-campo {
  --header-bg-image: url('../img/cabecera_campo.png');
}
.header-bg-club {
  --header-bg-image: url('../img/cabecera_club.png');
}
.header-bg-default {
  --header-bg-image: url('../img/header_bg.jpg');
}
/* Para añadir más fondos, crea una clase .header-bg-LOQUESEA y define --header-bg-image */
/* Fondo especial para header en página de club */
.club-header-bg {
  background-image: url('../img/cabecera_club.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
/* === Filtros top visuales (temporada, modalidad, etc.) === */
.filters-top-row {
  display: flex !important;
  gap: 16px;
  /* Quitar tarjeta azul para evitar reducción y cortes en selectores */
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
  margin: 8px auto 12px auto !important;
  align-items: flex-end;
  flex-wrap: wrap;
  max-width: 1100px;
  justify-content: center;
}

/* Publicidad lateral: no fija, posicionada en el margen */
.ad-left-rail{
  position: absolute !important;
  top: var(--ad-rail-top-static, var(--ad-rail-top, 180px)) !important;
  left: calc((100vw - 1200px) / 2 - 220px - 18px) !important;
  margin: 0 !important;
}

/* Layout GRID en desktop para 4 cajetines centrados y gap homogéneo */
@media (min-width: 1024px){
  .filters-top-row{
    display: grid !important;
    grid-template-columns: minmax(10ch,1fr) minmax(20ch,1fr) minmax(28ch,2fr) minmax(15ch,1fr);
    column-gap: 16px;
    row-gap: 0px;
    align-items: end;
    justify-content: center;
  }
  .filters-top-row .filter-group{ min-width: 0; }
}
.filter-group-grupo{ margin-left: auto; flex: 0 0 auto; }
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  flex: 1 1 240px;
}
.filter-group label {
  font-weight: 800;
  color: #001C47;
  font-size: 1.0em; /* Más legible y sin cortes */
  letter-spacing: 0.3px;
  margin-bottom: 2px;
  text-shadow: none;
}
.filter-group select {
  background: #fff;
  color: #001C47;
  border: 1px solid #dfe7ff;
  border-radius: 8px;
  font-size: 0.95em; /* más compacto */
  font-weight: 600;
  padding: 6px 24px 6px 10px; /* derecha ajustada para icono sin hueco excesivo */
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  min-width: 0; /* que no fuerce anchuras grandes por defecto */
  max-width: 100%;
  white-space: nowrap; /* aspecto más compacto y limpio */
  text-overflow: ellipsis; /* si el navegador lo aplica al control */
  box-sizing: border-box;
}
.filter-group select:focus {
  border-color: #ff7a1a;
  box-shadow: 0 0 0 3px #ff7a1a44;
}
@media (max-width: 900px) {
  .filters-top-row {
    flex-direction: column;
    gap: 16px;
    padding: 16px 8px 12px 8px;
    max-width: 98vw;
  }
  .filter-group {
    min-width: 100px;
    flex: 1 1 100px;
  }
}
/* Refuerzo: ocultar impresora en HTML inicial */
.icon-print, .btn-print, .print-icon, .imprimir, .fa-print, .glyphicon-print, button[onclick*="print"], a[href*="print"], [aria-label*="print"], [aria-label*="imprimir"], [class*="print"], [id*="print"] { display: none !important; }
/* === Mejora subtítulo fecha agrupada === */
#res-titulo {
  margin: 0;
  font-size: calc(1.4rem + 4px); /* +4px como solicitado */
  font-weight: 900;
  color: #023859;
  text-shadow: none;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  white-space: normal; /* permitir salto de línea */
  word-break: break-word; /* cortar palabras largas */
  overflow-wrap: anywhere; /* evitar desbordes */
}
/* Título competencia + grupo ajustado dentro del subtítulo */
#res-titulo .comp-grupo-title{
  display:block;
  font-size:1.05rem;
  font-weight:800;
  line-height:1.2;
}
/* Reglas específicas para la fila de filtros: evitar cajetines anchos y huecos internos */
.filters-top-row .filter-group{ min-width: auto; flex: 0 0 auto; }
.fecha-partidos .fecha-titulo, .fecha-larga {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 10px 0 8px 0;
  box-shadow: none;
  text-shadow: none;
  display: block;
}
.fecha-larga {
  font-size: 18px;
  font-weight: bold;
  color: #222;
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 18px 0;
  box-shadow: none;
  text-shadow: none;
  display: block;
}
/* Jornada info más compacta y en línea con fecha, envolviendo cuando sea necesario */
.fecha-partidos .fecha-titulo{ display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.fecha-partidos .fecha-titulo .jornada-info{ font-size:.95rem; color:#5b6b88; line-height:1.1; }

/* =========================================================
   FFCV – Cabecera azul, menú y píldoras (sin tocar buscador/flujo)
   ========================================================= */

:root{
  --ffcv-header:#001C47;
  --ffcv-header-grad: linear-gradient(90deg, #001C47 0%, #011C40 100%);
  --ffcv-text:#ffffff;
  --neon-blue:#00E5FF;
  --pill-gap:8px;
  --ffcv-font: 'Roboto', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  /* Imagen por defecto para hero de ficha de partido (fallback si no hay foto del campo) */
  --hero-default-img: url('../img/header_bg.jpg');
  /* Evitar auto-dark en Chrome y mantener legibilidad */
  color-scheme: light;
}

/* Bloquear tema oscuro heredado cuando no hay toggle de tema */
:root[data-theme="dark"]{
  --ffcv-blue-dark: #001C47;
  --ffcv-blue-light: #3871D7;
  --ffcv-orange: #D8641C;
  --ffcv-white: #FFFFFF;
  --text-dark: #222222;
  color-scheme: light !important;
}

html, body{
  color-scheme: light !important;
  background:#ffffff !important;
  color:#0b1c33 !important;
}

@media (prefers-color-scheme: dark){
  html, body{
    color-scheme: light !important;
    background:#ffffff !important;
    color:#0b1c33 !important;
  }
  .main-header, .container-wide, .match-card, .match-list-row, .sancion-card, .clasificacion-table-wrapper{
    background:#ffffff !important;
    color:#0b1c33 !important;
  }
  .filter-group label, .fecha-partidos .fecha-titulo, .fecha-larga, .team-row, .m-time, .m-badge, .ml-badge{
    color:#0b1c33 !important;
  }
}
body, button, input, select, textarea{ font-family: var(--ffcv-font); }

/* Footer centrado y separado del contenido */
footer{ text-align:center; padding:16px 12px 24px; color:#5b6b88; font-weight:700; }
footer p{ margin:0; }
footer a{ color:#ff7a1a !important; text-decoration:none !important; font-weight:800 !important; }
footer a:hover, footer a:focus, footer a:active{ text-decoration:none !important; color:#ff7a1a !important; }

/* Si el contenido es corto, empujar el footer por debajo del banner lateral */
body[data-ad-rail="1"] main.container-wide,
body[data-ad-rail="1"] main.container-narrow,
body[data-ad-rail="1"] .page-shell > main.container-wide{
  min-height: var(--ad-rail-height, 0px);
}

/* Foco visible coherente y accesible */
:focus-visible{
  outline: 3px solid rgba(0, 229, 255, 0.55);
  outline-offset: 2px;
}

/* ===== Cabecera azul liso ===== */

.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--ffcv-text);
  box-shadow: 0 4px 24px rgba(0,229,255,0.08);
  border-bottom: 2px solid var(--neon-blue);
  overflow: visible;
  min-height: 148px;
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}
/* Modo con imagen de fondo en cabecera (oculta el SVG e inserta la imagen) */
.main-header.has-bg-image{
  /* Puedes cambiar la URL por inline style en el header: style="--header-bg-image:url('img/mi_fondo.jpg')" */
  /* IMPORTANTE: esta hoja está en /Style/, por eso el path relativo correcto es ../img/ */
  /* Quitar overlay de degradado: dejar solo la imagen de fondo */
  background-image: var(--header-bg-image, url('../img/header_bg.jpg')) !important;
  background-size: cover !important;
  background-position: right center !important; /* Muestra mejor el motivo a la derecha */
  background-repeat: no-repeat !important;
}
.main-header.has-bg-image .figuras-bg{ display:none !important; }
.main-header .figuras-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  min-height: 320px;
  width: 100%;
  height: 100%;
}
.main-header .figuras-bg svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
}
.main-header .container-wide,
.main-header .header-content,
.main-header .header-right,
.main-header nav,
.main-header .title-search-row {
  position: relative;
  z-index: 2;
}

/* Anular gradientes/elementos decorativos del tema para una cabecera limpia */
.main-header { background: none !important; }
/* Forzar fondo blanco de la página para evitar azul en Chrome */
body{ background:#fff !important; }
html, body { overflow-x: hidden; }

/* Overlay para gate de móviles hacia App FFCV */
#mobile-overlay{
  position:fixed; inset:0; z-index:10000; display:none;
  align-items:center; justify-content:center;
  background:rgba(0,0,0,.66);
}
#mobile-overlay *{ box-sizing:border-box; }
html.ffcv-mobile-locked, html.ffcv-mobile-locked body{
  overflow:hidden !important;
  height:100% !important;
}
#mobile-overlay .mo-card{
  background:#fff; color:#0b1f49; border-radius:14px; border:1px solid #e8edf6;
  box-shadow:0 12px 32px rgba(0,0,0,.35); padding:18px; max-width:520px; width:92vw;
  text-align:center;
}
#mobile-overlay .mo-logo{ width:84px; height:auto; display:block; margin:0 auto 8px; }
#mobile-overlay h2{ margin:6px 0 8px; font-weight:900; font-size:1.4rem; }
#mobile-overlay p{ margin:0 0 12px; color:#4d618e; font-weight:700; }
#mobile-overlay .mo-actions{ display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:wrap; }
#mobile-overlay .mo-btn{ display:inline-block; padding:10px 14px; border-radius:999px; font-weight:900; text-decoration:none; }
#mobile-overlay .mo-store{ color:#fff; background:#011C40; border:1px solid #011C40; }
#mobile-overlay .mo-android{ color:#fff; background:#3ddc84; border:1px solid #2bb86b; }
#mobile-overlay .mo-ios{ color:#fff; background:#0a84ff; border:1px solid #086fd8; }
.main-header::before,
.main-header::after {
  display: none !important;
  content: none !important;
  background: none !important;
}
.main-header .figuras-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.main-header .container-wide,
.main-header .header-content,
.main-header .header-right,
.main-header nav,
.main-header .title-search-row {
  position: relative;
  z-index: 2;
}

/* Carrusel de jornadas (copiado de ffcv_competiciones60) */
.jornadas-bar { position: relative; display:flex; gap:8px; align-items:center; overflow:hidden; margin-bottom: 18px; }
.pills-scroll { display:flex; gap:8px; overflow-x:auto; scrollbar-width: none; -ms-overflow-style: none; flex:1 1 auto; min-width:0; }
.pills-scroll::-webkit-scrollbar { display:none; }
.pill-nav { background: #ff7a1a; border: 1px solid #e56d12; color: #ffffff; width: 36px; height: 36px; border-radius: 999px; font-weight: 900; line-height: 1; display:inline-flex; align-items:center; justify-content:center; box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.pill-nav:hover { background: #ff882f; }

/* Píldoras de fechas de comité (sanciones) */
#sanciones-fechas{ display:flex; flex-wrap:wrap; gap: var(--pill-gap); align-items:center; justify-content:center; margin-bottom: 18px; }
/* Carrusel sanciones: snap al centro de la píldora */
#san-pills-scroll{ scroll-snap-type: x mandatory; }
#san-pills-scroll .pill-btn{ scroll-snap-align: center; }
/* Evitar scroll lateral: en pantallas pequeñas, convertir el carrusel en listado envuelto */
@media (max-width: 720px){
  #san-pills-scroll{ flex-wrap: wrap; overflow-x: visible; }
  #san-pills-scroll .pill-btn{ min-width: 0; flex: 1 1 calc(50% - 8px); }
}

/* Maquetación sanciones: tarjetas claras */
.sanciones-list{ display: grid; grid-template-columns: 1fr; gap: 12px; }
/* Dos columnas a partir de tablet para visualizar tarjetas en dos columnas en el ancho del cuerpo */
@media (min-width: 720px){
  .sanciones-list{ grid-template-columns: repeat(2, 1fr); }
}
.sancion-card{ border:1px solid #e6eef9; border-radius: 12px; background:#ffffff; box-shadow: 0 2px 8px rgba(0,0,0,.06); padding: 12px; }
.sancion-fecha{ font-weight:800; color:#0b1f49; margin-bottom:8px; }
.sancion-card .bloque-t{ font-weight:800; color:#001C47; margin-bottom:6px; }
.sancion-card .team-head{ display:flex; align-items:center; gap:10px; padding:4px 0; }
.sancion-card .team-head .avatar{ width:30px; height:30px; border-radius:6px; object-fit:contain; background:#fff; border:1px solid #dde7f7; box-shadow:0 1px 4px rgba(0,0,0,.06); }
.sancion-card .team-head .team-name{ font-weight:900; color:#0b1f49; font-size:1.02em; }
.sancion-card .items{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:8px; }
.sancion-item{ display:flex; align-items:flex-start; gap:10px; padding:6px 8px; border:1px solid #eef3fb; border-radius:10px; background:#fafcff; }

/* =========================================================
  Partidos – Tarjetas homogéneas (equipo.php)
  ========================================================= */
.partidos-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media (max-width:760px){ .partidos-grid{ grid-template-columns:1fr; } }
.partido-card{ background:#fff; border:1.5px solid #e5efff; border-radius:14px; box-shadow:0 4px 18px rgba(1,28,64,0.07); padding:16px 12px 12px; display:flex; flex-direction:column; align-items:flex-start; min-width:0; text-decoration:none; }
.partido-card .header-line{ font-weight:800; color:#0b1c33; font-size:1.08em; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.partido-card .row-mid{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; width:100%; }
.partido-card .row-side{ display:flex; align-items:center; gap:10px; min-width:0; }
.partido-card .crest{ width:32px; height:32px; border-radius:50%; background:#f6fbff; border:1.5px solid #e5efff; object-fit:contain; }
.partido-card .side-name{ font-weight:800; color:#0b1c33; }
.partido-card .score{ font-weight:900; color:#ff7a00; font-size:1.12em; }
.partido-card .pill{ align-self:center; text-align:center; font-weight:900; padding:4px 12px; border-radius:999px; }
.partido-card .pill-default{ background:#e5efff; color:#31507a; }
.partido-card .pill-provisional{ background:#fff7e6; color:#ff7a00; animation:blink 1s infinite; }

/* Chips de cabecera (Posición / Puntos) */
.chip{ display:inline-block; padding:4px 10px; border-radius:999px; border:1px solid #dbe7ff; background:#f5f9ff; color:#0b1c33; font-weight:900; margin-right:8px; }
.chip-pos{ background:#eef6ff; border-color:#d7e7ff; color:#2457ff; }
.chip-pts{ background:#fff6e9; border-color:#ffe2b8; color:#8a4b00; }

/* Animaciones reusables */
@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}
@keyframes blink{0%,100%{opacity:1;}50%{opacity:.3;}}
.spinner{ display:inline-block; width:32px; height:32px; border:4px solid #e5efff; border-top:4px solid #ff7a00; border-radius:50%; animation:spin 1s linear infinite; }
.load-hint{ margin-top:12px; font-weight:700; color:#31507a; }

/* =========================================================
  Club – Eventos semanales en tarjetas (api/clubes/club.php)
  ========================================================= */
.events-wrap{ display:grid; grid-template-columns:1fr; gap:16px; margin:6px 0 24px 0; }
.event-day-card{ background:#fff; border:1px solid #e5efff; border-radius:12px; box-shadow:0 2px 12px rgba(1,28,64,.05); overflow:hidden; }
.event-day-title{ background:#f8fbff; color:#0b1c33; font-weight:800; padding:8px 12px; border-bottom:1px solid #e5efff; font-size:1.06rem; }
.events-list{ padding:10px; }
.club-events-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
@media (max-width:760px){ .club-events-grid{ grid-template-columns:1fr; } }
.club-event-card{ display:block; background:#fff; border:1px solid #e9eef6; border-radius:12px; box-shadow:0 1px 8px rgba(1,28,64,.04); padding:12px; text-decoration:none; color:inherit; }
.club-event-card .line-1{ font-weight:800; color:#31507a; margin-bottom:6px; }
.club-event-card .line-2{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:6px 0; }
.club-event-card .l-team, .club-event-card .v-team{ display:flex; align-items:center; gap:8px; min-width:0; }
.club-event-card .escudo{ width:24px; height:24px; object-fit:contain; border-radius:4px; background:#fff; border:1px solid #dde7f7; }
.club-event-card .hora{ font-weight:900; color:#0b1c33; }
.club-event-card .line-3{ display:flex; align-items:center; justify-content:center; gap:8px; color:#7487a2; font-weight:600; }
.club-event-card .line-3 svg{ width:16px; height:16px; vertical-align:middle; }
.club-event-card .line-4{ margin-top:8px; text-align:right; }
.club-event-card .cta{ display:inline-block; padding:6px 10px; border-radius:10px; border:1px solid #dbe7ff; background:#f5f9ff; color:#0b1c33; font-weight:700; text-decoration:none; }
.sancion-item .avatar{ width:34px; height:34px; border-radius:50%; object-fit:cover; border:1px solid #dde7f7; background:#fff; }
.sancion-item .info{ display:flex; flex-direction:column; gap:2px; }
.sancion-item .name{ font-weight:700; color:#0b1f49; }
.sancion-item .meta{ font-size:.9em; color:#4d618e; }
/* Quitar subrayado de enlaces de jugador/partido y mantener estilo de tarjeta */
.sanciones-list a.sancion-item{ text-decoration: none; color: inherit; display:flex; }
.sanciones-list a.sancion-item:hover{ text-decoration: none; background:#f2f7ff; }
.match-card a{ text-decoration: none; color: inherit; }
.sancion-res .res-item{ padding:6px 8px; border-left:3px solid #ff7a1a; background:#fff6ef; border-radius:8px; margin-bottom:6px; }
/* Subtítulo de Artículo con estilo pill para claridad y uniformidad */
/* Subtítulo Artículo como pill (sin pseudo selectores no estándar) */
.sancion-bloque .articulo-pill{
  display:inline-block;
  background:#eef3ff;
  border:1px solid #d7e1ff;
  color:#2457ff;
  border-radius:999px;
  padding:4px 10px;
  font-weight:900;
  margin:8px 0 6px;
}

/* Logo (sin caja gris) */
/* El bloque .logo y .logo img ya está redefinido arriba */
.logo {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 80px;
  /* Sin recuadro ni efectos: solo el logo */
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  transition: none !important;
}
.logo::before { display:none !important; content:none !important; }
.logo img {
  position: relative;
  z-index: 2;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  width: 164px;
  height: auto;
  /* Sutil borde blanco para integración */
  border: 0 !important;
}

/* === Foto de jugador en sanciones: halo radial con imagen transparente === */
.styled-table td:first-child{ position:relative; }
.styled-table td:first-child::before{
  content:"";
  position:absolute;
  left:2px; top:2px;
  width:44px; height:44px;
  border-radius:50%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.9), rgba(255,255,255,0.0) 65%);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  pointer-events:none;
}
.styled-table td:first-child img{
  width:44px; height:44px;
  object-fit: contain;
  background: transparent;
  border:none;
}

/* === Cromática y jerarquía: chips como texto secundario, remover bordes neón === */
.styled-table th, .styled-table td{ border-color:#e8effa; }
.styled-table thead th{ background: linear-gradient(180deg, rgba(8,25,60,0.96), rgba(8,25,60,0.88)); color:#fff; }
.styled-table tbody tr:hover{ background:#f6f9ff; }
.styled-table caption, .styled-table .meta-chip{ color:#4d618e; background:none; border:none; }

/* ===== Efecto de profundidad/3D opcional para el logo ===== */
.logo.depth-3d { position: relative; }
.logo.depth-3d::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 62%;
  height: 14px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 70%);
  filter: blur(6px);
}
.logo .logo-3d {
  will-change: transform, filter;
  transition: transform .25s ease, filter .25s ease;
  /* Sombra con respeto al contorno del PNG/SVG (no caja) */
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.32));
  transform: translateZ(12px) scale(1.04);
}
.logo:hover .logo-3d {
  transform: perspective(900px) rotateX(4deg) rotateY(-6deg) translateY(-1px) scale(1.03);
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.30));
}

@media (max-width: 900px) {
  .logo.depth-3d::after { bottom: -4px; height: 12px; filter: blur(5px); }
  .logo:hover .logo-3d { transform: perspective(800px) rotateX(3deg) rotateY(-4deg) translateY(-0.5px) scale(1.02); }
}

/* Profundidad real: habilitar perspectiva en el contenedor */
.logo.depth-3d{ perspective: 1000px; transform-style: preserve-3d; }

/* Countdown en cabecera (centrado bajo título y buscador) */
.header-countdown{ display:none; width:100%; align-items:center; justify-content:center; margin-top:6px; }
.header-countdown .md-countdown-lg{ margin: 0; }

/* Navegación centrada */
.main-header .container-wide{padding:16px 22px;}
.header-content{display:flex;align-items:center;gap:16px;}
.main-header .header-right{display:flex;align-items:center;}
.header-toggle{display:none;background:transparent;border:2px solid rgba(255,255,255,.7);color:#fff;border-radius:8px;padding:6px 10px;font-weight:800;cursor:pointer;}
.header-content .main-nav{flex:1 1 auto;display:flex;justify-content:center;}
.main-nav ul{display:flex;gap:14px;list-style:none;margin:0;padding:0;justify-content:center;flex-wrap:wrap;}
.main-nav ul{ align-items:center; }

.main-nav a {
  background: rgba(255,255,255,0.08);
  border: 2px solid var(--neon-blue);
  color: #fff !important;
  border-radius: 999px;
  padding: 12px 22px;
  margin: 0 8px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  font-weight: 800;
  box-shadow: 0 2px 12px #00E5FF22;
  text-transform: uppercase;
  letter-spacing: .6px;
  line-height: 1;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.main-nav a:hover {
  box-shadow: 0 0 16px var(--neon-blue), 0 2px 18px #011C40;
  background: #011C40;
  color: var(--neon-blue) !important;
  transform: translateY(-2px) scale(1.04);
}
.main-nav a.active {
  background: #ff7a1a !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  color: #fff !important;
}
/* Responsive: centrar logo y menú en móvil */
@media (max-width: 900px) {
  /* .logo { margin: 0 auto; }  Eliminado para evitar conflictos con el nuevo diseño glass */
  .main-nav ul { flex-direction: row; justify-content: center; }
  .main-nav a { padding: 10px; border-radius: 50%; min-width: 48px; }
}

/* ===== Título + buscador (ya corregido, lo mantenemos) ===== */
.title-search-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;flex-wrap:wrap;min-width:0;}
#current-page-title{margin:0;font-size:1.8rem;font-weight:900;color:#fff;}
#current-page-title{ line-height: 1.1; }
.club-search-wrap{position:relative;flex:0 1 320px;max-width:320px;min-width:0;}
#club-search{width:100%;box-sizing:border-box;padding:10px 14px;border-radius:20px;border:2px solid rgba(255,255,255,.65);background:#fff;color:#001C47;outline:none;}
#club-search::placeholder{color:#6b7a90;}
#club-search:focus{border-color:#fff;box-shadow:0 0 0 3px rgba(255,255,255,0.35);}
#club-results{
  position:fixed;
  left:50%;
  top:90px;
  transform:translateX(-50%);
  width:340px;
  max-width:95vw;
  min-width:220px;
  display:none;
  max-height:360px;
  overflow:auto;
  z-index:10001 !important;
  background:#fff;
  border:2px solid #1e57cc;
  border-radius:10px;
  box-shadow:0 10px 24px rgba(0,0,0,0.25);
}

/* ===== Píldoras con flechas (formato “Jornada” arriba / fecha abajo) ===== */
.jornadas-bar{display:flex;gap:var(--pill-gap);align-items:center;overflow:hidden;justify-content:center;margin-bottom:18px;}
.pill-nav{background:#ff7a1a;border:1px solid #e56d12;color:#fff;width:36px;height:36px;border-radius:999px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.16)}
.pill-nav:hover{background:#ff882f}

.pills-scroll{display:flex;gap:var(--pill-gap);flex:1 1 auto;min-width:0;}
.pills-scroll::-webkit-scrollbar{display:none;}

.pill-btn{
  background:#eef3ff;border:1px solid #d7e1ff;color:#10233e;
  border-radius:999px;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-width:120px;padding:10px 18px;white-space:nowrap;flex:0 0 auto;min-height:56px;text-align:center;
}
.pill-btn .pill-jor{  font-size:.9em;font-weight:400;line-height:1.05; } /* “Jornada X” ARRIBA (ligeramente menor) */
.pill-btn .pill-date{ font-size:16px;font-weight:bold;color:#6b7a90;line-height:1.1; } /* fecha ABAJO (ligeramente menor) */
/* Refuerzo: ocultar impresora en todas vistas */
.icon-print, .btn-print, button[onclick*="print"], a[href*="print"], [aria-label="Imprimir"] { display: none !important; }

/* Activa (neón) */
.pill-btn.active{
  background:#062d4a;border-color:var(--neon-blue);color:var(--neon-blue);
  box-shadow:0 0 12px rgba(0,229,255,.45), inset 0 0 0 1px rgba(0,229,255,.35);
}
.pill-btn.active .pill-jor,
.pill-btn.active .pill-date{ color:var(--neon-blue); }

/* Selector de competición: ancho moderado; resto más compactos, todo en una línea en desktop */
#sel-competicion{ min-width:28ch; max-width:100%; width:auto; }
#sel-temporada{ min-width:10ch; width:auto; }
#sel-cat-grupo{ min-width:20ch; width:auto; }
#sel-grupo{ min-width:15ch; width:auto; }
.filter-comp{ flex: 0 0 auto; min-width:28ch; }
@media (min-width: 1024px){ .filters-top-row{ flex-wrap: nowrap; } }

/* Evitar estiramiento de Temporada y Modalidad para un layout más estable */
.filter-group-temporada, .filter-group-modalidad{ flex: 0 0 auto; }
.filter-group-grupo{ margin-left: 0; flex: 0 0 auto; }



/* ===== Eliminar cualquier toolbar/botón residual en cabecera (refuerzo) ===== */
.toolbar-actions,.main-header .toolbar-actions,.main-header .btn-ffcv,.main-header .icon-print{display:none !important;}

/* ===== Quitar “Imprimir” solo en Partidos y Resultados (refuerzo del JS) ===== */
.view-partidos .icon-print,
.view-partidos .btn-print,
.view-partidos button[onclick*="print"],
.view-partidos a[href*="print"],
.view-partidos [aria-label="Imprimir"]{display:none !important;}

/* ===== Tarjetas de partidos (restauradas al estilo original, con prioridad alta) ===== */
.cards{display:grid !important;grid-template-columns:repeat(2,1fr) !important;gap:16px !important;}
@media (max-width:900px){.cards{grid-template-columns:1fr !important;}}
/* Scoped link styling debe aplicarse por página para evitar alterar principal */

.match-card{
  background:#fff !important;border-radius:12px !important;
  box-shadow:0 2px 8px rgba(0,0,0,.06) !important;
  display:flex !important;align-items:stretch !important;overflow:hidden !important;
  border:1px solid #e8edf6 !important;
}
.match-left{flex:1 !important;padding:10px 12px !important;display:flex !important;flex-direction:column !important;gap:8px !important;justify-content:center !important;}
.team-row{display:flex !important;align-items:center !important;gap:12px !important;color:#18324f !important;font-weight:800 !important;font-size:1.02em !important;min-width:0 !important;}
.team-row span:last-child{flex:1 1 auto !important;min-width:0 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
/* Forzar que no se muestre el marcador vertical heredado en la columna derecha */
.team-logo{width:24px !important;height:24px !important;object-fit:contain !important;border-radius:3px !important;background:#fff !important;box-shadow:0 0 0 1px #e6eef9 !important;flex:0 0 auto !important;}

.match-divider{width:1px !important;background:#e5e9f2 !important;}

.match-right{
  width:120px !important;min-width:110px !important;
  display:flex !important;flex-direction:column !important;justify-content:center !important;align-items:center !important;
  gap:8px !important;padding:10px !important;background:#fafcff !important;min-height:84px !important;
}
.match-left .m-meta{ font-weight:800 !important; color:#6b7a90 !important; font-size:.95em !important; }
.m-result-inline{
  text-align:center !important;
  font-size:1.4em !important;
  font-weight:900 !important;
  color:#F5A623 !important;
  font-variant-numeric: tabular-nums !important;
}
.m-result-inline .dash{ opacity:.8 !important; margin:0 6px !important; }
/* Resultado apilado (vertical) entre equipos */
.m-result-stack{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:1.4em !important;
  font-weight:900 !important;
  color:#F5A623 !important;
  font-variant-numeric: tabular-nums !important;
  line-height:1 !important;
}
.m-result-stack .score-top,
.m-result-stack .score-bottom{ display:block !important; }
.m-time{
  font-size:1.05em !important;
  font-weight:800 !important;
  color:#10233e !important;
  /* Alinear métricas numéricas para que los dígitos ocupen el mismo ancho */
  font-variant-numeric: tabular-nums !important;
  line-height:1 !important;
}
.m-result{
  font-size:1.32em !important;
  font-weight:900 !important;
  color:#F5A623 !important;
  /* Mantener números alineados y homogéneos */
  font-variant-numeric: tabular-nums !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  /* Separación compacta entre goles */
  gap:8px !important;
}
.m-result .score-top,
.m-result .score-bottom{
  display:block !important;
  line-height:1 !important;
}

.m-btn{display:inline-block !important;text-decoration:none !important;font-weight:700 !important;color:#2457ff !important;background:#eef3ff !important;padding:6px 10px !important;border-radius:8px !important;border:1px solid #d7e1ff !important;max-width:100% !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.m-btn:hover{background:#e3ebff !important;}

/* Badge para estado/motivo del partido */
.m-badge{
  display:inline-block !important;
  max-width:100% !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-size:.78em !important;
  font-weight:800 !important;
  padding:2px 8px !important;
  border-radius:999px !important;
  border:1px solid #e9eef9 !important;
  background:#f3f7ff !important;
  color:#26478f !important;
}
.m-badge.state-2{ /* Aplazado */
  background:#fff6e9 !important;
  border-color:#ffe2b8 !important;
  color:#8a4b00 !important;
}
.m-badge.state-3{ /* Suspendido */
  background:#ffefef !important;
  border-color:#ffd0d0 !important;
  color:#a30d0d !important;
}
.m-badge.state-4{ /* Anulado */
  background:#f1f3f7 !important;
  border-color:#dee6f3 !important;
  color:#5b6b88 !important;
}
.m-badge.state-5{ /* Perdido */
  background:#ffecec !important;
  border-color:#ffcfcf !important;
  color:#b3261e !important;
}
.m-badge.state-6{ /* Provisional */
  background:#eef6ff !important;
  border-color:#d7e7ff !important;
  color:#2457ff !important;
}
.match-list-row .ml-badge.state-2{ background:#fff6e9; border-color:#ffe2b8; color:#8a4b00; }
.match-list-row .ml-badge.state-3{ background:#ffefef; border-color:#ffd0d0; color:#a30d0d; }
.match-list-row .ml-badge.state-4{ background:#f1f3f7; border-color:#dee6f3; color:#5b6b88; }
.match-list-row .ml-badge.state-5{ background:#ffecec; border-color:#ffcfcf; color:#b3261e; }
.match-list-row .ml-badge.state-6{ background:#eef6ff; border-color:#d7e7ff; color:#2457ff; }
.m-badge.warn{ background:#fff6e9 !important; border-color:#ffe2b8 !important; color:#8a4b00 !important; }
.m-badge.danger{ background:#ffefef !important; border-color:#ffd0d0 !important; color:#a30d0d !important; }
.m-badge.neutral{ background:#eef6ff !important; border-color:#d7e7ff !important; color:#2457ff !important; }

/* ===== Responsive ===== */
@media (max-width:900px){
  .header-content{gap:10px;}
  .header-toggle{display:inline-flex;align-items:center;justify-content:center;}
  .main-nav ul{display:none;flex-direction:column;gap:6px;padding:10px 0;}
  .main-header.nav-open .main-nav ul{display:flex;}
  .title-search-row{flex-direction:column;align-items:flex-start;gap:10px;}
  .club-search-wrap{flex:1 1 100%;max-width:100%;width:100%;}
  #club-search{width:100%;max-width:100%;}
  #club-results{width:100%;}
}

/* =====================
   Skeletons de carga
   ===================== */
.skeleton-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
@media (max-width:900px){.skeleton-grid{grid-template-columns:1fr}}
.skeleton-card{display:flex;align-items:stretch;gap:0;background:#fff;border:1px solid #e8edf6;border-radius:12px;overflow:hidden}
.skeleton-left{flex:1;padding:14px 16px;display:flex;flex-direction:column;gap:12px}
.skeleton-right{width:140px;min-width:120px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:14px;background:#fafcff}
.skeleton-divider{width:1px;background:#e5e9f2}
.skeleton-line{height:14px;border-radius:8px;background:linear-gradient(90deg, #eef3ff 0%, #e7edff 50%, #eef3ff 100%);background-size:200% 100%;animation:sk-shimmer 1.2s infinite}
.skeleton-line.w60{width:60%}
.skeleton-line.w50{width:50%}
.skeleton-line.w40{width:40%}
.skeleton-circle{width:32px;height:32px;border-radius:50%;background:linear-gradient(90deg, #eef3ff 0%, #e7edff 50%, #eef3ff 100%);background-size:200% 100%;animation:sk-shimmer 1.2s infinite}
@keyframes sk-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Mensajes de no datos / errores visibles y accesibles */
.no-data-message{display:none;background:#fff6e9;border:1px solid #ffe2b8;color:#8a4b00;border-radius:10px;padding:12px 14px;margin:10px 0;font-weight:800;}
body .no-data-message[aria-live]{outline:0}

/* ==========================
   Ficha de partido (detalle)
   ========================== */
.match-detail{background:#fff;border:1px solid #e8edf6;border-radius:12px;padding:16px;margin-top:16px;box-shadow:0 2px 8px rgba(0,0,0,.06);} 
.md-title{margin:0 0 8px 0;color:#2457ff;font-size:1.4rem;font-weight:900;}
.md-sub{margin:12px 0 8px;color:#10233e;font-size:1.1rem;font-weight:800;}
.md-grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
.md-line{color:#18324f;font-weight:700;}
.md-tag{display:inline-block;background:#eef3ff;border:1px solid #d7e1ff;color:#2457ff;border-radius:999px;padding:2px 8px;margin-right:6px;font-size:.8em;font-weight:800;}
.md-teams{display:flex;align-items:center;justify-content:center;gap:16px;margin:12px 0;}
.md-team{display:flex;flex-direction:column;align-items:center;gap:6px;}
.md-logo{height:48px;max-width:48px;border-radius:8px;background:#fff;border:1px solid #dde;}
.md-team-name{color:#10233e;}
.md-vs{font-size:1.5em;font-weight:bold;color:#5b6b88;}
.md-list{list-style:none;margin:6px 0 0 0;padding:0;}
.md-list li{padding:4px 0;border-bottom:1px dotted #eef;}
.md-box{background:#f8fbff;border:1px solid #e6eef9;border-radius:8px;padding:10px;color:#18324f;}
@media (max-width:900px){.md-grid-2{grid-template-columns:1fr;}}

/* Tabs en ficha de partido */
.md-tabs{display:flex;gap:8px;border-bottom:1px solid #e8edf6;margin:12px 0 4px;flex-wrap:wrap}
.md-tab{background:#eef3ff;border:1px solid #d7e1ff;color:#2457ff;border-radius:10px 10px 0 0;padding:8px 12px;font-weight:800;cursor:pointer;user-select:none}
.md-tab.active{background:#fff;border-bottom-color:#fff;color:#10233e}
.md-pane{display:none;padding-top:8px}
.md-pane.active{display:block}

/* ========================
  Ficha Partido – Previo
  ======================== */
.md-hero{position:relative; width:100%; min-height:420px; border-radius:12px; overflow:hidden; background:#001C47; display:flex; align-items:flex-end; justify-content:flex-start; box-shadow:0 8px 28px rgba(0,0,0,.25);} 
.md-hero::before{content:""; position:absolute; inset:0; background:var(--hero-img, var(--hero-default-img, none)) center/cover no-repeat; filter:saturate(108%) contrast(104%);} 
.md-hero::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.0) 35%, rgba(0,0,0,.58) 100%);} 
.md-hero .md-hero-inner{position:relative; z-index:2; color:#fff; padding:14px 16px 16px; width:100%;}
.md-countdown{display:flex; gap:12px; align-items:center; font-weight:900; color:#fff; background:rgba(0,0,0,.38); border:1px solid rgba(255,255,255,.28); padding:10px 14px; border-radius:12px; width:max-content; backdrop-filter:blur(4px)}
.md-countdown .cd-label{opacity:.9; font-weight:800}
.md-countdown .cd-val{font-variant-numeric:tabular-nums; letter-spacing:.5px}
.md-game-head{display:flex; align-items:center; justify-content:center; gap:16px; margin:16px 0; color:#fff; text-shadow:0 2px 6px rgba(0,0,0,.35)}
.md-game-head .md-logo{height:60px; width:60px; object-fit:contain; background:#fff; border:1px solid #dde; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.25)}
.md-game-head .md-team{font-weight:900; color:#fff}
.md-game-head .md-vs{opacity:.9}
.md-info-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:12px; margin-top:12px}
.md-info-item{background:#0b1f49dd; border:1px solid #1c3f8a; color:#dbe7ff; border-radius:12px; padding:12px; box-shadow:0 2px 10px rgba(0,0,0,.18)}
.md-info-item .md-tag{background:#17366f; border-color:#2c59b0; color:#cfe0ff}
@media (max-width:900px){ .md-info-grid{grid-template-columns:1fr} .md-hero{min-height:320px} }

/* Ajustes móviles finos */
@media (max-width:600px){
  .md-hero .md-hero-inner{ padding:12px; }
  .md-game-head{ gap:10px; margin:10px 0; }
  .md-game-head .md-logo{ height:44px; width:44px; border-radius:8px; }
  .md-countdown{ padding:8px 10px; font-size:.95rem; gap:8px; }
  .md-info-item{ padding:10px; border-radius:10px; }
  .md-hero::before{ background-position:center 35%; }
  .md-hero::after{ background:linear-gradient(180deg, rgba(0,0,0,.06) 24%, rgba(0,0,0,.65) 100%); }
}

/* --- Rediseño ficha previo partido --- */
.match-detail{position:relative}
.md-header-bar{display:flex; justify-content:flex-start; margin-bottom:10px}
.md-back{display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:8px 6px; border-radius:0; background:transparent; color:#0b1f49; border:0; font-weight:800; cursor:pointer; text-decoration:none; box-shadow:none}
.md-back .material-symbols-outlined{font-size:20px; line-height:1}
.md-back:hover{background:transparent; color:#ff7a1a}
.btn-back{display:inline-flex; align-items:center; gap:6px; padding:6px 4px; border-radius:0; background:transparent !important; color:#011C40 !important; border:0 !important; font-weight:800 !important; cursor:pointer !important; text-decoration:none !important; box-shadow:none !important; transition:color .15s ease !important}
.btn-back:hover, .btn-back:focus:hover, .btn-back:active:hover{background:transparent !important; color:#ff7a1a !important}
.md-card-head{display:flex; flex-direction:column; align-items:center; text-align:center; margin:8px 0 10px}
.md-card-title{font-size:1.25rem; font-weight:900; color:#0b1f49}
.md-card-subtitle{font-size:.95rem; color:#4d618e}
.md-teams-line{display:flex; align-items:center; justify-content:center; gap:12px; font-weight:900; color:#0b1f49; margin:10px 0}
.md-teams-line .md-vs{opacity:.6}
.md-countdown-lg{display:flex; align-items:flex-end; justify-content:center; gap:10px; padding:6px 10px; width:100%}
.md-countdown-lg .cd-seg{display:flex; flex-direction:column; align-items:center}
.md-countdown-lg .cd-num{font-weight:1000; font-variant-numeric:tabular-nums; letter-spacing:.5px; font-size:52px; line-height:1}
.md-countdown-lg .cd-lbl{font-size:.75rem; opacity:.9; margin-top:4px}
.md-countdown-lg .cd-sep{font-weight:1000; font-size:38px; opacity:.85; transform:translateY(-4px)}
.md-hero .md-hero-inner .md-countdown-lg{margin-top:6px; margin-bottom:8px}
@media (max-width:600px){
  .md-countdown-lg .cd-num{font-size:38px}
  .md-countdown-lg .cd-sep{font-size:30px; transform:translateY(-2px)}
}
.md-field-block{margin-top:14px}
.md-field-img{width:100%; max-height:340px; object-fit:cover; border-radius:10px; border:1px solid #dfe7ff; box-shadow:0 2px 10px rgba(0,0,0,.12)}
.md-field-name{margin-top:8px; text-align:center; color:#0b1f49; font-weight:800}
.md-section-head{display:flex; align-items:center; gap:8px; font-weight:900; color:#0b1f49; margin:14px 0 8px}
.md-icon{font-family:'Material Symbols Outlined'; font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24; font-size:20px; line-height:1}
.md-info-line{display:flex; align-items:center; gap:10px; padding:10px 12px; background:#f6f9ff; border:1px solid #e2eaff; border-radius:10px; color:#0b1f49}
.md-info-line .md-icon{color:#2457ff}
.md-refs-list{list-style:none; padding:0; margin:0; display:grid; gap:8px}
.md-refs-list li{display:flex; align-items:center; gap:8px; padding:8px 10px; background:#f9fbff; border:1px solid #e8efff; border-radius:8px}

/* ==========================================
  Bloque "Isométrico Cortado" – Pitch Hero
  ========================================== */
.pitch-hero{ position:relative; display:grid; place-items:center; padding:clamp(12px,3vw,24px); background:#0b0f1a; overflow:hidden; isolation:isolate; border-radius:12px; margin:16px auto; box-sizing:border-box; aspect-ratio: 16 / 9; max-width:1920px; width:100%; }
.pitch-hero__img{ max-width:100%; width:100%; height:auto; display:block; filter:drop-shadow(0 12px 24px rgba(0,0,0,.25)); object-fit:contain; background:#0b0f1a; }
.pitch-hero::after{ content:""; position:absolute; inset:-10% -10%; background:linear-gradient(120deg, rgba(14,78,163,.65), rgba(255,122,0,.4)); mix-blend-mode:soft-light; pointer-events:none; }
.pitch-hero::before{ content:""; position:absolute; inset:-20% -20%; background:radial-gradient(60% 40% at 70% 30%, rgba(255,255,255,.18), transparent 65%); filter:blur(18px); opacity:.8; pointer-events:none; }
.pitch-hero__content{ position:absolute; bottom:24px; left:0; right:0; text-align:center; color:#fff; z-index:2; }
.pitch-hero__title{ font-weight:800; font-size:clamp(22px,4vw,44px); margin:0 0 8px 0; }
.pitch-hero__subtitle{ font-weight:500; font-size:clamp(14px,2vw,18px); opacity:.85; margin:0; }
.pitch-hero__layer{ position:absolute; inset:0; z-index:3; pointer-events:none; }
.pitch-hero__players{ position:absolute; left:8%; right:8%; top:10%; bottom:10%; z-index:4; pointer-events:none; }
.pitch-hero__player{ position:absolute; transform:translate(-50%,-50%); text-align:center; }
.pitch-hero__player .dot{ width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:900; box-shadow:0 4px 12px rgba(0,0,0,.18); margin:0 auto; border:2px solid rgba(255,255,255,.85); }
.pitch-hero__player.home .dot{ background:#011C40; color:#00E5FF; }
.pitch-hero__player.away .dot{ background:#ff7a00; color:#fff; }
.pitch-hero__player .name{ display:none; }
.pitch-hero__shields{ position:absolute; inset:0; z-index:5; pointer-events:none; }
.pitch-hero__shield{ position:absolute; top:50%; transform:translateY(-50%); width:108px; height:108px; object-fit:contain; filter:drop-shadow(0 18px 36px rgba(0,0,0,.38)); opacity:.92; }
.pitch-hero__shield--left{ left:18px; -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%); mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%); }
.pitch-hero__shield--right{ right:18px; -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%); mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 85%); }
@media (max-width:640px){ .pitch-hero__shield{ width:82px; height:82px; } }

/* Badges de esquema en cada mitad */
.pitch-hero__badge{ position:absolute; top:12px; padding:6px 10px; border-radius:999px; font-weight:900; font-size:13px; box-shadow:0 4px 10px rgba(0,0,0,.2); backdrop-filter:blur(2px); }
.pitch-hero__badge--home{ left:12px; background:#011C4099; color:#00E5FF; border:2px solid #00E5FF33; }
.pitch-hero__badge--away{ right:12px; background:#ff7a0099; color:#fff; border:2px solid #ffffff33; }

/* Listas laterales de titulares */
.pitch-hero__lists{ position:absolute; inset:0; display:flex; justify-content:space-between; align-items:center; padding:10px; z-index:6; pointer-events:none; }
.pitch-hero__list{ width:24%; max-width:280px; display:flex; flex-direction:column; gap:6px; pointer-events:auto; }
.pitch-hero__list--left{ align-items:flex-start; }
.pitch-hero__list--right{ align-items:flex-end; }
.pitch-hero__row{ display:flex; align-items:center; gap:8px; color:#fff; font-weight:800; font-size:12px; background:rgba(0,0,0,.38); padding:6px 8px; border-radius:10px; backdrop-filter:blur(2px); box-shadow:0 4px 10px rgba(0,0,0,.15); white-space:nowrap; }
.pitch-hero__events{ display:inline-flex; align-items:center; gap:6px; margin-right:4px; }
.pitch-hero__row .badge-num{ min-width:24px; height:24px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; font-weight:900; font-size:12px; border:2px solid rgba(255,255,255,.85); margin-left:auto; }
.pitch-hero__list--left .badge-num{ background:#011C40; color:#00E5FF; }
.pitch-hero__list--right .badge-num{ background:#ff7a00; color:#fff; }
.pitch-hero__pos{ opacity:.9; font-weight:900; font-size:11px; padding:2px 6px; border-radius:6px; background:rgba(255,255,255,.15); margin-left:4px; }
.pitch-hero__cap{ color:#ffd54a; margin-left:2px; display:inline-flex; align-items:center; }
.pitch-hero__txtwrap{ display:inline-flex; align-items:center; gap:6px; }
.pitch-hero__txt{ max-width:56ch; overflow:hidden; text-overflow:ellipsis; }

@media (max-width:980px){
  .pitch-hero{ aspect-ratio:auto; }
  .pitch-hero__lists{ position:relative; inset:auto; padding:10px 0 0 0; flex-direction:column; align-items:stretch; gap:8px; }
  .pitch-hero__list{ width:100%; max-width:none; }
  .pitch-hero__list--right{ align-items:flex-start; }
}

/* ==============================
   Señales de clic (affordances)
   ==============================
   – Clasificaciones: logo y nombre clicables via JS
   – Listas de partidos: escudos clicables via JS
   – Ficha partido: enlaces de equipos (nombre/escudo)
*/
.table-club-name img,
.table-club-name span{ cursor: pointer; }
.clasificacion-table .table-club-name img{
  width:30px;
  height:30px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex-shrink: 0;
  display:block;
}
.team-row .team-logo{ cursor: pointer; }
.md-game-head a,
.md-teams-line a{ cursor: pointer; text-decoration: none; color: inherit; }
/* Ficha de partido: enlaces en cabecera deben comportarse como fila inline-flex para no deshacer el layout */
.teams-line .team-link{ display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }

/* Firefox: asegurar maquetación de sanciones consistente */
#view-sanciones .sanciones-list{
  display:grid !important;
  grid-template-columns: 1fr !important;
  gap:12px !important;
}
@media (min-width: 720px){
  #view-sanciones .sanciones-list{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
#view-sanciones .sancion-card{
  width:100% !important;
  box-sizing:border-box !important;
  background:#ffffff !important;
  border:1px solid #e6eef9 !important;
  border-radius:12px !important;
  box-shadow:0 2px 8px rgba(0,0,0,.06) !important;
  padding:12px !important;
}
#view-sanciones .sancion-card .items{
  display:grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap:8px !important;
}
#view-sanciones .sancion-item{
  display:flex !important;
  align-items:flex-start !important;
  gap:10px !important;
  padding:6px 8px !important;
  border:1px solid #eef3fb !important;
  border-radius:10px !important;
  background:#fafcff !important;
}
@supports not (display: grid){
  #view-sanciones .sanciones-list{ display:flex !important; flex-direction:column !important; }
  #view-sanciones .sancion-card .items{ display:flex !important; flex-wrap:wrap !important; }
  #view-sanciones .sancion-item{ flex:1 1 220px !important; }
}

/* Indicador de equipo retirado en clasificación */
.team-retired{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-weight:900;
  font-size:.75rem;
  background:#ffecec;
  border:1px solid #ffcfcf;
  color:#b3261e;
}


