/* ==================================================
   Ruleta Kit | Casa de la Diabetes
   ================================================== */

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables */
:root {
  --font: "DM Sans", sans-serif;
  --display: "Space Grotesk", sans-serif;

  --ink: #002d72;
  --navy: #1d428c;
  --blue: #0f5683;
  --aqua: #fff1de;
  --coral: #fab622;
  --yellow: #fab622;
  --paper: #fff8ed;
  --white: #fff;

  --shadow: 0 24px 60px rgba(23, 32, 71, 0.18);
}

/* Estilos generales */
html,
body {
  min-height: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font);
}

a {
  text-decoration: none;
}

/* ==================================================
   Botones
   ================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 2rem;
  border: 0;
  border-radius: 10px;
  font: 700 1rem var(--font);
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-3px);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-play {
  color: var(--white);
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(229, 76, 124, 0.25);
}

.btn-info {
  color: var(--white);
  background: var(--navy);
}

.btn-back {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
}

/* ==================================================
   Página de inicio
   ================================================== */

body.landing-page {
  min-height: 100vh;
  background: #0f5683;
  color: #fff;
  font-family: "Nunito", sans-serif;
}

.landing {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: clamp(4rem, 8vw, 9rem);
  width: min(1120px, calc(100% - 3rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 3rem 0;
}

.landing-brand { position: relative; display: flex; justify-content: flex-end; }
.landing-content { max-width: 590px; }

.kit-box-logo {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: clamp(120px, 18vw, 190px);
  height: clamp(82px, 12vw, 126px);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  background: #eaf8fb;
  box-shadow: 0 14px 30px rgba(0, 45, 85, 0.22);
  transform: translateX(-50%);
}

.kit-box-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 92%;
}

.landing-logo-frame {
  display: grid;
  place-items: center;
  width: min(390px, 100%);
  aspect-ratio: 1 / 1;
  padding: 0;
  background: transparent;
}

.landing-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 3px 3px rgba(60, 47, 0, 0.16));
  transform: scaleX(1.18);
}

.landing-kicker {
  margin-bottom: 0.65rem;
  color: #fab622;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.landing-content h1 {
  color: #fff;
  font: 900 clamp(3.5rem, 5.3vw, 5.4rem) / 0.98 "Nunito", sans-serif;
  letter-spacing: -0.045em;
}

.landing-content h1 span {
  display: block;
  margin-top: 0.12em;
  color: #fab622;
}

.landing-description {
  max-width: 570px;
  margin-top: 2.5rem;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  font-weight: 700;
  line-height: 1.45;
}

.landing-actions { display: flex; gap: 1rem; margin-top: 2.25rem; }

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 210px;
  min-height: 70px;
  padding: 1rem 2rem;
  border: 3px solid #fab622;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.landing-button:hover { transform: translateY(-3px); }
