/**
 * V5.4-FINAL.CSS — Última camada (carregada por último)
 * Atualizado: corrige todas as queixas de UX da v5.3/v5.4
 *
 * 1. Inverte 3 seções para fundo escuro + texto claro (vídeo, incluso, sobre)
 * 2. Modal desqualificação com texto escuro
 * 3. Esconde barra de progresso de scroll
 * 4. FAQ FECHADO por padrão + sem scrollbar interno
 * 5. Único contexto de scroll (sem barra dupla)
 * 6. Pulse dos botões SEM escala (só glow) — não cria overflow
 * 7. Reveal animations APENAS opacidade — não causa layout shift
 * 8. Banner de urgência redesenhado (mais bonito)
 * 9. CTA fixo mobile redesenhado (mais bonito)
 * 10. Hover melhorados em cards (.how-step, .incluso-card)
 * 11. Sem animações que deslocam horizontalmente (shake desativado)
 */

/* ============================================================
   1. SEÇÃO VÍDEO — FUNDO ESCURO + TEXTO CLARO
   ============================================================ */

body .section-video,
section.section-video {
  background: #1a1714 !important;
  color: #f5efe7 !important;
}

body .section-video .section-title,
body .section-video .section-text,
body .section-video h2,
body .section-video p,
body .section-video .video-section-header h2,
body .section-video .video-section-header p,
body .video-section-header .section-title {
  color: #f5efe7 !important;
}

/* ============================================================
   2. INCLUSO-FOOTER — FUNDO ESCURO + TEXTO CLARO
   ============================================================ */

body .incluso-footer,
body .section-incluso .incluso-footer,
body p.incluso-footer {
  color: #f5efe7 !important;
  background: #1a1714 !important;
  padding: 1.25rem 1.5rem !important;
  border-radius: 12px !important;
  margin-top: 1.5rem !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  border: 1px solid rgba(212, 175, 143, 0.25) !important;
}

/* ============================================================
   3. SEÇÃO SOBRE A DRA. — FUNDO ESCURO + TEXTO CLARO (REFORÇADO)
   Especificidade alta para vencer v5.2-fixes (.section-about .about-text p)
   ============================================================ */

html body section.section-about,
html body #sobre.section-about,
html body .section-about {
  background: #1a1714 !important;
  color: #f5efe7 !important;
}

html body .section-about,
html body .section-about *,
html body .section-about .section-title,
html body .section-about h2,
html body .section-about h3,
html body .section-about p,
html body .section-about strong,
html body .section-about em,
html body .section-about .about-text,
html body .section-about .about-text *,
html body .section-about .about-text h2,
html body .section-about .about-text p,
html body .section-about .about-text strong,
html body .section-about .about-content p,
html body .section-about .about-content h2 {
  color: #f5efe7 !important;
}

html body .section-about .about-credentials,
html body .section-about p.about-credentials {
  color: #E8C9A6 !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  font-size: 1.05rem !important;
}

html body .section-about .about-text p {
  font-size: 1.05rem !important;
  line-height: 1.8 !important;
  margin-bottom: 1.25rem !important;
  color: #f5efe7 !important;
}

/* ============================================================
   4. MODAL DESQUALIFICAÇÃO — TEXTO ESCURO
   ============================================================ */

body .modal-overlay h2,
body .modal-overlay p,
body .modal-overlay strong,
body .modal-overlay div,
.modal-overlay h2,
.modal-overlay p,
.modal-overlay strong {
  color: #1a1a1a !important;
}

body .modal-overlay button,
.modal-overlay button {
  color: #ffffff !important;
}

/* ============================================================
   5. ESCONDER BARRA DE PROGRESSO DE SCROLL
   ============================================================ */

#scroll-progress,
body #scroll-progress {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============================================================
   6. FAQ — SEMPRE FECHADO POR PADRÃO + SEM SCROLLBAR INTERNO
   FIX v5.6: usar reveal-active/revealed do scroll para que .active
   só significa "FAQ aberto" (clicado pelo usuário)
   ============================================================ */

.faq-answer {
  max-height: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.5s ease !important;
}

/* Bloqueia abertura do FAQ se 'reveal-active' (scroll-reveal) chegou
   ANTES do click. A exclusão `:not(.active)` garante que assim que o
   usuário clica e a classe `.active` é adicionada, esta regra deixa
   de aplicar e a regra `.faq-item.active .faq-answer` (abaixo) abre. */
