/* Diseño: cabecera azul marino fija, portada con foto de Otxartaga Berri y los próximos partidos del
   Senior A y B, y debajo bloques que alternan fondo claro, azul claro y azul marino. */
/* Tipos de letra guardados en la propia web (carpeta fuentes/), sin pedirlos a Google:
   así el visitante no se conecta a servidores de terceros. Licencia SIL Open Font License. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fuentes/archivo.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700 900; font-display: swap; src: url("fuentes/big-shoulders-display.woff2") format("woff2"); }

:root {
  --navy: #0b2a5b;
  --blue: #1757c2;
  --sky: #e9f0fb;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --ink: #0e1a2e;
  --muted: #56667f;
  --line: #d8e1ef;
  --on-navy: #ffffff;
  --on-navy-muted: #b9c8e6;
  --win: #177d43; --draw: #8f6409; --loss: #c0392b; --on-result: #ffffff;
  --wa: #0f7a40;
  --note-bg: #fff4d6; --note-ink: #6e4d00;
  --f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08142a; --surface: #0f1f3d; --sky: #0c1a33; --ink: #eaf0fb; --muted: #9eb0d0;
    --line: #213558; --blue: #6a9cff; --navy: #061a3d;
    --note-bg: #3a2e0c; --note-ink: #ffd77a; --win: #2fb36c; --draw: #c99a2e; --loss: #e0604f; --wa: #3ccf7a; --on-result: #08142a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08142a; --surface: #0f1f3d; --sky: #0c1a33; --ink: #eaf0fb; --muted: #9eb0d0;
  --line: #213558; --blue: #6a9cff; --navy: #061a3d;
  --note-bg: #3a2e0c; --note-ink: #ffd77a; --win: #2fb36c; --draw: #c99a2e; --loss: #e0604f; --wa: #3ccf7a; --on-result: #08142a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--navy); }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* Sobre fondo azul marino el contorno de foco va en blanco para que se vea */
