/* FAQ page specific styles for AltNotes */

.faq-hero {
  padding: 60px 0;
  background: transparent;
}

.search-wrap {
  max-width: 540px;
  margin: 32px auto 0;
}

.faq-search {
  width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.faq-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.faq-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.category-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 122, 255, 0.28);
}

.category-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.category-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.category-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-results {
  margin-top: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.faq-results.is-searching ~ .faq-categories {
  display: none;
}

/* If searching, hide categories - for simplicity we do it via JS or CSS */
.is-searching ~ .faq-categories {
  display: none !important;
}

.faq-section {
  margin-bottom: 48px;
}

.faq-section h2 {
  font-size: 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.faq-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 180ms ease;
}

.faq-item:hover {
  border-color: var(--muted-2);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease;
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .faq-question:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-icon {
  transition: transform 200ms ease;
  color: var(--muted-2);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 250ms ease-out;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer p {
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.faq-no-results {
  text-align: center;
  padding: 60px 0;
}
