/**
 * Checkit · Login gate (bifurcación Viajeros / Comunidad)
 * Hero híbrido · viewport 100vh sin scroll · navbar/logo intactos.
 */

.page-login {
  --gate-ink: #0c1222;
  --gate-body: #334155;
  --gate-muted: #5b6b7c;
  --gate-orange: #f97316;
  --gate-orange-deep: #ea580c;
  --gate-gold: #eab308;
  --gate-blue: #2563eb;
  --gate-blue-deep: #1d4ed8;
  --gate-radius: 22px;
  --gate-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
  --gate-shadow-hover: 0 28px 58px rgba(15, 23, 42, 0.32);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0b1220;
}

html:has(body.page-login),
body.page-login {
  height: 100%;
  overflow: hidden;
}

/* ── Hero híbrido (fondo de pantalla) ── */
.c-login-hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0b1220;
  pointer-events: none;
}

.c-login-hero-bg__video {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.c-login-hero-bg__image {
  position: absolute;
  inset: 0;
  background-color: #0b1220;
  background-image: url("../assets/images/login-bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

@supports (background-image: image-set(url("../assets/images/login-bg.webp") type("image/webp"))) {
  .c-login-hero-bg__image {
    background-image: image-set(
      url("../assets/images/login-bg.webp") type("image/webp"),
      url("../assets/images/login-bg.jpg") type("image/jpeg")
    );
  }
}

.c-login-hero-bg__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 20, 40, 0.35) 0%, rgba(8, 20, 40, 0.52) 55%, rgba(8, 20, 40, 0.62) 100%);
  z-index: 1;
}

@media (min-width: 768px) {
  .c-login-hero-bg__video {
    display: block;
  }

  .c-login-hero-bg__image {
    z-index: 0;
  }

  .c-login-hero-bg.is-video-ready .c-login-hero-bg__image {
    opacity: 0;
    transition: opacity 0.45s ease;
  }
}

@media (max-width: 767px) {
  .c-login-hero-bg__video {
    display: none !important;
  }
}

.page-login .c-header-collective {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

/* Subnav compacto en landing para liberar altura útil */
.page-login .c-header-collective__main--subnav-only {
  display: none;
}

.page-login .wrapper-login {
  position: relative;
  z-index: 1;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  background: transparent;
  overflow: hidden;
}

.page-login .login-form-modal.c-login-gate {
  position: relative;
  z-index: 2;
  padding: 8px 16px 14px;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.c-login-gate__shell {
  width: min(920px, 100%);
  margin: 0 auto;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.c-login-gate__intro {
  text-align: center;
  color: #fff;
  margin: 0;
  flex-shrink: 0;
}

.c-login-gate__intro h1 {
  margin: 0 0 5px;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(249, 115, 22, 0.18);
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.28));
}

.c-login-gate__intro p {
  margin: 0 auto;
  max-width: 42rem;
  font-size: clamp(0.86rem, 1.55vw, 1.04rem);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
  text-wrap: balance;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* ── Bifurcación: apiladas a ancho completo (plantilla idéntica) ── */
.c-login-gate__chooser {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

.c-login-path-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 252, 248, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--gate-radius);
  box-shadow: var(--gate-shadow);
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.14));
  padding: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, border-color 0.3s ease;
}

.c-login-path-card--partners {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 255, 0.97) 100%);
}

.c-login-path-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gate-shadow-hover);
  border-color: rgba(249, 115, 22, 0.35);
  filter: drop-shadow(0 18px 36px rgba(249, 115, 22, 0.22));
}

.c-login-path-card--partners:hover {
  border-color: rgba(37, 99, 235, 0.35);
  filter: drop-shadow(0 18px 36px rgba(37, 99, 235, 0.2));
}

.c-login-path-card__media {
  flex: 0 0 36%;
  max-width: 36%;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--gate-radius) 0 0 var(--gate-radius);
  align-self: stretch;
}

.c-login-path-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 45%, rgba(15, 23, 42, 0.12) 100%);
  pointer-events: none;
}

.c-login-path-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.c-login-path-card:hover .c-login-path-card__media img {
  transform: scale(1.05);
}

/* Cuerpo estándar: cabeza + 2 CTAs (misma grilla en ambas fichas) */
.c-login-path-card__body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 14px 18px 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.c-login-path-card__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 auto;
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
}

.c-login-path-card__eyebrow {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--gate-orange-deep);
  border: 1px solid #fdba74;
}

.c-login-path-card__eyebrow i {
  font-size: 0.72em;
}

.c-login-path-card--partners .c-login-path-card__eyebrow {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--gate-blue-deep);
  border-color: #93c5fd;
}

