/* VARIABLES GLOBALES Y ESTILOS BASE */
:root {
  --bg-principal: #121212;
  --bg-tarjeta: #1e1e1e;
  --rojo-parley: #df0a0e;
  --azul-destacado: #2b6cb0;
  --texto-claro: #f7fafc;
  --texto-mutado: #cbd5e0;
  --amarillo: #ecc94b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #050538;
  color: var(--texto-claro);
  font-family: Verdana, sans-serif;
  line-height: 1.6;
  padding: 10px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* MENÚ DE NAVEGACIÓN LATERAL Y BOTONES */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-nav {
  display: flex;
  align-items: center;
  width: 100%;
  height: 50px;
  padding: 0 20px;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: background .2s;
  font-family: Verdana;
  cursor: pointer;
}

.btn-nav:hover {
  filter: brightness(50%);
}

.btn-nav img {
  margin-right: 15px;
  flex-shrink: 0;
}

.btn-nav span {
  font-weight: 700;
  font-size: 17px;
}

/* Variaciones de colores para botones */
.btn-orange { background-color: #f55e27; border-color: #f55e27; color: #000; }
.btn-green  { background-color: #038132; border-color: #038132; color: #fff; }
.btn-red    { background-color: #df0a0e; border-color: #df0a0e; color: #fff; }
.btn-blue-f { background-color: #1868d6; border-color: #2085ff; color: #000; }
.btn-blue-b { background-color: #1a00e1; border-color: #1a00e1; color: #fff; }
.btn-yellow { background-color: #f5eb27; border-color: #f5eb27; color: #000; }
.btn-white  { background-color: #fff;    border-color: #fff;    color: #000; }
.btn-black  { background-color: #3a3a3a; border-color: #3a3a3a; color: #fff; }

/* BANNERS PUBLICITARIOS */
.contenedor-banner {
  text-align: center;
  margin: 20px 0;
}

.contenedor-banner img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  transition: opacity .3s ease;
}

.banner-celular { display: block; }
.banner-pc { display: none; }

@media (min-width: 768px) {
  .banner-celular { display: none; }
  .banner-pc { display: block; }
}

/* BARRA DE NAVEGACIÓN PRINCIPAL (NAVBAR) */
/* --- NAVEGACIÓN --- */
.navbar { 
    background: #C2080B; 
    padding: 0.7rem 1rem; 
    position: relative; 
    width: 100%;
    z-index: 1000;
}
.menu-checkbox { display: none; }
.menu-trigger { cursor: pointer; font-size: 2rem; display: block; color: white; }

.nav-links { 
    list-style: none; 
    display: none; 
    flex-direction: column; 
    gap: 0; 
    margin-top: 5px;
    width: 100%;
}

.nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.nav-links li:last-child {
    border-bottom: none;
}

.nav-links a { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    color: white; 
    text-decoration: none; 
    font-weight: bold; 
    text-align: center;
    transition: background-color 0.2s ease;
}

.nav-links a:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

#menu-toggle:checked ~ .nav-links { display: flex; }

@media (max-width: 767px) {
    .navbar { 
        position: fixed; 
        top: 0; 
        left: 0;
    }
    body { padding-top: 80px; }
}

@media (min-width: 768px) {
    .navbar { position: relative; }
    .menu-trigger { display: none; }
    .nav-links { 
        display: flex; 
        flex-direction: row; 
        justify-content: center; 
        margin-top: 0; 
    }
    .nav-links li { 
        width: auto;
        border-bottom: none;
        padding: 0 15px; 
    }
    .nav-links a {
        display: inline;
        width: auto;
        padding: 0;
        text-align: left;
    }
    body { padding-top: 10px; } 
}

/* LAYOUT PRINCIPAL Y SECCIONES */
.layout-principal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  overflow-x: hidden;
}

@media (min-width: 992px) {
  .layout-principal {
    grid-template-columns: 2fr 1fr;
  }
}

.contenido-datos {
  min-width: 0;
  width: 100%;
}

.seccion-header {
  background: linear-gradient(135deg, #2d3748, #1a202c);
  padding: 15px;
  text-align: center;
  border-radius: 6px;
  margin-bottom: 15px;
}

.seccion-header h2 {
  font-size: 24px;
}

.fecha-texto {
  color: var(--amarillo);
  font-weight: 700;
}

/* FOOTER Y BLOQUES SEO */
.sitio-footer {
  margin-top: 40px;
  padding: 20px;
  background-color: #1a1a1a;
  text-align: center;
  border-top: 2px solid #2d3748;
}

.footer-enlaces {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.footer-enlaces a {
  color: #fff;
  text-decoration: none;
}

.sponsor {
  color: var(--amarillo);
  font-weight: 700;
}

.seo-descripcion {
  background-color: #1a1a1a;
  padding: 25px;
  margin-top: 40px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  line-height: 1.7;
  text-align: justify;
}

.seo-descripcion h3 {
  color: var(--texto-claro);
  margin-bottom: 15px;
  font-size: 20px;
  text-transform: uppercase;
}

.seo-descripcion p {
  margin-bottom: 15px;
}

/* MULTIMEDIA Y ANUNCIOS */
.video-adaptable {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 16/9;
}

.video-adaptable iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.ads-container {
  display: block;
  width: 100%;
  background-color: #000;
  margin: 10px 0;
  contain: layout style;
  min-height: 250px;
}

@media (min-width: 768px) {
  .ads-container {
    min-height: 280px;
  }
}

/* TARJETA DE APUESTA (MATCHUP) */
.tarjeta-apuesta-matchup {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    
    contain: content; /* Impide que el contenido interno afecte al resto y viceversa */
    position: relative;
    z-index: 1;
}

.matchup-header {

    color: #ffffff;
    padding: 6px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.4px;
    font-size: 0.9rem;
}

.mblueb {
    background: #1a237e;
}
.mred {
    background: #df0a0e;
}
.mgreen {
    background: #038132;
}
.mblack {
    background: #3a3a3a;
}
.mbluef {
    background: #2085ff;
}




.matchup-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px;
    gap: 15px;
}

.team-col { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }

.team-logo { margin-bottom: 6px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1)); }

.racha-container { display: flex; gap: 4px; margin-bottom: 8px; }

/* Estilos Base */
.racha-container { 
    display: flex; 
    gap: 4px; 
    margin-bottom: 2px; 
}

/* Estilo base para todos los cuadros */
.cuadro-racha {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative; /* CRÍTICO: Necesario para que el ::after se posicione bien */
    overflow: hidden;   /* CRÍTICO: Recorta el triángulo para que respete el border-radius */
}

/* Colores Sólidos */
.boxWin  { background: #00a651; }
.boxLose { background: #e60000; }
.boxDraw { background: #f39c12; }

/* La esquina naranja (Tiempo Extra) */
.te-mark::after {
    content: "";
    position: absolute; 
    bottom: 0; 
    right: 0;
    border-style: solid;
    /* Usamos 7px para un triángulo que se integra bien en un cuadro de 20px */
    border-width: 0 0 7px 7px;
    border-color: transparent transparent #ffcc00 transparent; /* Un amarillo más vibrante para contraste */
}

.team-name { font-size: 0.9rem; font-weight: 900; color: #333; margin: 1px 0; }
.team-home { font-size: 0.9rem; font-weight: 900; color: #333; margin: 1px 0; }

.bet-pill { padding: 2px 12px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; margin: 2px 0; }
.mia-color { background: #f1f8e9; color: #33691e; }
.nym-color { background: #ffebee; color: #c62828; }
.yia-color { background: #fff176; color: #000000; }

.info-col { padding-top: 10px; font-size: 0.85rem; color: #666; font-weight: 600; text-align: center; }
.o-u { font-size: 1.1rem; color: #000; margin-top: 5px; }



.matchup-estadistica {
    background: #eee;
    color: #000000;
    padding: 1px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.matchup-stats {
    background: #f8f9fa;
    border-top: 1px solid #eee;
    padding: 5px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2px;
    font-size: 0.8rem;
    color: #555;
    text-align: center;
}
.stat-label { font-weight: 900; color: #333; text-transform: uppercase; font-size: 0.7rem; }

/* Contenedor del pronóstico */
.pronostico-container {
    padding: 25px;
    background: #DEDEDE;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #000;
    line-height: 1.7;    
    text-align: justify;
    font-weight: 500;
}




/* Estilo del botón */
.btn-ver-mas {
    display: block;
    width: 95%;
    margin: 10px auto;
    padding: 10px;
    background: #172DF1;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-ver-mas:hover {
    background: #051675;
}

/* Selecciona todos los párrafos dentro del contenedor de pronósticos */
.pronostico-container p {
    margin-top: 0;       /* Elimina el margen superior para mayor control */
    margin-bottom: 12px; /* Aquí controlas el espacio entre puntos y aparte */
    line-height: 1.5;    /* Mejora la legibilidad del texto */
}

/* Opcional: Elimina el margen del último párrafo si es necesario */
.pronostico-container p:last-child {
    margin-bottom: 0;
}

.prediccion-box {
    margin-top: 2px;
    padding: 2px;
    background: #ffd700;
    border-radius: 4px;
    font-size: 0.85em;
}

.pred-label {
    margin: 0px 7px 0px 7px;
    font-weight: bold;
    color: #000;
}





.matchup-porcentajes-titulo {
    background: #ffffff;
    color: #000000;
    padding: 1px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
}





.matchup-porcentajes-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0;
    padding: 0 10px;
}

.fila-porcentaje {
    display: grid;
    /* La columna central 'auto' se ajusta al contenido (ATS/OU), los lados '1fr' se reparten el resto */
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px; /* Espacio entre el porcentaje y la etiqueta central */
}

.label-center, .pill-label {
    font-weight: 800;
    color: #333;
    width: 40px; /* Ancho fijo para que el centro siempre sea el mismo */
    text-align: center;
}

.pill {
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8em;
}



.pill-left {
    background-color: #ffebee;
    color: #c62828;
    text-align: center; /* Empuja el porcentaje hacia la etiqueta central */
}

.pill-right {
    background-color: #f1f8e9;
    color: #33691e;
    text-align: center; /* Empuja el porcentaje hacia la etiqueta central */
}


/* TABLAS DE DATOS Y RESULTADOS */
.contenedor-tabla-scroll {
  width: var(--ancho-contenido);
  overflow: auto;
  margin: 20px 0;
  display: block;
}

.tabla-titulo {
  background-color: #4E4E4E;
  color: #FFFFFF;
  font-family: Tahoma, sans-serif;
  font-size: 13px;
  height: 28px;
  width: 100%;
  text-align: center;
  padding-top: 6px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.tabla-scroll-wrapper {
  overflow-x: auto;
}

.tabla-aperturas {
  background-color: #FFFFFF;
  font-family: Tahoma, sans-serif;
  font-size: 12px;
  color: #333333;
  border-collapse: collapse;
  width: 100%;
}

.tabla-aperturas th {
  background-color: #E9E9E9;
  color: #222222;
  text-align: center;
  height: 28px;
  font-weight: 700;
  font-size: 11px;
  padding: 0 4px;
  white-space: nowrap;
}

.tabla-aperturas td {
  text-align: center;
  height: 36px;
  border-bottom: 1px solid #D2D2D2;
  padding: 2px 4px;
  white-space: nowrap;
}

/* Anchos de columnas específicos */
.col-fecha           { width: 72px; min-width: 72px; max-width: 72px; }
.col-local, .col-visita { width: 165px; min-width: 165px; max-width: 165px; }
.col-marcador        { width: 105px; min-width: 105px; max-width: 105px; }
.col-anota           { width: 82px; min-width: 82px; max-width: 82px; }
.col-ou, .col-ml     { min-width: 65px; }
.col-ats             { min-width: 75px; }
.col-inn             { min-width: 90px; }
.col-sino            { min-width: 60px; }
.col-abridor         { min-width: 130px; }
.col-icono           { min-width: 20px; }

/* Clases de utilidad y resaltados de tabla */
.ml-highlight { background-color: #FFF7A6; color: #1A1A1A; }
.text-red     { color: #B30000 !important; }
.text-green   { color: #006600 !important; }
.text-yellow  { color: #7A6300 !important; }
.td-racha     { padding-left: 4px; }