/*
Theme Name: Futbol.click
Description: Tema propio de futbol.click: ligero, móvil primero, sin constructores visuales. Pensado para las páginas de datos de Liga MX del plugin Futbol.click Datos.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: futbolclick
*/

:root {
  --tinta: #12161b;
  --tinta-suave: #3a424c;
  --gris: #5f6670;
  --borde: #e3e6ea;
  --fondo: #ffffff;
  --fondo-suave: #f6f7f9;
  --acento: #5f889e;        /* el azul del ratón del logo */
  --acento-oscuro: #3f6579;
  --verde: #0b7a3e;
  --ancho: 1080px;
  --texto: 720px;
  --radio: 12px;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--fuente); color: var(--tinta); background: var(--fondo); }
img { max-width: 100%; height: auto; }
a { color: var(--acento-oscuro); text-underline-offset: .18em; }
a:hover { color: var(--tinta); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: 0 0 .6rem; }
h2 { font-size: 1.45rem; margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 1rem; top: 1rem; z-index: 99; background: #fff; padding: .5rem 1rem; border-radius: 8px; }
.contenedor { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--borde); }
.cabecera .contenedor { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.marca { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--tinta); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; margin-right: auto; }
.marca img { height: 42px; width: auto; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.marca:hover img { transform: rotate(-8deg) scale(1.06); }
.marca b { color: var(--acento); font-weight: 800; }
.menu-boton { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.nav a { position: relative; display: block; padding: .5rem .7rem; color: var(--tinta-suave); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 8px; }
.nav a::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .3rem; height: 2px; background: var(--acento); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.nav a:hover::after, .nav .current-menu-item > a::after, .nav .current_page_item > a::after, .nav .current-menu-ancestor > a::after { transform: scaleX(1); }
.nav a:hover, .nav .current-menu-item > a { color: var(--tinta); }
.nav .sub-menu { display: none; }

@media (max-width: 760px) {
  .menu-boton { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; cursor: pointer; }
  .menu-boton span, .menu-boton span::before, .menu-boton span::after { display: block; width: 18px; height: 2px; background: var(--tinta); position: relative; transition: transform .25s, background .25s; }
  .menu-boton span::before, .menu-boton span::after { content: ""; position: absolute; left: 0; }
  .menu-boton span::before { top: -6px; } .menu-boton span::after { top: 6px; }
  .menu-abierto .menu-boton span { background: transparent; }
  .menu-abierto .menu-boton span::before { transform: translateY(6px) rotate(45deg); }
  .menu-abierto .menu-boton span::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--borde); clip-path: inset(0 0 100% 0); transition: clip-path .35s cubic-bezier(.2,.7,.2,1); }
  .menu-abierto .nav { clip-path: inset(0 0 0 0); }
  .nav ul { flex-direction: column; padding: .5rem 16px 1rem; }
  .nav li { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
  .menu-abierto .nav li { opacity: 1; transform: none; }
  .menu-abierto .nav li:nth-child(2) { transition-delay: 40ms; } .menu-abierto .nav li:nth-child(3) { transition-delay: 80ms; }
  .menu-abierto .nav li:nth-child(4) { transition-delay: 120ms; } .menu-abierto .nav li:nth-child(5) { transition-delay: 160ms; }
  .nav a { padding: .8rem .2rem; font-size: 1.05rem; }
  .nav a::after { left: .2rem; right: auto; width: 2rem; }
}

/* Contenido */
main { padding: 2rem 0 3rem; min-height: 60vh; }
.migas { font-size: .85rem; color: var(--gris); margin-bottom: .75rem; }
.migas a { color: var(--gris); text-decoration: none; }
.migas a:hover { color: var(--tinta); text-decoration: underline; }
.titulo { overflow: hidden; }
.titulo h1 { animation: revela-texto .8s cubic-bezier(.2,.7,.2,1) both; }
.contenido { animation: aparece .6s .15s ease both; }
.contenido > p, .contenido > ul, .contenido > ol, .contenido > h2, .contenido > h3, .contenido > blockquote { max-width: var(--texto); }
.contenido ul, .contenido ol { padding-left: 1.25rem; }
.contenido li { margin: .25rem 0; }
.contenido table:not(.fc-tabla) { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; }
.contenido table:not(.fc-tabla) th, .contenido table:not(.fc-tabla) td { border-bottom: 1px solid var(--borde); padding: .5rem; text-align: left; }
.entradilla { font-size: 1.1rem; color: var(--tinta-suave); max-width: var(--texto); }

/* Portada */
.portada-hero { background: linear-gradient(160deg, var(--fondo-suave), #fff 60%); border-bottom: 1px solid var(--borde); padding: 2.5rem 0 2rem; margin: -2rem 0 2rem; }
.portada-hero h1 { max-width: 16ch; }
.atajos { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.atajos a { display: block; padding: 1rem; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; text-decoration: none; color: var(--tinta); font-weight: 700; transition: transform .25s, box-shadow .25s, border-color .25s; animation: aparece .5s ease both; }
.atajos li:nth-child(2) a { animation-delay: 60ms; } .atajos li:nth-child(3) a { animation-delay: 120ms; } .atajos li:nth-child(4) a { animation-delay: 180ms; }
.atajos a span { display: block; font-weight: 400; font-size: .85rem; color: var(--gris); }
.atajos a:hover { transform: translateY(-2px); border-color: var(--acento); box-shadow: 0 10px 24px -16px var(--acento-oscuro); }
@media (min-width: 760px) { .atajos { grid-template-columns: repeat(4, 1fr); } }

/* Rejilla de equipos (página /equipos/ y /a-que-hora-juega/) */
.rejilla-hijas { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; list-style: none; padding: 0; margin: 1rem 0; }
.rejilla-hijas a { display: block; padding: .8rem 1rem; border: 1px solid var(--borde); border-radius: var(--radio); text-decoration: none; color: var(--tinta); font-weight: 600; transition: border-color .2s, background .2s; }
.rejilla-hijas a:hover { border-color: var(--acento); background: var(--fondo-suave); }
@media (min-width: 760px) { .rejilla-hijas { grid-template-columns: repeat(3, 1fr); } }

/* Pie */
.pie { border-top: 1px solid var(--borde); background: var(--fondo-suave); padding: 2rem 0; font-size: .9rem; color: var(--gris); }
.pie .contenedor { display: grid; gap: 1rem; }
.pie ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.pie a { color: var(--tinta-suave); text-decoration: none; }
.pie a:hover { color: var(--tinta); text-decoration: underline; }
.pie .marca-pie { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--tinta); }
.pie .marca-pie img { height: 32px; width: auto; }

/* 404 y búsqueda */
.buscador { display: flex; gap: .5rem; max-width: 480px; margin: 1rem 0; }
.buscador input { flex: 1; padding: .7rem .9rem; border: 1px solid var(--borde); border-radius: 10px; font: inherit; }
.buscador button { padding: .7rem 1.1rem; border: 0; border-radius: 10px; background: var(--tinta); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.resultados { list-style: none; padding: 0; }
.resultados li { padding: .8rem 0; border-bottom: 1px solid var(--borde); }

@keyframes revela-texto { from { transform: translateY(105%); } to { transform: none; } }
@keyframes aparece { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
