/* FAQ hub — topics bar, search, single-column Q&A */

.info-page--faq .info-body {
  overflow: visible;
  padding-top: 48px;
}

.info-page--faq .info-section-head {
  position: relative;
  z-index: 1;
}

.faq-hub {
  width: 100%;
}

.faq-layout--modern {
  width: 100%;
}

.faq-column-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.faq-topics-bar--desktop {
  display: none;
}

.faq-topics-bar {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 65, 196, 0.06);
  overflow: hidden;
}

.faq-topics-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 40px;
  bottom: 12px;
  width: 28px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--white) 75%);
  pointer-events: none;
}

.faq-toolbar {
  margin: 0;
}

.faq-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0, 65, 196, 0.06);
  width: 100%;
}

.faq-search-icon {
  font-size: 1.1rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.faq-search-input {
  flex: 1;
  border: none;
  outline: none;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

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

.faq-search-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.faq-sidebar-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 0 0 10px 2px;
}

.faq-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.faq-topic-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--muted);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.faq-topic-list-viewport {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.faq-topic-list-viewport:active .faq-topic-list--marquee {
  animation-play-state: paused;
}

.faq-topic-list--mobile {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 0 0 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.faq-topic-list--mobile.faq-topic-list--marquee {
  overflow: visible;
  scroll-snap-type: none;
  width: max-content;
  animation: faq-topics-marquee 42s linear infinite;
  will-change: transform;
}

.faq-topic-list--mobile > li[aria-hidden='true'] {
  pointer-events: none;
}

@keyframes faq-topics-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.faq-topic-list--mobile::-webkit-scrollbar {
  display: none;
}

.faq-topic-list--mobile .faq-topic-btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  scroll-snap-align: start;
}

.faq-topic-list--mobile .faq-topic-btn:hover {
  background: rgba(0, 93, 255, 0.06);
  color: var(--blue-dark);
  border-color: rgba(0, 93, 255, 0.15);
}

.faq-topic-list--mobile .faq-topic-btn.is-active {
  background: linear-gradient(135deg, rgba(0, 93, 255, 0.12) 0%, rgba(255, 195, 23, 0.14) 100%);
  border-color: rgba(0, 93, 255, 0.28);
  color: var(--blue-dark);
  box-shadow: 0 4px 14px rgba(0, 93, 255, 0.1);
}

.faq-topic-list--mobile .faq-topic-btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.faq-topic-list--mobile .faq-topic-btn-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.faq-topic-btn-count {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 65, 196, 0.08);
  color: var(--blue);
}

.faq-topic-btn.is-active .faq-topic-btn-count {
  background: var(--blue);
  color: var(--white);
}

.faq-main {
  min-height: 200px;
  width: 100%;
  position: relative;
  z-index: 0;
}

.faq-main .faq-topic-section {
  animation: faq-panel-in 0.28s ease;
}

@keyframes faq-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-topic-section {
  scroll-margin-top: calc(var(--header-h) + 24px);
  padding: 24px 24px 8px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 8px 36px rgba(0, 65, 196, 0.06);
  border-top: 4px solid var(--blue);
}

