/* ==========================================
   FAQ PAGE STYLES - PUBLIC VERSION
   (Removed all dashboard/sidebar styles)
========================================== */

/* ==========================================
   FIX - Account for Fixed Header (64px)
========================================== */
.faqs-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 90px 20px 40px;
  scroll-margin-top: 80px;
  font-family: var(--font-sans);
}

.faqs-container h1 {
  text-align: center;
  margin-bottom: 10px;
  font-size: var(--text-2xl);
  color: #000000;
  letter-spacing: 0.04em;
}

.faqs-container h1 i {
  display: inline-block;
  width: 26px;
  height: 26px;
  color: var(--color-secondary, var(--color-secondary));
  vertical-align: -5px;
  margin-right: 10px;
}

.faqs-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 16px;
}

/* Category Navigation */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
}

.category-tab {
  padding: 10px 20px;
  background: #f0f0f0;
  color: #666;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.2s;
  font-size: 14px;
}

.category-tab:hover {
  background: var(--color-border);
}

.category-tab.active {
  background: var(--color-primary, var(--color-primary));
  color: white;
}

/* FAQ Content */
.faqs-content {
  background: white;
  padding: 25px;
  border: 1px solid var(--status-danger-border);
  border-radius: 20px;
  margin-bottom: 30px;
}

.faq-section h2 {
  margin-bottom: 20px;
  color: var(--color-primary, var(--color-primary));
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 10px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.faq-item.active {
  border-color: #dbe4ff;
  box-shadow: 0 4px 14px rgba(0, 51, 204, 0.08);
}

.faq-question {
  width: 100%;
  background: #f8f9fa;
  padding: 15px 20px;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font: inherit;
  color: inherit;
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: #e8f0fe;
}

.question-text {
  font-weight: 600;
  color: #333;
  flex: 1;
}

.toggle-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #666;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .toggle-icon {
  transform: rotate(180deg);
}

/* Height is animated in JS (toggleFAQ) to the answer's measured
   scrollHeight, so short and long answers open at the same visual
   speed instead of racing toward a fixed max-height. */
.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background: white;
  color: #555;
  line-height: 1.6;
  font-size: 14px;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.faq-item.active .faq-answer {
  opacity: 1;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease 0.05s;
}

.faq-answer-inner {
  padding: 0 20px;
  transform: translateY(-6px);
  transition: transform 0.3s ease,
    padding 0.35s ease;
}

.faq-item.active .faq-answer-inner {
  padding: 20px;
  transform: translateY(0);
}

/* A few answers contain a real <ul> (e.g. document checklists) instead of
   plain text - tighten the default browser list spacing so it matches the
   surrounding answer's rhythm instead of looking like an untouched list. */
.faq-answer-inner ul {
  margin: 0.5em 0;
  padding-left: 22px;
}

.faq-answer-inner ul ul {
  margin: 0.35em 0;
}

.faq-answer-inner li {
  margin-bottom: 0.35em;
}

.faq-answer-inner li:last-child {
  margin-bottom: 0;
}

/* Alerts */

@media (prefers-reduced-motion: reduce) {
  .faq-answer,
  .faq-answer-inner,
  .toggle-icon,
  .faq-item {
    transition: none !important;
  }
}

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 768px) {
  .faqs-container {
    /* The public header is 60px tall on mobile; leave a visible breathing space below
       it before the page title starts. */
    padding: 96px 15px 30px;
  }

  .category-nav {
    gap: 8px;
  }

  .category-tab {
    padding: 6px 12px;
    font-size: 12px;
  }

}

@media (max-width: 480px) {
  .faqs-container {
    padding: 96px 12px 20px;
  }

  .faqs-content {
    padding: 16px;
    border-radius: 14px;
  }

  .faq-section h2 {
    font-size: var(--text-lg, 1.3rem);
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .faq-list {
    gap: 10px;
  }

  .faq-question {
    padding: 14px 16px;
  }

  .question-text {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .faq-answer {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}