.faq-item.reveal-active:not(.active):not([aria-expanded]):not(.user-opened) .faq-answer {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Só abre quando .active for adicionado por click (animations.js initFAQ).
   IMPORTANTE: manter overflow:hidden para a animação max-height funcionar
   sem o texto vazar para fora do card. max-height grande para acomodar
   respostas longas. */
.faq-item.active .faq-answer {
  max-height: 1500px !important;
  overflow: hidden !important;
  padding-top: 0.5rem !important;
  padding-bottom: 1.25rem !important;
}

.faq-answer p {
  word-wrap: break-word !important;
  margin: 0 !important;
}

/* Garantir que NENHUM elemento crie scrollbar interno secundário.
   .faq-item EXCLUÍDO desta regra: precisa do overflow:hidden do components.css
   para a animação max-height da resposta não vazar no item seguinte. */
.container,
.about-text,
.video-section-header,
.incluso-grid,
.how-steps-grid {
  overflow: visible !important;
}

/* CRÍTICO: .section precisa overflow:hidden para conter o ::before
   (que tem width:200% + animation float — causava barra horizontal piscando) */
.section {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  position: relative !important;
}

/* Mata o float background animado em todas as seções (translate + rotate
   com width:200% causava scrollbar intermitente a cada ciclo de 20s) */
.section::before {
  animation: none !important;
  display: none !important;
}

/* Mata o "subtle-glow" piscante em títulos (text-shadow infinito que
   gera repaint constante e estresse visual) */
.hero-title,
.section-title {
  animation: none !important;
}

/* ============================================================
   7. SCROLL — UM ÚNICO CONTEXTO (sem barra dupla)
   ============================================================ */

html {
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: auto !important;
}

body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  width: 100% !important;
  max-width: 100vw !important;
}

/* ============================================================
   8. PULSE DOS BOTÕES — SÓ GLOW, SEM SCALE (não cria overflow)
   ============================================================ */

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(212, 175, 143, 0.35);
  }
  50% {
    box-shadow: 0 6px 24px rgba(212, 175, 143, 0.55);
  }
}

.btn-pulse,
.btn.btn-pulse,
a.btn-pulse,
button.btn-pulse {
  animation: pulse-glow 2.4s ease-in-out infinite !important;
  transform: none !important;
}

.btn-pulse:hover,
.btn.btn-pulse:hover {
  animation: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(212, 175, 143, 0.65) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Botões em geral: hover suave sem layout shift */
.btn,
a.btn,
button.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.btn:hover,
a.btn:hover,
button.btn:hover {
  transform: translateY(-1px) !important;
}

.btn:active,
a.btn:active,
button.btn:active {
  transform: translateY(0) !important;
}

/* ============================================================
   9. REVEAL ANIMATIONS — SLIDE-UP UNIFORME (todas as seções)
   v5.6: efeito homogêneo, suave e elegante para o site inteiro
   ============================================================ */

/* Estado inicial: invisível e levemente abaixado */
.reveal {
  opacity: 0 !important;
  transform: translateY(24px) !important;
  transition: opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
  will-change: opacity, transform;
  animation: none !important;
}

/* Estado revelado (IntersectionObserver adiciona .active ou .revealed) */
.reveal.revealed,
.reveal.active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Variantes específicas — direções */
.reveal.slide-in-left {
  transform: translateX(-24px) !important;
}
.reveal.slide-in-right {
  transform: translateX(24px) !important;
}
.reveal.slide-in-left.revealed,
.reveal.slide-in-left.active,
.reveal.slide-in-right.revealed,
.reveal.slide-in-right.active {
  transform: translateX(0) translateY(0) !important;
}

/* Stagger via data-delay — coordena cards/itens */
.reveal[data-delay="100"] { transition-delay: 0.10s !important; }
.reveal[data-delay="150"] { transition-delay: 0.15s !important; }
.reveal[data-delay="200"] { transition-delay: 0.20s !important; }
.reveal[data-delay="250"] { transition-delay: 0.25s !important; }
.reveal[data-delay="300"] { transition-delay: 0.30s !important; }
.reveal[data-delay="350"] { transition-delay: 0.35s !important; }
.reveal[data-delay="400"] { transition-delay: 0.40s !important; }
.reveal[data-delay="450"] { transition-delay: 0.45s !important; }
.reveal[data-delay="500"] { transition-delay: 0.50s !important; }
.reveal[data-delay="550"] { transition-delay: 0.55s !important; }
.reveal[data-delay="600"] { transition-delay: 0.60s !important; }

/* Fallback de segurança: se IntersectionObserver falhar (muito raro),
   revela após 2.5s — tempo suficiente para o usuário rolar para a seção */
@keyframes auto-reveal-safe {
  to { opacity: 1; transform: translateY(0); }
}
.reveal:not(.revealed):not(.active) {
  animation: auto-reveal-safe 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) 2.5s forwards;
}

/* Cards "Como funciona" e "O que está incluso" — hover melhorado */
.how-step {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.how-step:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

.incluso-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}
.incluso-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12) !important;
  border-color: rgba(212, 175, 143, 0.6) !important;
}

/* ============================================================
   9.1 SLIDE-IN ESPECIAL nas seções de cards
   (mesma curva, profundidade um pouco maior para destacar grids)
   ============================================================ */