header :focus-visible, footer :focus-visible, .topbar :focus-visible, .page-hero :focus-visible, .hero :focus-visible, .strip :focus-visible, section.dark :focus-visible { outline-color: #fff; }
/* ...salvo dentro de las piezas blancas que hay sobre ese fondo */
.hero .match :focus-visible, .foot-sponsors :focus-visible { outline-color: #1757c2; }
main:focus { outline: none; }
/* Texto solo para lectores de pantalla: no se ve, pero se lee */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: #0b2a5b; font-weight: 700; padding: 10px 14px; border-radius: 4px; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }
h1, h2, h3 { font-family: var(--f-display); line-height: .95; text-wrap: balance; margin: 0; text-transform: uppercase; letter-spacing: .01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.pending { display: inline-block; background: var(--note-bg); color: var(--note-ink); font: 700 11px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; vertical-align: middle; }

/* Cabecera con menú desplegable */
.topbar { background: #061a3d; color: #b9c8e6; font-size: 12.5px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; flex-wrap: wrap; }
.topbar a { text-decoration: none; color: #d6e0f3; }
.topbar a:hover { color: #fff; }
.topbar .socials { display: flex; gap: 14px; }
#cabecera { display: contents; } /* así la cabecera se queda fija arriba al bajar por la página */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--navy); color: var(--on-navy); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
header.top .wrap { display: flex; align-items: center; gap: 16px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 48px; height: 48px; }
.brand b { font: 900 23px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; display: block; }
.brand small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-muted); }
nav.menu { display: flex; align-items: center; gap: 2px; }
nav.menu > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
nav.menu li { position: relative; }
nav.menu a, nav.menu .drop-btn { display: block; font: 700 13.5px/1 var(--f-body); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; padding: 12px 11px; border-radius: 4px; color: var(--on-navy); background: none; border: 0; cursor: pointer; }
nav.menu a:hover, nav.menu .drop-btn:hover, nav.menu li.open > .drop-btn { background: rgba(255,255,255,.12); }
nav.menu a[aria-current="page"], nav.menu .drop-btn.current { box-shadow: inset 0 -3px 0 #fff; }
nav.menu .drop-btn::after { content: ""; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin: 0 0 3px 8px; }
nav.menu .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; list-style: none; margin: 6px 0 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 40px rgba(6,26,61,.25); }
nav.menu li.open > .sub { display: block; }
nav.menu .sub a { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; padding: 11px 12px; }
nav.menu .sub a small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
nav.menu .sub a:hover { background: var(--sky); }
nav.menu .sub a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--blue); background: var(--sky); }
nav.menu a.cta { background: #fff; color: #0b2a5b; margin-left: 8px; }
nav.menu a.cta:hover { background: #e9f0fb; }
.menu-btn { display: none; align-items: center; gap: 10px; background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--on-navy); font: 700 14px var(--f-body); padding: 10px 12px; border-radius: 4px; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.menu-btn i, .menu-btn i::before, .menu-btn i::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; }
.menu-btn i::before { top: -6px; } .menu-btn i::after { top: 6px; }
@media (max-width: 1240px) {
  .menu-btn { display: flex; }
  nav.menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); flex-direction: column; align-items: stretch; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid rgba(255,255,255,.12); max-height: calc(100vh - 70px); overflow-y: auto; }
  nav.menu.open { display: flex; box-shadow: 0 24px 40px rgba(6,26,61,.35), 0 0 0 100vmax rgba(6,26,61,.55); clip-path: inset(0 -100vmax -100vmax -100vmax); }
  nav.menu > ul { flex-direction: column; }
  nav.menu a, nav.menu .drop-btn { padding: 15px 8px; font-size: 16px; width: 100%; text-align: left; }
  nav.menu .drop-btn::after { float: right; margin-top: 4px; }
  nav.menu .sub { position: static; box-shadow: none; border: 0; background: rgba(255,255,255,.06); margin: 0 0 6px; }
  nav.menu .sub a { color: #fff; }
  nav.menu .sub a small { color: #b9c8e6; }
  nav.menu .sub a:hover, nav.menu .sub a[aria-current="page"] { background: rgba(255,255,255,.1); }
  nav.menu a.cta { margin: 10px 0 0; text-align: center; color: #0b2a5b; }
  .topbar .hide-sm { display: none; }
}

/* Cabecera de las páginas interiores */
.page-hero { position: relative; color: #fff; background: #0b2a5b var(--hero-img, url("img/tribuna.jpg")) center / cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,26,61,.97) 0%, rgba(11,42,91,.9) 55%, rgba(11,42,91,.6) 100%); }
.page-hero .wrap { position: relative; padding-block: 40px 44px; }
.crumbs { font-size: 13px; color: #b9c8e6; margin-bottom: 14px; }
.crumbs a { color: #d6e0f3; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-hero h1 { font-size: clamp(46px, 7vw, 84px); font-weight: 900; }
.page-hero p { margin: 12px 0 0; color: #d6e0f3; max-width: 60ch; font-size: 17px; }

/* Enlaces "ver más" y accesos */
.more { font: 700 13px/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick a { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
.quick a:hover { border-color: var(--blue); transform: translateY(-2px); }
.quick b { font: 800 24px/1 var(--f-display); text-transform: uppercase; }
.quick span { color: var(--muted); font-size: 14px; }
.home-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.home-grid > * { min-width: 0; }
.panel .panel-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-grid { grid-template-columns: 1fr; } }

/* Portada */
.hero { position: relative; color: #fff; background: #0b2a5b url("img/tribuna.jpg") center / cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,26,61,.96) 0%, rgba(11,42,91,.88) 45%, rgba(11,42,91,.55) 100%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding-block: 48px 56px; }
.hero .eyebrow { font: 700 13px/1.3 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #b9c8e6; }
.hero .eyebrow span { white-space: nowrap; }
@media (max-width: 560px) { .hero .eyebrow span { display: block; } .hero .eyebrow .sep { display: none; } }
.hero .eyebrow .sep { font-style: normal; }
.hero .hero-title { font-family: var(--f-display); line-height: .95; text-wrap: balance; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(32px, 4.6vw, 60px); font-weight: 900; margin: 12px 0 16px; color: #9ebff5; }
.hero .hero-title span { display: block; color: #fff; letter-spacing: .01em; font-size: clamp(68px, 10.5vw, 138px); line-height: .9; }
.hero p.lead { font-size: 18px; max-width: 42ch; color: #d6e0f3; margin: 0 0 26px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; font: 700 14px/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; text-decoration: none; padding: 15px 22px; border-radius: 4px; background: #fff; color: #0b2a5b; border: 2px solid #fff; cursor: pointer; }
.btn.ghost { background: transparent; color: #fff; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: var(--surface); }
.btn.line { background: transparent; border-color: var(--blue); color: var(--blue); }
.next { display: grid; gap: 14px; min-width: 0; }
.match { background: #fff; color: #0e1a2e; border-radius: 10px; padding: 18px 20px; box-shadow: 0 20px 44px rgba(0,0,0,.35); min-width: 0; }
.match .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 12px/1.2 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #56667f; }
.match .head b { color: #1757c2; }
.match .teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0; text-align: center; }
.match .team b { display: block; font: 800 20px/1.05 var(--f-display); text-transform: uppercase; margin-top: 8px; overflow-wrap: anywhere; }
.match .vs { font: 900 24px/1 var(--f-display); color: #1757c2; }
.crest-mini { width: 50px; height: 50px; margin: 0 auto; display: block; }
.crest-other { width: 46px; height: 46px; margin: 2px auto; border-radius: 50%; background: #e9f0fb; display: grid; place-items: center; font: 900 18px var(--f-display); color: #0b2a5b; }
.match .info { display: flex; justify-content: center; gap: 8px 16px; flex-wrap: wrap; border-top: 1px solid #d8e1ef; padding-top: 12px; font-size: 14px; color: #56667f; }
.match .info strong { color: #0e1a2e; }
.match .days { color: #fff; background: #1757c2; border-radius: 4px; padding: 2px 8px; font-weight: 700; }

/* Franja de resultados */
.strip { background: var(--navy); color: #fff; border-top: 1px solid rgba(255,255,255,.1); }
.strip .wrap { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 0; padding-block: 0; }
.strip .lbl { font: 800 18px/1.05 var(--f-display); text-transform: uppercase; padding: 16px 20px 16px 0; display: flex; align-items: center; }
.strip .res { padding: 14px 16px; border-left: 1px solid rgba(255,255,255,.12); min-width: 0; }
.strip .res small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #b9c8e6; }
.strip .res small { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.strip .o { font: 700 10px/1 var(--f-body); font-style: normal; letter-spacing: .08em; padding: 3px 6px; border-radius: 3px; color: var(--on-result); margin-left: auto; }
.strip .o.w { background: var(--win); } .strip .o.d { background: var(--draw); } .strip .o.l { background: var(--loss); }
.strip .row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.strip .row + .row { margin-top: 4px; }
.strip .row span { font-size: 14px; color: #d6e0f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.strip .row b { font: 800 20px/1 var(--f-display); font-variant-numeric: tabular-nums; color: #d6e0f3; }
.strip .row.us span, .strip .row.us b { color: #fff; font-weight: 700; }
.strip .row.us b { font-weight: 900; }
.strip .none { font-size: 14px; color: #b9c8e6; }

/* Secciones */
section.block { padding-block: 64px; }
section.alt { background: var(--sky); }
section.dark { background: var(--navy); color: #fff; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(40px, 6vw, 62px); font-weight: 900; }
.kicker { font: 700 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--blue); display: block; margin-bottom: 16px; }
section.dark .kicker { color: #b9c8e6; }
.sec-head p { margin: 0; color: var(--muted); max-width: 52ch; }
section.dark .sec-head p { color: #b9c8e6; }

/* Selector de equipo */
.team-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 700 13px/1 var(--f-body); text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 11px 15px; border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip:hover { border-color: var(--blue); }

/* Competición */
.comp { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.comp > div { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel > h3 { font-size: 24px; font-weight: 800; padding: 18px 20px 6px; }
.panel .sub { padding: 0 20px 10px; color: var(--muted); font-size: 13.5px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th { font: 700 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 12px 6px; border-bottom: 1px solid var(--line); }
td { text-align: center; padding: 9px 6px; border-bottom: 1px solid var(--line); }
td.t, th.t { text-align: left; }
td.t { font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.us td { background: var(--sky); font-weight: 800; }
tr.us td.t { color: var(--blue); }
td.pts { font-weight: 800; }
.pos { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; font-weight: 700; }
tr.first .pos { background: var(--blue); color: #fff; }
.tabs { display: flex; gap: 18px; padding: 12px 20px 0; border-bottom: 1px solid var(--line); }
.tabs button { font: 700 13px/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 0; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.games { list-style: none; margin: 0; padding: 0; }
.games li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line); }
.games li:first-child { border-top: 0; }
.games div.d { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; line-height: 1.3; }
.games div.d b { display: block; font: 800 19px/1 var(--f-display); color: var(--ink); }
.games .m { min-width: 0; font-weight: 600; font-size: 14.5px; }
.games .m .us { color: var(--blue); }
.games .m small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.score { font: 900 20px/1 var(--f-display); font-variant-numeric: tabular-nums; padding: 7px 9px; border-radius: 4px; color: var(--on-result); white-space: nowrap; }
.score.w { background: var(--win); } .score.d { background: var(--draw); } .score.l { background: var(--loss); }
.score.na { background: var(--line); color: var(--muted); font-size: 12px; font-family: var(--f-body); font-weight: 700; }
.hour { font: 700 12px/1 var(--f-body); color: var(--muted); background: var(--sky); padding: 8px 9px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.scorers { list-style: none; margin: 0; padding: 4px 20px 16px; display: grid; gap: 10px; }
.scorers li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.scorers b { font-weight: 600; font-size: 15px; }
.scorers b small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.scorers .cap { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.scorers .g { font: 900 26px/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--blue); }
.scorers .bar { grid-column: 1 / -1; height: 6px; background: var(--sky); border-radius: 3px; overflow: hidden; }
.scorers .bar i { display: block; height: 100%; background: var(--blue); }
.empty { padding: 14px 20px 20px; color: var(--muted); font-size: 14.5px; margin: 0; }
.source { margin-top: 16px; font-size: 13px; color: var(--muted); }
.source a { color: var(--blue); }

/* Noticias */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.news article:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; }
.news .pic { aspect-ratio: 16 / 9; max-width: 100%; width: 100%; object-fit: cover; display: block; background: var(--line); }
.news article:first-child .pic { aspect-ratio: auto; height: 100%; min-height: 260px; }
.news .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.news article:first-child .body { justify-content: center; padding: 28px 32px; }
.news .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.news .meta .cat { color: var(--blue); }
.news h2, .news h3 { font-size: 26px; font-weight: 800; }
.news .body p { white-space: pre-line; margin: 0; }
.news article:not(:first-child) .body p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.news .body .more { margin-top: auto; padding-top: 6px; }
.news article:first-child h2, .news article:first-child h3 { font-size: 40px; }
.news p { margin: 0; color: var(--muted); font-size: 15px; }

/* Primer equipo */
.squad-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.squad { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; min-width: 0; }
.player { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; min-width: 0; }
.player .dorsal { font: 900 30px/1 var(--f-display); color: var(--blue); width: 36px; text-align: center; font-variant-numeric: tabular-nums; flex: none; }
.player b { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.squad-label { grid-column: 1 / -1; font: 700 12px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 8px 0 2px; }
.staff { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px; }
.staff h3 { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.staff dl { margin: 0; display: grid; gap: 12px; }
.staff dt { font: 700 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #b9c8e6; }
.staff dd { margin: 4px 0 0; font-weight: 600; }

/* Equipos */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.team-card h2, .team-card h3 { font-size: 26px; font-weight: 800; }
.team-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.team-card .pos-line { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; }
.team-card button { align-self: flex-start; margin-top: 6px; font: 700 12px/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); background: none; border: 0; padding: 4px 0; cursor: pointer; }

/* Club: historia, palmarés, directiva, campo */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 3px solid var(--blue); }
.timeline li { padding: 22px 18px 0 0; position: relative; min-width: 0; }
.timeline li::before { content: ""; position: absolute; top: -10px; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--bg); border: 3px solid var(--blue); }
.timeline .y { font: 900 46px/1 var(--f-display); color: var(--blue); }
.timeline h2 { font-size: 21px; font-weight: 800; margin: 8px 0 6px; }
.timeline p { margin: 0; color: var(--muted); font-size: 14.5px; }
.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; margin-top: 44px; }
.story p { margin: 0 0 14px; max-width: 64ch; }
.founders { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; align-self: start; }
.founders h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.founders p { color: var(--muted); font-size: 14.5px; margin: 0 0 8px; }
.palmares { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.palmares .trophy-photo { margin: 0; }
.palmares .trophy-photo img { height: 100%; object-fit: cover; }
.palmares .honours { grid-template-columns: 1fr; grid-auto-rows: 1fr; margin-top: 0; }
.palmares .honour { display: flex; flex-direction: column; justify-content: center; }
.trophy-photo { margin: 0 0 18px; }
.trophy-photo.copas { margin-top: 18px; }
.trophy-photo img { display: block; width: 100%; height: auto; border-radius: 8px; }
.trophy-photo figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 960px) {
  .palmares { grid-template-columns: 1fr; }
  .palmares .trophy-photo img { height: auto; }
  .palmares .honours { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .palmares .honour:first-child { grid-column: 1 / -1; }
}
.card-socio .carnet { display: block; width: 100%; max-width: 250px; height: auto; margin: 4px 0 22px; transform: rotate(-3deg); border-radius: 10px; box-shadow: 0 12px 26px rgba(0,0,0,.4); }
.honours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 44px; }
.honour { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px; min-width: 0; }
.honour b { display: block; font: 900 36px/1 var(--f-display); }
.honour span { color: #b9c8e6; font-size: 14px; }
.club-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.board div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.board small { display: block; font: 700 11px/1.3 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.board b { font-weight: 600; }
.ground { align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ground img { display: block; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; object-fit: cover; }
.ground .facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.ground .facts div { padding: 14px 16px; border-right: 1px solid var(--line); }
.ground .facts div:last-child { border-right: 0; }
.ground .facts b { display: block; font: 900 28px/1 var(--f-display); color: var(--blue); }
.ground .facts small { color: var(--muted); font-size: 12.5px; }
.ground p { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
h2.mini { font-size: 30px; font-weight: 900; margin-bottom: 14px; }

/* Apoya al club */
.support { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.card-socio { background: linear-gradient(135deg, #0b2a5b, #1757c2); color: #fff; border-radius: 12px; padding: 28px; position: relative; overflow: hidden; }
.card-socio::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; background: url("img/escudo.webp") center / contain no-repeat; opacity: .14; }
.card-socio > * { position: relative; z-index: 1; }
.card-socio h2 { font-size: 40px; font-weight: 900; }
.card-socio .price { font: 900 64px/1 var(--f-display); margin: 18px 0 4px; }
.card-socio .price small { font: 600 16px var(--f-body); color: #b9c8e6; margin-left: 6px; }
.socio-other { margin: 0; color: #d6e0f3; font-weight: 600; }
.tickets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 420px; }
.tickets div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tickets small { display: block; font: 700 11px/1.3 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tickets b { font: 900 28px/1 var(--f-display); color: var(--blue); }
.card-socio ul { margin: 14px 0 22px; padding-left: 20px; color: #d6e0f3; }
.shop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.item .ph { aspect-ratio: 1; max-width: 100%; background: var(--sky); display: grid; place-items: center; position: relative; overflow: hidden; }
.item .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item .ph svg { width: 54%; height: auto; }
.item div.t { padding: 10px 12px 12px; }
.item b { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.item small { color: var(--muted); font-size: 12.5px; }
.sponsors { margin-top: 40px; }
.sponsor-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sponsor-row div { border: 1px dashed var(--line); background: var(--surface); border-radius: var(--radius); min-height: 86px; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--muted); font-size: 13.5px; }
.sponsor-row .logo { background: #ffffff; border-style: solid; padding: 14px 20px; }
.sponsor-row .logo img { max-width: 100%; max-height: 74px; object-fit: contain; }
.sponsor-row a.free { text-decoration: none; }
.sponsor-row a.free:hover div { border-color: var(--blue); color: var(--blue); }
.helpers { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; color: var(--muted); font-size: 14px; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.contact dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 20px; }
.contact dt { font: 700 12px/1.6 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #b9c8e6; }
.contact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.copy { font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: .08em; margin-left: 8px; background: none; border: 1px solid rgba(255,255,255,.35); color: #b9c8e6; border-radius: 3px; padding: 7px 10px; cursor: pointer; vertical-align: middle; }
.social { display: grid; gap: 10px; }
.social a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); text-decoration: none; }
.social a:hover { background: rgba(255,255,255,.08); }
.social svg { width: 28px; height: 28px; flex: none; }
.social b { display: block; font: 800 20px/1 var(--f-display); text-transform: uppercase; }
.social small { color: #b9c8e6; }

/* Pie de página */
footer { background: #061a3d; color: #b9c8e6; font-size: 14px; }
footer a { color: #d6e0f3; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
.foot-sponsors { background: #ffffff; color: #56667f; border-top: 1px solid #d8e1ef; }
.foot-sponsors .wrap { display: flex; align-items: center; gap: 14px 28px; flex-wrap: wrap; padding-block: 18px; }
.foot-sponsors span:first-child { font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; }
.foot-sponsor img { display: block; height: 52px; width: auto; max-width: 100%; }
.foot-sponsors a { color: #1757c2; font-weight: 600; font-size: 13.5px; margin-left: auto; }
.foot-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 28px; padding-block: 40px 28px; }
.foot-main > * { min-width: 0; }
.foot-main img { width: 56px; height: 56px; display: block; margin-bottom: 10px; }
.foot-main b { color: #fff; font: 800 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.foot-main p { margin: 6px 0 0; }
.foot-main ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-contact { display: grid; gap: 9px; align-content: start; overflow-wrap: anywhere; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.1); padding-block: 16px 22px; font-size: 12.5px; color: #8fa3c8; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.legal-links { display: flex; gap: 18px; }
.legal { max-width: 760px; }
.legal h2:first-child { margin-top: 0; }
.legal-data { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 14px; }
.legal-data dt { font: 700 12px/1.6 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.legal-data dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .legal-data { grid-template-columns: 1fr; gap: 2px; } .legal-data dd { margin-bottom: 8px; } }
@media (max-width: 760px) { .foot-main ul { gap: 2px; } .foot-main li a { display: inline-block; padding-block: 7px; } .foot-main { grid-template-columns: 1fr 1fr; } .foot-main > div:first-child, .foot-contact { grid-column: 1 / -1; } .foot-sponsors a { margin-left: 0; } }

/* Agenda de partidos (todos los equipos) */
.agenda { display: grid; gap: 22px; }
.agenda-day h3 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.agenda-day .panel .games li { grid-template-columns: 96px 1fr auto; }
.agenda-day .games div.d b { font-size: 17px; }
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 40; }
.subnav .wrap { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; }
.subnav .chip { white-space: nowrap; text-decoration: none; }
.chip[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.team-card { text-decoration: none; }
a.team-card:hover { border-color: var(--blue); }
.team-card .go { margin-top: 6px; font: 700 12px/1 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.team-card .go::after { content: " →"; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.stat b { display: block; font: 900 40px/1 var(--f-display); color: var(--blue); font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.form-dots { display: flex; gap: 6px; margin-top: 8px; }
.form-dots i { width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center; font: 700 11px/1 var(--f-body); font-style: normal; color: var(--on-result); }
.form-dots .w { background: var(--win); } .form-dots .d { background: var(--draw); } .form-dots .l { background: var(--loss); }

/* Colores y escudo */
.crest-block { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center; }
.crest-block img { width: 100%; max-width: 260px; height: auto; }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 14px; margin-top: 18px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.swatch i { display: block; height: 70px; border-bottom: 1px solid var(--line); }
.swatch span { display: block; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.prose p { margin: 0 0 14px; max-width: 64ch; }
.prose h2, .prose h3 { font-size: 30px; font-weight: 900; margin: 28px 0 12px; }
.ig-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ig-band h2 { font-size: clamp(34px, 5vw, 52px); font-weight: 900; }
.ig-band p { margin: 8px 0 0; color: #d6e0f3; }
.notice { background: var(--note-bg); color: var(--note-ink); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin-bottom: 20px; }
@media (max-width: 760px) { .crest-block { grid-template-columns: 1fr; } .crest-block img { max-width: 180px; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .subnav { top: calc(env(safe-area-inset-top, 0px) + 64px); } }

@media (max-width: 960px) {
  .hero .wrap, .comp, .story, .club-grid, .support, .contact, .squad-wrap { grid-template-columns: 1fr; }
  .news { grid-template-columns: 1fr 1fr; }
  .news article:first-child { grid-template-columns: 1fr; }
  .news article:first-child .pic { min-height: 0; aspect-ratio: 16 / 9; }
  .news article:first-child .body { padding: 18px 20px 22px; }
  .teams-grid, .honours, .shop, .sponsor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teams-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .timeline { grid-template-columns: 1fr 1fr 1fr; row-gap: 30px; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .strip .lbl { grid-column: 1 / -1; padding: 14px 0 4px; }
  .strip .res { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-left: 0; }
}
@media (max-width: 560px) {
  section.block { padding-block: 48px; }
  .news, .board { grid-template-columns: 1fr; }
  .news article:first-child h2, .news article:first-child h3 { font-size: 30px; }
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 3px solid var(--blue); }
  .timeline li { padding: 0 0 0 24px; }
  .timeline li::before { top: 6px; left: -10px; }
  .games li { grid-template-columns: 54px 1fr auto; padding: 11px 14px; }
  th.x, td.x { display: none; }
  .hour.tbc { display: none; }
  .strip .wrap { grid-template-columns: 1fr; }
  .brand small { display: none; }
  .match .team b { font-size: 17px; }
  .ground .facts b { font-size: 22px; }
  .honour b { font-size: 26px; }
  .honour { padding: 14px; }
}

/* Suscripción al calendario de partidos */
.cal-box { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 760px; }
.cal-teams { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cal-note { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.cal-note code { font-size: 12.5px; overflow-wrap: anywhere; color: var(--ink); }
.cal-note .copy { color: var(--blue); border-color: var(--line); }

/* Página de error (404) */
.offside { padding-block: clamp(40px, 8vw, 96px); }
.offside .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.offside h1 { font: 900 clamp(48px, 9vw, 96px)/.9 var(--f-display); text-transform: uppercase; margin: 0 0 16px; color: var(--ink); }
.offside p { max-width: 52ch; }
.offside-board { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 26px 22px; text-align: center; box-shadow: inset 0 0 0 3px rgba(255,255,255,.12); }
.offside-board small { display: block; font: 700 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #b9c8e6; margin-bottom: 8px; }
.offside-board b { font: 900 clamp(64px, 14vw, 140px)/.85 var(--f-display); color: #ffd23f; font-variant-numeric: tabular-nums; }
.offside-fact { margin-top: 32px; padding: 16px 20px; border-left: 4px solid var(--blue); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; max-width: 60ch; }
.offside-fact p { margin: 6px 0 0; color: var(--muted); }
@media (max-width: 640px) { .offside .wrap { grid-template-columns: 1fr; } .offside-board { justify-self: start; } }

/* Compartir por WhatsApp: circulito discreto con el icono */
.share { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; color: var(--wa); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.share:hover { background: var(--wa); border-color: var(--wa); color: var(--bg); }
.match { position: relative; }
.match .share { position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px; color: #0f7a40; border-color: #d8e1ef; background: #fff; }
.match .share:hover { background: #0f7a40; border-color: #0f7a40; color: #fff; }
.match .info { padding-inline: 36px; }
.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.agenda-head h3 { margin-bottom: 0; }
.form-line { padding: 0 20px 12px; display: flex; align-items: center; gap: 10px; }
.form-line small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.form-line .form-dots { margin-top: 0; }
.cal-team { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; background: var(--sky); border-radius: var(--radius); padding: 18px 20px; }
.cal-team p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cal-team a:not(.btn) { color: var(--blue); }

/* Cómo llegar a los campos de fuera: circulito con el icono de ubicación, como el de WhatsApp */
.maps { display: inline-grid; place-items: center; width: 28px; height: 28px; vertical-align: middle; margin-left: 4px; border-radius: 50%; color: var(--blue); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.maps:hover { background: var(--blue); border-color: var(--blue); color: var(--surface); }
.match .maps { position: absolute; right: 52px; bottom: 12px; width: 32px; height: 32px; margin: 0; color: #1757c2; border-color: #d8e1ef; background: #fff; }
.match .maps:hover { background: #1757c2; border-color: #1757c2; color: #fff; }

/* Ficha de partido: marcador grande arriba, cronología de goles y tarjetas, y alineaciones */
a.res { display: block; color: inherit; text-decoration: none; }
a.res:hover { background: rgba(255,255,255,.06); }
a.score { text-decoration: none; }
a.score:hover { outline: 2px solid var(--blue); outline-offset: 2px; }
.fb-meta { margin-top: 18px; font: 700 12px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--on-navy-muted); }
.fb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 18px 0 16px; text-align: center; }
.fb-team b { display: block; margin-top: 10px; font: 800 clamp(20px, 3.4vw, 30px)/1.05 var(--f-display); text-transform: uppercase; overflow-wrap: anywhere; }
.fb .crest-mini { width: 64px; height: 64px; }
.fb .crest-other { width: 60px; height: 60px; font-size: 22px; }
.fb-score { font: 900 clamp(54px, 11vw, 96px)/1 var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fb-score i { font-style: normal; opacity: .5; margin: 0 .12em; }
.fb-info { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: #d6e0f3; font-size: 15px; }
.fb-info > span { display: inline-flex; align-items: center; gap: 8px; }
.fb-info .maps { margin: 0; color: #1757c2; background: #fff; border-color: #fff; }
.fb-info .o { font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: 4px; color: #fff; }
.fb-info .o.w { background: #177d43; } .fb-info .o.d { background: #8f6409; } .fb-info .o.l { background: #c0392b; }
.fi-empty { color: var(--muted); margin: 0 0 24px; }
.fi-sec { margin-bottom: 28px; }
.ev-head { display: grid; grid-template-columns: 1fr 1fr; padding: 4px 20px 10px; font: 700 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ev-head span:last-child { text-align: right; }
.ev { list-style: none; margin: 0; padding: 6px 0 10px; position: relative; }
.ev::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.ev li { position: relative; display: flex; align-items: center; gap: 10px; width: 50%; padding: 8px 20px; font-size: 15px; }
.ev li.local { flex-direction: row-reverse; text-align: right; }
.ev li.visitante { margin-left: 50%; }
.ev li.us .ev-txt { font-weight: 700; }
.ev-min { flex: none; min-width: 34px; font: 800 18px/1 var(--f-display); color: var(--blue); font-variant-numeric: tabular-nums; }
.ev li.local .ev-min { text-align: right; }
.ev-ico { flex: none; display: inline-flex; gap: 2px; color: var(--ink); }
.ev-ico svg { width: 18px; height: 18px; }
.ev-txt { min-width: 0; overflow-wrap: anywhere; }
.ev-txt small { color: var(--muted); font-weight: 400; }
.card { display: inline-block; width: 11px; height: 15px; border-radius: 2px; }
.card.y { background: #f5c518; } .card.r { background: #d63a2f; }
.sec-mini { font: 700 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--blue); margin: 0 0 14px; }
.lu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 8px; }
.lu.us { border-color: var(--blue); }
.lu-list { list-style: none; margin: 0; padding: 0 20px 12px; }
.lu-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.lu-list li:first-child { border-top: 0; }
.dorsal { flex: none; width: 28px; text-align: center; font: 800 17px/1 var(--f-display); color: var(--blue); font-variant-numeric: tabular-nums; }
.lu-list abbr { text-decoration: none; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 1px 4px; }
.chg { margin-left: auto; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chg.out { color: var(--loss); } .chg.in { color: var(--win); }
.chg + .chg { margin-left: 6px; }
.lu-sub { padding: 10px 20px 2px; font: 700 11.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fi-nav { margin-top: 24px; }
@media (max-width: 560px) {
  .fb { gap: 6px; }
  .fb .crest-mini { width: 48px; height: 48px; }
  .fb .crest-other { width: 46px; height: 46px; font-size: 18px; }
  .ev li { padding: 8px 12px; gap: 8px; font-size: 14px; }
  .ev-min { min-width: 28px; font-size: 16px; }
  .fi-nav .btn { flex: 1 1 auto; text-align: center; padding-inline: 14px; }
}
.ev-sc { margin-left: 4px; font: 800 13px/1 var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.lu-tabs { display: none; }
@media (max-width: 760px) {
  .lu-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
  .lu-tabs button { font: 700 13px/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; padding: 11px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; overflow-wrap: anywhere; }
  .lu-tabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: var(--surface); }
  .lu-grid[data-show="local"] .lu.visitante, .lu-grid[data-show="visitante"] .lu.local { display: none; }
  .lu-list li { padding: 5px 0; font-size: 14.5px; }
  .lu > h3 { display: none; }
  .lu-list { padding-top: 6px; }
}

/* Página de cada equipo: foto del equipo, tarjetas por jugador y equipos sin clasificación (fútbol base) */
.comp.solo { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.team-photo { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.team-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.team-photo figcaption { padding: 10px 16px; font-size: 13px; color: var(--muted); }
.cards-list { list-style: none; margin: 0; padding: 4px 20px 16px; display: grid; gap: 8px; }
.cards-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.cards-list li:first-child { border-top: 0; }
.cards-list b { font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.cards-list .cnt { display: inline-flex; align-items: center; gap: 6px; flex: none; font: 800 17px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.cards-list .cnt .card + * { margin-left: 0; }
@media (min-width: 761px) { .team-photo img { aspect-ratio: 21 / 9; } }

/* Cronología del partido en el móvil: más sitio para nombres largos (Mahamadou...) */
@media (max-width: 760px) {
  .ev li { padding: 8px 10px; gap: 8px; font-size: 14px; }
  .ev-txt { hyphens: auto; min-width: 0; }
}

/* Patrocinadores y colaboradores */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sp { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.sp-box { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 16 / 9; max-width: 100%; display: grid; place-items: center; padding: 16px 20px; text-align: center; overflow: hidden; }
.sp-box { position: relative; }
.sp-box img { position: absolute; inset: 14px 18px; width: calc(100% - 36px); height: calc(100% - 28px); object-fit: contain; }
.sp-box.txt b { font: 800 19px/1.2 var(--f-display); color: #0f2f6b; text-wrap: balance; }
.sp-cap { display: flex; flex-direction: column; gap: 2px; padding-inline: 2px; }
.sp-cap b { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.sp-cap small { color: var(--muted); font-size: 13px; }
a.sp:hover .sp-box { border-color: var(--blue); }
.sp.free .sp-box { background: var(--surface); border-style: dashed; color: var(--muted); font-weight: 600; }
a.sp.free:hover .sp-box { color: var(--blue); }
.sp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.sp-cta > div { flex: 1 1 380px; min-width: 0; }
.sp-cta h2 { margin: 0 0 6px; }
.sp-cta p { margin: 0; color: var(--muted); }
.foot-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; flex: 1 1 0; min-width: 260px; }
.foot-sponsor img { height: 40px; max-width: 130px; object-fit: contain; }
.foot-sponsor.txt { font: 700 13px/1.2 var(--f-body); color: #0f2f6b; }
@media (max-width: 560px) {
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sp-box { padding: 10px 12px; }
  .sp-box.txt b { font-size: 15px; }
  .sp-cap b { font-size: 13.5px; }
  .sp-cap small { font-size: 12px; }
  .foot-sponsors .wrap { flex-direction: column; align-items: flex-start; }
  .foot-logos { gap: 10px 20px; flex-basis: auto; min-width: 0; }
  .foot-sponsor img { height: 32px; max-width: 110px; }
  .sp-box img { inset: 10px 12px; width: calc(100% - 24px); height: calc(100% - 20px); }
  .foot-sponsor.txt { font-size: 12px; }
}

/* Botón «Al calendario» en la cabecera del panel de Partidos */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 6px 20px; position: relative; }
.panel-head h3 { font-size: 24px; font-weight: 800; }
.cal-pop > summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: 700 12.5px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 999px; padding: 8px 13px; white-space: nowrap; }
.cal-pop > summary::-webkit-details-marker { display: none; }
.cal-pop[open] > summary, .cal-pop > summary:hover { background: var(--blue); color: var(--surface); }
.cal-menu { position: absolute; right: 12px; top: calc(100% + 4px); z-index: 20; width: min(300px, calc(100vw - 48px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(6, 26, 61, .28); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.cal-menu b { font-size: 15px; line-height: 1.3; }
.cal-menu small { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.cal-menu .btn { text-align: center; padding: 13px 16px; }
.cal-menu .more { font-size: 13.5px; text-align: center; padding-top: 4px; }

/* Portada: tarjeta que gira entre el destacado y el texto del club */
.flip { min-width: 0; perspective: 1600px; }
/* Curva simétrica: a mitad de tiempo la tarjeta está justo de canto (90°), que es cuando se cambia de cara */
.flip-in { display: grid; transition: transform .8s cubic-bezier(.65, 0, .35, 1); transform-style: preserve-3d; }
.flip .face { grid-area: 1 / 1; min-width: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; align-self: center; }
.flip.flipping .face.club { transform: rotateY(180deg); }
/* La cara oculta se esconde de verdad a mitad del giro (no todos los navegadores respetan backface-visibility) */
.flip.flipping .face { transition: visibility 0s .4s; }
.flip.flipping .face.club, .flip.flipping.on-club .face.dest { visibility: hidden; }
.flip.flipping.on-club .face.club { visibility: visible; }
.flip.flipping.on-club .flip-in { transform: rotateY(180deg); }
.face.dest { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 26px; align-items: center; }
/* La foto del destacado va recortada (sin fondo): solo la sombra del propio objeto */
.dest-pic { display: block; aspect-ratio: 1; max-width: 100%; }
.dest-pic img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 16px 22px rgba(0,0,0,.45)); }
.face.dest h2 { font-size: clamp(38px, 4.6vw, 64px); font-weight: 900; line-height: .95; margin: 10px 0 14px; text-wrap: balance; }
.face.dest .lead { margin-bottom: 22px; }
.flip-dots { display: flex; gap: 8px; margin-top: 22px; }
.flip-dots button { width: 28px; height: 6px; border-radius: 3px; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.flip-dots button[aria-pressed="true"] { background: #fff; }
@media (max-width: 560px) {
  .face.dest { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; }
  .face.dest .btns { grid-column: 1 / -1; }
  .face.dest .dest-txt { display: contents; }
  .face.dest .dest-txt > :not(.btns) { grid-column: 2; }
  .face.dest .dest-pic { grid-row: 1 / span 3; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-in { transition: none; transform: none !important; }
  .flip.flipping .face { transform: none; transition: opacity .4s; }
  .flip.flipping .face.club, .flip.flipping.on-club .face.dest { opacity: 0; visibility: hidden; }
  .flip.flipping.on-club .face.club { opacity: 1; visibility: visible; }
}
