/* ==========================================================================
   VIEWPORT, HERO HEADER & FOOTER
   ========================================================================== */
.app-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-header {
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  background: transparent;
  padding-bottom: 4px;
  overflow: visible !important;
}

.hero-header:has(.lang-dropdown-wrapper.open),
.hero-header.menu-open {
  z-index: 10000 !important;
}

.hero-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  z-index: 1;
  pointer-events: none;
  background-image: url('../assets/sun.svg');
  background-repeat: no-repeat;
  background-position: right top;
  background-size: contain;
}

.topbar {
  position: relative;
  z-index: 10;
  padding: 14px 20px 4px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  overflow: visible;
}

.brand {
  justify-self: start;
  display: flex;
  align-items: center;
}

.brand img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-fallback {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.brand-fallback span { color: var(--coral); }

.topbar-center {
  justify-self: center;
  position: relative;
  z-index: 1000;
}

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4px 20px 6px;
}

.hero .eyebrow {
  font-size: 0.72rem;
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.hero h1,
.hero .hero-title {
  font-size: 1.55rem;
  color: var(--navy);
  line-height: 1.2;
  margin: 10px 0 6px 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero .apt-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(30, 76, 97, 0.12);
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(30, 76, 97, 0.04);
}

.hero .apt-tag strong {
  font-weight: 700;
}

.hero .addr {
  margin-top: 5px;
  display: flex;
  justify-content: center;
}

.hero .addr-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 3px 6px;
  color: var(--navy);
  font-family: var(--font-inter);
  font-size: 0.82rem;
  font-weight: 600;
}
.hero .hero-location {
  display: flex;
  justify-content: center;
  margin-top: 3px;
}

.hero .addr-text {
  border-bottom: 1px dashed rgba(30, 76, 97, 0.35);
  padding-bottom: 1px;
}

.hero .addr-pin { color: var(--coral); }
.hero .addr-arrow { color: rgba(30, 76, 97, 0.6); }

/* Stepper Dots */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px 8px;
  position: relative;
  z-index: 10;
}

.step-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.step-dot {
  height: 5px;
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  background: rgba(30, 76, 97, 0.22);
  width: 8px;
}

.step-dot.active {
  background: var(--navy);
  width: 24px;
}

/* Área da Roleta / Esteira */
.sheet-gesture-area {
  flex: 1;
  width: 100%;
  position: relative;
  z-index: 20;
  padding-top: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.roulette-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.stage-card-wrapper {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  padding: 0 14px 6px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: visible;
}

/* ==========================================================================
   CARD PRINCIPAL - LIQUID GLASS DE ALTA REFRAÇÃO
   ========================================================================== */
.stage-card-inner {
  position: relative;
  background: var(--glass-card-bg);
  backdrop-filter: var(--glass-backdrop-filter);
  -webkit-backdrop-filter: var(--glass-backdrop-filter);
  border-radius: var(--radius-sheet);
  border: var(--glass-border-specular);
  box-shadow: var(--glass-shadow-layered);
  padding: 16px 18px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 0; /* Impede overflow flex descontrolado */
}

/* Brilho linear suave no topo sem bloquear a transparência */
.stage-card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.08) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.stage-content-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  /* 👉 Respiro aumentado: afasta os inputs e blocos da barra de rolagem */
  padding-right: 10px;
  padding-left: 2px;
  -webkit-overflow-scrolling: touch;

  /* Suporte Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 76, 97, 0.25) transparent;
}

/* Scrollbar ultrafina e elegante (Chrome, Safari, Edge) */
.stage-content-scroll::-webkit-scrollbar {
  width: 4px;
}

.stage-content-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0; /* Não encosta nas bordas curvas do card */
}

.stage-content-scroll::-webkit-scrollbar-thumb {
  background: rgba(30, 76, 97, 0.22);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.stage-content-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 76, 97, 0.45);
}

.stage-content-scroll > *:last-child,
.stage-content-scroll .form-group:last-child {
  margin-bottom: 2px !important;
}

.stage-footer-nav-col {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding-top: 10px;
}
.swipe-hint-text {
  font-size: 0.76rem;
  color: var(--navy);
  opacity: 0.75;
  font-weight: 700;
  text-align: center;
  margin-top: 2px;
}

.stage-head {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(30, 76, 97, 0.1);
  padding: 0 0 8px 0;    /* Era 14px */
  margin-bottom: 10px;   /* Era 16px - aproxima diretamente o bloco */
}

.stage-footer-nav {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(30, 76, 97, 0.08);
  padding-top: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-footer {
  background: transparent;
  padding: 8px 16px 14px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;                     /* Weight normal (sem ser bold) */
  color: #FFFFFF;                       /* 100% Branco */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); /* Leve sombra para leitura sobre o fundo claro ou escuro */
  position: relative;
  z-index: 30;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.stage-head h2 {
  font-family: var(--font-karla), sans-serif;
  font-size: 1.08rem;    /* Tamanho calibrado e proporcional */
  font-weight: 700;      /* Suavizado (era 800) */
  color: var(--navy);    /* Tom azul-marinho MAPÊ (#1E4C61) */
  letter-spacing: -0.01em;
  margin: 0;
}

/* ==========================================================================
   VERSÃO DESKTOP (AMPLA, ERGONÔMICA E EM COLUNAS)
   ========================================================================== */

@media (min-width: 768px) {
  /* Centraliza na tela sem barra de rolagem na janela do navegador */
  html, body {
    overflow: hidden !important;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
  }

  /* Altura ampliada e imersiva para o card */
  .app-viewport {
    width: 100%;
    max-width: 860px;
    height: min(94vh, 920px);
    max-height: 920px;
    margin: auto;
    border-radius: 32px;
    box-shadow: 0 32px 80px rgba(18, 51, 66, 0.2), 0 4px 16px rgba(0, 0, 0, 0.06);
  }

  .hero-header {
    padding-bottom: 2px;
  }

  .hero h1,
  .hero .hero-title {
    font-size: 1.75rem;
    margin: 4px 0 6px 0;
  }

  .steps-indicator {
    padding: 4px 20px 6px;
  }

  .stage-card-wrapper {
    padding: 0 24px 8px;
  }

  .stage-card-inner {
    padding: 18px 24px 14px;
  }
}

@media (min-width: 1400px) {
  .app-viewport {
    max-width: 880px;
    height: min(94vh, 920px);
    max-height: 920px;
  }
}