/**
 * FAQ Section - CSS
 * Reusable component styles
 */

.faq-section {
  padding: 80px 0;
  background: var(--color-bg);
  position: relative;
  z-index: 1;
}

.faq-section .container {
  max-width: 900px;
}

.faq-title {
  text-align: center;
  font-size: 40px;
  font-weight: 500;
  line-height: 100%;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--color-text);
  margin-bottom: 48px;
}

.faq-item {
  border-top: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: none;
}

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

.faq-question {
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 20.3px;
  font-weight: 500;
  line-height: 24.38px;
  color: var(--color-text, #1d1d1f);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-question-text {
  flex: 1;
  vertical-align: middle;
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open .faq-question {
  color: #206dd1;
}

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

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 0;
}

.faq-answer > * {
  overflow: hidden;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: 15px;
  font-weight: 400;
  line-height: 25.5px;
  color: var(--color-text, #1d1d1f);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .faq-section {
    padding: 20px 0;
  }
  .faq-title {
    margin-bottom: 32px;
    font-size: 28px;
  }
  .faq-question {
    padding: 20px 0;
    font-size: 18px;
    line-height: 22px;
  }
  .faq-item.is-open .faq-answer {
    padding-bottom: 20px;
  }
  .faq-answer p {
    font-size: 14px;
    line-height: 23px;
  }
}

@media (max-width: 480px) {
  .faq-title {
    font-size: 24px;
  }
  .faq-question {
    font-size: 16px;
    line-height: 20px;
  }
  .faq-answer p {
    font-size: 14px;
    line-height: 22px;
  }
}