.c-login-path-card__title {
  margin: 0;
  width: 100%;
  min-height: 2.4em;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  font-weight: 800;
  color: var(--gate-ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-login-path-card__lead,
.c-login-path-card__text {
  margin: 0;
  width: 100%;
  min-height: 2.7em;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--gate-body);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.c-login-path-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 2px;
  flex: 0 0 auto;
  min-height: auto;
  align-content: stretch;
  align-items: stretch;
  flex-shrink: 0;
}

/* Cada CTA = ranura idéntica: ícono+label + hint de 2 líneas */
.c-login-path-cta {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(248, 250, 252, 0.9);
  align-content: stretch;
  min-height: 0;
  height: 100%;
}

.c-login-path-cta .c-button {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.86rem;
  border-radius: 11px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.c-login-path-cta .c-button i {
  font-size: 0.92em;
  flex-shrink: 0;
}

.c-login-path-cta .c-button span {
  line-height: 1.15;
  text-align: center;
}

.c-login-path-cta .c-button:hover {
  /* Sin translateY: evita que el borde inferior de la ficha recorte el botón */
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  filter: brightness(1.05);
}

.c-login-path-cta .c-button--brand {
  background: linear-gradient(135deg, var(--gate-orange) 0%, var(--gate-orange-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.3);
}

.c-login-path-card--partners .c-login-path-cta .c-button--brand {
  background: linear-gradient(135deg, var(--gate-blue) 0%, var(--gate-blue-deep) 100%);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.c-login-path-cta .c-button--outline {
  background: #fff;
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  color: var(--gate-ink);
}

.c-login-path-cta .c-button--outline:hover {
  border-color: rgba(249, 115, 22, 0.45);
  color: var(--gate-orange-deep);
}

.c-login-path-card--partners .c-login-path-cta .c-button--outline:hover {
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--gate-blue-deep);
}

.c-login-path-cta__hint {
  margin: 0;
  min-height: 2.4em;
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--gate-muted);
  text-align: center;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Paneles (paso 2) ── */
.c-login-gate__panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--gate-radius);
  box-shadow: var(--gate-shadow);
  padding: clamp(16px, 2.4vw, 28px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: min(520px, 100%);
  margin: 0 auto;
  max-height: 100%;
  overflow: auto;
}

.c-login-gate__panel[hidden],
.c-login-gate__chooser[hidden],
.c-login-gate__auth[hidden] {
  display: none !important;
}

.c-login-gate__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--gate-muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin: 0 0 10px;
}

.c-login-gate__back:hover {
  color: var(--gate-ink);
}

.c-login-gate__panel-title {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 800;
  color: var(--gate-ink);
  line-height: 1.2;
  text-wrap: balance;
}

.c-login-gate__panel-lead {
  margin: 0 0 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--gate-body);
  text-wrap: pretty;
}

.c-login-gate__option {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.c-login-gate__option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.c-login-gate__option .c-button {
  min-height: 44px;
  justify-content: center;
  font-weight: 800;
  border-radius: 12px;
  text-decoration: none;
}

.c-login-gate__option-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--gate-muted);
  text-wrap: pretty;
}

.c-login-gate__auth {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.c-login-gate__auth .c-login-form-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gate-ink);
}

.c-login-gate__auth .c-login-form-subtitle {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--gate-muted);
}

.c-login-gate__auth .c-icon-escort .c-text-input {
  border-radius: 10px;
  min-height: 46px;
}

.c-login-gate__auth #btn-signin {
  min-height: 48px;
  font-weight: 800;
  border-radius: 12px;
}

.c-login-gate__soft-link {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--gate-muted);
}

.c-login-gate__soft-link a {
  color: var(--gate-orange-deep);
  font-weight: 700;
  text-decoration: none;
}

.c-login-gate__soft-link a:hover {
  text-decoration: underline;
}

.c-login-gate__panel.is-auth-open .c-login-gate__option,
.c-login-gate__panel.is-auth-open .c-login-gate__panel-lead {
  display: none;
}

/* En login de partners, el link a registro permanece visible */
#login-path-partners.is-auth-open .c-login-gate__soft-link {
  display: block;
}

#login-path-travel.is-auth-open .c-login-gate__soft-link {
  display: none;
}

.c-login-gate__panel.is-auth-open .c-login-gate__auth {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ── Cookies: barra inferior elegante ── */
.page-login .c-modal--cookies {
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px max(12px, env(safe-area-inset-bottom, 0px));
}

.page-login .c-modal--cookies .c-modal__backmask {
  background: transparent;
  pointer-events: none;
}

.page-login .c-modal--cookies .c-modal__wrapper {
  max-width: min(720px, 100%);
  width: 100%;
  margin: 0;
  transform: translateY(12px);
}

.page-login .c-modal--cookies.is-active .c-modal__wrapper {
  transform: translateY(0);
}

.page-login .c-modal--cookies .c-modal__container {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.page-login .c-modal--cookies .c-modal__body {
  padding: 14px 18px;
}

.page-login .c-modal--cookies .c-modal__body h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gate-ink);
}

