/* Calendario Getxo WP · estilos propios.
   La base (colores, fuentes, cabecera, pie, botones, tarjetas, títulos de sección)
   viene de la web del club: ../css/style.css, que se carga antes que este archivo.
   Aquí solo está lo que no existe en la web: banda del próximo partido, chips de equipo,
   pestañas, lista de partidos, tabla de parciales y tarjetas de avisos. */

:root {
  /* Propios del calendario (el resto de colores son los de la web) */
  --surface: #f6f5ef;
  --win: #1d6b3c;
  --loss: #a3281e;
  --warn: #8a5300;
  --warn-bg: #f6e7c8;
  --condensed: 'Barlow Condensed', 'Barlow', sans-serif;
  --text: 'Barlow', -apple-system, sans-serif;
}

button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.columna { max-width: 860px; }
.buscador input:focus-visible, .chip:focus-visible, .pestana:focus-visible, .fila:focus-visible { outline: 3px solid var(--yellow-dim); outline-offset: 2px; }

/* Botón pequeño (filas de partidos y calendarios) */
.btn-small { padding: 7px 14px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ── Banda negra con el próximo partido (estilo Topaketa) ─────── */
.banda-negra { background: var(--black); color: var(--ink-inv); padding: 40px 0 44px; border-bottom: 4px solid var(--yellow); position: relative; overflow: hidden; }
.banda-negra::before {
  content: ""; position: absolute; left: -12%; bottom: -70%; width: 560px; height: 560px; pointer-events: none;
  background: radial-gradient(circle, rgba(245,210,26,.14) 0%, rgba(245,210,26,0) 70%);
}
.banda-negra .wrap { position: relative; }
.banda-negra .section-head { margin-bottom: 28px; }
.banda-negra .kicker { color: var(--yellow); }
.banda-negra h1 { color: var(--ink-inv); }
.banda-negra .section-head p.lead { color: var(--ink-inv-muted); }
.banda-negra .lead a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }

.proximo { display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: center; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.proximo-fecha {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 150px; aspect-ratio: 1/1; background: var(--yellow); color: #111; border-radius: 12px;
  font-family: var(--condensed); font-weight: 800; text-transform: uppercase; line-height: .9;
}
.proximo-fecha .dia-sem { font-size: 20px; letter-spacing: .06em; }
.proximo-fecha .dia { font-size: 72px; }
.proximo-fecha .mes { font-size: 28px; letter-spacing: .04em; }
.proximo-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--condensed); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em;
  color: #111; background: var(--yellow); padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.proximo-tag.juego { background: #fff; }
.proximo h2 { font-size: clamp(30px, 4.6vw, 52px); color: var(--ink-inv); overflow-wrap: anywhere; }
.proximo-facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 36px; }
.proximo-facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proximo-facts strong { font-family: var(--condensed); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--yellow); }
.proximo-facts span { font-size: 18px; font-weight: 600; color: var(--ink-inv); }
.proximo .cta-row { margin-top: 24px; }
.proximo .btn-outline { border-color: var(--yellow); color: var(--yellow); }
.proximo .btn-outline:hover { color: #111; }
@media (max-width: 820px) {
  .proximo { grid-template-columns: 1fr; gap: 20px; }
  .proximo-fecha { width: auto; aspect-ratio: auto; flex-direction: row; gap: 12px; align-items: baseline; padding: 12px 18px; justify-self: start; }
  .proximo-fecha .dia { font-size: 48px; }
  .proximo-fecha .dia-sem, .proximo-fecha .mes { font-size: 24px; }
}

/* ── Contenido sobre papel ────────────────────────────────────── */
.contenido { padding: 36px 0 56px; }
.fuente-datos { color: var(--ink-muted); font-size: 14px; }
.columna { display: flex; flex-direction: column; gap: 22px; }
.equipos { display: flex; flex-direction: column; gap: 10px; }
.equipos .kicker { margin-bottom: 0; }
.ayuda { color: var(--ink-muted); font-size: 16px; }

/* Chips de equipo (como las píldoras de la web): punto con el color de la categoría */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 18px 10px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: transparent; color: var(--ink);
  font-family: var(--condensed); font-weight: 600; font-size: 17px; letter-spacing: .02em;
}
.chip::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--c1, var(--ink-muted)); flex: none; }
.chip.franjas::before { border-color: var(--c2); box-shadow: inset 0 0 0 2px var(--c1); }
.chip[aria-pressed="true"] { background: var(--black-2); border-color: var(--black-2); color: var(--ink-inv); }
.chip[aria-pressed="true"]::before { background: var(--c1); border-color: var(--c1); box-shadow: none; }
.chip.franjas[aria-pressed="true"]::before { background: linear-gradient(135deg, var(--c1) 0 50%, #000 50% 100%); border-color: var(--c1); }

/* Pestañas (como el menú de la web) */
.pestanas { display: flex; gap: 28px; border-bottom: 1px solid var(--line); }
.pestana {
  background: none; border: 0; cursor: pointer; padding: 8px 2px 10px; margin-bottom: -1px;
  font-family: var(--condensed); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink-muted); border-bottom: 3px solid transparent;
}
.pestana:hover { color: var(--ink); }
.pestana[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--yellow); }

.buscador input {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
}
.buscador input:focus { outline: none; border-color: var(--yellow-dim); }
.aviso-estado { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; }

