/* ===================================
   FAQ Section
   =================================== */

#faq {
  padding: var(--spacing-3xl) 0;
}

#faq h2 {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  color: var(--color-text-primary);
}

/* FAQ Container */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Individual FAQ Item */
.faq-item {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid rgba(55, 55, 28, 0.1);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* FAQ Question Button */
.faq-question {
  /* Remove default button styling */
  background: none;
  border: none;
  padding: 0;

  /* Style as heading */
  font-family: inherit;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: var(--line-height-tight);

  /* Full-width block element, left-aligned */
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;

  /* Interactive styling */
  cursor: pointer;
  margin-bottom: var(--spacing-md);

  /* Smooth transitions */
  transition: color 0.2s ease;
}

/* Hover state */
.faq-question:hover {
  color: rgba(55, 55, 28, 0.8);
}

/* Focus state for keyboard navigation */
.faq-question:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Chevron indicator */
.faq-question::after {
  content: '▼';
  font-size: var(--font-size-base);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--spacing-md);
}

/* Rotated chevron for expanded state */
.faq-question[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* FAQ Answer */
.faq-answer {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  margin-bottom: 0;

  /* Collapsible animation */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Expanded answer state */
.faq-answer:not([hidden]) {
  max-height: 500px;
}

/* Answer paragraph spacing */
.faq-answer p {
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #faq {
    padding: var(--spacing-2xl) 0;
  }

  .faq-container {
    max-width: 100%;
  }

  .faq-question {
    font-size: var(--font-size-md);
  }

  .faq-item {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
  }
}