.page-login .c-modal--cookies .c-modal__body p {
  margin: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--gate-body);
}

.page-login .c-modal--cookies .c-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Flotantes: solo WhatsApp ── */
.page-login .c-ai-agent,
.page-login .c-detalle-scroll-top,
.page-login .c-checkit-scroll-top,
.page-login .c-guest-cta {
  display: none !important;
}

.page-login .c-whatsapp-button {
  right: 18px !important;
  bottom: 18px !important;
  left: auto !important;
  z-index: 90;
  transform: scale(0.92);
}

.page-login .c-whatsapp-button__tag {
  display: none !important;
}

/* Footer oculto en landing 100vh (markup intacto) */
.page-login .c-footer-collective {
  display: none;
}

/* ── Móvil / tablet: fichas más altas, imagen de portada grande, scroll con el dedo ── */
@media (max-width: 1024px) {
  html:has(body.page-login),
  body.page-login,
  .page-login {
    height: auto;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page-login .wrapper-login {
    height: auto;
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    overflow: visible;
  }

  .page-login .login-form-modal.c-login-gate {
    padding: 8px 10px max(18px, env(safe-area-inset-bottom, 0px));
    height: auto;
    min-height: calc(100dvh - 64px);
    align-items: flex-start;
    overflow: visible;
  }

  .c-login-gate__shell {
    width: 100%;
    max-height: none;
    gap: 10px;
  }

  .c-login-gate__intro h1 {
    font-size: 1.28rem;
    margin-bottom: 4px;
  }

  .c-login-gate__intro p {
    font-size: 0.82rem;
    max-width: 24rem;
    line-height: 1.35;
    white-space: normal;
  }

  .c-login-gate__chooser {
    grid-template-rows: auto auto;
    gap: 14px;
    flex: 0 0 auto;
    min-height: auto;
  }

  .c-login-path-card {
    flex-direction: column;
    border-radius: 18px;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .c-login-path-card__media {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    height: clamp(168px, 38vw, 240px);
    min-height: 168px;
    border-radius: 18px 18px 0 0;
  }

  .c-login-path-card__media::after {
    background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, 0.3) 100%);
  }

  .c-login-path-card__body {
    padding: 14px 14px 18px;
    gap: 12px;
    justify-content: flex-start;
    overflow: visible;
  }

  .c-login-path-card__head {
    gap: 6px;
    flex: 0 0 auto;
    overflow: visible;
  }

  .c-login-path-card__eyebrow {
    font-size: 0.62rem;
    padding: 4px 10px;
    gap: 6px;
  }

  .c-login-path-card__title {
    font-size: 1.05rem;
    line-height: 1.2;
    min-height: 0;
    -webkit-line-clamp: 2;
  }

  .c-login-path-card__lead,
  .c-login-path-card__text {
    font-size: 0.84rem;
    line-height: 1.35;
    min-height: 0;
    -webkit-line-clamp: 3;
  }

  .c-login-path-card__actions {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .c-login-path-cta {
    gap: 6px;
    padding: 10px 10px 12px;
    border-radius: 12px;
  }

  .c-login-path-cta .c-button {
    min-height: 44px;
    font-size: 0.78rem;
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 10px;
  }

  .c-login-path-cta__hint {
    font-size: 0.7rem;
    line-height: 1.3;
    min-height: 2.6em;
  }

  .c-login-path-card:hover {
    transform: none;
  }
}

@media (max-width: 819px) {
  .page-login .login-form-modal.c-login-gate {
    padding: 6px 8px max(16px, env(safe-area-inset-bottom, 0px));
  }

  .c-login-path-card__media {
    height: clamp(180px, 42vw, 260px);
    min-height: 180px;
  }
}

@media (max-width: 380px) {
  .c-login-path-card__title {
    font-size: 0.95rem;
  }

  .c-login-path-card__actions {
    grid-template-columns: 1fr;
  }

  .c-login-path-cta .c-button {
    font-size: 0.8rem;
    min-height: 44px;
  }

  .c-login-path-card__media {
    height: 170px;
    min-height: 170px;
  }
}

@media (min-width: 1025px) {
  .page-login .login-form-modal.c-login-gate {
    padding: 12px 24px 18px;
  }

  .c-login-gate__intro p {
    white-space: nowrap;
  }

  .c-login-gate__chooser {
    gap: 14px;
  }

  .c-login-path-cta .c-button {
    min-height: 46px;
  }
}
