/* ==========================================================
   faq.css — BEELESSON FAQ page
   Reuses theme variables & global layout from global.css
   ========================================================== */

.faq-hero-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.faq-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
}

.faq-subtitle {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Controls (search + category tabs) */
.faq-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .faq-controls {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.faq-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: 420px;
}

.faq-search-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.faq-search-input {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  background-color: var(--bg-alt);
  color: var(--ink);
  outline: none;
}
.faq-search-input::placeholder {
  color: var(--ink-soft);
}
.faq-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.faq-category-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.faq-category-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.faq-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.faq-tab {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  background-color: var(--bg-alt);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 0.12s ease-out, color 0.12s ease-out,
    border-color 0.12s ease-out, transform 0.12s ease-out;
}
.faq-tab:hover {
  border-color: var(--accent);
}
.faq-tab.active {
  background: linear-gradient(135deg, var(--accent), #f97316);
  border-color: #ea580c;
  color: #111827;
  transform: translateY(-1px);
}

/* FAQ list / accordion */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-item {
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  width: 100%;
  border: none;
  background: transparent;
}
.faq-question-text {
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
}
.faq-question-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.faq-category-chip {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  background-color: var(--bg-soft);
  color: var(--ink-soft);
}
.faq-toggle-icon {
  font-size: 1rem;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-top: 1px solid transparent;
  padding: 0 0.85rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
  transition: max-height 0.18s ease-out, opacity 0.18s ease-out,
    padding-top 0.18s ease-out, padding-bottom 0.18s ease-out,
    border-top-color 0.18s ease-out;
}

.faq-item.open .faq-answer {
  max-height: 500px; /* enough for most answers */
  opacity: 1;
  padding-top: 0.55rem;
  padding-bottom: 0.65rem;
  border-top-color: var(--border);
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(90deg);
}

/* Small helper when no results */
.faq-no-results {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}
