/* ==========================================================================
   JUNTOS — Seção 07: "Ficou alguma dúvida?" (FAQ Interativo + Boneca Animada)
   Paleta fiel ao início do site: Off-white (#f6f2e9), Verde-oliva (#5f6251),
   Terracota editorial (#8b503e / #9e5b43 / #b9775d), Areia (#d8c9b4)
   ========================================================================== */

.faq-section {
  --faq-bg: var(--paper, #f6f2e9);
  --faq-ink: var(--ink, #5f6251);
  --faq-ink-muted: #5f6251cc;
  --faq-ink-soft: #5f6251a6;
  --faq-olive-deep: #474b3c;
  --faq-olive-frame: #363a2d;
  --faq-clay: #8b503e;
  --faq-terracotta: #9e5b43;
  --faq-stroke: var(--transformation, #b9775d);
  --faq-sand: var(--welcome, #d8c9b4);
  --faq-border: #d8c9b4b8;
  --faq-surface: #faf7f0;
  --faq-surface-soft: #f2ece0;
  --faq-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --faq-fast: cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;
  z-index: 9;
  background-color: var(--faq-bg);
  background-image:
    radial-gradient(ellipse at 16% 28%, #d8c9b440, transparent 54%),
    radial-gradient(ellipse at 86% 76%, #b9775d12, transparent 52%);
  color: var(--faq-ink);
  overflow-x: clip;
}

/* Transição orgânica suave do verde-oliva escuro da Seção 06 (#363a2d) para o off-white */
.faq-bridge-top {
  display: block;
  width: 100%;
  height: clamp(32px, 4.6vw, 64px);
  background: #363a2d;
  line-height: 0;
}

.faq-bridge-top svg {
  display: block;
  width: 100%;
  height: 100%;
}

.faq-shell {
  width: min(1180px, 91%);
  margin: 0 auto;
  padding: clamp(54px, 6.8vw, 98px) 0 clamp(72px, 8.2vw, 118px);
  min-height: clamp(680px, 88svh, 880px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
}

/* --------------------------------------------------------------------------
   Coluna Esquerda — Título + Boneca Animada (Marca Registrada do FAQ) + CTA
   -------------------------------------------------------------------------- */
.faq-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 520px;
}

.faq-title {
  margin: 0;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(34px, 3.85vw, 54px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.042em;
  color: var(--faq-ink);
  text-wrap: balance;
}

.faq-title-accent {
  position: relative;
  display: inline-block;
  font-family: 'Nunito Editorial', Montserrat, Arial, sans-serif;
  font-style: normal;
  font-weight: 650;
  letter-spacing: -.028em;
  color: var(--faq-clay);
}

.faq-title-stroke {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -.12em;
  width: 104%;
  height: .22em;
  pointer-events: none;
  overflow: visible;
}

.faq-title-stroke path {
  fill: none;
  stroke: var(--faq-stroke);
  stroke-width: 2.1;
  stroke-linecap: round;
  opacity: .76;
}

.faq-subtitle {
  margin: clamp(14px, 1.8svh, 20px) 0 0;
  max-width: 44ch;
  font-size: clamp(15px, 1.1vw, 16.5px);
  line-height: 1.58;
  letter-spacing: -.008em;
  color: var(--faq-ink-muted);
}

/* Palco da Boneca Animada em WebP */
.faq-mascot-row {
  margin-top: clamp(22px, 3svh, 30px);
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 2.6vw, 30px);
}

.faq-mascot-stage {
  position: relative;
  width: clamp(220px, 24vw, 286px);
  aspect-ratio: 640 / 736;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  isolation: isolate;
}

/* Halo orgânico sutil integrando a boneca ao papel off-white */
.faq-mascot-stage::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 2%;
  height: 76%;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 54%, #d8c9b466 0%, #b9775d1a 48%, transparent 74%);
  z-index: 0;
  pointer-events: none;
}

.faq-mascot-stage::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 1.5%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(95, 98, 81, .22), transparent 72%);
  z-index: 0;
  pointer-events: none;
}

.faq-mascot-frames {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  animation: faqMascotBreathe 3.8s ease-in-out infinite;
  transform-origin: 50% 94%;
}

@keyframes faqMascotBreathe {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.008);
  }
}

.faq-mascot-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 145ms ease;
  user-select: none;
  pointer-events: none;
  will-change: opacity;
}

.faq-mascot-frame.is-active {
  opacity: 1;
}

.faq-mascot-aside {
  flex: 1 1 auto;
  padding-bottom: clamp(14px, 2.2svh, 24px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.faq-mascot-callout {
  position: relative;
  margin: 0;
  padding: 13px 16px;
  border-radius: 16px 16px 16px 4px;
  background: var(--faq-surface);
  border: 1px solid var(--faq-border);
  font-size: .86rem;
  line-height: 1.55;
  color: var(--faq-ink);
  box-shadow: 0 12px 24px -18px rgba(95, 98, 81, .32);
}

.faq-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 24px;
  border-radius: 10px;
  background: var(--faq-ink);
  color: var(--faq-bg);
  font-size: .9rem;
  letter-spacing: -.01em;
  box-shadow: 0 14px 28px -18px rgba(95, 98, 81, .58);
  transition:
    background-color 220ms var(--faq-fast),
    transform 220ms var(--faq-fast),
    box-shadow 220ms var(--faq-fast);
}

.faq-cta-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--faq-fast);
}

