/* 
 * FAQ SECTION - Agência Precisão
 * Estilos para a seção "Perguntas Frequentes"
 */

.faq {
  position: relative;
  width: 100%;
  padding-left: 10vw;
  padding-right: 10vw;
  padding-bottom: 5vw;
  background: linear-gradient(135deg, rgba(8, 22, 35, 0.95) 0%, rgba(5, 15, 25, 0.98) 100%);
  overflow: hidden;
}

.faq::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cor-primaria), transparent);
  opacity: 0.5;
}

.faq::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cor-primaria), transparent);
  opacity: 0.2;
}

.faq .section-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 5vw 5vw 0;
}

.faq .section-header h2 {
  color: #FFF;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.faq .section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--cor-primaria);
  box-shadow: var(--sombra-glow-primaria);
}

.faq .section-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Container das perguntas */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Item individual de FAQ */
.faq-item {
  background: rgba(16, 35, 55, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.faq-item:hover {
  border-color: rgba(0, 209, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 209, 255, 0.1);
}

/* Cabeçalho da pergunta */
.faq-question {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.faq-question h3 {
  color: #FFF;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  padding-right: 2rem;
  transition: color 0.3s ease;
}

.faq-item:hover .faq-question h3 {
  color: var(--cor-primaria);
}

/* Ícones de expandir/recolher */
.faq-icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--cor-primaria);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.faq-plus, .faq-minus {
  position: absolute;
  transition: all 0.3s ease;
}

.faq-plus {
  opacity: 1;
}

.faq-minus {
  opacity: 0;
}

/* Conteúdo da resposta */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  opacity: 0;
}

.faq-answer p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  padding-bottom: 1.5rem;
}

/* Estado ativo */
.faq-item.active {
  background: rgba(20, 45, 70, 0.6);
  border-color: rgba(0, 209, 255, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 209, 255, 0.15);
}

.faq-item.active .faq-question h3 {
  color: var(--cor-primaria);
  font-weight: 600;
}

.faq-item.active .faq-plus {
  opacity: 0;
}

.faq-item.active .faq-minus {
  opacity: 1;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* Altura máxima ajustável conforme necessário */
  opacity: 1;
  padding-top: 0.5rem;
}

/* Efeito de hover nos itens */
.faq-item:hover {
  transform: translateY(-2px);
}

.faq-question:hover .faq-icon {
  color: var(--cor-secundaria);
}

/* CTA após as perguntas */
.faq-cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(16, 41, 66, 0.7) 0%, rgba(10, 27, 42, 0.7) 100%);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(0, 209, 255, 0.12);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25), 0 0 20px rgba(0, 209, 255, 0.08);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.faq-cta p {
  color: #FFF;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.faq-cta .cta-button {
  background: linear-gradient(90deg, var(--cor-secundaria), #E79D1E);
  color: var(--cor-fundo-escuro);
  border: none;
  border-radius: 50px;
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 15px rgba(249, 178, 51, 0.3);
}

.faq-cta .cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(249, 178, 51, 0.4);
}

.faq-cta .cta-button:active {
  transform: translateY(-1px);
}

.faq-cta .cta-button i {
  font-size: 1.1rem;
}

/* Responsividade */
@media screen and (max-width: 1024px) {
  .faq {
    padding: 5rem 0;
  }
  
  .faq .section-header h2 {
    font-size: 2.2rem;
  }
  
  .faq-container {
    width: 90%;
  }
  
  .faq-question h3 {
    font-size: 1rem;
  }
}

@media screen and (max-width: 768px) {
  .faq {
    padding: 4rem 0;
  }
  
  .faq .section-header h2 {
    font-size: 2rem;
  }
  
  .faq-question {
    padding: 1.2rem;
  }
  
  .faq-answer {
    padding: 0 1.2rem;
  }
  
  .faq-answer p {
    font-size: 0.95rem;
    padding-bottom: 1.2rem;
  }
  
  .faq-cta {
    margin-top: 5vw;
    padding: 1.5rem;
  }
  
  .faq-cta p {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 480px) {
  .faq {
    padding: 3rem 0;
  }
  
  .faq .section-header h2 {
    font-size: 1.8rem;
  }
  
  .faq .section-header p {
    font-size: 0.95rem;
  }
  
  .faq-question {
    padding: 1rem;
  }
  
  .faq-question h3 {
    font-size: 0.95rem;
    padding-right: 1.5rem;
  }
  
  .faq-icon {
    right: 1rem;
    font-size: 1.2rem;
    width: 20px;
    height: 20px;
  }
  
  .faq-answer {
    padding: 0 1rem;
  }
  
  .faq-answer p {
    font-size: 0.9rem;
    padding-bottom: 1rem;
  }
  
  .faq-cta {
    padding: 1.2rem;
  }
  
  .faq-cta p {
    font-size: 1rem;
    margin-bottom: 1.2rem;
  }
  
  .faq-cta .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .faq-item, 
  .faq-question h3, 
  .faq-plus, 
  .faq-minus, 
  .faq-answer,
  .faq-cta .cta-button {
    transition: none !important;
  }
  
  .faq-item:hover {
    transform: none !important;
  }
}
