/* FAQ Section */
.faq {
  padding: var(--section-padding) 0;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Standalone FAQ page */
.faq.faq-page {
  padding-top: 7rem;
  min-height: 100vh;
}

/* Subtle grid pattern */
.faq::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* Ambient glow */
.faq::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 60%;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.faq-item {
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, rgba(28, 35, 51, 0.5) 0%, rgba(15, 18, 25, 0.8) 100%);
}

.faq-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

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

.faq-question {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.faq-question:hover {
  background: rgba(59, 130, 246, 0.05);
}

.faq-question h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0;
  flex: 1;
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease 0.1s,
    padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 1rem 1.5rem 1.5rem;
  opacity: 1;
  max-height: 1500px;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.faq-answer a:hover {
  color: var(--accent-light);
}

/* Contact CTA */
.faq-contact {
  max-width: 800px;
  margin: 2.5rem auto 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

.faq-contact p {
  font-size: 1rem;
  color: var(--text-muted);
}

.faq-contact a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.faq-contact a:hover {
  color: var(--accent-light);
}

@media (max-width: 768px) {
  .faq {
    padding: var(--section-padding-mobile) 0;
  }

  .faq.faq-page {
    padding-top: 6rem;
  }

  .faq-question {
    padding: 1.25rem;
  }

  .faq-question h3 {
    font-size: 1rem;
  }

  .faq-item.active .faq-answer {
    padding: 0.75rem 1.25rem 1.25rem;
  }
}