.faq-topic-section--teal { border-top-color: #0e7490; }
.faq-topic-section--gold { border-top-color: var(--yellow); }
.faq-topic-section--green { border-top-color: #059669; }
.faq-topic-section--orange { border-top-color: #ea580c; }
.faq-topic-section--purple { border-top-color: #7c3aed; }
.faq-topic-section--cyan { border-top-color: #0284c7; }
.faq-topic-section--rose { border-top-color: #e11d48; }

.faq-topic-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.faq-topic-head-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #dbeafe, #93c5fd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 6px 18px rgba(0, 93, 255, 0.15);
}

.faq-topic-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.faq-topic-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.faq-item--teal .faq-summary-icon { background: linear-gradient(145deg, #cffafe, #67e8f9); }
.faq-item--gold .faq-summary-icon { background: linear-gradient(145deg, #fef3c7, #fcd34d); }
.faq-item--green .faq-summary-icon { background: linear-gradient(145deg, #d1fae5, #6ee7b7); }
.faq-item--orange .faq-summary-icon { background: linear-gradient(145deg, #ffedd5, #fdba74); }
.faq-item--purple .faq-summary-icon { background: linear-gradient(145deg, #ede9fe, #c4b5fd); }
.faq-item--cyan .faq-summary-icon { background: linear-gradient(145deg, #e0f2fe, #7dd3fc); }
.faq-item--rose .faq-summary-icon { background: linear-gradient(145deg, #ffe4e6, #fda4af); }

.faq-answer strong {
  color: var(--text);
  font-weight: 700;
}

/* Desktop — sticky sidebar + main column (previous layout) */
@media (min-width: 901px) {
  .faq-topics-bar--mobile {
    display: none;
  }

  .faq-topics-bar--desktop {
    display: block;
  }

  .faq-layout--modern {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 28px;
    align-items: start;
  }

  .faq-sidebar--topics {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    padding: 20px 16px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 65, 196, 0.07);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
  }

  .faq-topic-list--desktop {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .faq-topic-list--desktop .faq-topic-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
  }

  .faq-topic-list--desktop .faq-topic-btn:hover {
    background: rgba(0, 93, 255, 0.06);
    color: var(--blue-dark);
  }

  .faq-topic-list--desktop .faq-topic-btn.is-active {
    background: linear-gradient(135deg, rgba(0, 93, 255, 0.1) 0%, rgba(255, 195, 23, 0.12) 100%);
    border-color: rgba(0, 93, 255, 0.22);
    color: var(--blue-dark);
    box-shadow: 0 4px 16px rgba(0, 93, 255, 0.08);
  }

  .faq-topic-list--desktop .faq-topic-btn-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 11px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
  }

  .faq-topic-list--desktop .faq-topic-btn.is-active .faq-topic-btn-icon {
    background: var(--white);
  }

  .faq-topic-list--desktop .faq-topic-btn-text {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .faq-topic-list--mobile.faq-topic-list--marquee {
    animation: none;
    overflow-x: auto;
    width: auto;
  }
}

@media (max-width: 900px) {
  .info-page--faq .info-body {
    padding: 36px 0 64px;
  }

  .info-page--faq .info-section-head {
    margin-bottom: 22px;
  }

  .info-page--faq .info-section-head p {
    font-size: 15px;
  }

  .faq-hub {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 820px;
    margin-inline: auto;
  }

  .faq-topics-bar--mobile {
    padding: 14px 12px 12px;
  }

  .faq-topic-list--mobile .faq-topic-btn {
    min-height: 48px;
    padding: 12px 14px;
  }

  .faq-topic-list--mobile .faq-topic-btn-text {
    font-size: 14px;
  }

  .faq-topic-section {
    padding: 18px 16px 4px;
  }

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

  .info-page--faq .faq-item summary {
    min-height: 52px;
    padding: 14px 16px;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
  }

  .info-page--faq .faq-summary-text {
    line-height: 1.45;
    min-width: 0;
  }

  .info-page--faq .faq-answer {
    padding: 0 16px 18px;
    font-size: 15px;
    line-height: 1.65;
  }

  .info-page--faq .faq-answer a {
    word-break: break-word;
  }

  .info-page--faq .faq-cta {
    margin-top: 28px;
    padding: 28px 20px;
  }

  .info-page--faq .faq-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .info-page--faq .faq-cta-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .info-page--faq .info-hero-float {
    margin-bottom: 16px;
  }

  .info-page--faq .info-section-head {
    padding-top: 8px;
  }

  .faq-topic-btn-count {
    display: none;
  }

  .info-page--faq .faq-summary-icon {
    display: none;
  }

  .info-page--faq .faq-item summary::after {
    width: 36px;
    height: 36px;
  }

  .faq-topic-head {
    align-items: center;
  }

  .faq-topic-head-icon {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .faq-topic-title {
    font-size: 1.05rem;
  }
}
