/* ═══════════════════════════════════════════════════════════════════
   ROC · DISEÑO COMÚN (PRO)  ·  v2.0  ·  2026-11
   -------------------------------------------------------------------
   Se carga en todas las páginas públicas, DESPUÉS de sus estilos.

   1. Menú superior único (lo construye roc-pro.js)
   2. Móvil: barra con ☰ y menú deslizante; nada se sale de la pantalla
   3. Cabeceras de página con el mismo estilo
   4. Tarjetas, botones y tablas: reacción al pasar el ratón
   5. Animaciones de entrada (las hace roc-pro.js con GSAP)
   Para quitarlo: borrar las líneas "ROC pro" de la página.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --rp-rojo: #e11d48;
  --rp-rojo2: #ff3b62;
  --rp-fondo: #07090d;
  --rp-linea: rgba(255,255,255,.09);
  --rp-panel: #12161d;
  --rp-apagado: #8b95a3;
  --rp-display: 'Rajdhani', 'Inter', sans-serif;
  --rp-curva: cubic-bezier(.22, .8, .3, 1);
  --rp-alto: 62px;
}

/* ------------------------------------------------------ 1. MENÚ SUPERIOR */
.rp-nav { position: fixed; left: 0; right: 0; top: 0; z-index: 9500; height: 74px; display: flex; align-items: center; gap: 26px;
  padding: 0 clamp(16px, 3vw, 44px); box-sizing: border-box; font-family: 'Inter', system-ui, sans-serif;
  transition: background .35s, box-shadow .35s, height .35s; }
.rp-nav.solida { height: var(--rp-alto); background: rgba(7,9,13,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--rp-linea), 0 14px 40px rgba(0,0,0,.45); }
.rp-nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--rp-rojo) 20%, var(--rp-rojo) 80%, transparent);
  transform: scaleX(0); transition: transform .5s var(--rp-curva); }
