/* ============================================
   FAQ Explorer - Two-column interactive FAQ component
   Reusable across all FAQ pages; no font/color overrides —
   typography and colors inherit from the site's global styles.
   ============================================ */

.cfe-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

/* ---- Left Sidebar ---- */

.cfe-sidebar {
  flex: 0 0 280px;
  border: 1px solid var(--colors--border-grey);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 6rem;
}

.cfe-category {
  border-bottom: 1px solid var(--colors--border-grey);
}

.cfe-category:last-child {
  border-bottom: none;
}

.cfe-category-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.cfe-category-btn:hover {
  background-color: var(--colors--card-grey);
}

.cfe-category.is-active .cfe-category-btn {
  background-color: var(--colors--card-grey);
}

.cfe-chevron {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.cfe-category.is-active .cfe-chevron {
  transform: rotate(180deg);
}

/* Sub-list */

.cfe-sub-list {
  list-style: none;
  margin: 0 1.25rem 0 1.75rem;
  padding: 0 0 0 1rem;
  border-left: 2px solid transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.cfe-category.is-active .cfe-sub-list {
  max-height: 1000px;
  padding-bottom: 0.75rem;
  border-left-color: var(--colors--border-grey);
}

.cfe-sub-list li {
  padding: 0;
}

.cfe-sub-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.5rem;
  text-align: left;
  line-height: 1.4;
  color: var(--colors--text-grey, #888);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.cfe-sub-btn:hover {
  background: none;
  color: var(--colors--text, #222);
}

.cfe-sub-btn.is-active {
  color: var(--colors--blue);
  font-weight: 600;
}

/* ---- Right Content Panel ---- */

.cfe-content {
  flex: 1;
  min-width: 0;
}

.cfe-panel {
  animation: cfeFadeIn 0.2s ease;
}

@keyframes cfeFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cfe-panel-title {
  margin-bottom: 1.5rem;
}

.cfe-qa-list {
  display: flex;
  flex-direction: column;
}

.cfe-qa-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--colors--border-grey);
  scroll-margin-top: 7rem;
}

.cfe-qa-item:first-child {
  padding-top: 0;
}

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

.cfe-qa-question {
  margin-bottom: 0.5rem;
}

.cfe-qa-answer {
  margin: 0;
}

.cfe-empty-state {
  padding: 3rem 0;
  text-align: center;
}

/* ---- Responsive ---- */

@media screen and (max-width: 767px) {
  .cfe-layout {
    flex-direction: column;
  }

  .cfe-sidebar {
    flex: unset;
    width: 100%;
    position: static;
  }
}