* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  color: #17201a;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select {
  outline: none;
}

/* ============================================================
   VARIABLES
============================================================ */

:root {
  --green: #198754;
  --green-dark: #12683f;
  --green-light: #eaf6ef;
  --green-border: #bfe3ce;

  --text: #17201a;
  --text-secondary: #657069;
  --text-muted: #8b958e;

  --border: #e2e7e3;
  --border-dark: #d5dcd7;

  --background: #f5f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf8;

  --danger: #c0392b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 16px 45px rgba(21, 36, 27, 0.07);

  --transition: 180ms ease;
}

/* ============================================================
   MAIN LAYOUT
============================================================ */

.casale-page {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.simulator-area {
  width: 100%;
}

.simulator-area {
  display: flex;
  align-items: center;
}

.casale-page.onboarding-state .simulator-area {
  padding: 48px 32px;
}

.casale-page.simulation-state .simulator-area {
  padding: 48px 32px;
}

/* ============================================================
   DESKTOP — HERO + FORM
============================================================ */

.casale-page.onboarding-state {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(620px, 1.1fr);
}

.casale-page.simulation-state {
  display: block;
}

/* ============================================================
   HERO
============================================================ */

.casale-hero {
  display: flex;
  align-items: center;

  transition:
    opacity 250ms ease,
    transform 250ms ease;
}

.hero-content {
  width: 100%;
  max-width: 540px;
  margin-left: auto;
}

/* ============================================================
   HERO BADGE
============================================================ */

.hero-badge {
  display: inline-flex;
  align-items: center;

  padding: 7px 11px;

  border: 1px solid var(--green-border);
  border-radius: 999px;

  background: var(--green-light);

  color: var(--green-dark);

  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 520px;

  font-size: clamp(34px, 3.2vw, 60px);

  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 700;

  color: var(--text);

  margin-top: 8px;
  margin-bottom: 12px;
}

.hero-content h1 span {
  color: var(--green);
}

.hero-description {
  max-width: 470px;

  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 20px;

  color: var(--text-secondary);
}

.hero-content h4 {
  font-size: 20px;
  margin-bottom: 24px;
}

.hero-benefits {
  list-style: none;

  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-benefits li {
  display: flex;
  align-items: center;
  gap: 11px;

  font-size: 16px;
  font-weight: 500;

  color: #4d5851;
}

.benefit-icon {
  width: 40px;
  height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border-radius: 100%;

  background: var(--green-light);
  color: var(--green);
}

.benefit-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* ============================================================
   HERO HIDDEN AFTER FIRST CONTINUE
============================================================ */

.casale-page.simulation-state .casale-hero {
  display: none;
}

/* ============================================================
   SIMULATOR AREA
============================================================ */

.simulator-area {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 48px;
  margin-top: 24px;
}

.casale-page.simulation-state .simulator-area {
  min-height: 100vh;
}

/* ============================================================
   SIMULATOR CARD
============================================================ */

.simulator-card {
  width: 100%;
  max-width: 720px;

  overflow: hidden;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius-xl);

  box-shadow:
    var(--shadow-card),
    0 10px 90px rgba(25, 135, 84, 0.3);
}

/* ============================================================
   SIMULATOR HEADER
============================================================ */

.simulator-header {
  padding: 25px 30px;
}

.simulator-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.simulator-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  background: var(--green-light);

  flex-shrink: 0;
}

.simulator-icon img {
  width: 40px;
  height: 40px;

  object-fit: contain;
}

.simulator-title h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0px;
}

.simulator-title h5 {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0px;
}

.lgpd-notice {
  display: block;

  margin-top: 10px;

  font-size: 11px;
  line-height: 1.5;
  text-align: center;

  color: var(--text-muted);
}

.lgpd-notice a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lgpd-notice a:hover {
  color: var(--green);
}

/* ============================================================
   STEPPER
============================================================ */

.stepper {
  display: flex;
  align-items: center;

  padding: 8px 30px;

  background: #fcfdfc;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;

  flex-shrink: 0;
}