.landing-button-primary { color: #0f5683; background: #fab622; }
.landing-button-primary:hover { background: #ffd069; }
.landing-button-secondary { color: #fff; background: transparent; }
.landing-button-secondary:hover { color: #0f5683; background: #fab622; }
.landing-button:focus-visible,
.landing-menu-link:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.landing-menu-link {
  display: inline-block;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.landing-menu-link:hover { color: #fab622; }

.home-shell,
.resource-shell {
  min-height: 100vh;
  padding: 0 6vw;
  overflow: hidden;
}

.home-shell {
  background:
    radial-gradient(circle at 82% 20%, #d8f2ee 0, transparent 31%),
    var(--paper);
}

/* Navegación */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1240px;
  height: 82px;
  margin: auto;
}

.brand-lockup,
.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font: 1.05rem var(--display);
}

.brand-lockup strong,
.mini-brand strong {
  color: var(--coral);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px 10px 10px 2px;
  color: var(--aqua);
  background: var(--navy);
  font: 700 0.72rem var(--display);
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav-links a,
.game-nav a {
  color: #5b6079;
  font-size: 0.84rem;
  font-weight: 700;
}

.nav-links a:hover,
.game-nav a:hover {
  color: var(--coral);
}

.nav-cta {
  padding: 0.65rem 1rem;
  border: 1px solid #d8d9df;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.nav-cta span {
  margin-left: 0.35rem;
  color: var(--coral);
}

/* Hero */
.home-hero {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  align-items: center;
  gap: 5vw;
  max-width: 1240px;
  min-height: 590px;
  margin: auto;
}

.hero-copy {
  padding: 4rem 0 3rem;
}

.eyebrow {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 22px;
  height: 3px;
  margin: 0 0.5rem 0.2rem 0;
  background: var(--yellow);
}

.hero-copy h1,
.resource-heading h1 {
  margin: 1.4rem 0 1.2rem;
  color: var(--ink);
  font: 700 clamp(3rem, 5vw, 5.3rem) / 0.98 var(--display);
}

.hero-copy h1 em,
.resource-heading h1 em {
  color: var(--coral);
  font-style: normal;
}

.hero-description {
  max-width: 410px;
  color: #62677c;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  margin-top: 2rem;
}

.text-link {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
}

.text-link span {
  margin-left: 0.4rem;
  color: var(--coral);
}

.hero-note {
  margin-top: 4rem;
  color: #7a7d8b;
  font-size: 0.75rem;
}

.note-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--aqua);
}

/* Imagen del hero */
.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  max-height: 540px;
  border-radius: 32px 32px 32px 4px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.visual-label {
  position: absolute;
  top: -1.5rem;
  right: 2rem;
  z-index: 1;
  color: var(--coral);
  font: 700 0.72rem var(--display);
  letter-spacing: 0.12em;
}

.visual-label span {
  margin-left: 1rem;
  color: #9699a7;
}

.visual-badge {
  position: absolute;
  bottom: 1.5rem;
  left: -2rem;
  padding: 1.2rem 1.5rem;
  border-radius: 6px 18px 18px;
  color: var(--ink);
  background: var(--yellow);
  font: 0.88rem/1.35 var(--display);
  box-shadow: 0 12px 22px rgba(245, 195, 41, 0.25);
}

.visual-badge strong {
  font-size: 1.2rem;
}

/* Accesos rápidos */
.home-strip {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  align-items: center;
  gap: 1rem;
  max-width: 1240px;
  margin: auto;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid #dbdce0;
}

.strip-kicker {
  color: #8a8d9b;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-strip a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}

.home-strip a:hover {
  color: var(--coral);
}

.strip-icon,
.resource-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--navy);
  background: var(--aqua);
  font-weight: 700;
}

.home-strip strong,
.home-strip small {
  display: block;
}

.home-strip strong {
  font-size: 0.8rem;
}

.home-strip small {
  margin-top: 0.2rem;
  color: #888b97;
  font-size: 0.7rem;
}

.home-strip b {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 400;
}

/* ==================================================
   Página de recursos
   ================================================== */

.resource-shell {
  background: #fff8ed;
}

.resource-heading {
  max-width: 1240px;
  margin: 0 auto 2rem;
  padding-top: clamp(3rem, 7vw, 6rem);
}

.resource-heading > p:last-child {
  color: #6c7080;
}

.resource-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 1240px;
  margin: 1.5rem auto 0;
}

.resource-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border: 1.5px solid #d1d6da;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.resource-actions a:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

.resource-actions .resource-action-primary {
  border-color: var(--navy);
  color: #fff;
  background: var(--navy);
}

.resource-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1rem;
  max-width: 1240px;
  margin: auto;
}

.resource-card {
  position: relative;
  min-height: 330px;
  padding: 1.8rem;
  overflow: hidden;
  border-radius: 20px 20px 20px 3px;
  color: var(--white);
  transition: transform 0.25s ease;
}

.resource-card:hover {
  transform: translateY(-6px);
}

.resource-card-main {
  background: var(--navy);
}

.resource-card-light {
  color: var(--ink);
  background: var(--aqua);
}

.resource-card-note {
  background: var(--coral);
}

.card-index {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  opacity: 0.72;
}

.resource-symbol {
  margin-top: 4.5rem;
  color: inherit;
  background: rgba(255, 255, 255, 0.2);
}

.resource-card h2 {
  margin-top: 1rem;
  font: 700 2rem/1 var(--display);
}

.resource-card p {
  max-width: 220px;
  margin-top: 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  opacity: 0.8;
}

.card-arrow {
  position: absolute;
  right: 1.8rem;
  bottom: 1.8rem;
  font-size: 1.7rem;
}

.resource-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1240px;
  margin: 3rem auto;
  color: #878b96;
  font-size: 0.78rem;
}

