/* FAQ page — scoped to nexus-site.css design tokens */

/* ---- Search ---- */
.faq-search-section {
  padding: 40px 24px 24px;
  background: var(--nx-bg);
}

.faq-search-container {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.faq-search-container h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--nx-navy);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 15px 18px 15px 48px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  font-size: 16px;
  font-family: inherit;
  background: var(--nx-white);
  color: var(--nx-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--nx-orange);
  box-shadow: 0 0 0 3px rgba(239, 146, 39, 0.12);
}

.search-box input::placeholder {
  color: var(--nx-muted);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--nx-muted);
  pointer-events: none;
}

/* ---- Category navigation ---- */
.faq-categories-nav {
  padding: 16px 24px 20px;
  background: var(--nx-bg);
  border-bottom: 1px solid var(--nx-border);
}

.categories-container {
  max-width: var(--nx-container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.category-btn {
  padding: 10px 20px;
  border: 1px solid var(--nx-border);
  border-radius: 999px;
  background: var(--nx-white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--nx-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.category-btn:hover {
  border-color: var(--nx-navy-light);
  color: var(--nx-navy);
}

.category-btn.active {
  background: var(--nx-navy);
  color: var(--nx-white);
  border-color: var(--nx-navy);
  box-shadow: var(--nx-shadow-sm);
}

.category-btn:focus-visible {
  outline: 2px solid var(--nx-orange);
  outline-offset: 2px;
}

/* ---- FAQ content ---- */
.faq-content-section {
  padding: 40px 24px 64px;
  background: var(--nx-white);
}

.faq-content-container {
  max-width: 820px;
  margin: 0 auto;
}

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

.faq-category:last-of-type {
  margin-bottom: 0;
}

.faq-category.hidden {
  display: none;
}

/* Category headings */
.category-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--nx-border);
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  font-weight: 800;
  color: var(--nx-navy);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.category-title svg {
  flex-shrink: 0;
  display: block;
  width: 34px;
  height: 34px;
  fill: var(--nx-navy-light);
}

/* ---- FAQ accordion ---- */
.faq-item {
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--nx-white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item:hover {
  border-color: rgba(10, 74, 138, 0.35);
}

.faq-item.active {
  border-color: var(--nx-navy-light);
  box-shadow: var(--nx-shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--nx-navy);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.faq-question:hover {
  background: var(--nx-bg);
}

.faq-item.active .faq-question {
  background: linear-gradient(
    135deg,
    var(--nx-navy-dark) 0%,
    var(--nx-navy) 55%,
    var(--nx-navy-light) 100%
  );
  color: var(--nx-white);
}

.faq-question span {
  flex: 1;
  min-width: 0;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  fill: currentColor;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.15s ease;
}

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

.faq-question:focus-visible {
  outline: 2px solid var(--nx-orange);
  outline-offset: -2px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--nx-bg);
}

.faq-item.active .faq-answer {
  max-height: 2400px;
  padding: 20px 20px 22px;
  border-top: 1px solid var(--nx-border);
}

.faq-answer p {
  font-size: 16px;
  color: var(--nx-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

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

.faq-answer ul,
.faq-answer ol {
  margin: 12px 0;
  padding-left: 22px;
}

.faq-answer li {
  font-size: 16px;
  color: var(--nx-muted);
  line-height: 1.75;
  margin-bottom: 8px;
}

.faq-answer li::marker {
  color: var(--nx-navy-light);
}

.faq-answer strong {
  color: var(--nx-navy);
  font-weight: 600;
}

.faq-answer a {
  color: var(--nx-navy-light);
  font-weight: 600;
  text-decoration: none;
}

.faq-answer a:hover {
  color: var(--nx-orange);
  text-decoration: underline;
}

/* ---- No results ---- */
.no-results {
  display: none;
  text-align: center;
  padding: 48px 20px;
  color: var(--nx-muted);
}

.no-results.show {
  display: block;
}

.no-results svg {
  width: 64px;
  height: 64px;
  fill: var(--nx-border);
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nx-navy);
  margin-bottom: 8px;
}

.no-results p {
  font-size: 16px;
}

.highlight {
  background: rgba(250, 188, 46, 0.35);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* ---- Contact CTA ---- */
.faq-contact-section {
  max-width: 820px;
  margin: 56px auto 0;
}

.faq-contact-card {
  background: linear-gradient(
    135deg,
    var(--nx-navy-dark) 0%,
    var(--nx-navy) 50%,
    var(--nx-navy-light) 100%
  );
  color: var(--nx-white);
  padding: clamp(32px, 5vw, 48px);
  border-radius: var(--nx-radius-lg);
  text-align: center;
  box-shadow: var(--nx-shadow-lg);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.contact-icon svg {
  width: 34px;
  height: 34px;
  fill: var(--nx-white);
}

.faq-contact-card h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--nx-white);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.faq-contact-card p {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.faq-contact-card .btn-primary,
.faq-contact-card .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--nx-radius-sm);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.faq-contact-card .btn-primary {
  background: var(--nx-white);
  color: var(--nx-navy);
  border: 2px solid var(--nx-white);
}

.faq-contact-card .btn-primary:hover {
  background: transparent;
  color: var(--nx-white);
}

.faq-contact-card .btn-secondary {
  background: transparent;
  color: var(--nx-white);
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.faq-contact-card .btn-secondary:hover {
  background: var(--nx-white);
  color: var(--nx-navy);
  border-color: var(--nx-white);
}

/* ---- Scroll to top ---- */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nx-navy);
  color: var(--nx-white);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--nx-shadow);
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.15s ease;
  z-index: 100;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background: var(--nx-navy-light);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .faq-search-section {
    padding: 32px 20px 20px;
  }

  .faq-categories-nav {
    padding: 12px 16px 16px;
  }

  .categories-container {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .categories-container::-webkit-scrollbar {
    display: none;
  }

  .category-btn {
    flex-shrink: 0;
  }

  .faq-content-section {
    padding: 32px 16px 48px;
  }

  .faq-category {
    margin-bottom: 36px;
  }

  .category-title {
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 18px;
  }

  .category-title svg {
    width: 30px;
    height: 30px;
  }

  .faq-question {
    padding: 18px 20px;
    font-size: 16px;
  }

  .faq-item.active .faq-answer {
    padding: 16px 18px 18px;
  }

  .contact-buttons {
    flex-direction: column;
  }

  .faq-contact-card .btn-primary,
  .faq-contact-card .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .faq-search-container h2 {
    font-size: 1.25rem;
  }

  .search-box input {
    font-size: 16px;
  }

  .faq-answer p,
  .faq-answer li {
    font-size: 15px;
  }
}
