/* Maxibásquet La Plata — estilos
   Colores tomados del escudo: azul, naranja pelota y crema. */

@font-face {
  font-family: "Bebas Neue";
  src: url("../fonts/bebas-neue.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --azul-noche: #12223a;
  --azul: #254073;
  --naranja: #ff600c;
  --naranja-oscuro: #c94400;
  --crema: #f5e4c8;
  --papel: #fbf5ec;
  --tinta: #1b2433;
  --gris: #5b6474;

  --display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
  --texto: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ancho: 72rem;
  --alto-header: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-header) + 2.5rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.menu-abierto { overflow: hidden; }

main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); text-underline-offset: 0.18em; }
a:hover { color: var(--naranja-oscuro); }

:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 3px;
  border-radius: 2px;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 48rem) { .contenedor { padding: 0 2rem; } }

.saltar {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--naranja);
  color: var(--azul-noche);
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-decoration: none;
}
.saltar:focus { top: 1rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

/* ---------- Encabezado y menú ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--azul-noche);
  color: var(--crema);
}

/* Borde inferior curvo del encabezado (reemplaza la línea recta) */
.curva {
  position: absolute;
  left: 0;
  top: calc(100% - 1px);
  width: 100%;
  height: clamp(1rem, 2.6vw, 2.25rem);
  pointer-events: none;
  overflow: visible;
}
.curva-fondo { fill: var(--azul-noche); }
.curva-linea {
  fill: none;
  stroke: var(--naranja);
  stroke-width: 3px;
  vector-effect: non-scaling-stroke;
}
.header .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--alto-header);
  gap: 1rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--crema);
  text-decoration: none;
  flex-shrink: 0;
}
.marca img { position: relative; z-index: 2; width: clamp(4.25rem, 7vw, 6rem); height: auto; margin: 0.4rem 0 clamp(-1.1rem, -2.5vw, -2.4rem); filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.marca span {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.marca:hover { color: #fff; }

.boton-menu {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--crema);
  border: 2px solid rgba(245, 228, 200, 0.4);
  border-radius: 999px;
  padding: 0.45rem 1rem 0.45rem 0.85rem;
  font: 600 0.95rem var(--texto);
  cursor: pointer;
}
.boton-menu:hover { border-color: var(--naranja); }
.boton-menu .barras { position: relative; width: 1.1rem; height: 0.8rem; }
.boton-menu .barras span {
  position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.boton-menu .barras span:nth-child(1) { top: 0; }
.boton-menu .barras span:nth-child(2) { top: calc(50% - 1px); }
.boton-menu .barras span:nth-child(3) { top: calc(100% - 2px); }
.boton-menu[aria-expanded="true"] .barras span:nth-child(1) { top: calc(50% - 1px); transform: rotate(45deg); }
.boton-menu[aria-expanded="true"] .barras span:nth-child(2) { opacity: 0; }
.boton-menu[aria-expanded="true"] .barras span:nth-child(3) { top: calc(50% - 1px); transform: rotate(-45deg); }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.nav a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--crema);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  line-height: 1;
  border-radius: 4px;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav a[aria-current="page"] { background: var(--naranja); color: var(--azul-noche); }

/* Menú de celular: panel oscuro con texto claro (antes era blanco sobre blanco) */
@media (max-width: 60rem) {
  .boton-menu { display: inline-flex; }
  .marca span { display: none; }

  .nav {
    position: fixed;
    inset: var(--alto-header) 0 0 0;
    z-index: -1;
    background: var(--azul-noche);
    padding: 1.5rem 1.25rem 2rem;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .nav.abierto {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: 1px solid rgba(245, 228, 200, 0.14); }
  .nav a {
    font-size: 2.4rem;
    padding: 0.85rem 0.25rem;
    border-radius: 0;
  }
  .nav a[aria-current="page"] { background: transparent; color: var(--naranja); }
  .nav a:hover { background: transparent; color: #fff; }
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  color: #fff;
  background-color: var(--azul-noche);
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url("../img/fondo-1600.jpg");
  background-image: image-set(url("../img/fondo-1600.webp") type("image/webp"), url("../img/fondo-1600.jpg") type("image/jpeg"));
  isolation: isolate;
}
@media (max-width: 50rem) {
  .hero {
    background-image: url("../img/fondo-800.jpg");
    background-image: image-set(url("../img/fondo-800.webp") type("image/webp"), url("../img/fondo-800.jpg") type("image/jpeg"));
  }
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10, 20, 36, 0.92) 0%, rgba(10, 20, 36, 0.72) 45%, rgba(10, 20, 36, 0.25) 100%);
}
.hero .contenedor {
  padding-top: clamp(4rem, 12vw, 8rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
}
.hero-texto { max-width: 38rem; }
.hero .saludo {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--naranja);
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
}
.hero h1 {
  font-size: clamp(3.6rem, 11vw, 7.5rem);
  margin-bottom: 0.15em;
}
.hero .bajada {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--crema);
  margin: 0 0 1.25rem;
}
.hero p { color: rgba(255, 255, 255, 0.86); margin: 0 0 2rem; }

.botones { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.boton {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  line-height: 1.2;
}
.boton-principal { background: var(--naranja); color: var(--azul-noche); }
.boton-principal:hover { background: #ff7a33; color: var(--azul-noche); }
.boton-secundario { border-color: rgba(245, 228, 200, 0.55); color: var(--crema); }
.boton-secundario:hover { border-color: var(--crema); color: #fff; }

/* ---------- Categorías: tablero de números ---------- */

.seccion { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.seccion h2 { font-size: clamp(2.6rem, 6vw, 3.75rem); color: var(--azul-noche); }
.seccion .intro { max-width: 36rem; color: var(--gris); margin: -0.5rem 0 2.5rem; }

.categorias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.categoria {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 15rem;
  padding: 1.5rem;
  background: var(--azul-noche);
  color: var(--crema);
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
}
.categoria::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--naranja);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.categoria:hover { color: #fff; }
.categoria:hover::after, .categoria:focus-visible::after { transform: scaleX(1); }
.categoria .numero {
  font-family: var(--display);
  font-size: clamp(5rem, 14vw, 7.5rem);
  line-height: 0.85;
  color: var(--naranja);
}
.categoria .numero small { font-size: 0.5em; color: var(--crema); margin-left: 0.08em; }
.categoria .nombre { font-weight: 700; font-size: 1.05rem; }
.categoria .detalle { font-size: 0.92rem; color: rgba(245, 228, 200, 0.72); }

/* ---------- Bloque de contacto ---------- */

.contacto-bloque {
  background: var(--crema);
  border-top: 1px solid rgba(18, 34, 58, 0.08);
}
.contacto-bloque .contenedor {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .contacto-bloque .contenedor { grid-template-columns: 1.2fr 1fr; }
}
.contacto-bloque h2 { margin-bottom: 0.3em; }
.contacto-bloque p { margin: 0; color: var(--tinta); max-width: 32rem; }
.canales { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.canales a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border-radius: 6px;
  color: var(--azul-noche);
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
  border: 2px solid transparent;
}
.canales a:hover { border-color: var(--naranja); color: var(--azul-noche); }
.canales svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; fill: var(--naranja-oscuro); }
.canales small { display: block; font-weight: 500; color: var(--gris); font-size: 0.85rem; }

/* ---------- Páginas internas ---------- */

.cabecera {
  background: var(--azul-noche);
  color: var(--crema);
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
}
.cabecera .miga { margin: 0 0 1rem; font-size: 0.92rem; }
.cabecera .miga a { color: var(--crema); opacity: 0.8; }
.cabecera .miga a:hover { opacity: 1; color: #fff; }
.cabecera h1 { font-size: clamp(3.5rem, 12vw, 7rem); color: #fff; margin: 0; }
.cabecera h1 .acento { color: var(--naranja); }
.cabecera p { margin: 0.75rem 0 0; max-width: 34rem; color: rgba(245, 228, 200, 0.85); }

.subnav {
  background: var(--azul);
  overflow-x: auto;
}
.subnav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0.5rem 0; white-space: nowrap; }
.subnav a {
  display: block;
  padding: 0.4rem 0.9rem;
  color: var(--crema);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
}
.subnav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.subnav a[aria-current="page"] { background: var(--crema); color: var(--azul-noche); }

.bloque { margin-bottom: 3rem; }
.bloque h2 { font-size: clamp(2.2rem, 5vw, 3rem); color: var(--azul-noche); }

.vacio {
  border: 2px dashed rgba(37, 64, 115, 0.3);
  border-radius: 6px;
  padding: 1.75rem 1.5rem;
  color: var(--gris);
  background: #fff;
}
.vacio p { margin: 0; }
.vacio p + p { margin-top: 0.5rem; }

.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; min-width: 32rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e9e1d4; }
th { background: var(--azul-noche); color: var(--crema); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; }
td.num, th.num { text-align: center; font-variant-numeric: tabular-nums; }

.texto-largo { max-width: 42rem; }
.texto-largo h2 { margin-top: 1.5em; }

/* ---------- Formulario ---------- */

.formulario { display: grid; gap: 1.1rem; max-width: 40rem; }
.fila { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .fila { grid-template-columns: 1fr 1fr; } }
.campo label { display: block; font-weight: 700; margin-bottom: 0.35rem; font-size: 0.95rem; }
.campo .opcional { font-weight: 500; color: var(--gris); }
.campo input, .campo textarea, .campo select {
  width: 100%;
  font: inherit;
  padding: 0.8rem 0.9rem;
  border: 2px solid #d9cfbf;
  border-radius: 6px;
  background: #fff;
  color: var(--tinta);
}
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(255, 96, 12, 0.35); }
.campo textarea { min-height: 9rem; resize: vertical; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulario button { justify-self: start; border: 0; cursor: pointer; font-family: var(--texto); }
.aviso { padding: 1rem 1.2rem; border-radius: 6px; font-weight: 600; margin-bottom: 1.5rem; max-width: 40rem; }
.aviso-ok { background: #e3f1e6; color: #1f5130; }
.aviso-error { background: #fbe4dc; color: #8a2a06; }

.dos-columnas { display: grid; gap: 3rem; }
@media (min-width: 58rem) { .dos-columnas { grid-template-columns: 1.4fr 1fr; } }

/* ---------- Pie: columna centrada, ícono arriba de cada dato ---------- */

.footer {
  background: var(--azul-noche);
  color: var(--crema);
  padding: 3.5rem 0 2rem;
  text-align: center;
  border-top: 4px solid var(--naranja);
}
.footer .contenedor { display: flex; flex-direction: column; align-items: center; }
.footer-logo img { width: 6.5rem; margin: 0 auto 1rem; }
.footer-nombre {
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: #fff;
  margin: 0 0 2rem;
}
.footer h2 {
  font-size: 2rem;
  color: var(--naranja);
  letter-spacing: 0.03em;
  margin: 0 0 1.25rem;
}
.footer-contacto {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
@media (min-width: 48rem) {
  .footer-contacto { flex-direction: row; gap: 3.5rem; }
}
.footer-contacto a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--crema);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  word-break: break-word;
}
.footer-contacto svg { width: 1.9rem; height: 1.9rem; fill: currentColor; transition: color 0.2s ease; }
.footer-contacto a:hover { color: var(--naranja); }
.footer .legal {
  width: 100%;
  margin: 2.75rem 0 0;
  border-top: 1px solid rgba(245, 228, 200, 0.15);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(245, 228, 200, 0.65);
}

/* Categorías en celular: dos por fila, más compactas */
@media (max-width: 40rem) {
  .categorias { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .categoria { min-height: 11.5rem; padding: 1.1rem; }
  .categoria .numero { font-size: 3.9rem; }
  .categoria .nombre { font-size: 0.95rem; }
  .categoria .detalle { font-size: 0.82rem; line-height: 1.35; display: inline-block; margin-top: 0.2rem; }
}

/* Fixture embebido (iframe de la liga). El iframe no se toca: solo se le da un marco. */
.seccion-fixture { padding: clamp(1.5rem, 4vw, 3rem) 0; }
.marco-fixture {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e9e1d4;
}
.marco-fixture iframe { display: block; width: 100%; border: 0; }
@media (max-width: 40rem) {
  .seccion-fixture .contenedor { padding: 0; }
  .marco-fixture { border-radius: 0; border-left: 0; border-right: 0; }
}
