/* ========================================================
   BOCA ES LA PASIÓN - 3 SECCIONES DE PANTALLA COMPLETA (100VH)
   - Sección 1: Intro (Fondo Intro + Logo centrado)
   - Sección 2: Fixture & Tabla (Fondo Blanco Sólido)
   - Sección 3: En Vivo (Fondo En Vivo + Reproductor)
   ======================================================== */

:root {
  --boca-navy: #22396b;
  --boca-gold: #f9be3d;
  --boca-red: #fc012f;
  --bg-dark: #0d1017;
  --text-dark: #111111;
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-table: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

html, body {
  width: 100%;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ================= CLASE BASE: PANTALLA COMPLETA 100VH ================= */
.fullpage-section {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-margin-top: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* ================= 1. SECCIÓN INTRO (FONDO INTRO PROPIO) ================= */
.intro-section {
  background-image: 
    linear-gradient(rgba(10, 14, 22, 0.4), rgba(10, 14, 22, 0.5)),
    url('assets/images/fondo-intro.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 20px;
}

.hero-container {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-logo-box {
  width: 100%;
  max-width: clamp(340px, 50vw, 640px);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
}

.hero-logo {
  width: 100%;
  height: auto;
  max-height: 52vh;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.75));
}

/* Botón flecha interactiva de la intro (flecha.svg idéntico al diseño original, sin círculo) */
.hero-scroll-btn {
  margin-top: clamp(18px, 3vh, 34px);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  border: none;
  outline: none;
  padding: 6px;
  animation: bounceArrowFlow 2.2s infinite ease-in-out;
  transition: transform 0.3s ease;
  z-index: 10;
}

.hero-scroll-btn:hover {
  animation-play-state: paused;
  transform: translateY(4px) scale(1.15);
}

.hero-chevron {
  width: clamp(52px, 4.8vw, 70px);
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.75));
  transition: filter 0.3s ease;
}

.hero-scroll-btn:hover .hero-chevron {
  filter: drop-shadow(0 0 18px rgba(249, 190, 61, 0.9)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

/* ================= 2. SECCIÓN FIXTURE & TABLA (FONDO BLANCO SÓLIDO) ================= */
.board-section {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: var(--text-dark);
  min-height: auto !important; /* Elimina la altura forzada de 100vh y el exceso de espacio vacío */
  height: auto !important;
  padding: clamp(24px, 3.5vh, 40px) 0 clamp(36px, 5vh, 52px) 0;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
  z-index: 3;
  justify-content: flex-start;
}

.board-container {
  width: 92%;
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch; /* Permite que el divisor dorado coincida con la altura de las columnas */
  gap: 0;
}

/* Títulos principales: alineados exactamente arriba en la línea negra */
.col-title {
  font-family: var(--font-main);
  font-size: clamp(1.75rem, 2.3vw, 2.25rem);
  font-weight: 800;
  color: var(--boca-navy);
  letter-spacing: 1px;
  text-align: center;
  margin: 0 0 clamp(8px, 1.2vh, 14px) 0;
  line-height: 1;
  text-transform: uppercase;
}

/* Divisor dorado vertical CENTRADO (50% y 50%) */
.board-divider {
  width: 2px;
  background-color: var(--boca-gold);
  height: auto;
  align-self: stretch;
  flex-shrink: 0;
  opacity: 0.95;
  margin-top: clamp(36px, 5.2vh, 52px);
}

/* Columna Izquierda: Fixture (50% de ancho con 6 partidos entre las líneas rojas) */
.fixture-col {
  flex: 1;
  width: 50%;
  padding-right: clamp(14px, 2.2vw, 36px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fixture-list {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 11px);
  margin-top: clamp(24px, 3.6vh, 38px); /* Bajado un 10% respecto a los títulos */
}

.fixture-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(6px, 1.2vw, 16px);
  padding: 1px 0;
}

.fixture-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.fixture-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.7vw, 7px);
  line-height: 1;
}

.match-date {
  font-size: clamp(0.95rem, 1.2vw, 1.22rem);
  font-weight: 600;
  letter-spacing: -0.2px;
}

.fixture-star-icon {
  display: inline-flex;
  width: clamp(10px, 1vw, 13px);
  height: clamp(10px, 1vw, 13px);
}

.fixture-star-icon svg {
  width: 100%;
  height: 100%;
}

.match-time {
  font-size: clamp(0.95rem, 1.2vw, 1.22rem);
  font-weight: 300;
  letter-spacing: -0.2px;
}

.fixture-tournament {
  font-family: var(--font-main);
  font-size: clamp(1.05rem, 1.35vw, 1.38rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-top: 1px;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
}

/* Colores de Fixture */
.fixture-gold {
  color: var(--boca-gold);
}

.fixture-navy {
  color: var(--boca-navy);
}

/* Escudos de Fixture con cuadrado de fondo color #22396b */
.fixture-badges {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 12px);
  flex-shrink: 0;
}

.badge-wrapper {
  width: clamp(42px, 3.8vw, 50px);
  height: clamp(42px, 3.8vw, 50px);
  background-color: #22396b; /* Cuadrado de fondo color #22396b */
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 3px 10px rgba(34, 57, 107, 0.28);
  flex-shrink: 0;
}

.team-badge {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Columna Derecha: Tabla (50% de ancho) */
.tabla-col {
  flex: 1;
  width: 50%;
  padding-left: clamp(14px, 2.2vw, 36px);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tables-group {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vh, 18px);
  margin-top: clamp(24px, 3.6vh, 38px); /* Bajado un 10% respecto a los títulos */
}

.standings-box {
  width: 100%;
  background: #ffffff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tabla de Posiciones */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-table);
  font-size: clamp(0.7rem, 0.88vw, 0.82rem);
  font-weight: 700;
  color: #111111;
}

/* Encabezado Azul #22396b con letras blancas */
.table-head-row {
  background-color: #22396b !important; /* Rectángulo de color #22396b */
  color: #ffffff !important;
  height: clamp(20px, 2.5vh, 24px);
  line-height: 1;
}

.th-conf {
  text-align: left;
  padding: 3px 6px 3px 8px;
  font-weight: 800;
  font-size: clamp(0.72rem, 0.9vw, 0.86rem);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff !important; /* Letras blancas para TORNEO CLAUSURA y ANUAL */
}

.th-stat {
  width: 20px;
  text-align: center;
  font-size: clamp(0.65rem, 0.8vw, 0.78rem);
  font-weight: 700;
  padding: 3px 1px;
  color: #ffffff !important;
}

.th-pts {
  width: 26px;
  text-align: right;
  font-size: clamp(0.7rem, 0.85vw, 0.82rem);
  font-weight: 800;
  padding: 3px 8px 3px 1px;
  color: #ffffff !important;
}

/* Filas del cuerpo de la tabla */
.standings-table tbody tr {
  height: clamp(18px, 2.3vh, 22px);
  border-bottom: 1px solid #f4f4f4;
  transition: background-color 0.15s ease;
}

.standings-table tbody tr:hover {
  background-color: #fafafa;
}

.standings-table tbody tr.row-boca {
  background-color: rgba(249, 190, 61, 0.7); /* Fondo #f9be3d con 70% de opacidad */
}

.standings-table tbody tr.row-boca:hover {
  background-color: rgba(249, 190, 61, 0.82);
}

.standings-table tbody tr.row-boca .td-name {
  color: var(--boca-navy);
  font-weight: 900;
}

.td-pos {
  width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  padding-left: 6px;
}

.td-crest {
  width: 22px;
  text-align: center;
  padding: 0 3px;
}

.crest-img {
  width: clamp(15px, 1.8vw, 19px);
  height: clamp(15px, 1.8vw, 19px);
  object-fit: contain;
  vertical-align: middle;
}

.td-name {
  text-align: left;
  font-weight: 800;
  font-size: clamp(0.68rem, 0.88vw, 0.82rem);
  white-space: nowrap;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  padding-left: 4px;
  padding-right: 8px;
}

.td-stat {
  text-align: center;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  padding: 0 2px;
}

.td-pts {
  text-align: right;
  font-weight: 800;
  color: #22396b; /* Color #22396b */
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.75rem, 0.95vw, 0.9rem);
  padding-right: 8px;
}

/* ================= 3. SECCIÓN EN VIVO (FONDO EN VIVO PROPIO) ================= */
.live-stream-section {
  background-image: 
    linear-gradient(rgba(10, 14, 22, 0.4), rgba(10, 14, 22, 0.5)),
    url('assets/images/fondo-envivo.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: clamp(20px, 3vh, 35px) 0;
  justify-content: center;
  align-items: center;
}

.live-title-bar {
  background: transparent;
  background-color: transparent;
  width: 100%;
  padding: clamp(6px, 1.2vh, 14px) 0 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: none;
}

.live-heading {
  color: #ffffff;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.95), 0 2px 5px rgba(0, 0, 0, 0.85);
}

.live-container {
  width: 90%;
  max-width: 1000px;
  margin: clamp(14px, 2.2vh, 26px) auto clamp(20px, 3vh, 36px) auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Recuadro blanco del reproductor de video */
.live-player-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 58vh;
  min-height: 240px;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.player-content {
  width: 100%;
  height: 100%;
}

.player-content iframe,
.player-content video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Animaciones de rebote */
@keyframes bounceArrowFlow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(10px);
  }
  60% {
    transform: translateY(5px);
  }
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(12px);
  }
  60% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* ================= ADAPTACIÓN RESPONSIVE ================= */

/* Pantallas medianas y Tablets (<= 920px) */
@media (max-width: 920px) {
  .fullpage-section {
    min-height: 100vh;
    height: auto;
  }

  .board-container {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .board-divider {
    width: 100%;
    height: 2px;
    min-height: 0;
    margin: 10px 0;
    align-self: auto;
  }

  .fixture-col, .tabla-col {
    width: 100%;
    flex: auto;
  }

  .fixture-card {
    justify-content: space-around;
  }
}

/* Móviles (<= 580px) */
@media (max-width: 580px) {
  .intro-section {
    padding: 15px;
  }

  .board-section {
    padding: 25px 0 50px 0;
  }

  .fixture-list {
    gap: 20px;
  }

  .fixture-card {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .fixture-badges {
    justify-content: center;
  }

  .badge-wrapper {
    width: 50px;
    height: 50px;
  }

  .standings-table {
    font-size: 0.7rem;
  }

  .th-stat, .td-stat {
    width: 18px;
    padding: 2px 1px;
  }

  .live-player-box {
    aspect-ratio: 16 / 9;
    min-height: 190px;
  }
}
