/* ==============================================
   SEÇÃO FAQ - Design Moderno em Tema Claro v3.0
   Cards elegantes com animações suaves
   Sistema limpo e responsivo
============================================== */

/* Reset e configurações base */
.faq * {
  box-sizing: border-box;
}

:root {
  /* Cores modernas em tons marrom/bege */
  --faq-primary: #8B5A3C;
  --faq-primary-light: #A67C5A;
  --faq-accent: #B8860B;
  --faq-success: #8BC34A;
  
  /* Tema marrom/bege */
  --faq-background: #F5F0E8;
  --faq-card-bg: #FEFCF7;
  --faq-card-hover: #F0E6D2;
  --faq-border: #E7D7C1;
  --faq-border-hover: #D4C4A8;
  
  /* Textos */
  --faq-text-primary: #3E2723;
  --faq-text-secondary: #8D6E63;
  --faq-text-muted: #A1887F;
  
  /* Sombras suaves */
  --faq-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --faq-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --faq-shadow-active: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Animações suaves */
  --faq-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --faq-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Container principal do FAQ */
.faq {
  padding: 80px 0;
  background: var(--faq-background);
  position: relative;
}

.faq .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Título da seção */
.faq .section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--faq-text-primary);
  letter-spacing: -0.025em;
}

.faq .section-subtitle {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  color: var(--faq-text-secondary);
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Container dos cards FAQ */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

/* Card individual do FAQ */
.faq-item {
  background: var(--faq-card-bg);
  border: 1px solid var(--faq-border);
  border-radius: 12px;
  box-shadow: var(--faq-shadow);
  transition: var(--faq-transition);
  overflow: hidden;
}

.faq-item:hover {
  border-color: var(--faq-border-hover);
  box-shadow: var(--faq-shadow-hover);
  transform: translateY(-1px);
}

.faq-item.active {
  border-color: var(--faq-primary);
  box-shadow: var(--faq-shadow-active);
}

/* Botão da pergunta */
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: var(--faq-transition);
  font-family: inherit;
}

.faq-question:hover {
  background: var(--faq-card-hover);
}

.faq-question:focus {
  outline: 2px solid var(--faq-primary);
  outline-offset: -2px;
}

/* Texto da pergunta */
.faq-question-text {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  font-weight: 600;
  color: var(--faq-text-primary);
  line-height: 1.5;
  flex: 1;
}

/* Ícone de toggle moderno */
.faq-toggle {
  width: 32px;
  height: 32px;
  background: var(--faq-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
  transition: var(--faq-transition);
  flex-shrink: 0;
  position: relative;
}

.faq-item.active .faq-toggle {
  background: var(--faq-success);
  transform: rotate(45deg);
}

/* Container da resposta */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--faq-bounce), padding 0.3s ease;
  background: linear-gradient(to bottom, rgba(37, 99, 235, 0.02), rgba(6, 182, 212, 0.02));
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

/* Conteúdo da resposta */
.faq-answer-content {
  padding: 0 24px 24px 24px;
  color: var(--faq-text-secondary);
  line-height: 1.7;
  font-size: clamp(0.9rem, 1vw, 1rem);
  opacity: 0;
  transform: translateY(-8px);
  transition: var(--faq-transition);
}

.faq-item.active .faq-answer-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}

/* Animação de entrada dos cards */
.faq-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }

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

/* Responsividade */
@media (max-width: 768px) {
  .faq {
    padding: 60px 0;
  }
  
  .faq .container {
    padding: 0 16px;
  }
  
  .faq .section-subtitle {
    margin-bottom: 40px;
  }
  
  .faq-container {
    gap: 12px;
  }
  
  .faq-question {
    padding: 20px;
    gap: 12px;
  }
  
  .faq-question-text {
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  }
  
  .faq-toggle {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .faq-answer-content {
    padding: 0 20px 20px 20px;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  }
}

@media (max-width: 480px) {
  .faq {
    padding: 50px 0;
  }
  
  .faq .container {
    padding: 0 12px;
  }
  
  .faq-question {
    padding: 18px;
  }
  
  .faq-answer-content {
    padding: 0 18px 18px 18px;
  }
  
  .faq-item {
    border-radius: 8px;
  }
}

/* Estados especiais */
.faq-item.highlighted {
  animation: highlight 2s ease;
}

@keyframes highlight {
  0%, 100% { 
    background: var(--faq-card-bg); 
    border-color: var(--faq-border);
  }
  50% { 
    background: rgba(37, 99, 235, 0.05); 
    border-color: var(--faq-primary);
  }
}

/* Modo escuro (se necessário no futuro) */
@media (prefers-color-scheme: dark) {
  :root {
    --faq-background: #0f172a;
    --faq-card-bg: #1e293b;
    --faq-card-hover: #334155;
    --faq-border: #334155;
    --faq-border-hover: #475569;
    --faq-text-primary: #f1f5f9;
    --faq-text-secondary: #cbd5e1;
    --faq-text-muted: #94a3b8;
  }
}

/* Animações reduzidas para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-question,
  .faq-toggle,
  .faq-answer,
  .faq-answer-content {
    animation: none;
    transition: none;
  }
}
