/* Estilo de las páginas de contenido (app-hyrox, hyrox/estaciones,
   hyrox/calculadora-ritmos). Mismos colores y letras que la portada. */
:root {
  --oro: #E8B923; --oro-luz: #F1D57B;
  --bg: #050505; --bg-card: #0C0A04; --borde: #231C0A;
  --texto: #F2F2F0; --texto-sec: #ABA79C; --texto-ter: #7d776b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--texto);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--oro-luz); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

header { padding: 18px 0 6px; text-align: center; }
.logo { font-family: 'Bebas Neue', sans-serif; font-size: 34px; letter-spacing: 4px; line-height: 1; color: var(--texto); text-decoration: none; }
.logo span { color: var(--oro); }

.migas { font-size: 13px; color: var(--texto-ter); margin-top: 18px; }
.migas a { color: var(--texto-sec); text-decoration: none; }

.cabecera { padding: 22px 0 6px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--oro); }
h1 {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 0.5px;
  font-size: clamp(42px, 11vw, 68px); line-height: 0.95; margin-top: 8px; text-wrap: balance;
}
h1 em, h2 em { font-style: normal; color: var(--oro); }
.lead { color: var(--texto-sec); font-size: 17px; margin-top: 14px; max-width: 62ch; }

section { padding-top: 46px; }
h2 {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 0.5px;
  font-size: 36px; line-height: 1; text-wrap: balance;
}
h3 { font-size: 17px; font-weight: 700; margin-top: 4px; }
p { max-width: 65ch; }
section > p, section > ul { margin-top: 12px; color: var(--texto-sec); }
ul.lista { padding-left: 20px; display: grid; gap: 6px; }
ul.lista b { color: var(--texto); }

.tarjetas { display: grid; gap: 12px; margin-top: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tarjeta { background: var(--bg-card); border: 1px solid var(--borde); border-radius: 16px; padding: 16px 18px; }
.tarjeta p { color: var(--texto-sec); font-size: 15px; margin-top: 6px; }

.tabla-caja { overflow-x: auto; margin-top: 18px; border: 1px solid var(--borde); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--borde); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--texto-ter); font-weight: 700; background: var(--bg-card); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tr.carrera td { color: var(--texto-sec); }
.nota { font-size: 13px; color: var(--texto-ter); margin-top: 10px; }

.video { max-width: 300px; margin: 22px auto 0; }
.video-marco {
  position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 24px; overflow: hidden;
  background: #0a0907 center / cover no-repeat; box-shadow: 0 14px 30px -14px rgba(232,185,35,0.4);
}
.video-marco video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Vídeos a pantalla completa del móvil (16 nov): más altos que los 9:16. */
.video-marco.alta { aspect-ratio: 1170 / 2532; }

.faq { display: grid; gap: 10px; margin-top: 18px; }
.faq details { background: var(--bg-card); border: 1px solid var(--borde); border-radius: 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--oro); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 18px 16px; color: var(--texto-sec); font-size: 15px; }