.section-how-it-works .reveal,
.section-incluso .reveal,
.section-method .reveal,
.section-stats .reveal {
  transform: translateY(28px) !important;
}

.section-how-it-works .reveal.revealed,
.section-how-it-works .reveal.active,
.section-incluso .reveal.revealed,
.section-incluso .reveal.active,
.section-method .reveal.revealed,
.section-method .reveal.active,
.section-stats .reveal.revealed,
.section-stats .reveal.active {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Fallback antigo (1.4s) REMOVIDO em v5.6 — agora usa o fallback global de 2.5s
   da seção 9 (.reveal:not(.revealed):not(.active)) para todas as seções,
   evitando dessincronização entre seções. */

/* ============================================================
   10. BANNER DE URGÊNCIA — REDESIGN BONITO
   ============================================================ */

body .urgency-banner,
body #urgency-banner {
  background: linear-gradient(135deg, #2c1810 0%, #4a2818 50%, #2c1810 100%) !important;
  color: #fff !important;
  padding: 0.85rem 1rem !important;
  min-height: 44px !important;
  line-height: 1.45 !important;
  border-bottom: 2px solid #D4AF8F !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
  position: relative !important;
  overflow: hidden !important;
  animation: none !important;
  display: flex !important;
  align-items: center !important;
}

/* Brilho sutil deslizando no banner */
body .urgency-banner::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 50% !important;
  height: 100% !important;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 143, 0.18) 50%,
    transparent 100%) !important;
  animation: banner-shine 6s linear infinite !important;
  pointer-events: none !important;
}

@keyframes banner-shine {
  0%   { left: -100%; }
  100% { left: 200%; }
}

body .urgency-banner .urgency-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
  font-size: 0.92rem !important;
  line-height: 1.45 !important;
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  padding: 0.1rem 0 !important;
}

body .urgency-banner .urgency-icon {
  font-size: 1.1rem !important;
  display: inline-block !important;
}

body .urgency-banner .urgency-text {
  color: #fff !important;
  letter-spacing: 0.2px !important;
}

body .urgency-banner .urgency-text strong {
  color: #FFD9A8 !important;
  font-weight: 700 !important;
}

body .urgency-banner .urgency-timer {
  color: #FFD9A8 !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  background: rgba(0, 0, 0, 0.35) !important;
  padding: 0.3rem 0.7rem !important;
  border-radius: 6px !important;
  font-size: 0.88rem !important;
  line-height: 1.3 !important;
  display: inline-block !important;
}

@media (max-width: 480px) {
  body .urgency-banner .urgency-content {
    font-size: 0.8rem !important;
    gap: 0.5rem !important;
  }
  body .urgency-banner .urgency-timer {
    font-size: 0.75rem !important;
  }
}

/* ============================================================
   11. CTA FIXO MOBILE — REDESIGN BONITO
   ============================================================ */

body .mobile-cta-fixed {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(26, 23, 20, 0.95) 30%,
    rgba(26, 23, 20, 1) 100%) !important;
  padding: 1.5rem 1rem 1rem !important;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-top: none !important;
}

body .mobile-cta-btn,
body .mobile-cta-fixed .btn,
body .mobile-cta-fixed a.btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
  padding: 1rem 1.25rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  min-height: 56px !important;
  background: linear-gradient(135deg, #D4AF8F 0%, #C4996F 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(212, 175, 143, 0.45),
              0 0 0 2px rgba(255, 255, 255, 0.1) inset !important;
  text-decoration: none !important;
  letter-spacing: 0.3px !important;
  position: relative !important;
  overflow: hidden !important;
}

body .mobile-cta-btn::after {
  content: '→' !important;
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  transition: transform 0.2s ease !important;
}

body .mobile-cta-btn:active {
  transform: scale(0.98) !important;
  transition: transform 0.08s ease !important;
}

body .mobile-cta-btn:active::after {
  transform: translateX(4px) !important;
}

/* Garantir espaço no body só quando mobile-cta visível */
@media (max-width: 768px) {
  body {
    padding-bottom: 100px !important;
  }
}

/* ============================================================
   12. ÍCONES E ELEMENTOS QUE PULSAVAM — DESATIVAR
   ============================================================ */

.pulse-icon,
.urgency-icon-pulse {
  animation: none !important;
  transform: none !important;
}

/* Badge pulse (do header de urgência): só opacidade */
.badge-pulse {
  animation: pulse-fade 2.5s ease-in-out infinite !important;
}
@keyframes pulse-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ============================================================
   13. ELIMINAR QUALQUER ELEMENTO QUE EXTRAPOLE LATERALMENTE
   ============================================================ */

img, video, iframe {
  max-width: 100% !important;
  height: auto;
}

/* Container principal nunca extrapola */
.container {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}
