/* faq.css - FAQ Section */

#faq {
  background-color: #F8FAFC;
  padding: 96px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 10px 24px -6px rgba(7, 19, 61, 0.08);
}

/* Subtle dot-grid background — matches #why-arth pattern */
#faq::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #2563EB 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.04;
  pointer-events: none;
}

/* ── Container ── */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.faq-header-wrapper {
  position: relative;
  text-align: center;
  margin-bottom: 56px;
}

/* Eyebrow label — identical pattern to .platform-label / .why-arth-label */
.faq-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2563EB;
  margin-bottom: 8px;
}

/* Underline bar beneath eyebrow */
.faq-eyebrow-line {
  width: 32px;
  height: 2px;
  border-radius: 9999px;
  background-color: #2563EB;
  margin: 0 auto 20px;
}

/* Main heading */
.faq-heading {
  font-size: 36px;
  font-weight: 800;
  color: #07133D;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .faq-heading {
    font-size: 48px;
  }
}

/* Highlighted word "Questions" */
.faq-heading-accent {
  color: #2563EB;
}

/* "Expand All" button — top-right of section header */
.faq-expand-all-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #2563EB;
  background: none;
  border: none;
  border-bottom: 2px solid #2563EB;
  padding: 2px 0 2px;
  cursor: pointer;
  line-height: 1.5;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.faq-expand-all-btn:hover {
  color: #1D4ED8;
  border-color: #1D4ED8;
  opacity: 0.85;
}

/* ── FAQ List ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── FAQ Item Card ── */
.faq-item {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 12px rgba(7, 19, 61, 0.06);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.faq-item:hover {
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

/* ── Question row ── */
.faq-question {
  display: flex;
  align-items: center;
  padding: 28px 28px 28px 28px;
  gap: 20px;
  cursor: pointer;
  user-select: none;
}

.faq-question:focus {
  outline: none;
}

.faq-question:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: -2px;
  border-radius: 16px;
}

/* Large number */
.faq-number {
  font-size: 32px;
  font-weight: 800;
  color: #2563EB;
  min-width: 68px;
  flex-shrink: 0;
  line-height: 1;
}

/* Question text */
.faq-question-text {
  font-size: 17px;
  font-weight: 700;
  color: #07133D;
  flex: 1;
  line-height: 1.45;
}

/* Circular toggle button — CSS-drawn cross for pixel-perfect centering */
.faq-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #2563EB;
  background: none;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  pointer-events: none;
  font-size: 0; /* suppress text character */
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease,
              border-color 0.2s ease;
}

/* Horizontal bar of the + */
.faq-toggle::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 2px;
  background-color: #2563EB;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1px;
  transition: background-color 0.2s ease;
}

/* Vertical bar of the + */
.faq-toggle::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 14px;
  background-color: #2563EB;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1px;
  transition: background-color 0.2s ease;
}

/* Rotate 45° → + becomes × on open */
.faq-item.is-open .faq-toggle {
  transform: rotate(45deg);
  background-color: #2563EB;
}

.faq-item.is-open .faq-toggle::before,
.faq-item.is-open .faq-toggle::after {
  background-color: #ffffff;
}

/* ── Answer panel ── */
.faq-answer-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Indented to align with question text
   left-pad = faq-question padding-left(28) + number min-width(68) + gap(20) = 116px */
.faq-answer {
  padding: 0 28px 28px 116px;
  color: #64748B;
  font-size: 15px;
  line-height: 1.78;
  opacity: 0;
  transition: opacity 0.25s ease 0.08s;
}

.faq-item.is-open .faq-answer {
  opacity: 1;
}

/* ── Responsive — tablet / mobile ── */
@media (max-width: 768px) {
  #faq {
    padding: 72px 16px;
  }

  .faq-heading {
    font-size: 32px;
  }

  .faq-expand-all-btn {
    position: static;
    display: block;
    margin: 20px auto 0;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .faq-heading {
    font-size: 26px;
  }

  .faq-question {
    padding: 20px;
    gap: 12px;
  }

  .faq-number {
    font-size: 24px;
    min-width: 52px;
  }

  .faq-question-text {
    font-size: 14px;
  }

  .faq-toggle {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  /* Adjust answer indent for mobile */
  .faq-answer {
    padding: 0 20px 20px 84px;
    font-size: 14px;
  }

  .faq-header-wrapper {
    margin-bottom: 36px;
  }
}