.faq-cta-btn:hover {
  background: var(--faq-terracotta);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -18px rgba(158, 91, 67, .55);
}

.faq-cta-btn:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Coluna Direita — Smartphone Editorial JUNTOS + Instrução abaixo do aparelho
   -------------------------------------------------------------------------- */
.faq-phone-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.faq-phone-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.faq-phone-stage::before {
  content: '';
  position: absolute;
  inset: 8% -5% 4%;
  border-radius: 48%;
  background: radial-gradient(circle at 50% 45%, #d8c9b466, #b9775d16 48%, transparent 72%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

.faq-phone {
  position: relative;
  z-index: 1;
  width: min(100%, 406px);
  padding: 11px;
  border-radius: 44px;
  background: linear-gradient(155deg, #565a49 0%, #414536 52%, #313529 100%);
  box-shadow:
    0 34px 72px -28px rgba(54, 58, 45, .42),
    0 14px 28px -18px rgba(54, 58, 45, .26),
    inset 0 1px 1px rgba(246, 242, 233, .28),
    inset 0 -1px 2px rgba(26, 29, 21, .5);
}

.faq-phone::before,
.faq-phone::after {
  content: '';
  position: absolute;
  width: 3px;
  border-radius: 3px;
  background: #474b3c;
  pointer-events: none;
}

.faq-phone::before {
  left: -3px;
  top: 116px;
  height: 44px;
  box-shadow: 0 56px 0 #474b3c;
}

.faq-phone::after {
  right: -3px;
  top: 144px;
  height: 62px;
}

.faq-phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: clamp(540px, 69svh, 640px);
  border-radius: 34px;
  overflow: hidden;
  background: var(--faq-surface);
  border: 1px solid rgba(246, 242, 233, .45);
}

/* Barra superior discreta do smartphone */
.faq-phone-statusbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 22px 6px;
  background: var(--faq-surface-soft);
  font-size: .72rem;
  letter-spacing: .01em;
  color: #5f6251b8;
  user-select: none;
}

.faq-phone-island {
  width: 78px;
  height: 19px;
  border-radius: 999px;
  background: #2f3326;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .1);
}

.faq-phone-signal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5f6251a6;
}

.faq-phone-signal svg {
  width: 14px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Cabeçalho da conversa no estilo JUNTOS (sem verde WhatsApp e sem "online" falso) */
.faq-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 13px;
  background: var(--faq-surface-soft);
  border-bottom: 1px solid var(--faq-border);
}

.faq-chat-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.faq-chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  flex: none;
  border: 1.5px solid #b9775d78;
  background: #e9e1d2;
}

.faq-chat-meta {
  min-width: 0;
}

.faq-chat-name {
  margin: 0;
  font-family: 'Nunito Editorial', Montserrat, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--faq-ink);
}

.faq-chat-role {
  margin: 2px 0 0;
  font-size: .71rem;
  line-height: 1.3;
  color: var(--faq-ink-muted);
}

.faq-chat-assistant-label {
  margin: 2px 0 0;
  font-size: .67rem;
  letter-spacing: .015em;
  color: var(--faq-clay);
}

.faq-chat-reset {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #5f625130;
  background: var(--faq-surface);
  color: var(--faq-ink);
  transition: background-color 180ms var(--faq-fast), color 180ms var(--faq-fast), border-color 180ms var(--faq-fast), opacity 180ms var(--faq-fast);
}

.faq-chat-reset svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-chat-reset:hover:not(:disabled) {
  background: var(--faq-ink);
  border-color: var(--faq-ink);
  color: var(--faq-bg);
}

.faq-chat-reset:disabled {
  opacity: .38;
  cursor: default;
}

/* Área interna com scroll suave da conversa */
.faq-chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background-color: var(--faq-surface);
  background-image:
    radial-gradient(circle at 82% 16%, #d8c9b438, transparent 44%),
    radial-gradient(circle at 12% 84%, #b9775d12, transparent 46%);
  scrollbar-width: thin;
  scrollbar-color: #5f625140 transparent;
}

.faq-chat-body::-webkit-scrollbar {
  width: 5px;
}

.faq-chat-body::-webkit-scrollbar-thumb {
  background: #5f62513d;
  border-radius: 999px;
}

.faq-date-stamp {
  align-self: center;
  margin-bottom: 2px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #d8c9b452;
  font-size: .66rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faq-ink-muted);
}

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

.faq-msg {
  max-width: 88%;
  padding: 11px 14px;
  font-size: .835rem;
  line-height: 1.56;
  animation: faqMsgIn 320ms var(--faq-ease) both;
}

@keyframes faqMsgIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.faq-msg--incoming {
  align-self: flex-start;
  border-radius: 6px 16px 16px 16px;
  background: #fcf9f2;
  color: var(--faq-ink);
  border: 1px solid var(--faq-border);
  box-shadow: 0 6px 16px -12px rgba(95, 98, 81, .22);
}