.step-circle {
  width: 28px;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #eef1ee;
  color: #879189;

  font-size: 11px;
  font-weight: 700;

  transition: var(--transition);
}

.step-item p {
  font-size: 11px;
  font-weight: 600;

  color: #909991;

  white-space: nowrap;
}

.step-item.active .step-circle {
  background: var(--green);
  color: white;
}

.step-item.active p {
  color: var(--green-dark);
}

.step-line {
  flex: 1;

  height: 1px;

  margin: 0 12px;

  background: var(--border-dark);
}

/* ============================================================
   SIMULATOR CONTENT
============================================================ */

.simulator-content {
  padding: 34px 34px 30px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;

  animation: stepEnter 220ms ease both;
}

@keyframes stepEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

/* ============================================================
   STEP HEADER
============================================================ */

.step-header {
  margin-bottom: 28px;
}

.step-header h3 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;

  color: var(--text);
}

.step-header p {
  margin-top: 4px;

  font-size: 14px;
  line-height: 1.5;

  color: var(--text-secondary);
}

/* ============================================================
   FIELDS GRID
============================================================ */

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 18px;
}

.field {
  min-width: 0;
  width: 100%;
}

.field label,
.question-block > label {
  display: block;

  margin-bottom: 8px;

  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;

  color: #2e3430;
}

.question-counter {
  font-size: 14px;
  color: var(--text-muted);
}

.field input,
.field select {
  width: 100%;
  height: 48px;

  padding: 0 14px;

  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);

  background: #fff;

  color: var(--text);

  font-size: 14px;

  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.field input::placeholder {
  color: #a4aca6;
}

.field input:hover,
.field select:hover {
  border-color: #bdc8c0;
}

.field input:focus,
.field select:focus {
  border-color: var(--green);

  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.09);
}

/* ============================================================
   EXTRA FIELDS
============================================================ */

.extra-fields {
  display: none;

  margin-top: 18px;
}

.extra-fields.visible {
  display: block;

  animation: extraFieldsEnter 240ms ease both;
}

@keyframes extraFieldsEnter {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

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

/* ============================================================
   QUESTION BLOCK
============================================================ */

.question-block {
  margin-top: 28px;
}

.question-block > label {
  margin-bottom: 10px;
}

/* ============================================================
   OPTIONS
============================================================ */

.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 10px;
}

.answer-option {
  width: 100%;

  min-height: 54px;

  display: flex;
  align-items: center;

  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);

  background: #fff;

  color: var(--text);

  font-size: 14px;
  font-weight: 500;

  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.answer-option:hover {
  border-color: #aebbb2;
  background: #fafcfb;
}

.answer-option:active {
  transform: scale(0.995);
}

.option-list .answer-option {
  justify-content: flex-start;

  padding: 0 17px;

  text-align: left;
}

.option-grid .answer-option {
  justify-content: center;

  padding: 0 16px;
}

/* ============================================================
   RADIO
============================================================ */

.radio {
  width: 18px;
  height: 18px;

  flex-shrink: 0;

  margin-right: 12px;

  border: 1.5px solid #aab3ad;

  border-radius: 50%;

  position: relative;
}

.answer-option.selected {
  border-color: var(--green);

  background: var(--green-light);

  color: var(--green-dark);

  box-shadow: 0 0 0 1px rgba(25, 135, 84, 0.05);
}

.answer-option.selected .radio {
  border-color: var(--green);
}

.answer-option.selected .radio::after {
  content: "";

  position: absolute;

  width: 8px;
  height: 8px;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  background: var(--green);
}

/* ============================================================
   EQUIPMENT OPTIONS
============================================================ */

.equipment-option {
  min-height: 58px;
}

/* ============================================================
   DYNAMIC QUESTIONS
============================================================ */

.dynamic-questions {
  margin-top: 22px;
}

.dynamic-questions:empty {
  display: none;
}

.dynamic-questions .question-block {
  padding-top: 22px;

  border-top: 1px solid var(--border);
}

.dynamic-questions .question-block + .question-block {
  margin-top: 22px;
}

