/* =============================================================
   SEO FAQ Master — Accordion + filter tabs + search  (v1.3)
   Uses CSS vars --theme-text / --theme-accent / --theme-bg
   ============================================================= */

#seo-faq-accordion-wrapper {
  max-width: 860px;
  margin: 2.5rem auto 0;
  padding: 0 1rem 3rem;
  font-family: inherit;
  color: var(--theme-text, #1a1a1a);
}

/* ── Search bar ── */
.seo-faq-search-bar {
  position: relative;
  margin-bottom: 1.25rem;
}
.seo-faq-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  opacity: .4;
  pointer-events: none;
  color: var(--theme-text, #1a1a1a);
}
#seo-faq-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: .85rem 1.2rem .85rem 2.8rem;
  border: 2px solid rgba(128,128,128,.25);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: var(--theme-text, #1a1a1a);
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
#seo-faq-search-input:focus {
  border-color: var(--theme-accent, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
#seo-faq-search-input::placeholder { opacity: .45; }

/* ── Cluster filter tabs ── */
.seo-faq-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
  min-height: 36px;
}
.seo-faq-tab {
  padding: .4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(128,128,128,.28);
  background: transparent;
  color: var(--theme-text, #1a1a1a);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.seo-faq-tab:hover {
  background: rgba(128,128,128,.1);
  border-color: rgba(128,128,128,.45);
}
.seo-faq-tab.is-active {
  background: var(--theme-accent, #3b82f6);
  border-color: var(--theme-accent, #3b82f6);
  color: #fff;
  font-weight: 600;
}

/* ── Cluster section ── */
.seo-faq-cluster {
  border: 1px solid rgba(128,128,128,.18);
  border-radius: 14px;
  margin-bottom: .65rem;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  transition: box-shadow .2s;
}
.seo-faq-cluster:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

.seo-faq-cluster-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .95rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--theme-text, #1a1a1a);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: background .15s;
}
.seo-faq-cluster-header:hover { background: rgba(128,128,128,.07); }

.seo-faq-cluster-name { flex: 1; }
.seo-faq-cluster-count {
  font-size: .78rem; font-weight: 400; opacity: .4; flex-shrink: 0;
}

/* ── Chevron ── */
.seo-faq-chevron {
  width: 18px; height: 18px; flex-shrink: 0; opacity: .5;
  transition: transform .28s ease;
  color: var(--theme-text, #1a1a1a);
}
.seo-faq-cluster-header[aria-expanded="true"] .seo-faq-chevron,
.seo-faq-question[aria-expanded="true"]       .seo-faq-q-chevron {
  transform: rotate(180deg);
}

/* ── Cluster body ── */
.seo-faq-cluster-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
  border-top: 1px solid transparent;
}
.seo-faq-cluster-body.is-open {
  max-height: 99999px;
  border-top-color: rgba(128,128,128,.12);
}

/* ── FAQ item ── */
.seo-faq-item + .seo-faq-item { border-top: 1px solid rgba(128,128,128,.08); }

.seo-faq-question {
  width: 100%; display: flex; align-items: center; gap: .75rem;
  padding: .8rem 1.5rem;
  background: none; border: none; cursor: pointer; text-align: left;
  color: var(--theme-text, #1a1a1a);
  font-size: .92rem; font-weight: 500; line-height: 1.45;
  transition: background .15s;
}
.seo-faq-question:hover { background: rgba(128,128,128,.05); }
.seo-faq-question span { flex: 1; }
.seo-faq-q-chevron { width: 15px; height: 15px; }

.seo-faq-question mark {
  background: rgba(59,130,246,.2);
  color: inherit; border-radius: 3px; padding: 0 2px;
}

/* ── FAQ answer ── */
.seo-faq-answer {
  overflow: hidden; max-height: 0;
  transition: max-height .28s ease, padding .28s ease;
  padding: 0 1.5rem;
  font-size: .91rem; line-height: 1.75;
  color: var(--theme-text, #1a1a1a); opacity: .82;
}
.seo-faq-answer.is-open { max-height: 1200px; padding: .35rem 1.5rem 1.15rem; }

.seo-faq-readmore {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: .5rem; font-size: .82rem; font-weight: 600;
  color: var(--theme-accent, #3b82f6);
  text-decoration: none; opacity: .9; transition: opacity .15s;
}
.seo-faq-readmore:hover { opacity: 1; text-decoration: underline; }

/* ── States ── */
.seo-faq-empty {
  text-align: center; opacity: .4; padding: 2rem 0; font-size: .9rem;
}
#seo-faq-accordion-loading {
  text-align: center; opacity: .45; font-size: .88rem; padding: 1.5rem 0;
  animation: seo-faq-pulse 1.4s ease-in-out infinite;
}
@keyframes seo-faq-pulse { 0%,100%{opacity:.45} 50%{opacity:.18} }