.resource-footer img {
  width: 112px;
}

.institutional-footer.resource-page-footer {
  width: calc(100% + 12vw);
  max-width: none;
  margin: 3rem -6vw 0;
}

/* ==================================================
   Página de instrucciones
   ================================================== */

body.page-instrucciones {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background: #fff1de;
}

.card-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
  max-width: 600px;
  padding: 2.5rem 2rem;
  border-radius: 24px 24px 24px 4px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.card-logo {
  width: 150px;
}

.card-logo-panel {
  display: grid;
  place-items: center;
  padding: 0.85rem 1.2rem;
  border-radius: 14px;
  background: var(--navy);
}

.card-logo-white {
  filter: grayscale(1) brightness(0) invert(1);
}

.card-title {
  color: var(--navy);
  font: 700 1.8rem var(--display);
  text-align: center;
}

.instrucciones-lista {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  list-style: none;
}

.instrucciones-lista li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff8ed;
  font-size: 0.95rem;
  line-height: 1.45;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.instrucciones-lista li:hover {
  border-color: var(--aqua);
  transform: translateY(-3px);
}

.step-num {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  font-size: 0.85rem;
  font-weight: 900;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ==================================================
   Página del juego
   ================================================== */

body.page-juego {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #002d72,
    #1d428c 58%,
    #0f5683
  );
}

@media (min-width: 901px) {
  body.page-juego {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .page-juego .game-main {
    min-height: 0;
    padding-top: 0.75rem;
    padding-bottom: 42px;
  }

  .page-juego .wheel-wrapper {
    padding-bottom: 0;
    transform: translateY(1.25rem);
  }

  .page-juego .wheel-outer-ring {
    width: min(500px, 40vw, calc(100dvh - 190px));
    height: min(500px, 40vw, calc(100dvh - 190px));
  }
}

/* Encabezado del juego */
.game-header {
  position: fixed;
  top: 50%;
  left: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  width: 76px;
  padding: 0.75rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(11, 35, 91, 0.88);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.game-header .brand-lockup {
  position: relative;
  color: var(--white);
}

.game-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.game-nav a {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.game-nav a:hover {
  color: #fff;
  border-color: rgba(156, 228, 220, 0.55);
  background: rgba(156, 228, 220, 0.16);
  transform: translateX(2px);
}

.game-nav a {
  color: rgba(255, 255, 255, 0.78);
}

.side-icon {
  color: #fff1de;
  font-size: 1.15rem;
  font-weight: 900;
}

.side-label {
  position: absolute;
  top: 50%;
  left: calc(100% + 0.8rem);
  z-index: 2;
  width: max-content;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  background: #0f5683;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-6px, -50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.game-header a:hover .side-label,
.game-header a:focus-visible .side-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.btn-back-game {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.game-logo,
.header-spacer {
  display: none;
}

/* Área principal */
.game-main {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.5rem 2rem 6.5rem 6.5rem;
}

/* Ruleta */
.wheel-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 540px;
  align-items: center;
  justify-content: center;
  max-width: 650px;
  padding-bottom: 1rem;
  transform: translateY(2rem);
}

.wheel-outer-ring {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(500px, 78vw);
  height: min(500px, 78vw);
  border-radius: 50%;
  background: radial-gradient(circle, #bffaff, #5ba5bd 72%);
  box-shadow:
    0 0 0 8px rgba(190, 246, 250, 0.62),
    0 0 0 16px rgba(156, 228, 220, 0.2),
    0 16px 50px rgba(0, 0, 0, 0.5);
}

#ruleta {
  width: calc(100% - 20px) !important;
  height: calc(100% - 20px) !important;
  border-radius: 50%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.wheel-outer-ring.spin-highlight::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 9;
  width: 88px;
  height: 88px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: centerSpinGlow 1.15s ease-in-out infinite;
}

@keyframes centerSpinGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.95), 0 0 16px 5px rgba(255, 255, 255, 0.72);
    opacity: 0.85;
  }
  50% {
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0), 0 0 34px 12px rgba(255, 255, 255, 1);
    opacity: 1;
  }
}