/* ============================================================
   ACTIONS
============================================================ */

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-top: 30px;
  padding-top: 24px;

  border-top: 1px solid var(--border);
}

.btn-primary,
.btn-secondary {
  height: 48px;

  min-width: 130px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 20px;

  border-radius: var(--radius-sm);

  font-size: 13px;
  font-weight: 700;

  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.btn-primary {
  border: 1px solid var(--green);

  background: var(--green);

  color: #fff;

  box-shadow: 0 5px 14px rgba(25, 135, 84, 0.14);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  border: 1px solid var(--border-dark);

  background: #fff;

  color: #566159;
}

.btn-secondary:hover {
  border-color: #aeb9b1;
  background: #f8faf8;
}

/* ============================================================
   RECOMMENDATION
============================================================ */

#step-4 {
  position: relative;
}

/* ============================================================
   RECOMMENDATION — IMAGEM EM CIMA + TEXTO EMBAIXO
   MESMA ESTRUTURA NO DESKTOP E MOBILE
============================================================ */

#step-4 .recommendation-card {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100%;

  min-height: auto;

  overflow: hidden;

  border: 0;
  border-radius: 0;

  background: transparent;

  box-shadow: none;
}

/* ============================================================
   REMOVE ELEMENTOS DECORATIVOS ANTIGOS
============================================================ */

#step-4 .recommendation-card::before,
#step-4 .recommendation-card::after {
  display: none;
  content: none;
}

/* ============================================================
   IMAGEM — HERO
============================================================ */

#step-4 .recommendation-image {
  position: relative;

  order: -1;

  width: 100%;

  min-width: 0;
  min-height: 0;

  aspect-ratio: 1672 / 941;

  display: flex;

  align-items: center;
  justify-content: center;

  overflow: hidden;

  background: #fff;

  z-index: 1;
}

/* ============================================================
   IMAGEM
============================================================ */

#step-4 .recommendation-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/* ============================================================
   GRADIENTE — IMAGEM → BRANCO
============================================================ */

#step-4 .recommendation-image::after {
  content: "";

  position: absolute;

  inset: 0;

  pointer-events: none;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0.25) 62%,
    rgba(255, 255, 255, 0.78) 82%,
    #ffffff 100%
  );

  z-index: 2;
}

/* ============================================================
   CONTEÚDO
============================================================ */

#step-4 .recommendation-content {
  position: relative;

  z-index: 2;

  display: flex;

  flex-direction: column;

  justify-content: flex-start;

  align-items: flex-start;

  width: 100%;

  padding: 8px 0 32px;

  min-width: 0;

  background: #fff;
}

/* ============================================================
   LABEL
============================================================ */

#step-4 .recommendation-label {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  margin-bottom: 14px;

  font-size: 11px;

  line-height: 1;

  font-weight: 700;

  letter-spacing: 0.055em;

  text-transform: uppercase;

  color: var(--green);
}

#step-4 .recommendation-label::before {
  content: "";

  width: 6px;
  height: 6px;

  flex-shrink: 0;

  border-radius: 50%;

  background: var(--green);
}

/* ============================================================
   TÍTULO
============================================================ */

#step-4 .recommendation-card h4 {
  width: 100%;

  max-width: 100%;

  margin: 0;

  font-size: clamp(28px, 3vw, 42px);

  line-height: 1.05;

  letter-spacing: -0.04em;

  font-weight: 700;

  color: var(--text);
}

/* ============================================================
   DESCRIÇÃO
============================================================ */

#step-4 .recommendation-card p {
  width: 100%;

  max-width: 700px;

  margin-top: 16px;

  font-size: 14px;

  line-height: 1.6;

  color: var(--text-secondary);
}

/* ============================================================
   TAGS
============================================================ */

#step-4 .recommendation-meta {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin-top: 22px;
}

#step-4 .recommendation-tag {
  display: inline-flex;

  align-items: center;

  padding: 6px 9px;

  border: 1px solid var(--green-border);

  border-radius: 6px;

  background: var(--green-light);

  color: var(--green-dark);

  font-size: 10px;

  font-weight: 600;
}

/* ============================================================
   CONSULTOR
============================================================ */

