:root {
  --body: #040f20;      /* fondo muy oscuro */
  --header: #002361;    /* barra superior */
  --footer: #001849;    /* footer */
  --azul: #2f7bff;      /* azul de acento */
  --azul-claro: #4f8bff;
  --azul-boton: #2f8bff;
  --verde: #16c47f;
  --blanco: #ffffff;
  --linea: #3974d7;
  --tenue: #9fb0d6;
  --error: #ff5a6a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Pantalla de carga entre páginas ===== */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #002361;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 30px;
  transition: opacity .45s ease, visibility .45s ease;
}
.page-loader__logo { width: 230px; max-width: 62vw; height: auto; }
/* Anillo giratorio grueso con el isotipo (la flecha) en el centro */
.page-loader__ring {
  position: relative;
  width: 48px; height: 48px;
  display: grid; place-items: center;
}
.page-loader__ring::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .20);
  border-top-color: #fff;
  animation: loaderSpin .9s linear infinite;
}
.page-loader__icon {
  width: 22px; height: auto;
  animation: loaderPulse 1.6s ease-in-out infinite;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;            /* base igual a la original */
  background: var(--body);
  color: var(--blanco);
  min-height: 100vh;
}

/* ===== Barra superior (fija al hacer scroll) ===== */
.topbar {
  background: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 46px;
  gap: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.topbar__left { display: flex; align-items: center; gap: 110px; }

.hamburger {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #040f20;
  border: none; cursor: pointer;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px;
}
.hamburger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.logo__img { height: 34px; width: auto; display: block; }
.logo__text { font-weight: 700; font-size: 32px; color: #fff; letter-spacing: -.5px; }
.logo__text--sm { font-size: 28px; }
.logo__play {
  width: 0; height: 0;
  border-left: 20px solid var(--verde);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  position: relative;
}
.logo__play::after {
  content: "";
  position: absolute;
  left: -20px; top: -2px;
  width: 0; height: 0;
  border-left: 11px solid var(--azul);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.topbar__right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.login-input {
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 2px;
  height: 35px;
  padding: 0 14px 0 6px;
  font-family: inherit;         /* Montserrat, como el original */
  font-weight: 400;
  line-height: 1.5;
  font-size: 13px;
  width: 290px;
  color: #495057;
}
.login-input:nth-of-type(2) { margin-left: 12px; } /* input↔input = 26px */
.btn--outline { margin-left: 70px; }               /* empuja los botones a la derecha */
.login-input::placeholder { color: #9aa3b2; }

.btn {
  border: none; cursor: pointer;
  font-family: inherit; font-weight: 600;
  font-size: 13px; padding: 8px 10px;
  width: 152px;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: filter .15s, transform .15s ease;
}
.btn:hover { filter: brightness(1.08); transform: scale(1.06); }
.btn--outline { background: transparent; color: #fff; border: 1px solid #2f6b9e; }
.btn--blue { background: #3cb4e5; color: #002361; }
.recuperar {
  color: #3cb4e5;
  margin-left: 18px;
  font-size: 11px;
  text-decoration: underline;
  line-height: 1.5;
  text-align: center;
}

/* Botón "Iniciar sesión": oculto en escritorio, solo se ve en celular */
.login-movil { display: none; }

/* ===== Barra de progreso ===== */
.progress-wrap { background: var(--body); padding: 40px 0 0; }
.progress {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 46px;
  display: flex;
  gap: 16px;
}
.progress__seg { flex: 1; height: 8px; border-radius: 6px; background: var(--azul); }
.progress__seg.is-done { background: #fff; }

/* ===== Página ===== */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 46px 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  /* Zonas del grid en ESCRITORIO: la barra de progreso ocupa todo el ancho arriba,
     y debajo el título + formulario a la izquierda y el tablero a la derecha. */
  grid-template-areas:
    "progress progress"
    "title    aside"
    "form     aside";
  column-gap: 55px;
  row-gap: 0;
  align-items: center;     /* centra el tablero verticalmente con el formulario */
}
.page__title { grid-area: title; }
.progress-wrap { grid-area: progress; padding: 0 0 30px; }
.form-wrap { grid-area: form; max-width: none; margin: 0; width: 100%; }
.aside { grid-area: aside; }

.page__title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 22px;
}
.back { background: none; border: none; cursor: pointer; display: flex; padding: 0; text-decoration: none; }
.back svg { width: 28px; height: 22px; }

/* ===== Formulario ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 50px;
}
.field { display: flex; flex-direction: column; position: relative; }
.field label { font-size: 15px; font-weight: 400; margin-bottom: 12px; }

.field input,
.field select {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--linea);
  padding: 6px 2px;
  font-family: inherit;
  font-size: 16px;
  color: #fff;
  width: 100%;
}
.field input::placeholder { color: var(--azul-claro); font-weight: 600; }
.field input:focus,
.field select:focus { outline: none; border-bottom-color: var(--azul); }
.field.has-error input,
.field.has-error select,
.field.has-error .date { border-bottom-color: var(--error); }

/* Select con icono + alineado en la línea */
.field--select { position: relative; }
.field--select select {
  color: var(--azul-claro);
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  cursor: pointer;
}
.field--select select option { color: #333; }
.field--select::after {
  content: "";
  position: absolute;
  right: 4px; bottom: 4px;
  width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f8bff' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
}

/* Fecha Día / Mes / Año */
.date { display: flex; align-items: center; gap: 14px; }
.date input {
  border: none;
  border-bottom: 2.5px solid var(--linea);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  padding: 6px 2px;
}
.date .date__d, .date .date__m { width: 90px; }
.date .date__y { width: 110px; }
.date input::placeholder { color: var(--azul-claro); font-weight: 600; }
.date input:focus { outline: none; border-bottom-color: var(--azul); }
.date span { color: var(--azul-claro); }

.field__error {
  color: var(--error);
  font-size: 12px;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
}

/* Botón continuar */
.btn-continuar {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 52px auto 14px;
  background: #0d1b42;
  color: #2d4ea0;
  border: 0.8px solid #546fab;
  border-radius: 16px;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s ease;
  transform: translateX(calc((360px + 55px) / 2));  /* centra bajo toda la página, no solo el formulario */
}
.btn-continuar:hover { transform: translateX(calc((360px + 55px) / 2)) scale(1.02); }
.btn-continuar.is-ready { background: var(--azul); color: #fff; }
.guardar {
  display: block;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  transform: translateX(calc((360px + 55px) / 2));
}

/* ===== Ilustración lateral: clipboard ===== */
.aside { display: flex; justify-content: center; }
.aside__img { width: 100%; max-width: 400px; height: auto; display: block; }

/* ===== Footer ===== */
.footer { background: var(--footer); padding: 40px 46px 30px; margin-top: 40px; position: relative; }
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
/* Línea divisoria tenue (degradado cian que se desvanece en los bordes) */
.footer__line {
  max-width: 1200px;
  margin: 40px auto 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(90, 170, 220, 0) 0%, rgba(90, 170, 220, .55) 50%, rgba(90, 170, 220, 0) 100%);
}
.footer__cols { display: flex; gap: 34px; flex-wrap: wrap; flex: 1; align-items: flex-start; }
.footer__col { flex: 0 0 auto; position: relative; }
.footer__head {
  background: transparent; border: none; cursor: pointer;
  color: #4f8bff;
  font-family: inherit;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: flex-start;
  gap: 16px; width: auto;
  padding: 10px 16px;
  border-radius: 50px;
  transition: background .3s ease, color .3s ease;
}
.footer__head .plus {
  color: #4f8bff;
  font-size: 22px; font-weight: 400;
  display: inline-block;
  transition: transform .4s ease, color .3s ease;
}
/* Estado abierto: pastilla azul clara + "+" girado a "x" */
.footer__col.is-open .footer__head { background: #9fcdf0; color: #0a1733; }
.footer__col.is-open .footer__head .plus { color: #0a1733; transform: rotate(135deg); }

.footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  position: absolute;      /* colapsada: fuera del flujo, no ensancha la columna */
  top: 100%; left: 0;
  transition: max-height .45s ease, opacity .3s ease, margin-top .3s ease, gap .3s ease;
}
.footer__col.is-open .footer__list {
  position: static;        /* abierta: vuelve al flujo y empuja el contenido */
  max-height: 600px;
  opacity: 1;
  margin-top: 14px;
  gap: 14px;
}
.footer__list a {
  color: var(--azul-claro);
  text-decoration: none;
  font-size: 14px;
}
.footer__list a:hover { color: #fff; }

.footer__afiliados { text-align: left; min-width: 180px; }
.footer__afiliados p { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.footer__afiliados img { height: 46px; width: auto; }

/* Secciones de logos */
.footer__section {
  max-width: 1200px;
  margin: 34px auto 0;
  text-align: center;
}
.footer__section h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.footer__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 26px 34px;
}
.footer__logos img { height: 40px; width: auto; object-fit: contain; }

/* Carruseles infinitos (marquee) */
.marquee { overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; align-items: center; width: max-content; }
.marquee__track img { width: auto; object-fit: contain; }
.marquee__track--pay { gap: 60px; animation: marquee 38s linear infinite; }
.marquee__track--pay img { height: 40px; }
.marquee__track--rev { animation-direction: reverse; }   /* segunda fila: sentido contrario */
.footer__section--pay .marquee + .marquee { margin-top: 22px; }  /* separación entre las 2 filas */
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Escudos de patrocinadores: fila fija centrada */
.footer__logos--teams { gap: 24px 38px; }
.footer__logos--teams img { height: 68px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Texto "PATROCINADORES OFICIALES" debajo de los escudos */
.footer__section--teams h4 { margin-top: 20px; margin-bottom: 0; }

/* Redes sociales centradas */
.footer__social {
  max-width: 1200px;
  margin: 36px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}
.footer__social img { height: 36px; width: auto; cursor: pointer; }

/* Texto legal (centrado) */
.footer__legal {
  max-width: 1050px;
  margin: 34px auto 0;
  color: var(--tenue);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.footer__contrato { color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.footer__vigilado { color: #fff; font-weight: 600; font-size: 13px; margin-top: 22px; }

/* Barra final: +18 · aviso · Coljuegos */
.footer__strip {
  max-width: 900px;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.footer__strip .age-svg { height: 42px; width: auto; }
.footer__warn { color: #fff; font-weight: 700; font-size: 11px; line-height: 1.5; text-align: center; margin: 0; }
.footer__coljuegos { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.footer__coljuegos span { color: #fff; font-size: 11px; font-weight: 600; }
.footer__coljuegos img { height: 24px; width: auto; }
.footer__version { text-align: center; margin: 20px auto 0; color: var(--tenue); font-size: 11px; opacity: .7; }

/* ===== Flotantes ===== */
.float-clock {
  position: fixed;
  left: 22px; bottom: 22px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #13284f;
  border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  overflow: hidden;
}
.float-clock img { width: 30px; height: 30px; display: block; }
.float-help {
  position: fixed;
  right: 22px; bottom: 18px;
  background: none; border: none; padding: 0;
  cursor: pointer;
  z-index: 3500;   /* por encima del mega-menú (3000) para que se vea el avatar */
  transition: transform .2s ease;
}
.float-help:hover { transform: scale(1.05); }
.float-help img { width: 120px; height: auto; display: block; }

/* Menú de ayuda: overlay a pantalla completa con fondo oscurecido */
.help-menu {
  position: fixed;
  inset: 0;                              /* cubre toda la pantalla */
  background: rgba(0, 45, 110, 0.80);    /* fondo azul semitransparente */
  z-index: 60;
}
.help-menu[hidden] { display: none; }

.help-menu__list {
  list-style: none;
  position: absolute;
  right: 42px; bottom: 120px; top: auto;
  display: flex; flex-direction: column;
  gap: 30px;
}
.help-menu__list li { animation: helpItem .3s ease both; }
.help-menu__list a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
}
.help-menu__list a span { font-weight: 500; }
.help-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  flex: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.help-icon img { width: 24px; height: 24px; display: block; }
.help-menu__close {
  position: absolute;
  right: 36px; bottom: 32px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #38b6e8;
  color: #fff; border: none;
  font-size: 26px; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
@keyframes helpItem {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== Aviso: proyecto de clase (modal al pulsar "Ingresar") ===== */
.aviso-modal {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(2, 8, 24, .7);
  display: grid; place-items: center; padding: 20px;
  animation: megaIn .2s ease;
}
.aviso-modal[hidden] { display: none; }
.aviso-card {
  position: relative; width: 100%; max-width: 380px;
  background: #002361; color: #fff;
  border: 1px solid #2f6b9e; border-radius: 14px;
  padding: 32px 26px 26px; text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
}
.aviso-icon { font-size: 42px; color: #3cb4e5; line-height: 1; margin-bottom: 10px; }
.aviso-card h3 { font-size: 20px; margin-bottom: 10px; }
.aviso-card p { font-size: 14px; line-height: 1.5; color: #dbe6ff; }
.aviso-nota { font-size: 12.5px; color: #9fb0d6; margin-top: 10px; }
.aviso-ok {
  margin-top: 20px; padding: 10px 30px;
  background: #3cb4e5; color: #002361; font-weight: 700; font-size: 14px;
  border: none; border-radius: 6px; cursor: pointer;
}
.aviso-ok:hover { filter: brightness(1.08); }
.aviso-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer;
}

/* ===== Ventana de inicio de sesión (modal del botón "Iniciar sesión") ===== */
.login-modal {
  position: fixed; inset: 0; z-index: 6000;
  background: rgba(2, 8, 24, .72);
  display: grid; place-items: center;
  padding: 18px 42px;      /* más margen a los lados -> tarjeta más angosta/vertical */
  overflow-y: auto;
  animation: megaIn .2s ease;
}
.login-modal[hidden] { display: none; }
.login-card {
  position: relative;
  width: 100%; max-width: 330px;   /* más angosta y alta -> rectangular (vertical) */
  background: #02193F; color: #fff;   /* azul intermedio (entre #002361 y #040F20) */
  border-radius: 8px;                 /* esquinas más cuadradas */
  padding: 34px 24px 30px;            /* un poco más de alto */
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
}
.login-card__close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.login-card__brand {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; margin-bottom: 22px;
}
.login-card__brand img { height: 42px; width: auto; }
.login-card__brand span { font-size: 13px; color: #cdd9ee; }
.login-card__form { display: flex; flex-direction: column; gap: 16px; }
.login-field {
  background: #fff; border: none; border-radius: 4px;   /* esquinas más cuadradas */
  height: 42px; padding: 0 14px;                         /* más delgadas (menos altas) */
  font-family: inherit; font-size: 14px; color: #333;
}
.login-field::placeholder { color: #8a93a6; }
.login-field:focus { outline: 2px solid #3cb4e5; }
.login-remember {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: #fff; margin-top: 4px; cursor: pointer;
}
.login-remember input { width: 18px; height: 18px; accent-color: #3cb4e5; }
.login-card__btns {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-top: 10px;
}
.login-card__btns .btn { width: 100%; border-radius: 4px; padding: 13px 10px; font-size: 14px; margin: 0; }
.login-card__recuperar {
  display: block; text-align: center;
  color: #3cb4e5; text-decoration: underline;
  font-size: 14px; margin: 32px 0 18px;   /* más separación tras los botones */
}
.login-card__tc { text-align: center; font-size: 13px; color: #dbe6ff; line-height: 1.45; }
.login-card__tclink {
  display: block; text-align: center;
  color: #3cb4e5; font-size: 13px;
  word-break: break-word; margin-top: 4px; text-decoration: none;
}

/* ===== Mega-menú (hamburguesa) ===== */
.no-scroll { overflow: hidden; }
.megamenu {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(1, 8, 26, .5);     /* oscurece la parte visible de la página (derecha) */
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  overflow-y: auto;
  animation: megaIn .22s ease;
}
.megamenu[hidden] { display: none; }
@keyframes megaIn { from { opacity: 0; } to { opacity: 1; } }
.megamenu__close {
  position: absolute; top: 24px; right: 42px;
  background: none; border: none; color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer;
  transition: transform .15s;
}
.megamenu__close:hover { transform: scale(1.12); }
/* Panel sólido a la izquierda (deja ver la página a la derecha) */
.megamenu__inner {
  position: relative;
  width: 76%;
  min-height: 100vh;
  background: #001f52;
  padding: 72px 46px 48px;
}
.megamenu__cats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px;
}
.megacat__icon { width: 54px; height: 54px; display: block; margin-bottom: 20px; }
.megacat h3 { color: #fff; font-size: 20px; font-weight: 800; line-height: 1.12; margin-bottom: 20px; }
.megacat ul { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.megacat a { color: #cdd9ee; text-decoration: none; font-size: 15px; transition: color .15s; }
.megacat a:hover { color: #fff; }
.megalive { display: inline-flex; align-items: center; gap: 7px; }
.megalive::before {
  content: ""; width: 17px; height: 13px; border-radius: 3px;
  background: #e23b4e; flex: 0 0 auto;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath fill='black' d='M2 2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm18 3l4-2v12l-4-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath fill='black' d='M2 2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm18 3l4-2v12l-4-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.megamenu__divider { height: 1px; background: rgba(255, 255, 255, .13); margin: 44px 0 36px; }
.megamenu__bottom { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: start; }
.megalinks { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.megalinks a { color: #cdd9ee; text-decoration: none; font-size: 15px; display: flex; align-items: center; gap: 13px; transition: color .15s; }
.megalinks a:hover { color: #fff; }
.megalinks svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.megamenu__logos { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.megamenu__logos img { height: 34px; width: auto; }
@media (max-width: 1040px) {
  .megamenu__inner { width: 100%; }
  .megamenu__cats { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
}
@media (max-width: 680px) {
  .megamenu__cats { grid-template-columns: repeat(2, 1fr); }
  .megamenu__bottom { grid-template-columns: 1fr; gap: 28px; }
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  /* Tablet: una sola columna. Anulamos las zonas del grid para que
     título, progreso y formulario se apilen sin conflicto. */
  .page { grid-template-columns: 1fr; grid-template-areas: none; }
  .aside { display: none; }
  .btn-continuar, .guardar { transform: none; }  /* sin tablero, vuelve al centro */
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .topbar__right .login-input { display: none; }
  .recuperar { display: none; }
  .page__title { font-size: 26px; }
  .date .date__d, .date .date__m { width: 60px; }
  .date .date__y { width: 72px; }
}

/* ===== CELULAR (móvil) — barra superior, registro y footer (compartidos) ===== */
@media (max-width: 720px) {
  /* --- Barra superior --- */
  .topbar { padding: 10px 14px; gap: 10px; flex-wrap: nowrap; }  /* logo a la izq, botones a la der, misma fila */
  .topbar__left { gap: 10px; min-width: 0; }
  .topbar__right { flex: 0 0 auto; }
  .hamburger { width: 42px; height: 42px; }
  .logo__img { height: 28px; }

  /* Ocultamos el login de escritorio: formulario, inputs sueltos,
     el botón "Ingresar" y el enlace "Recuperar contraseña".
     (El formulario del inicio lleva estilo en línea, por eso el !important.) */
  #loginFormInline { display: none !important; }
  .topbar__right .login-input { display: none; }
  .topbar__right .btn--outline:not(.login-movil) { display: none; }
  .recuperar { display: none; }

  /* Mostramos los dos botones apilados a la derecha: Iniciar sesión + Registrarse */
  .login-movil { display: inline-block; }
  .topbar__right {
    flex-direction: column;
    align-items: flex-end;   /* pegados a la derecha, como en el celular real */
    gap: 8px;
  }
  .topbar__right .btn { width: 132px; margin-left: 0; border-radius: 6px; font-size: 12px; }

  /* --- Página de registro --- */
  .page {
    display: flex;           /* de 2 columnas a una sola columna apilada */
    flex-direction: column;
    align-items: stretch;    /* los bloques ocupan todo el ancho (la barra de progreso no se encoge) */
    padding: 24px 18px 40px;
    gap: 22px;
  }
  /* Orden exacto en celular: título → tablero → barra de progreso → campos */
  .page__title   { order: 1; }
  .aside         { order: 2; display: flex; }   /* tablero visible (en escritorio está oculto) */
  .progress-wrap { order: 3; padding: 0; }
  .form-wrap     { order: 4; }
  .progress { padding: 0; }   /* barra más ancha, con poco margen lateral */
  .aside__img { max-width: 230px; }

  /* Campos uno debajo de otro. minmax(0,1fr) + min-width:0 evitan que un
     campo "estire" la columna más allá del ancho del celular. */
  .grid { grid-template-columns: minmax(0, 1fr); gap: 24px 0; }
  .field { min-width: 0; }

  /* Día / Mes / Año repartidos a lo ancho */
  .date { gap: 12px; }
  .date input { flex: 1; width: auto; min-width: 0; }
  .date .date__d, .date .date__m, .date .date__y { width: auto; }

  /* Botón Continuar al centro y a todo el ancho (sin el desplazamiento del escritorio) */
  .btn-continuar, .guardar { transform: none; }

  /* --- Footer en una sola columna y centrado --- */
  .footer { padding: 32px 18px 26px; }
  .footer__inner { gap: 26px; }
  .footer__cols { gap: 14px; width: 100%; }
  .footer__col { width: 100%; }
  .footer__afiliados { width: 100%; text-align: center; }

  .footer__logos--teams img { height: 48px; }
  .footer__social { gap: 22px; flex-wrap: wrap; }
  .footer__strip { gap: 18px; }
  .footer__legal { font-size: 11px; }

  /* Botón flotante de ayuda un poco más pequeño */
  .float-help img { width: 92px; }
  .float-clock { left: 14px; bottom: 14px; }

  /* --- Mega-menú (hamburguesa) como ACORDEÓN vertical en celular --- */
  /* El panel NO cubre toda la pantalla: ocupa el 86% izquierdo y a la derecha
     se ve la página borrosa (el desenfoque lo pone .megamenu). */
  .megamenu__inner { width: 93%; padding: 58px 22px 44px; background: #02193F; }  /* azul un poco más claro; menos espacio a la derecha */

  /* Las 5 categorías pasan de rejilla a lista vertical, con más espacio entre ellas */
  .megamenu__cats { display: flex; flex-direction: column; gap: 75px; }

  /* Cada categoría: fila [ícono | nombre | +]. El submenú (ul) va debajo, plegado. */
  .megacat {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 14px;
    padding: 0 40px 0 0;   /* hueco a la derecha para el +/× */
    cursor: pointer;
  }
  .megacat__icon { width: 44px; height: 44px; margin: 0; }   /* íconos más pequeños */
  .megacat h3 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; position: relative; }  /* texto más pequeño */

  /* El signo + / × a la derecha (cambia solo con la clase .is-open) */
  .megacat::after {
    content: "+";
    position: absolute; right: 4px; top: 0;
    width: 30px; height: 44px;
    display: grid; place-items: center;
    color: #fff; font-size: 30px; font-weight: 300; line-height: 1;   /* + un poco más grande */
  }
  .megacat.is-open::after { content: "\00d7"; }   /* × */

  /* Subrayado verde bajo el título cuando está abierto */
  .megacat.is-open h3::after {
    content: ""; position: absolute; left: 0; bottom: -7px;
    width: 78px; height: 3px; background: #96ff03; border-radius: 2px;
  }

  /* Submenú plegable (se muestra solo al abrir) */
  .megacat ul {
    flex-basis: 100%; width: 100%;
    max-height: 0; overflow: hidden; opacity: 0;
    padding-left: 58px;          /* alineado con el texto, pasando el ícono (44 + 14) */
    gap: 0;
    transition: max-height .4s ease, opacity .3s ease, margin .3s ease;
  }
  .megacat.is-open ul { max-height: 520px; opacity: 1; margin: 14px 0 6px; }
  .megacat ul li { padding: 8px 0; }
  .megacat a { font-size: 15px; }

  /* Enlaces de abajo (Tiendas, Chat, Blog, Escríbenos…) en 2 columnas, como la referencia */
  .megamenu__bottom { grid-template-columns: 1fr 1fr; gap: 26px 20px; }
  .megamenu__logos { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 20px; margin-top: 10px; }
}
