/* Professional Trust — tema base claro */
body {
  background-color: #f8f9fa;
  color: #191c1d;
  overflow-x: hidden;
  min-height: max(884px, 100dvh);
}

/* Logo en header (reemplaza ícono + texto) */
.header-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.header-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .header-logo {
    height: 44px;
    max-width: 180px;
  }
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
}

.primary-glow,
.gold-glow {
  box-shadow: 0 4px 14px 0 rgba(1, 87, 123, 0.2);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid #e1e3e4;
  box-shadow: 0 4px 24px rgba(1, 87, 123, 0.06);
}

.text-balance {
  text-wrap: balance;
}

.bg-mesh-gradient {
  background-color: #f8f9fa;
  background-image:
    radial-gradient(at 0% 0%, rgba(1, 87, 123, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 29, 54, 0.05) 0px, transparent 50%);
}

/*
 * Fondo casita SOLO en la primera vista (hero .page-bg-show).
 * Full-bleed (sin bandas laterales). Imagen nítida + velo blanco ajustable.
 *
 * Ajusta legibilidad aquí (0 = más foto, 1 = más blanco):
 */
:root {
  --hero-veil-top: 0.70;
  --hero-veil-mid: 0.65;
  --hero-veil-bottom: 0.70;
}

.page-bg-show {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Full viewport width — sin “lados” grises */
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  min-height: min(100dvh, 900px);
}

.page-bg-show::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../img/bg-casita.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.page-bg-show::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, var(--hero-veil-top)) 0%,
    rgba(255, 255, 255, var(--hero-veil-mid)) 50%,
    rgba(248, 249, 250, var(--hero-veil-bottom)) 100%
  );
  pointer-events: none;
}

.page-bg-show > * {
  position: relative;
  z-index: 2;
}

/* Contenido del hero centrado; la foto sigue a todo el ancho */
.page-bg-show > .grid,
.page-bg-show > .relative.z-10,
.page-bg-show > .relative:not(.absolute):not([class*="inset-0"]) {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Capas absolutas internas del hero no deben tapar la foto */
.page-bg-show > .absolute.inset-0,
.page-bg-show > .absolute.inset-0.z-0,
.page-bg-show > .absolute.z-0 {
  background-color: transparent !important;
  opacity: 0.2;
}

.page-bg-show.bg-mesh-gradient,
.page-bg-show.bg-white,
.page-bg-show.bg-surface-container-lowest {
  background-color: transparent !important;
  background-image: none !important;
}

.hero-gradient {
  background: linear-gradient(135deg, rgba(1, 87, 123, 0.08) 0%, transparent 50%, rgba(248, 249, 250, 0.9) 100%);
}

.text-gradient-gold,
.gradient-text {
  background: linear-gradient(90deg, #01577b, #1d6489);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.transition-standard {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-gold:hover {
  filter: brightness(1.05);
}

.elite-input {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #c0c7cf;
  color: #191c1d;
  padding: 0 1rem;
  height: 48px;
  border-radius: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.elite-input:focus {
  outline: none;
  border-color: #01577b;
  box-shadow: 0 0 0 1px #01577b;
}

.elite-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 2rem;
  background-color: #01577b;
  color: #ffffff;
  font-family: Lexend, sans-serif;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: transform 0.15s, filter 0.15s;
}

.elite-btn-primary:hover {
  filter: brightness(1.05);
}

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

.form-error {
  border-color: #ba1a1a !important;
}

.form-success-msg {
  color: #25d366;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.funnel-page main,
.funnel-page footer {
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .funnel-page main,
  .funnel-page footer {
    padding-bottom: 0;
  }
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 1rem;
  border: 2px solid #c0c7cf;
  border-radius: 0.75rem;
  background: #f3f4f5;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  text-align: left;
}

.consent-check.is-checked,
.consent-check:has(.consent-checkbox:checked) {
  border-color: #01577b;
  background: rgba(1, 87, 123, 0.08);
  box-shadow: 0 0 0 1px rgba(1, 87, 123, 0.25);
}

.consent-check-label {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #40484e;
}

.consent-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem;
  min-height: 1.25rem;
  max-width: 1.25rem;
  margin: 0.125rem 0 0;
  padding: 0;
  border: 2px solid #71787f;
  border-radius: 0.35rem;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.consent-checkbox:hover {
  border-color: #01577b;
}

.consent-checkbox:focus-visible {
  outline: 2px solid #01577b;
  outline-offset: 2px;
}

.consent-checkbox:checked {
  background: #01577b;
  border-color: #01577b;
  box-shadow: 0 0 0 3px rgba(1, 87, 123, 0.2);
}

.consent-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 0.32rem;
  top: 0.05rem;
  width: 0.35rem;
  height: 0.65rem;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.lang-switcher {
  font-family: inherit;
}

.lang-switcher-btn {
  min-width: 2rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #71787f;
  border-radius: 0.375rem;
  transition: color 0.15s, background 0.15s;
}

.lang-switcher-btn:hover {
  color: #01577b;
  background: rgba(1, 87, 123, 0.1);
}

.lang-switcher-btn.is-active {
  color: #01577b;
  background: rgba(1, 87, 123, 0.12);
}

.lang-switcher-sep {
  color: #c0c7cf;
  font-size: 0.65rem;
  user-select: none;
}

@media (max-width: 767px) {
  /* Texto de marca antiguo (si queda); el logo .header-logo siempre visible */
  .header-brand-text:not(.header-logo-keep) {
    display: none !important;
  }
}

@media (min-width: 768px) {
  body.funnel-page .funnel-hero-cta {
    display: none !important;
  }
}

/* CTA final de funnel — fondo con fade y texto legible */
.funnel-bottom-cta {
  position: relative;
  isolation: isolate;
  margin-bottom: 0;
}

.funnel-bottom-cta__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.06);
}

.funnel-bottom-cta__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 29, 54, 0.55) 0%, rgba(1, 87, 123, 0.88) 45%, rgba(0, 29, 54, 0.95) 100%);
}

.funnel-bottom-cta__card {
  padding: 2.5rem 1.5rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 48px rgba(0, 29, 54, 0.25);
}

@media (min-width: 768px) {
  .funnel-bottom-cta__card {
    padding: 3rem 2.5rem;
  }
}

.funnel-bottom-cta h2 {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.funnel-bottom-cta p {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.funnel-bottom-cta + footer,
.funnel-bottom-cta ~ footer {
  margin-top: 0;
  border-top: none;
}
