/* ── FAQ Module Styles ─────────────────────────────────────────────────────── */

/* Hero / header */
.faq-hero {
  padding: 4rem 1rem 3rem;
  text-align: center;
}

.faq-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1rem;
}

.faq-page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 .5rem;
  color: var(--color-text, #e2e8f0);
  font-family: var(--font-display, Georgia, serif);
}

.faq-page-sub {
  font-size: 1rem;
  opacity: .6;
  margin: 0 0 2rem;
  color: var(--color-text, #e2e8f0);
}

/* Search */
.faq-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.faq-search {
  width: 100%;
  padding: .75rem 1rem .75rem 3rem;
  border: 1.5px solid var(--color-border, rgba(255,255,255,.12));
  border-radius: 999px;
  background: var(--color-surface, #1e293b);
  color: var(--color-text, #e2e8f0);
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  box-sizing: border-box;
}

.faq-search:focus {
  border-color: var(--color-primary, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary, #6366f1) 20%, transparent);
}

.faq-search::placeholder {
  opacity: .4;
}

.faq-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .95rem;
  pointer-events: none;
}

/* Body */
.faq-body {
  padding-bottom: 5rem;
}

/* Category */
.faq-category {
  margin-bottom: 1.5rem;
  border-radius: .75rem;
  overflow: hidden;
  border: 1px solid var(--color-border, rgba(255,255,255,.08));
  background: var(--color-surface, #1e293b);
}

.faq-cat-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,.03);
  border: none;
  cursor: pointer;
  color: var(--color-text, #e2e8f0);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: background .15s;
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,.08));
}

.faq-cat-header:hover {
  background: rgba(255,255,255,.06);
}

.faq-cat-name {
  flex: 1;
}

.faq-cat-count {
  font-size: .75rem;
  font-weight: 500;
  background: var(--color-primary, #6366f1);
  color: #fff;
  padding: .15rem .55rem;
  border-radius: 999px;
  opacity: .85;
}

.faq-cat-arrow {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s ease;
  opacity: .5;
  flex-shrink: 0;
}

.faq-cat-header[aria-expanded="false"] .faq-cat-arrow {
  transform: rotate(-45deg);
}

/* Category body (collapsible) */
.faq-cat-body {
  max-height: 9999px;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-cat-header[aria-expanded="false"] + .faq-cat-body {
  max-height: 0;
}

/* FAQ Item */
.faq-item {
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,.06));
}

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

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text, #e2e8f0);
  font-size: .9375rem;
  font-weight: 500;
  text-align: left;
  transition: color .15s, background .15s;
}

.faq-question:hover {
  color: var(--color-primary, #6366f1);
  background: rgba(255,255,255,.02);
}

.faq-question[aria-expanded="true"] {
  color: var(--color-primary, #6366f1);
}

.faq-question > span:first-child {
  flex: 1;
}

.faq-item-arrow {
  display: inline-block;
  width: .45rem;
  height: .45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s ease;
  opacity: .45;
  flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-item-arrow {
  transform: rotate(-135deg);
  opacity: .8;
}

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

.faq-answer-inner {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--color-text, #e2e8f0);
  opacity: .75;
}

/* Empty states */
.faq-empty,
.faq-no-results {
  text-align: center;
  padding: 5rem 1rem;
  opacity: .6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.faq-empty-icon {
  font-size: 3rem;
  line-height: 1;
}

.faq-empty h3,
.faq-no-results p {
  margin: 0;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .faq-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .faq-cat-header,
  .faq-question {
    padding: .85rem 1rem;
  }

  .faq-answer-inner {
    padding: 0 1rem 1rem;
  }
}