.rp-nav.solida::after { transform: scaleX(1); }
.rp-logo { flex: none; display: block; }
.rp-logo img { height: 46px; width: auto; display: block; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); transition: height .35s; }
.rp-nav.solida .rp-logo img { height: 38px; }
.rp-titulo { display: none; }
.rp-menu { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.rp-menu > a, .rp-mas > span { position: relative; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 10px; cursor: pointer;
  font-family: var(--rp-display); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: #e9edf2 !important; text-decoration: none !important; transition: color .2s, background .2s; }
.rp-menu > a::after, .rp-mas > span::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 5px; height: 2px; background: var(--rp-rojo);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--rp-curva); }
.rp-menu > a:hover::after, .rp-menu > a.on::after, .rp-mas:hover > span::after, .rp-mas.on > span::after { transform: scaleX(1); }
.rp-menu > a:hover, .rp-mas:hover > span, .rp-mas:focus-within > span { color: #fff !important; background: rgba(255,255,255,.05); }
.rp-menu > a.on, .rp-mas.on > span { color: #fff !important; }
.rp-mas { position: relative; }
.rp-mas > span i { font-size: 10px; transition: transform .25s; }
.rp-mas:hover > span i, .rp-mas:focus-within > span i { transform: rotate(180deg); }
.rp-baja { position: absolute; top: 100%; left: 0; min-width: 236px; padding: 10px; margin-top: 6px; border-radius: 14px; background: rgba(12,15,20,.98);
  border: 1px solid var(--rp-linea); box-shadow: 0 24px 60px rgba(0,0,0,.6); opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s, transform .22s, visibility .22s; }
.rp-mas:hover .rp-baja, .rp-mas:focus-within .rp-baja { opacity: 1; visibility: visible; transform: none; }
.rp-baja::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.rp-baja a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: #d6dbe2 !important; text-decoration: none !important;
  font-size: 14px; font-weight: 500; transition: background .15s, color .15s, transform .15s; }
.rp-baja a i { width: 18px; text-align: center; color: var(--rp-apagado); transition: color .15s; }
.rp-baja a:hover, .rp-baja a.on { background: rgba(225,29,72,.12); color: #fff !important; }
.rp-baja a:hover { transform: translateX(3px); }
.rp-baja a:hover i, .rp-baja a.on i { color: var(--rp-rojo2); }
.rp-admin { margin-top: 6px; border-top: 1px solid var(--rp-linea); color: var(--rp-rojo2) !important; }
.rp-admin-hueco { display: none; }
.rp-der { display: flex; align-items: center; gap: 10px; flex: none; }
.rp-ib { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--rp-linea);
  color: #fff; cursor: pointer; font-size: 15px; padding: 0; transition: background .2s, border-color .2s; }
.rp-ib:hover { background: rgba(225,29,72,.18); border-color: rgba(225,29,72,.5); }
.rp-entrar { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--rp-linea);
  background: rgba(255,255,255,.06); color: #fff !important; text-decoration: none !important; font-family: var(--rp-display); font-weight: 700;
  letter-spacing: .1em; font-size: 13px; text-transform: uppercase; white-space: nowrap; transition: background .2s, border-color .2s; }
.rp-entrar:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
.rp-entrar.rp-dentro { padding-left: 7px; }
.rp-entrar span { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.rp-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--rp-rojo); color: #fff; font-size: 13px; flex: none; }
.rp-discord { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 18px; border-radius: 11px; background: linear-gradient(135deg, var(--rp-rojo), #be123c);
  color: #fff !important; text-decoration: none !important; font-family: var(--rp-display); font-weight: 700; letter-spacing: .12em; font-size: 13px;
  text-transform: uppercase; white-space: nowrap; box-shadow: 0 8px 24px rgba(225,29,72,.35); transition: transform .2s, box-shadow .2s; }
.rp-discord:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(225,29,72,.5); }
.rp-boton { display: none; }
.rp-cajon, .rp-velo { display: none; }
@media (max-width: 1380px) { .rp-menu > a.rp-opc { display: none; } }
@media (max-width: 1120px) { .rp-discord span { display: none; } .rp-discord { padding: 0 13px; } .rp-nav { gap: 14px; } }

/* La página deja de usar su barra lateral y su contenido ocupa todo el ancho */
html body.rp-top { display: block !important; height: auto !important; min-height: 100vh; overflow-x: hidden !important; overflow-y: auto !important;
  padding-top: var(--rp-alto) !important; box-sizing: border-box; }
html body.rp-top.rp-con-heroe { padding-top: 0 !important; }
html body.rp-top .app { display: block !important; min-height: 0 !important; height: auto !important; }
html body.rp-top .app > aside.side, html body.rp-top > aside.side, html body.rp-top .sidebar { display: none !important; }
html body.rp-top .main, html body.rp-top .main-content, html body.rp-top .main-wrap { height: auto !important; min-height: calc(100vh - var(--rp-alto)) !important;
  overflow: visible !important; width: auto !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
/* Sobran: el menú flotante antiguo, la barra inferior del móvil y los botones de sesión/tema de cada página */
html body.rp-top .rn-fab, html body.rp-top .mobile-nav, html body.rp-top .theme-toggle, html body.rp-top .btn-auth-action,
html body.rp-top .main > header.top { display: none !important; }
/* Cabeceras de página que se quedaban pegadas arriba: ahora quedan debajo del menú */
html body.rp-top .main-content > header, html body.rp-top .main > header, html body.rp-top .page-header, html body.rp-top .topbar { top: var(--rp-alto) !important; }

/* ---------------------------------------------------------------- 2. MÓVIL */
@media (max-width: 900px) {
  .rp-nav, .rp-nav.solida { height: 58px; gap: 12px; padding: 0 12px; background: rgba(7,9,13,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--rp-linea); }
  :root { --rp-alto: 58px; }
  .rp-nav::after { transform: scaleX(1); }
  .rp-logo img, .rp-nav.solida .rp-logo img { height: 34px; }
  .rp-menu, .rp-nav .rp-entrar, .rp-nav .rp-tema, .rp-nav .rp-discord { display: none !important; }
  .rp-titulo { display: block; flex: 1; min-width: 0; font-family: var(--rp-display); font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rp-boton { display: grid; width: 44px; height: 44px; font-size: 18px; }
  .rp-boton:active { transform: scale(.94); }

  .rp-cajon { display: flex; flex-direction: column; gap: 14px; position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 9600;
    padding: 18px 14px 22px; box-sizing: border-box; overflow-y: auto; background: #0c0f14; border-left: 1px solid var(--rp-linea);
    transform: translateX(104%); transition: transform .32s var(--rp-curva); box-shadow: -18px 0 40px rgba(0,0,0,.55); }
  body.rp-abierto .rp-cajon { transform: translateX(0); }
  .rp-cajon-yo { display: flex; gap: 10px; align-items: center; }
  .rp-cajon-yo .rp-entrar { flex: 1; height: 46px; }
  .rp-cajon-yo .rp-ib { width: 46px; height: 46px; flex: none; }
  .rp-cajon-nav { display: flex; flex-direction: column; gap: 2px; }
  .rp-cajon-nav a { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 14px; border-radius: 10px; border-left: 3px solid transparent;
    color: #e9edf2 !important; text-decoration: none !important; font-family: var(--rp-display); font-size: 15px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
  .rp-cajon-nav a i { width: 20px; text-align: center; font-size: 15px; color: var(--rp-apagado); }
  .rp-cajon-nav a.on { background: linear-gradient(90deg, rgba(225,29,72,.22), transparent); border-left-color: var(--rp-rojo); color: #fff !important; }
  .rp-cajon-nav a.on i { color: var(--rp-rojo2); }
  .rp-cajon .rp-discord { justify-content: center; height: 46px; }
  .rp-cajon .rp-discord span { display: inline; }
  .rp-redes { display: flex; justify-content: center; gap: 22px; font-size: 18px; }
  .rp-redes a { color: #fff !important; opacity: .8; }
  .rp-pie { text-align: center; font-size: 11px; letter-spacing: .1em; color: #5c6672; text-transform: uppercase; }
  .rp-velo { display: block; position: fixed; inset: 0; z-index: 9550; background: rgba(5,7,10,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.rp-abierto .rp-velo { opacity: 1; pointer-events: auto; }
  body.rp-abierto { overflow: hidden !important; }

  /* Nada puede ser más ancho que la pantalla */
  html, html body.rp-top { max-width: 100vw; overflow-x: hidden !important; }
  html body.rp-top .main, html body.rp-top .main-content, html body.rp-top .main-wrap { max-width: 100vw !important; }
  /* Tablas anchas: se desplazan de lado en vez de cortarse */
  html body.rp-top .table-responsive-wrapper, html body.rp-top .rp-tabla { overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%; }
  /* Portada: sus columnas se ajustaban al contenido más ancho y se salían de la pantalla */
  html body.rp-top .main .wrap, html body.rp-top .main .izq, html body.rp-top .main .fila2,
  html body.rp-top .main .fila3, html body.rp-top .main .fila3-stack { grid-template-columns: minmax(0, 1fr) !important; }
  html body.rp-top .main .hero { min-width: 0 !important; max-width: 100%; }
  /* Cabeceras: los botones bajan de línea en vez de cortarse */
  html body.rp-top .roc-header-right { flex-wrap: wrap !important; max-width: 100% !important; }
  html body.rp-top :has(> .roc-header-right) { flex-wrap: wrap !important; }
  html body.rp-top .btn-filter { flex: none; }
  html body.rp-top div:has(> .btn-filter) { flex-wrap: wrap !important; max-width: 100%; }
}

/* ------------------------------------------------- 4. TARJETAS, BOTONES, TABLAS */
.rp-tarjeta { transition: transform .28s var(--rp-curva), box-shadow .28s var(--rp-curva), border-color .28s; }
@media (hover: hover) {
  .rp-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(225,29,72,.35), 0 0 26px rgba(225,29,72,.12); }
}
/* Brillo que cruza los botones principales al pasar el ratón */
.rp-brilla { position: relative; overflow: hidden; }
.rp-brilla::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); transform: skewX(-18deg); transition: left .55s var(--rp-curva); }
.rp-brilla:hover::after { left: 120%; }
/* Filas de tabla: se iluminan al pasar */
@media (hover: hover) {
  .rp-filas tbody tr { transition: background .15s; }
  .rp-filas tbody tr:hover { background: rgba(225,29,72,.07) !important; }
}
/* Barra fina de progreso de carga arriba (al cambiar de página) */
.rp-carga { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 99999; pointer-events: none;
  background: linear-gradient(90deg, var(--rp-rojo), #ff7a93); box-shadow: 0 0 10px var(--rp-rojo); transition: width .5s var(--rp-curva), opacity .3s; }

/* ------------------------------------------------- 5. ENTRADA DE LA PÁGINA */
@keyframes rp-entra { from { opacity: 0; } to { opacity: 1; } }
body.rp-listo { animation: rp-entra .35s ease-out both; }
body.rp-sale { opacity: 0 !important; transition: opacity .16s ease-in; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------- 6. AJUSTES POR PÁGINA */
/* Hotlaps: la tabla ocupaba "el alto que sobra" de la pantalla; ahora la página se desplaza entera */
html body.rp-top .table-responsive-wrapper { flex: none !important; height: auto !important; max-height: none !important; overflow-x: auto !important; overflow-y: visible !important; }
html body.rp-top .main-content::after { left: 20px !important; }
/* Hotlaps: Automobilista 2 ya no existe en ROC */
#btn-ams2 { display: none !important; }
/* Hotlaps: columnas que dicen lo mismo en todas las filas (las oculta roc-pro.js) */
.rp-col-oculta { display: none !important; }
.rp-resumen { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 20px 0; }
.rp-resumen span { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--rp-linea);
  background: rgba(255,255,255,.04); font-family: var(--rp-display); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #d6dbe2; }
.rp-resumen span small { color: var(--rp-apagado); font-size: 10px; letter-spacing: .16em; }
@media (max-width: 900px) {
  /* Hotlaps: filtros a todo el ancho, uno debajo de otro */
  html body.rp-top .toolbar { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 10px; }
  html body.rp-top .toolbar > * { width: 100% !important; max-width: none !important; margin: 0 !important; box-sizing: border-box; }
  html body.rp-top .toolbar .rt-combo-wrap input { width: 100% !important; box-sizing: border-box; }
  .rp-resumen { margin: 8px 10px 0; }
}

/* Ranking: podio de récords */
.rp-podio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; max-width: 760px; margin: 6px auto 26px; }
.rp-podio:empty { display: none; }
.rp-podio-p { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none !important; color: #fff !important; text-align: center; }
.rp-podio-ini { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--rp-display); font-size: 34px; font-weight: 700;
  background: radial-gradient(circle at 35% 30%, #2a313c, #10141a); border: 3px solid var(--rp-metal); box-shadow: 0 0 26px color-mix(in srgb, var(--rp-metal) 45%, transparent); }
.rp-podio-p b { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--rp-display); font-size: 19px; letter-spacing: .04em; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-podio-p b img { height: 14px; width: auto; border-radius: 2px; flex: none; }
.rp-podio-n { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--rp-apagado); }
.rp-podio-n em { font-style: normal; font-family: var(--rp-display); font-size: 22px; font-weight: 700; color: var(--rp-metal); margin-right: 4px; }
.rp-podio-base { width: 100%; display: grid; place-items: center; border-radius: 12px 12px 0 0; font-family: var(--rp-display); font-size: 44px; font-weight: 700;
  color: rgba(255,255,255,.9); background: linear-gradient(180deg, color-mix(in srgb, var(--rp-metal) 38%, #12161d), #0c0f14 92%);
  border: 1px solid color-mix(in srgb, var(--rp-metal) 55%, transparent); border-bottom: 0; height: var(--rp-escalon); }
.rp-p1 { --rp-metal: #f5b301; --rp-escalon: 130px; }
.rp-p2 { --rp-metal: #b8c0cc; --rp-escalon: 96px; }
.rp-p3 { --rp-metal: #cd7f32; --rp-escalon: 72px; }
.rp-p1 .rp-podio-ini { width: 92px; height: 92px; font-size: 42px; }
@media (max-width: 900px) { .rp-podio { gap: 8px; } .rp-podio-p b { font-size: 15px; } .rp-podio-ini { width: 56px; height: 56px; font-size: 26px; }
  .rp-p1 .rp-podio-ini { width: 68px; height: 68px; font-size: 32px; } .rp-podio-base { font-size: 32px; } }

/* Botones que sobran con el menú nuevo: tema de cada página, menú lateral antiguo, segunda barra de ROC TV */
html body.rp-top #btnTheme, html body.rp-top #btnTheme2, html body.rp-top #btnTheme3, html body.rp-top #themeSwitch, html body.rp-top #btnThemeMobile,
html body.rp-top button.theme, html body.rp-top .btn-theme, html body.rp-top .theme-btn, html body.rp-top .btn-toggle-sidebar,
html body.rp-top .roc-navbar .roc-nav-links { display: none !important; }
@media (max-width: 900px) { .rp-podio-p b { white-space: normal; flex-wrap: wrap; line-height: 1.15; } }