#step-4 .consultor-content {
  display: none;
}

#step-4 .recommendation-card.consultor {
  display: block;

  min-height: 260px;

  padding: 0;

  border: 0;
  border-radius: 0;

  background: #ffffff;

  box-shadow: none;
}

#step-4 .recommendation-card.consultor .recommendation-content {
  display: none;
}

#step-4 .recommendation-card.consultor .recommendation-image {
  display: flex;
  width: 100%;
  aspect-ratio: 1672 / 941;
  min-height: 0;
  overflow: hidden;
}

#step-4 .recommendation-card.consultor .consultor-content {
  min-height: 260px;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: flex-start;

  padding: 34px 0;
}

#step-4 .recommendation-card.consultor .consultor-content h4 {
  max-width: 500px;

  margin: 0;

  font-size: 32px;

  line-height: 1.1;

  letter-spacing: -0.035em;
}

#step-4 .recommendation-card.consultor .consultor-content p {
  max-width: 520px;

  margin-top: 12px;
}

/* ============================================================
   REMOVE HEADER "RECOMENDAÇÃO"
============================================================ */

#step-4 > .step-header {
  display: none;
}

/* ============================================================
   RESULT ACTIONS
============================================================ */

#step-4 .result-actions,
.result-actions {
  display: flex;

  flex-direction: column;

  gap: 10px;

  margin-top: 20px;
}

/* ============================================================ WHATSAPP BUTTON ============================================================ */
#step-4 .whatsapp-button,
.whatsapp-button {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: var(--radius-md);
  background: var(--green);
  color: #ffffff;
  text-align: left;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}
#step-4 .whatsapp-button:hover,
.whatsapp-button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: 0 7px 18px rgba(25, 135, 84, 0.15);
}
.whatsapp-button:active {
  transform: translateY(1px);
}

/* ============================================================ BUTTON ICON ============================================================ */
.button-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}
.button-icon svg {
  width: 19px;
  height: 19px;
}
/* ============================================================ BUTTON CONTENT ============================================================ */
.button-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.button-content strong {
  font-size: 16px;
  line-height: 1.3;
}
.button-content small {
  margin-top: 1px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* ============================================================ ARROW ============================================================ */
.arrow {
  margin-left: 12px;
  font-size: 22px;
}

/* ============================================================ RESTART ============================================================ */
.restart-button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #7a847d;
  font-size: 14px; /* aumentado de 12px */
  font-weight: 600;
}
.restart-button:hover {
  color: var(--green);
}
.restart-button span {
  font-size: 19px;
}

/* ============================================================
   VALIDATION
============================================================ */

.field input.invalid,
.field select.invalid {
  border-color: var(--danger);

  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.07);
}

/* ============================================================
   SELECT
============================================================ */

