/**
 * FAQ Section Component
 * Accordion-style frequently asked questions
 */

.faq-section {
  padding-top: var(--space-80);
  padding-bottom: var(--space-80);
}

@media (min-width: 1024px) {
  .faq-section {
    padding-top: var(--space-96);
    padding-bottom: var(--space-96);
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .faq-section {
    padding-top: var(--space-48);
    padding-bottom: var(--space-48);
  }
  
  .faq-section__header {
    text-align: center;
  }
  
  .faq-section__title {
    font-size: 1.75em;
  }
  
  .faq-accordion {
    gap: var(--space-12);
  }
  
  .faq-accordion__question {
    padding: 16px 20px;
    gap: var(--space-16);
  }
  
  .faq-accordion__question-text {
    font-size: 0.9375em;
  }
  
  .faq-accordion__answer-content {
    padding: 16px 20px 20px 20px;
    font-size: 0.875em;
  }
}

/* Background Colors */
.faq-section--bg-white {
  background-color: #fff;
}

.faq-section--bg-light {
  background-color: #f5f5f5;
}

.faq-section--bg-gray {
  background-color: #e8e8e8;
}

/* Header */
.faq-section__header {
  text-align: left;
  margin-bottom: var(--space-48);
  max-width: 800px;
}

.faq-section__label {
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #666;
  margin-bottom: var(--space-16);
}

.faq-section__title {
  font-size: 2em;
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--color-text);
  margin: 0;
}

@media (min-width: 768px) {
  .faq-section__title {
    font-size: 2.5em;
  }
}

/* Grid Layout */
.faq-section__grid {
  display: grid;
  gap: var(--space-48);
  align-items: start;
}

@media (min-width: 1024px) {
  .faq-section__grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-64);
  }
}

/* Accordion Container */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* Accordion Item */
.faq-accordion__item {
  background: #f5f5f5;
  border: none;
}

/* Question Button */
.faq-accordion__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.3s ease;
  gap: var(--space-24);
}

.faq-accordion__question:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.faq-accordion__question:focus {
  outline: 2px solid #333;
  outline-offset: -2px;
}

.faq-accordion__question-text {
  font-size: 1em;
  font-weight: 400;
  color: #000;
  line-height: 1.5;
  flex: 1;
}

@media (min-width: 768px) {
  .faq-accordion__question-text {
    font-size: 1.5em;
  }
}

/* Icon */
.faq-accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.5em;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-accordion__question[aria-expanded="true"] .faq-accordion__icon {
  transform: rotate(45deg);
}

/* Answer */
.faq-accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-accordion__answer--open {
  max-height: 2000px;
  transition: max-height 0.5s ease;
}

.faq-accordion__answer-content {
  padding: 20px 24px 24px 24px;
  font-size: 1.5em;
  line-height: var(--lh-normal);
  color: #555;
}

.faq-accordion__answer-content p {
  margin-bottom: var(--space-16);
  line-height: var(--lh-normal);
}

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

.faq-accordion__answer-content ul,
.faq-accordion__answer-content ol {
  margin-bottom: var(--space-16);
  padding-left: var(--space-24);
}

.faq-accordion__answer-content li {
  margin-bottom: var(--space-8);
}

/* Contact Box */
.faq-contact {
  background: #fff;
  padding: var(--space-32);
  border-radius: 8px;
  border: 1px solid #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: var(--space-32);
}

.faq-contact__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-24);
  line-height: var(--lh-tight);
}

.faq-contact__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.faq-contact__item {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  padding-bottom: var(--space-20);
  border-bottom: 1px solid #e5e5e5;
}

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

.faq-contact__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--color-text);
}

.faq-contact__link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.2s ease;
  word-break: break-word;
}

.faq-contact__link:hover,
.faq-contact__link:focus {
  opacity: 0.7;
}

/* Mobile adjustments for contact box */
@media (max-width: 1023px) {
  .faq-section__grid {
    grid-template-columns: 1fr;
  }
  
  .faq-contact {
    order: -1;
    position: static;
  }
  
  .faq-contact__title {
    font-size: 1.25rem;
  }
}

/* Accessibility: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .faq-accordion__icon,
  .faq-accordion__answer {
    transition: none;
  }
}

