/* RAQIO · imagen de la portada en las páginas de dentro (26/11/2026).
   Antonio: «que al darle a torneos, circuitos, ranking… no se vea tan Excel».
   Se carga la última en layouts/publico y layouts/jugador. Cambia la paleta y
   la tipografía por variables (pb-tema y pb-cuadros ya las usan) y repasa
   tarjetas, tablas, pestañas y botones. Contenido sobre fondo claro para que
   cuadros y resultados se lean bien también en las pantallas del club. */

body.pb-pub {
  --pb-surface: #ffffff;
  --pb-surface-2: #f0efea;
  --pb-bg: #f5f4f0;
  --pb-ink: #111111;
  --pb-ink-2: #4a4a4a;
  --pb-ink-3: #6b6b6b;
  --pb-line: rgba(17, 17, 17, .1);
  --pb-ball: #FFD200;
  --pb-ball-soft: #fff4c2;
  --pb-text: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pb-cond: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rq-negro: #0A0A0A;
  --rq-y: #FFD200;
  --rq-y2: #FFE15C;
  --rq-ease: cubic-bezier(.16, 1, .3, 1);
  background: var(--pb-bg) !important;
  font-family: var(--pb-text);
  color: var(--pb-ink);
  -webkit-font-smoothing: antialiased;
}
body.pb-pub .pbx {
  --pbx-surface: #ffffff;
  --pbx-surface-2: #f0efea;
  --pbx-ink: #111111;
  --pbx-ink-2: #4a4a4a;
  --pbx-ink-3: #5f5f5f;
  --pbx-line: rgba(17, 17, 17, .12);
  --pbx-ball: #FFD200;
  --pbx-ball-ink: #111111;
  --pbx-text: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pbx-cond: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- tipografía: la del cartel (Montserrat 600-700), sin mayúsculas estrechas ---------- */
body.pb-pub h1, body.pb-pub h2, body.pb-pub h3 {
  font-family: var(--pb-text); font-weight: 700; text-transform: none; letter-spacing: -.015em; line-height: 1.08;
}
body.pb-pub h4, body.pb-pub h5, body.pb-pub h6 { font-family: var(--pb-text); font-weight: 700; text-transform: none; letter-spacing: -.005em; }
body.pb-pub label:not(.pbx-field):not(.form-check-label):not(.btn) {
  font: 700 12px/1.2 var(--pb-text); letter-spacing: .12em; text-transform: uppercase; color: var(--pb-ink-2);
}
body.pb-pub .publico-card h1 { font-size: clamp(26px, 3.2vw, 38px); }
body.pb-pub a { color: var(--pb-ink); text-decoration-color: var(--rq-y); text-underline-offset: 3px; }

/* ---------- contenedor ---------- */
body.pb-pub .publico-wrap, body.pb-pub .publico-wrap-wide { margin-top: 28px; margin-bottom: 56px; }
body.pb-pub .publico-wrap-wide { max-width: 1180px; }

/* ---------- cabecera RAQIO (como la portada) ---------- */
.rqh { position: sticky; top: 0; z-index: 60; background: rgba(10, 10, 10, .92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); font-family: var(--pb-text); }
.rqh-bar { max-width: 1400px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 40px); display: flex; align-items: center; gap: 24px; }
.rqh-logo { display: flex; text-decoration: none !important; flex-shrink: 0; }
.rqh .rq-logo { display: flex; align-items: center; gap: 10px; background: none; padding: 0; }
.rqh .rq-simbolo { height: 42px; width: auto; }
.rqh .rq-nombre { height: 19px; width: auto; }
.rqh-nav { display: flex; gap: 2px; margin-left: auto; }
body.pb-pub .rqh-nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 10px 14px; border-radius: 999px; transition: background .25s, color .25s; }
body.pb-pub .rqh-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.pb-pub .rqh-nav a.on { color: var(--rq-y); }
body.pb-pub .rqh-acceso { text-decoration: none; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--rq-y); color: var(--rq-y); white-space: nowrap; transition: background .25s, color .25s; }
body.pb-pub .rqh-acceso:hover { background: var(--rq-y); color: var(--rq-negro); }
.rqh-toggle { display: none; width: 44px; height: 44px; border: 0; background: rgba(255, 255, 255, .08); border-radius: 12px; cursor: pointer; position: relative; flex-shrink: 0; }
.rqh-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--rq-ease), top .35s var(--rq-ease); }
.rqh-toggle span:first-child { top: 17px; }
.rqh-toggle span:last-child { top: 25px; left: 18px; }
.rqh-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.rqh-toggle[aria-expanded="true"] span:last-child { top: 21px; left: 12px; transform: rotate(-45deg); }
.rqh :focus-visible, .rqf :focus-visible { outline: 3px solid var(--rq-y); outline-offset: 3px; border-radius: 6px; }