.field select {
  appearance: none;

  padding-right: 38px;

  background-image:
    linear-gradient(45deg, transparent 50%, #7b857e 50%),
    linear-gradient(135deg, #7b857e 50%, transparent 50%);

  background-position:
    calc(100% - 17px) 20px,
    calc(100% - 12px) 20px;

  background-size:
    5px 5px,
    5px 5px;

  background-repeat: no-repeat;
}

/* ============================================================
   DISABLED
============================================================ */

button:disabled {
  cursor: not-allowed;

  opacity: 0.55;
}

/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1100px) {
  .casale-page.onboarding-state {
    grid-template-columns:
      minmax(0, 0.85fr)
      minmax(520px, 1.15fr);
  }

  .casale-hero {
    padding: 50px 42px;
  }

  .hero-content h1 {
    font-size: clamp(38px, 4.5vw, 54px);
  }

  .simulator-area {
    padding: 36px 26px;
  }
}

/* ============================================================
   MOBILE — RECOMMENDATION
============================================================ */

@media (max-width: 820px) {
  #step-4 .recommendation-card {
    display: flex;

    flex-direction: column;

    min-height: auto;

    overflow: hidden;
  }

  #step-4 .recommendation-image {
    order: -1;

    width: 100%;

    aspect-ratio: 1672 / 941;

    min-height: 0;

    height: auto;
  }

  #step-4 .recommendation-image img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;
  }

  #step-4 .recommendation-image::after {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 70%,
      rgba(255, 255, 255, 0.25) 82%,
      rgba(255, 255, 255, 0.78) 92%,
      #ffffff 100%
    );
  }
  
  #step-4 .recommendation-content {
    padding: 8px 0 32px;
  }

  #step-4 .recommendation-card h4 {
    max-width: 100%;

    font-size: 28px;

    line-height: 1.08;
  }

  #step-4 .recommendation-card p {
    max-width: 100%;

    margin-top: 14px;

    font-size: 14px;
  }

  #step-4 .recommendation-meta {
    margin-top: 18px;
  }

  #step-4 .recommendation-card.consultor {
    min-height: auto;
  }

  #step-4 .recommendation-card.consultor .consultor-content {
    min-height: 240px;

    padding: 32px 0;
  }

  #step-4 .recommendation-card.consultor .consultor-content h4 {
    font-size: 28px;
  }

  .casale-page.onboarding-state {
    display: flex;

    flex-direction: column;
  }

  .casale-hero {
    min-height: auto;

    padding: 48px 24px 34px;

    align-items: flex-start;
  }

  .hero-content {
    max-width: 650px;

    margin: 0 auto;
  }

  .hero-content h1 {
    max-width: 600px;

    font-size: clamp(38px, 9vw, 52px);

    line-height: 1;
  }

  .hero-description {
    max-width: 600px;

    margin-top: 20px;

    font-size: 16px;
  }

  .hero-benefits {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 26px;
  }

  .hero-benefits li {
    align-items: flex-start;

    font-size: 12px;

    line-height: 1.35;
  }

  .simulator-area {
    min-height: auto;

    padding: 20px 16px 40px;
  }

  .casale-page.simulation-state .simulator-area {
    min-height: 100vh;

    padding: 20px 16px 40px;
  }

  .simulator-card {
    max-width: 680px;

    border-radius: 18px;
  }

  .simulator-header {
    padding: 20px;
  }

  .stepper {
    padding: 17px 20px;

    overflow-x: auto;
  }

  .step-item p {
    display: none;
  }

  .step-line {
    min-width: 24px;

    margin: 0 8px;
  }

  .simulator-content {
    padding: 26px 20px 24px;
  }
}

/* ============================================================
   MOBILE — FORM
============================================================ */

@media (max-width: 600px) {
  .casale-hero {
    padding: 38px 20px 26px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-description {
    font-size: 15px;

    line-height: 1.5;
  }

  .hero-benefits {
    display: flex;

    gap: 10px;

    margin-top: 22px;
  }

  .hero-benefits li {
    font-size: 12px;
  }

  .benefit-icon {
    width: 20px;
    height: 20px;
  }

  .benefit-icon svg {
    width: 14px;
    height: 14px;
  }

  .simulator-area {
    padding: 14px 12px 30px;
  }

  .simulator-card {
    border-radius: 16px;
  }

  .simulator-header {
    padding: 18px;
  }

  .simulator-icon {
    width: 38px;
    height: 38px;
  }

  .stepper {
    padding: 15px 18px;
  }

  .step-circle {
    width: 26px;
    height: 26px;
  }

  .simulator-content {
    padding: 24px 18px 20px;
  }

  .step-header {
    margin-bottom: 23px;
  }

  .step-header h3 {
    font-size: 23px;
  }

  .step-header p {
    font-size: 13px;
  }

  .fields-grid {
    grid-template-columns: 1fr;

    gap: 15px;
  }

  .field input,
  .field select {
    height: 47px;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .answer-option {
    min-height: 52px;
  }

  .actions {
    margin-top: 26px;

    padding-top: 20px;
  }

  .btn-primary,
  .btn-secondary {
    min-width: 0;

    flex: 1;

    height: 47px;
  }

  /* ==========================================================
     RECOMMENDATION
     ========================================================== */

  #step-4 .recommendation-image {
    aspect-ratio: 1672 / 941;
  }

  #step-4 .recommendation-content {
    padding: 8px 0 32px;
  }

  #step-4 .recommendation-card h4 {
    font-size: 28px;
  }

  #step-4 .recommendation-card p {
    font-size: 14px;
  }

  #step-4 .recommendation-card.consultor .consultor-content {
    padding: 32px 0;
  }

  /* ==========================================================
     GENERAL RECOMMENDATION FALLBACK
     ========================================================== */

  .recommendation-card {
    min-height: auto;

    padding: 0;
  }

  .recommendation-card h4 {
    font-size: 24px;
  }

  /* ==========================================================
     REMOVE OLD CARD GRADIENT
     ========================================================== */

  .recommendation-card::after {
    display: none;
  }
}