.wheel-pointer {
  position: absolute;
  top: -17px;
  left: 50%;
  z-index: 10;
  display: block;
  width: 42px;
  height: 54px;
  overflow: hidden;
  border: 2px solid rgba(224, 255, 255, 0.85);
  background: linear-gradient(180deg, #d9ffff, #79d3df);
  box-shadow:
    0 0 0 3px rgba(151, 229, 237, 0.15),
    0 6px 12px rgba(0, 33, 61, 0.38);
  color: transparent;
  font-size: 0;
  pointer-events: none;
  clip-path: polygon(8% 0, 92% 0, 50% 100%);
  transform: translateX(-50%);
}

.wheel-pointer::after {
  display: none;
}

.wheel-stand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(330px, 58vw);
  margin-top: -2.4rem;
}

.wheel-stand-neck {
  width: 58%;
  height: 64px;
  border: 2px solid rgba(218, 253, 255, 0.8);
  border-top: 0;
  background: linear-gradient(90deg, rgba(79, 168, 192, 0.72), rgba(210, 250, 252, 0.9) 50%, rgba(79, 168, 192, 0.72));
  box-shadow:
    inset 0 -12px 18px rgba(35, 115, 145, 0.18),
    0 6px 12px rgba(0, 39, 66, 0.18);
  clip-path: none;
}

.wheel-stand-foot {
  position: relative;
  width: 92%;
  height: 20px;
  margin-top: -2px;
  border: 2px solid rgba(210, 251, 255, 0.7);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(228, 255, 255, 0.94), rgba(71, 163, 190, 0.82));
  box-shadow:
    inset 0 3px 5px rgba(255, 255, 255, 0.65),
    0 9px 18px rgba(0, 0, 0, 0.24);
}

.wheel-stand-foot::after {
  display: none;
}

.roulette-brand {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  right: auto;
  bottom: auto;
  z-index: 45;
  display: flex;
  align-items: center;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.roulette-brand img {
  display: block;
  width: 110px;
  height: auto;
  object-fit: contain;
  filter: none;
}

.roulette-back-link {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  color: #fff;
  background: rgba(11, 35, 91, 0.72);
  font-size: 1.35rem;
  font-weight: 900;
}

.roulette-back-link:hover,
.roulette-back-link:focus-visible {
  color: #fff;
  background: rgba(40, 121, 184, 0.95);
  transform: translateX(-2px);
}

.roulette-brand .roulette-back-link span {
  font-size: inherit;
  line-height: 1;
}

.roulette-brand strong {
  font: 900 0.9rem/1.05 "Nunito", sans-serif;
  text-align: left;
}

.roulette-brand span {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.institutional-footer {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 2vw, 1.4rem);
  width: 100%;
  min-height: 76px;
  padding: 0.75rem 1.5rem;
  border-top: 2px solid rgba(210, 251, 255, 0.65);
  color: #fff;
  background: #0f5683;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.14);
}

.page-juego > .institutional-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  height: 42px;
  min-height: 42px;
  padding: 0.2rem 1.5rem;
  overflow: hidden;
  border-top: 2px solid #70cbe8;
  box-sizing: border-box;
  background: #2879b8;
  box-shadow: none;
  transform: none;
}

.page-juego > .institutional-footer img {
  position: static;
  width: auto;
  max-width: 180px;
  height: auto;
  max-height: 34px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(1) !important;
  transform: none;
}

.institutional-footer img {
  width: clamp(135px, 32%, 180px);
  height: auto;
  filter: none;
}

.institutional-footer .footer-logo-white {
  filter: none !important;
}

.institutional-footer strong {
  color: #fff;
  font: italic 900 clamp(0.62rem, 1.2vw, 0.86rem) / 1 "Nunito", sans-serif;
  white-space: nowrap;
}

.institutional-footer span {
  padding-left: clamp(0.55rem, 1.5vw, 1rem);
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font: 900 clamp(0.58rem, 1.1vw, 0.78rem) / 0.95 "Nunito", sans-serif;
  white-space: nowrap;
}

/* Panel del juego */
.game-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 360px;
  max-width: 100%;
}

.question-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 230px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.question-icon {
  display: none;
}

