/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

/* ===== VARIABLES ===== */
:root {
  --azul-oscuro: #002b5c;
  --azul-claro: #0077ff;
  --blanco: #ffffff;
  --rojo: #e63946;
  --borde-suave: #eef4ff;
  --sombra: rgba(0, 0, 0, 0.15);
}

/* ===== ESTRUCTURA GLOBAL ===== */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(90deg, #eaf1fb 0%, #ffffff 50%, #eaf1fb 100%);
  color: var(--azul-oscuro);
  overflow-x: hidden;
  position: relative;
}

/* ===== BARRAS LATERALES ===== */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  width: 14px;
  height: 100vh;
  z-index: -1;
  background: linear-gradient(to bottom, var(--rojo), #0057b8 90%, var(--azul-oscuro));
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
}
body::before { left: 0; }
body::after { right: 0; }

/* ===== LEMAS LATERALES ===== */
html::before,
html::after {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 1rem;
  color: var(--azul-oscuro);
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  z-index: 0;
  pointer-events: none;
  writing-mode: vertical-rl;
  text-orientation: upright;
}
html::before { content: "UN POBO"; left: 30px; }
html::after { content: "UN SENTIMENTO"; right: 30px; }

@media (max-width: 1024px) {
  html::before, html::after { display: none; }
}

/* ===== HEADER ===== */
header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, var(--azul-oscuro), #0057b8, #4da3ff);
  padding: 10px 30px;
  color: var(--blanco);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo img {
  width: 36px;
  height: 36px;
  transition: transform 0.3s ease;
}
.logo img:hover { transform: scale(1.05); }

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}
.menu li a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}
.menu li a:hover,
.menu li a.active {
  background: var(--rojo);
  color: var(--blanco);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 6px 8px;
}

/* ===== SECCIÓN RESULTADOS ===== */
.resultados-section {
  padding: 60px 20px 80px;
  text-align: center;
}

.resultados-section h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  color: var(--azul-oscuro);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 40px;
  position: relative;
}
.resultados-section h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rojo);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== SELECTOR ===== */
.selector-jornada-container {
  text-align: center;
  margin-bottom: 25px;
}
.selector-jornada-container label {
  font-weight: 700;
  color: var(--azul-oscuro);
  margin-right: 10px;
}
#selector-jornada {
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--azul-oscuro);
  background-color: var(--blanco);
  cursor: pointer;
  transition: all 0.25s ease;
}
#selector-jornada:hover {
  background-color: var(--borde-suave);
}

/* ===== TABLA RESULTADOS ===== */
.tabla-wrapper {
  overflow-x: hidden; /* sin scroll */
  max-width: 100%;
}

.tabla-resultados {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: 0 6px 20px var(--sombra);
}
.tabla-resultados th {
  background: var(--azul-oscuro);
  color: var(--blanco);
  padding: 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.tabla-resultados td {
  padding: 12px;
  border-bottom: 1px solid var(--borde-suave);
  color: var(--azul-oscuro);
  font-weight: 500;
}
.tabla-resultados tr:nth-child(even) td {
  background: none;
}

.tabla-resultados tr:hover {
  background: rgba(77, 163, 255, 0.15);
  transform: scale(1.005);
  transition: all 0.25s ease;
}

/* ===== EQUIPOS CON ESCUDOS ===== */
.equipo-local,
.equipo-visitante {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  text-align: center;
  flex-direction: row; /* siempre escudo antes del nombre */
}

.escudo-equipo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.25));
}


/* ===== CELDA RESULTADO ===== */
.resultado {
  font-weight: 700;
  color: var(--rojo);
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;
  min-width: 50px;
}


/* 🔵 DESTACAR PARTIDOS DEL AD SOUTELO — BORDE SIEMPRE ACTIVO */
.destacar-soutelo {
  position: relative;
  border-left: 5px solid var(--azul-claro);
  box-shadow: 0 0 10px rgba(0, 87, 184, 0.15);
  transform: scale(1.01);
  transition: all 0.3s ease;
  border-radius: 6px;
}

.destacar-soutelo td {
  background: transparent !important;
  font-weight: 700;
  color: var(--azul-oscuro);
}

/* 💻 PC: solo mantenemos un efecto más sutil al pasar el ratón, sin depender del click */
@media (hover: hover) {
  .destacar-soutelo:hover {
    box-shadow: 0 0 15px rgba(0, 87, 184, 0.25);
    transform: scale(1.015);
  }
}




/* ===== FOOTER ===== */
footer {
  background: linear-gradient(90deg, var(--azul-oscuro), #0057b8);
  color: var(--blanco);
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
  margin-top: auto;
}
footer::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rojo);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== RESPONSIVE ===== */

/* 🔹 Menú móvil */
@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: #06335f;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  }
  .menu.active { display: flex; }
  .menu-toggle { display: block; }
}

/* 🔹 Tabla totalmente responsive */
@media (max-width: 768px) {
  .tabla-wrapper {
    width: 100%;
    overflow-x: auto; /* permitimos desplazamiento interno si es necesario */
    -webkit-overflow-scrolling: touch;
  }

  .tabla-resultados {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed; /* fuerza que las columnas se ajusten al ancho */
  }

  .tabla-resultados th,
  .tabla-resultados td {
    padding: 10px 6px;
    text-align: center;
    word-wrap: break-word;
  }

  /* 🔹 Adaptar formato a tarjetas en pantallas pequeñas */
  @media (max-width: 480px) {
    .tabla-resultados,
    .tabla-resultados thead,
    .tabla-resultados tbody,
    .tabla-resultados th,
    .tabla-resultados td,
    .tabla-resultados tr {
      display: block;
      width: 100%;
    }

    .tabla-resultados thead {
      display: none; /* ocultamos los encabezados */
    }

    .tabla-resultados tr {
      background: var(--blanco);
      margin-bottom: 14px;
      border-radius: 10px;
      box-shadow: 0 2px 8px var(--sombra);
      padding: 10px 0;
    }

    .tabla-resultados td {
      text-align: center;
      padding: 6px 0;
      border: none;
    }

    .tabla-resultados td.resultado {
      font-size: 1.1rem;
      font-weight: 800;
      color: var(--rojo);
      margin: 4px 0;
    }

    .equipo-local,
    .equipo-visitante {
      justify-content: center;
      gap: 6px;
      font-size: 0.9rem;
    }

    .escudo-equipo {
      width: 24px;
      height: 24px;
    }
  }
}
/* 🚫 Evitar que se resalten los partidos al hacer clic en móvil */
.tabla-resultados tr,
.tabla-resultados td {
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

.tabla-resultados tr:active,
.tabla-resultados tr:focus,
.tabla-resultados td:active,
.tabla-resultados td:focus {
  background: none !important;
  outline: none !important;
  box-shadow: none !important;
}