/* ---------- pie RAQIO (como la portada) ---------- */
.rqf { background: var(--rq-negro); color: #fff; padding: 64px 0 28px; font-family: var(--pb-text); }
.rqf-in { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.rqf-logo img { width: 200px; height: auto; }
.rqf-claim { margin: 16px 0 0; font-style: italic; font-weight: 500; font-size: 15px; color: #fff; }
.rqf-claim i { color: var(--rq-y); font-weight: 700; }
.rqf-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rqf-nav div { display: flex; flex-direction: column; gap: 10px; }
.rqf-nav b { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--rq-y); margin-bottom: 4px; }
body.pb-pub .rqf-nav a { color: #d6d6d6; text-decoration: none; font-weight: 500; font-size: 15px; }
body.pb-pub .rqf-nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--rq-y); }
.rqf-bottom { max-width: 1240px; margin: 48px auto 0; padding: 22px clamp(16px, 4vw, 40px) 0; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #a3a3a3; font-size: 14px; }
body.pb-pub .rqf-bottom a { color: #fff; font-weight: 700; text-decoration-color: var(--rq-y); }

/* ---------- tarjetas ---------- */
body.pb-pub .publico-card, body.pb-pub .stat-card {
  border: 0; border-radius: 22px; box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 18px 40px -28px rgba(17, 17, 17, .28);
}
body.pb-pub .publico-card { padding: clamp(20px, 3vw, 34px); }

/* ---------- tablas: sin rejilla «de Excel» ---------- */
body.pb-pub .table > thead > tr > th, body.pb-pub .table thead th, body.pb-pub .ck-table th, body.pb-pub .pbx .pbx-table th {
  font: 700 11.5px/1.2 var(--pb-text); letter-spacing: .14em; text-transform: uppercase; color: var(--pb-ink-3);
  border-bottom: 1px solid var(--pb-line) !important; background: transparent; padding-top: 12px; padding-bottom: 12px;
}
body.pb-pub .ck-table td, body.pb-pub .publico-card .ck-table td { border-bottom: 1px solid rgba(17, 17, 17, .06); padding: 13px 8px; }
body.pb-pub .ck-table tbody tr { transition: background .2s; }
body.pb-pub .ck-table tbody tr:hover td { background: #faf9f5; }
body.pb-pub .ck-table tbody tr:last-child td { border-bottom: 0; }
/* el nombre del jugador va a la izquierda (antes salía centrado) */
body.pb-pub .publico-card .ck-table .ck-l, body.pb-pub .ck-table th.ck-l { text-align: left; }
body.pb-pub .ck-table td.ck-l a { font-weight: 700; color: var(--pb-ink); border-bottom: 0; text-decoration: none; }
body.pb-pub .ck-table td.ck-l a:hover { color: var(--pb-ink); text-decoration: underline; text-decoration-color: var(--rq-y); text-decoration-thickness: 2px; }
body.pb-pub .ck-pos b { width: 34px; height: 34px; border-radius: 10px; background: var(--pb-surface-2); font-weight: 800; }
body.pb-pub .ck-table tr.top1 .ck-pos b { background: var(--rq-y); color: var(--rq-negro); }
body.pb-pub .ck-table tr.top2 .ck-pos b { background: #e4e4e4; }
body.pb-pub .ck-table tr.top3 .ck-pos b { background: #f0dcc4; }
body.pb-pub .ck-table tr.yo td { background: #fff7d1; }
body.pb-pub .ck-table tr.yo td:first-child { box-shadow: inset 4px 0 0 var(--rq-y); }
body.pb-pub .table > tbody > tr:hover > * { background: #faf9f5 !important; }

/* ---------- pestañas y filtros: pastillas negras / amarillas ---------- */
body.pb-pub .ck-cat, body.pb-pub .pbx .pbx-tab {
  border-radius: 999px; border: 1.5px solid var(--pb-line); background: #fff; color: var(--pb-ink); font: 700 14px/1 var(--pb-text);
  letter-spacing: 0; text-transform: none; min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
}
body.pb-pub .ck-cat:hover, body.pb-pub .pbx .pbx-tab:hover { border-color: var(--pb-ink); }
body.pb-pub .ck-cat.active, body.pb-pub .pbx .pbx-tab.active, body.pb-pub .pbx .pbx-tab[aria-selected="true"] { background: var(--rq-negro); border-color: var(--rq-negro); color: var(--rq-y); }
body.pb-pub .pbx .pbx-seg { border-radius: 999px; border-color: var(--pb-line); }
body.pb-pub .pbx .pbx-seg button { font: 700 13.5px/1 var(--pb-text); letter-spacing: 0; text-transform: none; padding: 10px 16px; }
body.pb-pub .pbx .pbx-seg button.active { background: var(--rq-negro); color: var(--rq-y); }
body.pb-pub .pb-vista-tab {
  font: 700 15px/1 var(--pb-text); letter-spacing: 0; text-transform: none; border-radius: 999px; border: 1.5px solid var(--pb-line); background: #fff; color: var(--pb-ink);
}
body.pb-pub .pb-vista-tab.active { background: var(--rq-negro); border-color: var(--rq-negro); color: var(--rq-y); }
body.pb-pub .live-dia-tab { font: 700 13.5px/1 var(--pb-text); letter-spacing: 0; text-transform: none; border-radius: 999px; }
body.pb-pub .jug-tab { font: 600 14px/1 var(--pb-text); letter-spacing: 0; text-transform: none; }

/* ---------- botones e insignias ---------- */
body.pb-pub .pf5-btn, body.pb-pub .btn-dark, body.pb-pub .btn-primary {
  font: 700 14px/1 var(--pb-text); letter-spacing: 0; text-transform: none; border-radius: 999px; background: var(--rq-negro); border-color: var(--rq-negro); color: var(--rq-y);
}
body.pb-pub .pf5-btn:hover, body.pb-pub .btn-dark:hover, body.pb-pub .btn-primary:hover { background: #000; color: var(--rq-y2); }
body.pb-pub .pf5-badge { font: 800 11px/1 var(--pb-text); letter-spacing: .12em; border-radius: 999px; padding: 6px 10px; }

/* ---------- formularios ---------- */
body.pb-pub .form-control, body.pb-pub .form-select {
  font-family: var(--pb-text); font-size: 16px; border-radius: 12px; border: 1.5px solid rgba(17, 17, 17, .14); min-height: 48px; padding: 10px 14px; background-color: #fff;
}
body.pb-pub .form-control:focus, body.pb-pub .form-select:focus { border-color: var(--pb-ink); box-shadow: 0 0 0 3px var(--rq-y); }
body.pb-pub .form-check-input:checked { background-color: var(--rq-negro); border-color: var(--rq-negro); }
body.pb-pub .btn { border-radius: 999px; font-family: var(--pb-text); font-weight: 700; }

/* ---------- listado de torneos ---------- */
body.pb-pub .pf5-card { border: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 18px 40px -28px rgba(17, 17, 17, .3); transition: transform .45s var(--rq-ease), box-shadow .45s var(--rq-ease); }
body.pb-pub .pf5-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(17, 17, 17, .45); }
body.pb-pub .pf5-card-img-ph { background: var(--rq-negro); color: var(--rq-y); }
body.pb-pub .pf5-card h3 { font-size: 20px; font-weight: 700; text-transform: none; letter-spacing: -.01em; }
body.pb-pub .pf5-section-title { font-family: var(--pb-text); text-transform: none; letter-spacing: -.01em; font-size: 22px; font-weight: 700; border-bottom-width: 1px; }

/* ---------- página de un torneo ---------- */
body.pb-pub .torneo-cartel-placeholder { background: var(--rq-negro); }
body.pb-pub .torneo-cartel-placeholder i { color: var(--rq-y); }

/* modo pantalla (TV del club): sin cabecera ni pie */
body.pb-pantalla .rqh, body.pb-pantalla .rqf { display: none !important; }

/* ---------- móvil ---------- */
@media (max-width: 960px) {
  .rqh-toggle { display: block; }
  .rqh-bar { gap: 12px; }
  .rqh-nav { position: fixed; left: 0; right: 0; top: 70px; flex-direction: column; gap: 0; padding: 8px clamp(16px, 4vw, 40px) 22px; background: #0A0A0A; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
    transform: translateY(-120%); visibility: hidden; transition: transform .45s var(--rq-ease), visibility 0s .45s; margin: 0; }
  .rqh-nav.open { transform: none; visibility: visible; transition: transform .45s var(--rq-ease); }
  body.pb-pub .rqh-nav a { font-size: 22px; font-weight: 700; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .rqh-acceso { margin-left: auto; }
  .rqf-in { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rqh .rq-simbolo { height: 34px; }
  .rqh .rq-nombre { height: 15px; }
  body.pb-pub .rqh-acceso { padding: 9px 14px; font-size: 13px; }
  .rqf-nav { grid-template-columns: 1fr 1fr; }
  body.pb-pub .publico-card { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .rqh-nav, .rqh-toggle span, body.pb-pub .pf5-card { transition: none !important; }
}