.enlaces { display: grid; gap: 10px; margin-top: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.enlaces a {
  display: block; text-decoration: none; background: var(--bg-card); border: 1px solid var(--borde);
  border-radius: 16px; padding: 16px 18px; color: var(--texto); font-weight: 700;
}
.enlaces a span { display: block; font-weight: 400; color: var(--texto-sec); font-size: 14px; margin-top: 4px; }
.enlaces a:hover { border-color: var(--oro); }

/* Botones de tienda (los rellena assets/paginas.js) */
.cta { text-align: center; padding: 56px 0 10px; }
.cta p { color: var(--texto-sec); margin: 10px auto 0; }
.tiendas { display: grid; gap: 10px; max-width: 420px; margin: 20px auto 0; }
.btn-descargar {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  width: 100%; min-height: 62px; padding: 12px 22px; border-radius: 18px;
  background: linear-gradient(180deg, #F6CF4A 0%, var(--oro) 55%, #C99A12 100%);
  color: #0b0900; font-weight: 800; font-size: 18px;
  box-shadow: 0 10px 30px -6px rgba(232,185,35,0.55), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-descargar svg { width: 26px; height: 26px; flex: 0 0 auto; }
.btn-descargar .txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.btn-descargar .txt small { font-size: 12px; font-weight: 600; opacity: 0.75; }
.btn-descargar .flecha { margin-left: auto; font-size: 22px; }

/* Descarga justo debajo del resultado de las calculadoras */
.cta-resultado {
  margin-top: 14px; padding: 18px 18px 16px; border-radius: 16px; text-align: center;
  background: linear-gradient(180deg, rgba(232,185,35,0.10) 0%, rgba(232,185,35,0.03) 100%);
  border: 1px solid rgba(232,185,35,0.35);
}
.cta-resultado-tit { font-family: 'Bebas Neue', sans-serif; font-size: 28px; line-height: 1.05; letter-spacing: 0.5px; color: var(--texto); }
.cta-resultado-tit em { font-style: normal; color: var(--oro); }
.cta-resultado p:not(.cta-resultado-tit) { color: var(--texto-sec); font-size: 14px; margin: 6px auto 0; max-width: 460px; }
.cta-resultado .tiendas { margin-top: 14px; }
.cta-resultado .btn-descargar { min-height: 54px; font-size: 16px; padding: 10px 18px; }

/* Barra fija de descarga en el móvil (la monta assets/paginas.js) */
.barra-descarga {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(5,5,5,0.94); border-top: 1px solid var(--borde);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: barra-entra .25s ease-out;
}
.barra-descarga[hidden] { display: none; }
.barra-btn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 14px;
  border-radius: 14px; text-decoration: none; color: #0b0900;
  background: linear-gradient(180deg, #F6CF4A 0%, var(--oro) 55%, #C99A12 100%);
  box-shadow: 0 8px 24px -8px rgba(232,185,35,0.6), inset 0 1px 0 rgba(255,255,255,0.45);
}
.barra-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.barra-txt b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-txt small { font-size: 12px; font-weight: 600; opacity: 0.75; }
.barra-flecha { margin-left: auto; font-size: 20px; font-weight: 800; }
.barra-cerrar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--borde);
  background: transparent; color: var(--texto-ter); font-size: 22px; line-height: 1; cursor: pointer;
}
body.con-barra { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@keyframes barra-entra { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) { .barra-descarga { display: none !important; } body.con-barra { padding-bottom: 0; } }

footer { border-top: 1px solid var(--borde); margin-top: 60px; padding: 24px 0 40px; text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
footer a { color: var(--texto-ter); font-size: 13px; text-decoration: none; }
footer .copy { color: var(--texto-ter); font-size: 12px; margin-top: 14px; }
footer .marcas { color: var(--texto-ter); font-size: 11px; line-height: 1.5; margin: 8px auto 0; max-width: 520px; }

@media (min-width: 900px) {
  .logo { font-size: 40px; }
  h2 { font-size: 44px; }
  .tiendas { grid-template-columns: 1fr 1fr; max-width: 640px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Calculadora de ritmos */
.calc { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.calc label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--texto-sec); }
.calc input {
  width: 120px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borde);
  background: var(--bg-card); color: var(--texto); font: inherit; font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tarjeta .cifra { font-family: 'Bebas Neue', sans-serif; font-size: 38px; line-height: 1; color: var(--oro); margin-top: 8px; font-variant-numeric: tabular-nums; }
.tarjeta p b { color: var(--texto); }

/* Dos vídeos lado a lado (fuerza y running) */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; max-width: 520px; }
.videos figure { margin: 0; }
.videos .video-marco { border-radius: 18px; }
.videos figcaption { font-size: 13px; color: var(--texto-sec); text-align: center; margin-top: 8px; }
.videos.uno { grid-template-columns: 1fr; max-width: 280px; margin-left: auto; margin-right: auto; }
.subtabla { font-size: 15px; color: var(--texto-sec); margin: 22px 0 0; }
#rm-sub { margin-top: 6px; }

/* Guías */
.respuesta { background: var(--bg-card); border: 1px solid var(--oro); border-radius: 16px; padding: 18px 20px; display: grid; gap: 8px; }
.respuesta p { color: var(--texto-sec); margin: 0; }
.respuesta b, section p b { color: var(--texto); }
section > p + p { margin-top: 12px; }
.figura { margin: 22px auto 0; max-width: 360px; }
.figura img { display: block; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--borde); }
.figura figcaption { font-size: 13px; color: var(--texto-ter); text-align: center; margin-top: 8px; }
.dia { margin-top: 22px; }
.dia h3 { color: var(--oro-luz); }
.dia .tabla-caja { margin-top: 10px; }

/* Pie: enlaces principales arriba, legales más pequeños abajo */
footer nav.legal { margin-top: 12px; gap: 6px 14px; }
footer nav.legal a { font-size: 12px; }
.calc select {
  min-width: 170px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borde);
  background: var(--bg-card); color: var(--texto); font: inherit; font-size: 18px; font-weight: 700;
}
.calc label[hidden] { display: none; }

/* Plan por semanas: el texto del entreno baja de línea en vez de cortarse. */
table.plan td { white-space: normal; vertical-align: top; }
table.plan td:first-child { white-space: nowrap; font-weight: 700; }

/* Cabecera con botón de descarga (18 nov). En ordenador se queda arriba. */
.cab { max-width: 760px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cab-descarga {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  background: var(--oro); color: #0b0900; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.cab-descarga:hover { background: var(--oro-luz); }
html { scroll-behavior: smooth; }
@media (min-width: 900px) {
  header:has(.cab) {
    position: sticky; top: 0; z-index: 40; padding: 12px 0;
    background: rgba(5,5,5,0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--borde);
  }
  section, .cta { scroll-margin-top: 80px; }
}

/* Bloque "así se ve en HIBRIX": pantalla de la app, frase del animal y descarga. */
.app-bloque {
  margin-top: 46px; padding: 24px 20px; border-radius: 22px; display: grid; gap: 22px; align-items: center;
  background: linear-gradient(160deg, rgba(232,185,35,0.10) 0%, rgba(232,185,35,0.02) 60%);
  border: 1px solid rgba(232,185,35,0.28);
}
.app-visual { min-width: 0; }
.app-movil {
  width: min(64%, 230px); margin: 0 auto; padding: 7px; border-radius: 32px;
  background: #15120a; border: 1px solid #3a2f12; transform: rotate(-2deg);
  box-shadow: 0 26px 50px -24px rgba(232,185,35,0.55);
}
.app-movil .pantalla { aspect-ratio: 9 / 17.5; border-radius: 25px; overflow: hidden; background: #050505; }
.app-movil .pantalla img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.app-movil .video-marco { border-radius: 25px; box-shadow: none; }
.app-recorte { max-width: 300px; margin: 0 auto; }
.app-recorte img {
  display: block; width: 100%; height: auto; border-radius: 20px; border: 1px solid #3a2f12;
  box-shadow: 0 26px 50px -24px rgba(232,185,35,0.55);
}
.app-txt h3 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0.5px; margin-top: 6px; text-wrap: balance; }
.app-txt h3 em { font-style: normal; color: var(--oro); }
.app-txt > p { color: var(--texto-sec); font-size: 15px; margin-top: 10px; }
.animal-dice { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.animal-dice img { flex: 0 0 auto; width: 72px; height: 72px; object-fit: contain; }
.animal-dice p {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-size: 14.5px; line-height: 1.4; font-weight: 600;
  background: #17140b; border: 1px solid #3a2f12; color: var(--texto);
}
.app-bloque .tiendas { margin: 16px 0 0; max-width: 340px; grid-template-columns: 1fr; }
.app-bloque .btn-descargar { min-height: 52px; font-size: 16px; padding: 9px 16px; border-radius: 15px; }
@media (min-width: 640px) {
  .app-bloque { grid-template-columns: 240px 1fr; gap: 30px; padding: 28px 30px; }
  .app-bloque.inv { grid-template-columns: 1fr 240px; }
  .app-bloque.inv .app-visual { order: 2; }
  .app-bloque.inv .app-movil { transform: rotate(2deg); }
  .app-movil { width: 100%; max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Fichas de ejercicios (/ejercicios) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips span {
  font-size: 13px; font-weight: 600; color: var(--texto-sec); background: var(--bg-card);
  border: 1px solid var(--borde); border-radius: 999px; padding: 4px 12px;
}
.enlaces-cortos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.enlaces-cortos a { padding: 12px 16px; font-weight: 600; }

/* "Tu animal te pregunta" (/guias/como-ganar-gluteo) */
.charla { background: var(--bg-card); border: 1px solid var(--borde); border-radius: 20px; padding: 18px; margin-top: 18px; }
.charla-animal { display: flex; gap: 12px; align-items: flex-end; }
.charla-animal img { flex: 0 0 auto; width: 64px; height: 64px; }
.burbuja {
  background: #15120a; border: 1px solid var(--borde); border-radius: 16px 16px 16px 4px;
  padding: 12px 14px; font-weight: 600; color: var(--texto); margin: 0;
}
.opciones { display: grid; gap: 8px; margin: 16px 0; }
.opciones button {
  text-align: left; cursor: pointer; font: inherit; color: var(--texto); background: transparent;
  border: 1px solid var(--borde); border-radius: 14px; padding: 12px 14px;
}
.opciones button b { display: block; }
.opciones button span { display: block; font-size: 13px; color: var(--texto-sec); margin-top: 2px; }
.opciones button.activa { border-color: var(--oro); background: rgba(232, 185, 35, 0.08); }
.respuesta { border-top: 1px solid var(--borde); padding-top: 16px; }
.plan-tit { font-size: 13px; font-weight: 700; color: var(--texto-sec); margin-top: 16px; }
.dias { display: flex; gap: 8px; margin-top: 8px; }
.dias button {
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700;
  color: var(--texto); background: transparent; border: 1px solid var(--borde);
}
.dias button.activa { background: var(--oro); border-color: var(--oro); color: #050505; }
.semana-plan { list-style: none; display: grid; gap: 6px; margin-top: 12px; }
.semana-plan li { display: flex; justify-content: space-between; border: 1px solid var(--borde); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.semana-plan li span { color: var(--texto-sec); font-weight: 600; }

/* Captura del reloj (/hyrox/garmin, /hyrox/amazfit) */
.reloj-shot { text-align: center; margin: 22px auto 6px; }
.reloj-shot img {
  width: 220px; height: 220px; border-radius: 50%; background: #000;
  border: 10px solid #1a1a1a; box-shadow: 0 0 0 2px var(--borde), 0 18px 40px rgba(0, 0, 0, 0.6);
}
.reloj-shot figcaption { font-size: 13px; color: var(--texto-ter); margin-top: 10px; }