.question-number {
  color: var(--yellow);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-text {
  color: var(--white);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.35;
}

.answer-display {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(5, 25, 61, 0.78);
  backdrop-filter: blur(8px);
}

.answer-display.hidden {
  display: none;
}

.answer-label {
  color: #0f5683;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-text {
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.4;
}

.answer-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  width: min(680px, 100%);
  padding: clamp(2rem, 5vw, 4rem);
  border: 4px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: #fff1de;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.answer-close {
  min-width: 170px;
  color: #fff;
  background: #0f5683;
}

/* Controles del juego */
.control-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-spin {
  color: var(--ink);
  background: var(--yellow);
}

.wheel-spin-proxy {
  display: none;
}

.btn-stop {
  display: none;
}

.btn-answer {
  color: var(--ink);
  background: var(--aqua);
}

.btn-answer.touch-highlight {
  position: relative;
  z-index: 2;
  animation: touchGlow 1.15s ease-in-out infinite;
}

@keyframes touchGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.95), 0 0 16px rgba(255, 255, 255, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 0 34px 10px rgba(255, 255, 255, 0.95);
    transform: scale(1.035);
  }
}

/* Animaciones */
.fade-in {
  animation: fadeInUp 0.35s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================================================
   Tabletas
   ================================================== */

@media (max-width: 900px) {
  .game-header {
    top: auto;
    right: 1rem;
    bottom: 0.75rem;
    left: 1rem;
    flex-direction: row;
    align-items: center;
    width: auto;
    padding: 0.6rem 0.75rem;
    border-radius: 16px;
    transform: none;
  }

  .game-header .brand-lockup {
    flex-shrink: 0;
  }

  .game-nav {
    flex: 1;
    flex-direction: row;
    justify-content: flex-end;
  }

  .game-nav a {
    padding: 0.55rem 0.65rem;
  }

  .game-main {
    padding-left: 2rem;
    padding-bottom: 10rem;
  }

  .landing {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    width: min(680px, calc(100% - 3rem));
    padding: 4rem 0;
    text-align: center;
  }

  .landing-brand { justify-content: center; }
  .landing-logo-frame { width: min(330px, 78vw); }
  .landing-content { max-width: none; }
  .landing-description { margin-right: auto; margin-left: auto; }
  .landing-actions { justify-content: center; }

  .nav-links {
    gap: 1rem;
  }

  .home-hero {
    grid-template-columns: 1fr;
    padding: 3rem 0;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-visual {
    width: 100%;
    max-width: 680px;
    margin: auto;
  }

  .home-strip,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }

  .strip-kicker {
    grid-column: 1 / -1;
  }

  .game-main {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .game-panel {
    width: 100%;
    max-width: 500px;
  }

  .roulette-brand {
    top: 0.65rem;
    left: 0.65rem;
    right: auto;
    bottom: auto;
  }
}

/* ==================================================
   Dispositivos móviles
   ================================================== */

@media (max-width: 600px) {
  .page-juego > .institutional-footer {
    bottom: 0;
    height: 42px;
    min-height: 42px;
    padding: 0.2rem;
    transform: none;
    border-top: 2px solid #70cbe8;
  }
  .page-juego > .institutional-footer img {
    width: auto;
    max-width: 45vw;
    height: auto;
    max-height: 34px;
  }

  .wheel-wrapper {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 1rem;
    margin-right: auto;
    margin-left: auto;
    padding-bottom: 0;
    transform: none;
  }

  .landing {
    gap: 2rem;
    width: min(100% - 2rem, 480px);
    padding: 2rem 0 2.5rem;
  }

  .landing-logo-frame { width: min(310px, 82vw); }
  .landing-content h1 { font-size: clamp(2.45rem, 12vw, 3.35rem); }
  .landing-description { margin-top: 1.5rem; font-size: 1rem; }
  .landing-actions { flex-direction: column; margin-top: 1.75rem; }
  .landing-button { width: 100%; min-width: 0; min-height: 58px; }
  .landing-menu-link { margin-top: 1.5rem; }

  .home-shell,
  .resource-shell {
    padding: 0 1rem;
  }

  .top-nav {
    height: 68px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    padding: 0.55rem 0.7rem;
  }

  .hero-copy h1,
  .resource-heading h1 {
    font-size: 3.2rem;
  }

  .hero-description {
    font-size: 0.94rem;
  }

  .hero-note {
    margin-top: 2.5rem;
  }

  .visual-badge {
    bottom: 0.7rem;
    left: 0.7rem;
  }

  .home-strip,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .home-strip {
    gap: 1.1rem;
  }

  .resource-heading {
    margin: 0 auto 1.5rem;
    padding-top: 2.5rem;
  }

  .resource-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .resource-actions a {
    flex: 1;
    padding: 0.6rem 0.35rem;
    text-align: center;
  }


  .resource-card {
    min-height: 260px;
  }

  .resource-symbol {
    margin-top: 2.5rem;
  }

  .resource-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .institutional-footer.resource-page-footer {
    width: calc(100% + 2rem);
    margin-right: -1rem;
    margin-left: -1rem;
  }

  .card-screen {
    padding: 1.4rem 0.8rem;
  }

  .card-title {
    font-size: 1.4rem;
  }

  .instrucciones-lista li {
    font-size: 0.88rem;
  }

  .card-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .game-header {
    bottom: 6.5rem;
    padding: 0.5rem 0.6rem;
  }

  .game-nav {
    gap: 0.6rem;
  }

  .game-nav a:not(.btn-back-game) {
    display: none;
  }

  .wheel-outer-ring {
    width: min(360px, 86vw);
    height: min(360px, 86vw);
    box-shadow:
      0 0 0 4px rgba(156, 228, 220, 0.45),
      0 0 0 8px rgba(156, 228, 220, 0.1),
      0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .wheel-stand {
    width: min(230px, 58vw);
  }

  .roulette-brand {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    right: auto;
    bottom: auto;
    padding: 0;
  }

  .roulette-brand img {
    width: 72px;
    height: auto;
  }

  .roulette-back-link {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .wheel-stand-neck {
    height: 48px;
  }

  .wheel-pointer {
    top: -12px;
    width: 30px;
    height: 39px;
  }

  .wheel-outer-ring.spin-highlight::after {
    width: 58px;
    height: 58px;
    border-width: 2px;
  }

  .wheel-pointer::after {
    top: 6px;
    left: 9px;
    width: 14px;
    height: 25px;
  }

  .institutional-footer img {
    width: 92px;
  }

  .institutional-footer {
    gap: 0.45rem;
    min-height: 62px;
    padding: 0.55rem;
  }

  .institutional-footer span {
    padding-left: 0.45rem;
  }


  .game-main {
    width: 100%;
    gap: 0.65rem;
    padding: 6rem 0.4rem 12rem;
  }

  .game-panel {
    gap: 0.65rem;
    width: min(94vw, 500px);
    margin-right: auto;
    margin-left: auto;
    align-self: center;
  }

  .question-display {
    min-height: 150px;
    padding: 1.2rem;
  }

  .question-text {
    font-size: 1.15rem;
  }

  .answer-display {
    padding: 0.7rem 0.85rem;
  }

  .answer-text {
    font-size: 1.25rem;
  }

  .answer-modal {
    gap: 1rem;
    padding: 2rem 1.25rem;
    border-radius: 20px;
  }

  .control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
  }

  .control-buttons .btn {
    padding: 0.62rem 0.4rem;
    font-size: 0.82rem;
  }

  #btn-respuesta {
    grid-column: 1 / -1;
  }
}

/* Ventanas con poca altura: portatiles, proyectores y navegador ampliado. */
@media (max-height: 600px) {
  .page-juego > .institutional-footer {
    height: 42px;
    min-height: 42px;
    padding: 0.2rem 1rem;
  }

  .page-juego > .institutional-footer img {
    width: auto;
    max-width: 180px;
    max-height: 34px;
  }

  .page-juego .game-main {
    padding-bottom: 42px;
  }
}

body.page-juego > footer.institutional-footer {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  height: 70px;
  min-height: 0;
  max-height: 70px;
  margin: 0;
  padding: 6px 16px;
  border: 0;
  border-top: 2px solid #70cbe8;
  box-sizing: border-box;
  background: #2879b8;
}

body.page-juego > footer.institutional-footer > img {
  display: block;
  width: auto;
  height: 54px;
  max-width: 240px;
  max-height: 54px;
  margin: 0;
  object-fit: contain;
}
