/*
 * FAQ page styles
 * Loaded by page-faq.php template.
 */

.faq-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

/* ── Hero ───────────────────────────────────────────────── */
.faq-hero {
  text-align: center;
  margin-bottom: 1.6rem;
}

.faq-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.08);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.faq-title {
  font-size: clamp(1.8rem, 3.8vw, 2.4rem);
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.faq-lead {
  max-width: 580px;
  margin: 0 auto;
  color: var(--gray-text);
  font-size: 1rem;
  line-height: 1.65;
}
.faq-lead a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Category nav: white card, sticky wrapper ───────────── */
.faq-categories-wrap {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 1.4rem;
  padding: 0.6rem 0;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.05);
}

.faq-cat-link {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.faq-cat-link:hover {
  color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}
.faq-cat-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* ── Groups ────────────────────────────────────────────── */
.faq-group { margin-bottom: 2rem; scroll-margin-top: 5rem; }
.faq-group:last-child { margin-bottom: 0; }

.faq-group-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.8rem;
  letter-spacing: -0.005em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.faq-empty {
  padding: 2rem;
  background: var(--light-gray);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  text-align: center;
  color: var(--gray-text);
  margin: 1.5rem 0;
}
.faq-empty code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* ── Question item ─────────────────────────────────────── */
.faq-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-item:hover { border-color: rgba(79, 70, 229, 0.25); }
.faq-item[open] {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--heading-color);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { display: none; }

.faq-q-text { flex: 1; line-height: 1.4; }

.faq-q-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary-color);
  transition: transform 0.2s ease, background 0.15s ease;
}
.faq-q-icon svg { width: 14px; height: 14px; }
.faq-item[open] .faq-q-icon {
  transform: rotate(180deg);
  background: var(--primary-color);
  color: #fff;
}

.faq-a {
  padding: 0 1.15rem 1.05rem;
  color: var(--gray-text);
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px solid transparent;
  animation: faq-open 0.18s ease;
}
.faq-item[open] .faq-a { border-top-color: var(--border-color); padding-top: 0.85rem; }
.faq-a p { margin: 0; }
.faq-a p + p { margin-top: 0.6rem; }

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CTA ───────────────────────────────────────────────── */
.faq-cta {
  margin-top: 2.5rem;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.22);
  position: relative;
}
.faq-cta::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.faq-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.7rem;
  position: relative;
  z-index: 1;
}

.faq-cta-text h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.005em;
}
.faq-cta-text p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.faq-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  background: #fff;
  border-radius: 9px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.faq-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

/* ── Dark mode ─────────────────────────────────────────── */
.dark .faq-eyebrow {
  background: rgba(124, 138, 255, 0.14);
  color: #a5b4ff;
}
.dark .faq-categories-wrap {
  background: rgba(22, 27, 46, 0.85);
}
.dark .faq-categories {
  background: linear-gradient(145deg, #181e34, #1e2542);
  border-color: rgba(124, 138, 255, 0.12);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.35);
}
.dark .faq-cat-link { color: #b8c4d4; }
.dark .faq-cat-link:hover { background: rgba(124, 138, 255, 0.1); }
.dark .faq-item {
  background: linear-gradient(145deg, #181e34, #1e2542);
  border-color: rgba(124, 138, 255, 0.12);
}
.dark .faq-item:hover { border-color: rgba(124, 138, 255, 0.3); }
.dark .faq-item[open] {
  border-color: rgba(124, 138, 255, 0.4);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}
.dark .faq-q-icon { background: rgba(124, 138, 255, 0.14); color: #a5b4ff; }
.dark .faq-item[open] .faq-a { border-top-color: rgba(124, 138, 255, 0.1); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  .faq-page { padding: 1.5rem 0.9rem 2.5rem; }
  .faq-categories { gap: 0.3rem; padding: 0.55rem 0.65rem; }
  .faq-cat-link { font-size: 0.78rem; padding: 0.38rem 0.75rem; }
  .faq-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .faq-cta-btn { width: 100%; justify-content: center; }
}