/* ============================================================
   VERY SMALL MOBILE
============================================================ */

@media (max-width: 380px) {
  .hero-content h1 {
    font-size: 34px;
  }

  .hero-description {
    font-size: 14px;
  }

  .simulator-content {
    padding-left: 15px;

    padding-right: 15px;
  }

  .stepper {
    padding-left: 14px;

    padding-right: 14px;
  }
}

/* ============================================================
   VALIDAÇÃO DE CAMPOS
============================================================ */

.field-error {
  border-color: #c0392b !important;
}

.field-error:focus {
  border-color: #c0392b !important;

  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08) !important;
}

.validation-error {
  display: block;

  margin-top: 7px;

  font-size: 11px;

  line-height: 1.4;

  font-weight: 500;

  color: #c0392b;
}

/* ============================================================
   TELEFONE
============================================================ */

.field:has(#telefone) {
  width: 100%;
}

.field:has(#telefone) .iti {
  width: 100%;

  display: block;
}

.field:has(#telefone) #telefone {
  width: 100% !important;

  box-sizing: border-box;
}

/* ============================================================
   ONBOARDING — PRIMEIRA VISUALIZAÇÃO
============================================================ */

.onboarding-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 18px;
}

/* ============================================================
   PRIMEIRO BOTÃO — INICIAR SIMULAÇÃO
============================================================ */

#continue-identification {
  width: 100%;

  height: 56px;

  font-size: 14px;

  font-weight: 700;
}

#step-1 .actions {
  display: block;

  margin-top: 30px;

  padding-top: 24px;
}

/* ============================================================
   LGPD
============================================================ */

#step-1 .lgpd-notice {
  display: block;

  margin-top: 10px;

  font-size: 11px;

  line-height: 1.5;

  text-align: center;

  color: var(--text-muted);
}

#step-1 .lgpd-notice a {
  color: var(--text-muted);

  text-decoration: underline;

  text-underline-offset: 2px;
}

#step-1 .lgpd-notice a:hover {
  color: var(--green);
}

/* ============================================================
   FIELDS — MOBILE
============================================================ */

@media (max-width: 600px) {
  .fields-grid {
    grid-template-columns: 1fr;

    gap: 15px;
  }

  .onboarding-fields {
    grid-template-columns: 1fr;
  }

  #continue-identification {
    height: 54px;
  }
}

.loading-container {
  width: 100%;
  min-height: 280px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 40px 24px;

  box-sizing: border-box;
}

.loading-icon {
  width: 56px;
  height: 56px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 24px;

  border-radius: 50%;
  background: #f3f4f6;
}

.loading-spinner {
  width: 24px;
  height: 24px;

  border: 3px solid #e5e7eb;
  border-top-color: #111827;

  border-radius: 50%;

  animation: loading-spin 0.8s linear infinite;
}

.loading-content h3 {
  margin: 0 0 8px;

  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;

  color: #111827;
}

.loading-content p {
  max-width: 420px;

  margin: 0 auto;

  font-size: 15px;
  line-height: 1.5;

  color: #6b7280;
}

.loading-hint {
  display: block;

  margin-top: 12px;

  font-size: 13px;
  line-height: 1.4;

  color: #9ca3af;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   RESULTADO FINAL — LAYOUT DESKTOP + MOBILE
============================================================ */

/* Amplia o simulador somente na etapa final */
.simulator-card:has(#step-4.active) {
  max-width: 1120px;
}

/* Dá mais espaço ao resultado */
#step-4 {
  width: 100%;
}

