/* ================================================================
   _faqs-addon-v4.css
   GhanaTRVL — FAQ page addon stylesheet
   Load order: custom-v4.css → _faqs-addon-v4.css

   Scope: FAQ pages only (_faqs.php / _faqs-tsp.php)
   All design tokens referenced from custom-v4.css :root.
   No token redeclarations here.

   Sections:
   01. Search band
   02. Page layout (sidebar + main)
   03. Sidebar navigation
   04. FAQ group header
   05. FAQ accordion item
   06. Answer panel
   07. Contact band
   08. Empty / no-results states
   09. Responsive overrides

   Last updated: 2026-05-28
================================================================ */


/* ================================================================
   01. SEARCH BAND
   Sticky bar between page-title hero and content.
   Uses backdrop-filter for a glassy lift on scroll.
================================================================ */

.faq-search-band {
  position: sticky;
  top: 0;                          /* sits beneath the sticky navbar via z-index layering */
  z-index: 200;
  background: rgba(244, 246, 250, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}

.faq-search-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.faq-search-field-wrap {
  position: relative;
  width: 100%;
}

.faq-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mu);
  font-size: 1rem;
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  border: 1.5px solid var(--rule);
  border-radius: 28px;
  font-family: var(--ff-b);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--bk);
  background: #fff;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  /* Remove browser default search cancel button */
  -webkit-appearance: none;
}
.faq-search-input::-webkit-search-cancel-button { display: none; }

.faq-search-input:focus {
  border-color: var(--mv);
  box-shadow: 0 0 0 3px rgba(89, 45, 140, 0.1);
}

.faq-search-input::placeholder {
  color: var(--mu);
  font-weight: 300;
}

.faq-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--mu);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}
.faq-search-clear:hover { color: var(--dv); }

.faq-search-hint {
  font-family: var(--ff-b);
  font-size: 0.75rem;
  color: var(--mu);
  font-weight: 400;
  margin: 0;
}


/* ================================================================
   02. PAGE LAYOUT
   Two-column grid: sticky sidebar + scrollable main.
   Collapses to single column below lg breakpoint.
================================================================ */

.faq-section {
  background: var(--wh);
  padding: 0 0 80px;
}

.faq-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

@media (max-width: 991.98px) {
  .faq-layout {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   03. SIDEBAR NAVIGATION
   Sticky, scrolls independently of main content.
   Hidden on mobile (replaced by anchor links above groups).
================================================================ */

.faq-sidebar {
  position: sticky;
  top: 72px;                       /* search band height ~72px */
  padding: 32px 20px 32px 0;
  border-right: 1px solid var(--rule);
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}

@media (max-width: 991.98px) {
  .faq-sidebar { display: none; }
}

.faq-sidebar-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ff-h);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--mu);
  margin: 0 0 12px 8px;
}
.faq-sidebar-label i { font-size: 0.75rem; }

.faq-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.faq-sidebar-list li {
  margin-bottom: 2px;
}

.faq-sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: var(--ff-h);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mu);
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
  cursor: pointer;
}
.faq-sidebar-link:hover {
  background: rgba(89, 45, 140, 0.06);
  color: var(--mv);
}
.faq-sidebar-link.active {
  background: rgba(89, 45, 140, 0.1);
  color: var(--dv);
}

.faq-sidebar-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(89, 45, 140, 0.09);
  color: var(--mv);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: background 0.14s, color 0.14s;
}
.faq-sidebar-link.active .faq-sidebar-icon {
  background: var(--dv);
  color: var(--ye);
}

.faq-sidebar-text {
  flex: 1;
  line-height: 1.3;
}

.faq-sidebar-count {
  flex-shrink: 0;
  background: rgba(89, 45, 140, 0.1);
  color: var(--mv);
  font-family: var(--ff-h);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}
.faq-sidebar-link.active .faq-sidebar-count {
  background: var(--ye);
  color: var(--dv);
}


/* ================================================================
   04. MAIN AREA + GROUP HEADER
================================================================ */

.faq-main {
  padding: 32px 0 32px 32px;
}

@media (max-width: 991.98px) {
  .faq-main { padding: 24px 0; }
}

.faq-group {
  margin-bottom: 44px;
  scroll-margin-top: 80px;         /* offset for sticky search band */
}

.faq-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--rule);
}

.faq-group-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--dv);
  color: var(--ye);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.faq-group-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-group-title {
  font-family: var(--ff-h);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--dv);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.faq-group-count {
  font-family: var(--ff-b);
  font-size: 0.75rem;
  color: var(--mu);
  font-weight: 400;
}


/* ================================================================
   05. FAQ ACCORDION ITEM — question trigger row
================================================================ */