/* ── Lista de partidos ───────────────────────────────────────── */
.lista { display: flex; flex-direction: column; gap: 30px; }
.grupo { display: flex; flex-direction: column; padding: 0; border-bottom: 0; }
.grupo-titulo { font-family: var(--condensed); font-weight: 800; font-size: 19px; letter-spacing: .04em; color: var(--ink); padding-bottom: 8px; border-bottom: 2px solid var(--ink); }

/* Raya de color a la izquierda: amarillo/negro a franjas, morado, azul… */
.partido { border-bottom: 1px solid var(--line); position: relative; padding-left: 16px; scroll-margin-top: 96px; }
.partido::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 6px; border-radius: 3px; background: var(--c1, var(--line)); }
.partido.franjas::before { background: repeating-linear-gradient(180deg, var(--c1) 0 7px, var(--c2) 7px 14px); }

.fila {
  width: 100%; background: none; border: 0; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 18px; align-items: center; padding: 14px 0;
}
.fila:hover .equipos-txt { color: #000; }
.cuando-col { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.cuando-col .dia { font-family: var(--condensed); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-muted); }
.cuando-col .hora { font-family: var(--condensed); font-weight: 800; font-size: 28px; line-height: 1; }
.cuando-col .hora.pf { font-family: var(--text); font-weight: 500; font-size: 14px; line-height: 1.25; color: var(--ink-muted); }
.centro { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cat { font-family: var(--condensed); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--yellow-dim); }
.equipos-txt { font-family: var(--condensed); font-weight: 800; font-size: 23px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.lugar { font-size: 15px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lugar .ca { font-weight: 600; color: var(--ink); }
.derecha { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.marcador { font-family: var(--condensed); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pastilla { font-family: var(--condensed); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 9px; border-radius: 999px; white-space: nowrap; border: 1.5px solid currentColor; }
.pastilla.v { color: var(--win); } .pastilla.d { color: var(--loss); } .pastilla.e { color: var(--ink-muted); }
.pastilla.aplazado, .pastilla.suspendido, .pastilla.pf { color: var(--warn); }
.pastilla.juego { background: var(--yellow); color: #111; border-color: var(--yellow); }
.flecha { position: relative; width: 22px; height: 22px; flex: none; }
.flecha::before, .flecha::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--yellow-dim); transform: translate(-50%, -50%); }
.flecha::before { width: 14px; height: 2px; }
.flecha::after { width: 2px; height: 14px; transition: transform .2s ease, opacity .2s ease; }
.fila[aria-expanded="true"] .flecha::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.detalle { padding: 0 0 18px 94px; display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.detalle p { color: var(--ink-muted); }
.detalle .table-wrap { max-width: 520px; margin-bottom: 0; }
.detalle .cta-row { gap: 12px; }
.parciales { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.parciales thead th { text-align: center; font-family: var(--condensed); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; color: var(--yellow); padding: 10px 12px; border-bottom: 2px solid var(--yellow-dim); }
.parciales tbody th, .parciales tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-dark); font-size: 16px; color: var(--ink-inv); text-align: center; }
.parciales tbody tr:last-child th, .parciales tbody tr:last-child td { border-bottom: 0; }
.parciales th:first-child { text-align: left; font-weight: 600; white-space: nowrap; }
.parciales .total { font-weight: 700; color: var(--yellow); }

.vacio { padding: 24px 0; color: var(--ink-muted); }
.vacio strong { display: block; color: var(--ink); font-family: var(--condensed); font-weight: 800; font-size: 24px; text-transform: uppercase; margin-bottom: 6px; line-height: 1; }

/* ── Avisos y calendarios: tarjetas negras como las de la web ─── */
.ajustes { padding-top: 56px; scroll-margin-top: 88px; }
/* Hasta 3 tarjetas por fila, del mismo ancho aunque alguna no salga (instalar, calendarios) */
.grid-ajustes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; align-items: start; }
/* .card viene de la web; aquí solo se apilan sus elementos con separación uniforme */
.grid-ajustes .card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.grid-ajustes .card .num, .grid-ajustes .card h3 { margin-bottom: 0; }
.card .nota { color: var(--ink-inv); border-left: 3px solid var(--yellow); background: var(--black-3); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; }
.card .btn-outline { border-color: var(--yellow); color: var(--yellow); }
.card .btn-outline:hover { color: #111; }
.calendarios { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; }
.calendarios li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line-dark); }
.calendarios .nombre { color: var(--ink-inv); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.calendarios .con-color::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c1); flex: none; }
.calendarios .con-color.franjas::before { background: linear-gradient(135deg, var(--c1) 0 50%, var(--c2) 50% 100%); box-shadow: 0 0 0 1.5px var(--c1); }
.calendarios .acc { display: flex; gap: 8px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 200;
  background: var(--black); color: var(--ink-inv); border-left: 4px solid var(--yellow);
  padding: 12px 18px; border-radius: var(--radius); font-size: 15px; max-width: calc(100% - 32px);
}

@media (max-width: 600px) {
  .fila { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 4px 12px; }
  .cuando-col .hora { font-size: 24px; }
  .equipos-txt { font-size: 20px; }
  .marcador { font-size: 28px; }
  .detalle { padding-left: 0; }
}
/* En móvil la web apila y centra los botones de .cta-row; en el detalle de un partido se quedan en fila. */
@media (max-width: 640px) {
  .detalle .cta-row { flex-direction: row; align-items: center; justify-content: flex-start; }
  .detalle .cta-row .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