.faq-msg--incoming.faq-msg--reply {
  border-left: 2.5px solid var(--faq-stroke);
}

.faq-msg--outgoing {
  align-self: flex-end;
  border-radius: 16px 6px 16px 16px;
  background: var(--faq-ink);
  color: var(--faq-bg);
  box-shadow: 0 8px 18px -12px rgba(95, 98, 81, .38);
}

.faq-msg p {
  margin: 0;
}

.faq-msg p + p {
  margin-top: 8px;
}

/* Indicador animado de digitação */
.faq-typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 15px;
  border-radius: 6px 16px 16px 16px;
  background: #fcf9f2;
  border: 1px solid var(--faq-border);
  animation: faqMsgIn 240ms var(--faq-ease) both;
}

.faq-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faq-stroke);
  opacity: .35;
  animation: faqTypingBounce 1.05s infinite ease-in-out;
}

.faq-typing-dot:nth-child(2) {
  animation-delay: 160ms;
}

.faq-typing-dot:nth-child(3) {
  animation-delay: 320ms;
}

@keyframes faqTypingBounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: .35;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Perguntas selecionáveis integradas à conversa */
.faq-suggestions-block {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed #d8c9b4d9;
}

.faq-suggestions-label {
  margin: 0 0 9px;
  font-size: .7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faq-ink-soft);
}

.faq-question-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.faq-question-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--faq-border);
  background: #fcf9f2;
  color: var(--faq-ink);
  font-size: .8rem;
  line-height: 1.38;
  text-align: left;
  transition:
    background-color 180ms var(--faq-fast),
    border-color 180ms var(--faq-fast),
    color 180ms var(--faq-fast),
    transform 180ms var(--faq-fast);
}

.faq-question-btn svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: var(--faq-clay);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms var(--faq-fast);
}

.faq-question-btn:hover:not(:disabled) {
  background: var(--faq-surface-soft);
  border-color: #b9775d85;
  transform: translateX(2px);
}

.faq-question-btn:hover:not(:disabled) svg {
  transform: translateX(2px);
}

.faq-question-btn:disabled {
  opacity: .55;
  cursor: wait;
}

/* Rodapé interno do smartphone — CTA direto para continuar com Analuiza */
.faq-phone-footer {
  padding: 11px 14px 13px;
  background: var(--faq-surface-soft);
  border-top: 1px solid var(--faq-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-phone-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--faq-terracotta);
  color: var(--faq-bg);
  font-size: .82rem;
  letter-spacing: -.01em;
  transition: background-color 180ms var(--faq-fast), transform 180ms var(--faq-fast);
}

.faq-phone-wa-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-phone-wa-btn:hover {
  background: var(--faq-clay);
  transform: translateY(-1px);
}

.faq-phone-homebar {
  width: 112px;
  height: 4px;
  margin: 0 auto;
  border-radius: 999px;
  background: #5f62513d;
}

/* Legenda instrutiva e aviso de privacidade abaixo do smartphone */
.faq-phone-caption {
  width: min(100%, 406px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.faq-guide-note {
  margin: 0;
  font-size: .82rem;
  line-height: 1.56;
  color: var(--faq-ink-muted);
}

.faq-privacy-hint {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: .74rem;
  line-height: 1.5;
  color: var(--faq-ink-soft);
}

.faq-privacy-hint svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: var(--faq-stroke);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Responsividade — Tablet e Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .faq-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 36px;
    padding: 52px 0 72px;
  }

  .faq-intro {
    max-width: 580px;
    margin: 0 auto;
    align-items: center;
    text-align: center;
  }

  .faq-mascot-row {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 520px;
  }

  .faq-mascot-aside {
    align-items: center;
    text-align: center;
    padding-bottom: 0;
  }

  .faq-mascot-callout {
    border-radius: 16px;
  }

  .faq-phone {
    width: min(100%, 392px);
  }

  .faq-phone-screen {
    height: min(600px, 74svh);
  }
}

@media (max-width: 560px) {
  .faq-shell {
    width: 92%;
    padding: 44px 0 64px;
  }

  .faq-mascot-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .faq-mascot-stage {
    width: clamp(190px, 56vw, 240px);
  }

  .faq-phone {
    padding: 9px;
    border-radius: 38px;
  }

  .faq-phone::before,
  .faq-phone::after {
    display: none;
  }

  .faq-phone-screen {
    border-radius: 29px;
    height: min(560px, 72svh);
  }

  .faq-chat-header {
    padding: 9px 13px 11px;
  }

  .faq-chat-avatar {
    width: 40px;
    height: 40px;
  }

  .faq-question-btn {
    padding: 10px 12px;
    font-size: .81rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-msg,
  .faq-typing,
  .faq-typing-dot,
  .faq-mascot-frames {
    animation: none !important;
  }
}

.static-motion .faq-msg,
.static-motion .faq-typing,
.static-motion .faq-typing-dot,
.static-motion .faq-mascot-frames {
  animation: none !important;
}
