/**
 * V5.1-FIXES.CSS
 * Correções pós-review:
 * 1. Contraste de fontes em fundos claros
 * 2. Ícones SVG inline nas seções "Como funciona" e "O que está incluso"
 * 3. Checkbox estado selecionado (override do !important do legibility-final)
 * 4. Radio estado selecionado reforçado
 * 5. CTA fixo mobile elegante
 * 6. Popup final do formulário com texto escuro
 * 7. Imagem transformacao-8 corrigida
 */

/* ============================================================
   1. CONTRASTE GLOBAL — TEXTOS ESCUROS EM FUNDOS CLAROS
   ============================================================ */

/* Seção "Como funciona" */
.section-how-it-works .section-title,
.section-how-it-works .section-subtitle {
  color: #1a1a1a !important;
}

.how-step-text {
  color: #2c2c2c !important;
}

.how-step-number {
  /* mantém o gradiente, texto branco já está correto */
  color: #fff !important;
}

/* Seção "O que está incluso" */
.section-incluso .section-title {
  color: #1a1a1a !important;
}

.incluso-card p {
  color: #2c2c2c !important;
}

.incluso-footer {
  color: #3a3a3a !important;
}

/* Seção Método */
.section-method .section-title,
.section-method .method-step-title,
.section-method .method-step-text,
.section-method .section-text {
  color: #1a1a1a !important;
}

/* Seção Diagnóstico */
.section-diagnosis .section-title,
.section-diagnosis p,
.section-diagnosis .diagnosis-text {
  color: #1a1a1a !important;
}

/* Seção Sobre */
.section-about .section-title,
.section-about p,
.about-credentials {
  color: #1a1a1a !important;
}

/* Seção FAQ */
.section-faq .section-title,
.faq-question span,
.faq-answer p {
  color: #1a1a1a !important;
}

/* Seção CTA Final */
.section-cta-final .cta-final-title,
.section-cta-final .cta-final-text {
  color: #1a1a1a !important;
}

/* Seção Transformações */
.section-transformations .section-title,
.section-transformations .section-subtitle {
  color: #1a1a1a !important;
}

/* Seção Testemunhos */
.section-testimonials .section-title,
.section-testimonials .section-subtitle {
  color: #1a1a1a !important;
}

/* Seção Vídeo */
.section-video .section-title,
.section-video .section-text {
  color: #1a1a1a !important;
}

/* Seção Stats */
.stat-label {
  color: #2c2c2c !important;
}

/* ============================================================
   2. ÍCONES SVG — SEÇÃO "COMO FUNCIONA"
   ============================================================ */

/* Os ícones SVG são injetados via JS (ver abaixo).
   Aqui definimos o container e estilo base. */

.how-step-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #D4AF8F, #C89F7A);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(212, 175, 143, 0.35);
}

.how-step-icon svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Remover o número quando ícone SVG está presente */
.how-step:has(.how-step-icon) .how-step-number {
  display: none;
}

/* ============================================================
   3. ÍCONES SVG — SEÇÃO "O QUE ESTÁ INCLUSO"
   ============================================================ */

.incluso-icon-svg {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #D4AF8F, #C89F7A);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(212, 175, 143, 0.3);
}

.incluso-icon-svg svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Ocultar emoji quando SVG está presente */
.incluso-card:has(.incluso-icon-svg) .incluso-icon {
  display: none;
}

/* ============================================================
   4. FORMULÁRIO — CHECKBOX ESTADO SELECIONADO (OVERRIDE FORTE)
   ============================================================ */

/* Override do legibility-final.css que usa !important sem exceção */
.form-checkbox:has(input[type="checkbox"]:checked),
.form-checkbox.is-checked {
  background: linear-gradient(135deg, #7A9E7A 0%, #5F8A5F 100%) !important;
  border-color: #5F8A5F !important;
  box-shadow: 0 4px 16px rgba(95, 138, 95, 0.35) !important;
  color: #fff !important;
}

.form-checkbox:has(input[type="checkbox"]:checked) .form-checkbox-text,
.form-checkbox.is-checked .form-checkbox-text {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Checkmark visível */
.form-checkbox:has(input[type="checkbox"]:checked)::after,
.form-checkbox.is-checked::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Radio estado selecionado reforçado */
.form-option:has(input[type="radio"]:checked),
.form-option.is-selected {
  background: linear-gradient(135deg, #D4AF8F 0%, #C89F7A 100%) !important;
  border-color: #C89F7A !important;
  box-shadow: 0 4px 16px rgba(212, 175, 143, 0.4) !important;
}

.form-option:has(input[type="radio"]:checked) .form-option-text,
.form-option.is-selected .form-option-text {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Checkmark no radio */
.form-option:has(input[type="radio"]:checked)::after,
.form-option.is-selected::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Garantir position: relative nos containers */
.form-option,
.form-checkbox {
  position: relative !important;
}

/* ============================================================
   5. FORMULÁRIO — POPUP FINAL (TELA QUALIFICADO)
   ============================================================ */

.section-final {
  background: linear-gradient(135deg, #F8F5F0 0%, #FFFFFF 100%);
}

.final-title {
  color: #1a1a1a !important;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.final-text {
  color: #3a3a3a !important;
  font-size: 1rem;
  line-height: 1.7;
}

.final-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ============================================================
   6. CTA FIXO MOBILE — VERSÃO ELEGANTE
   ============================================================ */

/* Override do v5.0 para versão mais elegante */
.mobile-cta-fixed {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.875rem 1.25rem;
  padding-bottom: calc(0.875rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0.97) 100%);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.06), 0 -8px 24px rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212, 175, 143, 0.2);
}

.mobile-cta-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  text-align: center;
  padding: 0.9rem 1.5rem;
  font-size: 0.975rem;
  font-weight: 700;
  border-radius: 12px;
  min-height: 52px;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #D4AF8F 0%, #C89F7A 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(212, 175, 143, 0.45) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mobile-cta-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(212, 175, 143, 0.3) !important;
}

@media (max-width: 768px) {
  .mobile-cta-fixed {
    display: block;
  }
  body {
    padding-bottom: 76px;
  }
}

.mobile-cta-fixed.hidden {
  display: none !important;
}

/* ============================================================
   7. YOUTUBE FACADE — THUMBNAIL CLICÁVEL
   ============================================================ */

.yt-facade {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.yt-thumbnail {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.yt-facade:hover .yt-thumbnail {
  opacity: 0.7;
}

.yt-play-btn {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.2s ease;
}

.yt-facade:hover .yt-play-btn {
  transform: scale(1.1);
}

/* Título do passo em "Como funciona" */
.how-step-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a !important;
  margin: 0 0 0.5rem;
}

/* ============================================================
   8. IMAGEM TRANSFORMACAO-8 — GARANTIR RENDERIZAÇÃO
   ============================================================ */

/* Garantir que o card da última transformação renderize corretamente */
.transformation-card picture {
  display: block;
  width: 100%;
  line-height: 0;
}

.transformation-card picture img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

/* Fallback se a imagem não carregar */
.transformation-card img[src=""],
.transformation-card img:not([src]) {
  min-height: 300px;
  background: #f0ece8;
}