#step-4 > .step-header {
  display: block;
  margin-bottom: 24px;
}

#step-4 > .step-header h3 {
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

#step-4 > .step-header p {
  margin-top: 8px;
}

/* Card de recomendação: imagem à direita */
#step-4 .recommendation-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

/* Conteúdo textual à esquerda */
#step-4 .recommendation-card > .recommendation-content {
  order: 1;
  flex: 1 1 56%;
  min-width: 0;
  padding: 36px;
  justify-content: center;
  align-items: flex-start;
  background: #fff;
}

/* Imagem à direita */
#step-4 .recommendation-card > .recommendation-image {
  order: 2;
  flex: 0 0 44%;
  width: 44%;
  min-width: 0;
  min-height: 400px;
  aspect-ratio: auto;
  display: flex;
  align-self: stretch;
  overflow: hidden;
  background: #fff;
}

/* Imagem ocupa todo o espaço disponível */
#step-4 .recommendation-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Retira o gradiente vertical do layout horizontal */
#step-4 .recommendation-image::after {
  display: none;
}

/* Ajusta a tipografia para o novo espaço */
#step-4 .recommendation-card h4 {
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

#step-4 .recommendation-card p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.65;
}

#step-4 .recommendation-meta {
  margin-top: 20px;
}

/* ============================================================
   CONSULTOR — MESMA ESTRUTURA VISUAL
============================================================ */

#step-4 .recommendation-card.consultor {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 400px;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

/* Mantém a imagem visível no consultor */
#step-4 .recommendation-card.consultor > .recommendation-image {
  display: flex;
  order: 2;
  flex: 0 0 44%;
  width: 44%;
  min-height: 400px;
  aspect-ratio: auto;
}

/* Texto do consultor à esquerda */
#step-4 .recommendation-card.consultor > .consultor-content {
  order: 1;
  flex: 1 1 56%;
  min-width: 0;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 36px;
  background: #fff;
}

#step-4 .recommendation-card.consultor .consultor-content h4 {
  max-width: 100%;
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

#step-4 .recommendation-card.consultor .consultor-content p {
  max-width: 100%;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.65;
}

/* ============================================================
   MOBILE — IMAGEM EM CIMA, TEXTO EMBAIXO
============================================================ */

@media (max-width: 820px) {
  .simulator-card:has(#step-4.active) {
    max-width: 680px;
  }

  #step-4 > .step-header {
    margin-bottom: 22px;
  }

  #step-4 .recommendation-card,
  #step-4 .recommendation-card.consultor {
    flex-direction: column;
    min-height: auto;
    border-radius: var(--radius-md);
  }

  #step-4 .recommendation-card > .recommendation-image,
  #step-4 .recommendation-card.consultor > .recommendation-image {
    order: 0;
    flex: none;
    width: 100%;
    min-height: 0;
    aspect-ratio: 1672 / 941;
  }

  #step-4 .recommendation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Gradiente suave no limite entre imagem e conteúdo */
  #step-4 .recommendation-image::after {
    display: block;
    background: linear-gradient(
      180deg,
      transparent 45%,
      rgba(255, 255, 255, 0.65) 80%,
      #fff 100%
    );
  }

  #step-4 .recommendation-card > .recommendation-content,
  #step-4 .recommendation-card.consultor > .consultor-content {
    order: 1;
    flex: none;
    width: 100%;
    min-height: auto;
    padding: 8px 22px 26px;
    justify-content: flex-start;
  }

  #step-4 .recommendation-card h4,
  #step-4 .recommendation-card.consultor .consultor-content h4 {
    font-size: 28px;
  }
}

/* ============================================================
   MOBILE PEQUENO
============================================================ */

@media (max-width: 380px) {
  #step-4 .recommendation-card > .recommendation-content,
  #step-4 .recommendation-card.consultor > .consultor-content {
    padding-right: 16px;
    padding-left: 16px;
  }
}