.faq-item {
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.faq-item:hover {
  border-color: rgba(89, 45, 140, 0.22);
}

.faq-item.faq-open {
  border-color: rgba(89, 45, 140, 0.3);
  box-shadow: 0 2px 14px rgba(35, 15, 66, 0.07);
}

.faq-q {
  display: flex;
  align-items: flex-start;         /* top-align for multi-line questions */
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fff;
  user-select: none;
  transition: background 0.12s;
  outline: none;                   /* focus style handled via box-shadow below */
}
.faq-q:focus-visible {
  box-shadow: inset 0 0 0 2px var(--mv);
}
.faq-q:hover {
  background: var(--wh2);
}
.faq-item.faq-open .faq-q {
  background: var(--wh);
}

.faq-q-num {
  font-family: var(--ff-h);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--mu);
  min-width: 20px;
  text-align: right;
  padding-top: 2px;               /* optical alignment with question text */
  flex-shrink: 0;
}

.faq-q-text {
  font-family: var(--ff-h);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dv);
  flex: 1;
  line-height: 1.45;
}

.faq-q-chevron {
  font-size: 0.8rem;
  color: var(--mu);
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s;
  margin-top: 3px;                 /* optical alignment */
}
.faq-item.faq-open .faq-q-chevron {
  transform: rotate(-180deg);
  color: var(--mv);
}


/* ================================================================
   06. ANSWER PANEL
   CSS max-height transition — no JS height measurement needed.
   1000px ceiling is generous for any realistic answer length.
================================================================ */

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.faq-open .faq-a {
  max-height: 1000px;
}

.faq-a-inner {
  padding: 4px 16px 16px 48px;    /* indent to align with question text */
}

/* Answer typography — matches legal-content pattern */
.faq-a-inner p,
.faq-a-inner div {
  font-family: var(--ff-b);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--bk);
  line-height: 1.75;
  margin-bottom: 0.65rem;
}
.faq-a-inner p:last-child,
.faq-a-inner div:last-child {
  margin-bottom: 0;
}

.faq-a-inner ul,
.faq-a-inner ol {
  font-family: var(--ff-b);
  font-size: 0.9rem;
  color: var(--bk);
  line-height: 1.7;
  padding-left: 1.4rem;
  margin-bottom: 0.65rem;
}

.faq-a-inner li {
  margin-bottom: 0.3rem;
}

.faq-a-inner a {
  color: var(--mv);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.faq-a-inner a:hover { color: var(--dv); }

.faq-a-inner strong,
.faq-a-inner b {
  font-weight: 700;
  color: var(--dv);
}


/* ================================================================
   07. CONTACT BAND
   Dark violet footer band inside the main content column.
================================================================ */

.faq-contact-band {
  background: var(--dv);
  border-radius: 10px;
  padding: 28px 32px;
  margin-top: 40px;
}

.faq-contact-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.faq-contact-heading {
  font-family: var(--ff-h);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ye);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.faq-contact-body {
  font-family: var(--ff-b);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.5;
}

.faq-contact-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Icon spacing inside contact band buttons */
.faq-contact-actions .btn-p i,
.faq-contact-actions .btn-o i {
  margin-right: 6px;
}

/* Override btn-o for dark background context */
.faq-contact-band .btn-o {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
}
.faq-contact-band .btn-o:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}


/* ================================================================
   08. EMPTY / NO-RESULTS STATES
================================================================ */

.faq-empty-state,
.faq-no-results {
  text-align: center;
  padding: 64px 24px;
  color: var(--mu);
}

.faq-empty-state i,
.faq-no-results i {
  font-size: 2.5rem;
  opacity: 0.3;
  display: block;
  margin-bottom: 16px;
}

.faq-empty-state p,
.faq-no-results p {
  font-family: var(--ff-b);
  font-size: 0.9rem;
  color: var(--mu);
  margin-bottom: 6px;
}

.faq-no-results-hint {
  font-size: 0.8rem !important;
  opacity: 0.75;
}


/* ================================================================
   09. RESPONSIVE OVERRIDES
================================================================ */

/* Tablet: tighten padding */
@media (max-width: 767.98px) {
  .faq-search-input { font-size: 0.85rem; }
  .faq-q-text       { font-size: 0.875rem; }
  .faq-a-inner      { padding: 4px 12px 14px 36px; }
  .faq-a-inner p,
  .faq-a-inner div,
  .faq-a-inner ul,
  .faq-a-inner ol   { font-size: 0.875rem; }
  .faq-contact-band { padding: 22px 20px; }
  .faq-contact-band-inner { flex-direction: column; align-items: flex-start; }
}

/* Mobile: full-width search, reduce group title size */
@media (max-width: 575.98px) {
  .faq-group-title { font-size: 0.8rem; }
  .faq-contact-actions { width: 100%; }
  .faq-contact-actions .btn-p,
  .faq-contact-actions .btn-o { flex: 1; text-align: center; justify-content: center; }
}
