/* ==========================================================================
   FAQs — Help Centre (two-pane: topic sidebar + content accordions)
   Template: templates/faqs.php   ·   Body class: .faqs-page
   ========================================================================== */

/* ─── Page wrapper — escapes Astra's max-width container ────── */
.faqs-content {
  display: block;
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

/* ─── Astra container resets ─────────────────────────────── */
.faqs-page .ast-container {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

.faqs-page .entry-content,
.faqs-page .ast-article-single,
.faqs-page #primary,
.faqs-page .content-area,
.faqs-page .site-main {
  padding: 0;
  margin: 0;
  max-width: none;
  width: 100%;
}

/* ─── Tokens ──────────────────────────────────────────────── */
.faqs-page {
  --background: 220 20% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --primary: 216 100% 22%;
  --primary-foreground: 0 0% 100%;
  --primary-light: 216 45% 94%;
  --accent: 140 61% 28%;
  --muted: 220 20% 96%;
  --muted-foreground: 220 10% 46%;
  --border: 220 15% 90%;
  --surface: 220 30% 96%;
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 hsl(216 100% 22% / 0.05);
  --shadow-md: 0 4px 12px -2px hsl(216 100% 22% / 0.08);
  --shadow-lg: 0 14px 40px -12px hsl(216 100% 22% / 0.25);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;

  font-family: var(--font-sans);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
}

/* ─── Hero / header ───────────────────────────────────────── */
.faqs-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: hsl(var(--primary-foreground));
  background:
    radial-gradient(820px 520px at 88% -20%, hsl(var(--primary-tint) / 0.30), transparent 60%),
    radial-gradient(760px 520px at 2% 130%, hsl(var(--accent) / 0.28), transparent 55%),
    linear-gradient(135deg, hsl(216 100% 14%) 0%, hsl(216 100% 22%) 55%, hsl(212 82% 30%) 100%);
  padding: 56px 24px 96px;
}

/* Curve divider — matches the hero on International / Patient Support / Careers */
.faqs-hero__curve {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  line-height: 0;
  color: hsl(var(--background));
  z-index: 1;
}

.faqs-hero__curve svg {
  display: block;
  width: 100%;
  height: 70px;
}

/* faint decorative grid so the band reads as designed, not flat */
.faqs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(hsl(0 0% 100% / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100% / 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 100% at 80% 0%, #000, transparent 75%);
  mask-image: radial-gradient(70% 100% at 80% 0%, #000, transparent 75%);
}

.faqs-hero__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.faqs-hero__crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: hsl(0 0% 100% / 0.7);
  margin-bottom: 20px;
}

.faqs-hero__crumb a {
  color: hsl(0 0% 100% / 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.faqs-hero__crumb a:hover {
  color: #fff;
}

.faqs-hero__crumb .sep {
  font-size: 9px;
  opacity: 0.55;
}

.faqs-hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--primary-tint));
  margin-bottom: 12px;
}

.faqs-hero h1 {
  margin: 0;
  font: 700 clamp(28px, 4vw, 42px) / 1.08 var(--font-sans);
  letter-spacing: -0.02em;
  color: #fff;
}

.faqs-hero__lead {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.6;
  color: hsl(0 0% 100% / 0.82);
}

/* ─── Search ──────────────────────────────────────────────── */
.faqs-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin-top: 26px;
}

.faqs-page .faqs-search__icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  z-index: 1;
}

.faqs-page .faqs-search__input {
  width: 100%;
  height: 54px;
  font: 400 16px/1.4 var(--font-sans);
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 9999px;
  padding: 0 52px 0 52px;
  margin: 0;
  border-color: transparent;
  box-shadow: 0 12px 30px -10px hsl(216 100% 12% / 0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.faqs-search__input::placeholder {
  color: hsl(var(--muted-foreground));
}

.faqs-search__input:focus {
  outline: none;
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.1);
}

.faqs-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.faqs-search__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: hsl(var(--surface));
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.faqs-search__clear:hover {
  background: hsl(var(--primary-light));
  color: hsl(var(--primary));
}

.faqs-search__clear .fa {
  font-size: 12px;
}

/* ─── Search results ──────────────────────────────────────── */
.faqs-hc__main.is-searching .faqs-pane {
  display: none !important;
}

.faqs-results__head {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 6px;
}

.faqs-results__head strong {
  color: hsl(var(--foreground));
}

.faqs-result__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin-right: 10px;
}

.faqs-results__empty {
  padding: 26px 4px;
  color: hsl(var(--muted-foreground));
  font-size: 15px;
  line-height: 1.6;
}

/* ─── Help centre layout ──────────────────────────────────── */
.faqs-hc {
  padding: 40px 24px 72px;
}

.faqs-hc__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.faqs-hc__sidebar {
  position: sticky;
  top: 24px;
}

.faqs-hc__sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  background: hsl(var(--primary));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  padding: 18px 22px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.faqs-hc__sidebar-head .fa {
  font-size: 15px;
  opacity: 0.85;
}

.faqs-topics {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
}

.faqs-topic {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: 600 15px/1.3 var(--font-sans);
  color: hsl(var(--foreground));
  transition:
    background 0.18s,
    color 0.18s;
}

.faqs-topic + .faqs-topic {
  border-top: 1px solid hsl(var(--border) / 0.7);
}

.faqs-topics li:not(:last-child) .faqs-topic {
  border-radius: 10px;
}

.faqs-topic:hover {
  background: hsl(var(--surface));
  color: hsl(var(--primary));
}

.faqs-topic.is-active {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
  font-weight: 700;
}

.faqs-topic__caret {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
  transition: transform 0.18s, color 0.18s;
}

.faqs-topic:hover .faqs-topic__caret,
.faqs-topic.is-active .faqs-topic__caret {
  color: hsl(var(--primary));
  transform: translateX(2px);
}

/* ─── Content panes ───────────────────────────────────────── */
.faqs-hc__main {
  min-width: 0;
}

.faqs-pane {
  display: none;
  animation: faqs-fade 0.25s ease;
}

.faqs-pane[data-active="true"] {
  display: block;
}

@keyframes faqs-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faqs-pane__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.faqs-pane__title {
  margin: 0;
  font: 700 clamp(24px, 3vw, 32px) / 1.15 var(--font-sans);
  letter-spacing: -0.02em;
  color: hsl(var(--primary));
}

.faqs-pane__intro {
  margin: 12px 0 4px;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
}

/* ─── Accordion ───────────────────────────────────────────── */
.faqs-acc {
  margin-top: 28px;
}

.faqs-acc__item {
  border-bottom: 1px solid hsl(var(--border));
}

.faqs-acc__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 17px;
  font-weight: 600;
  color: hsl(var(--foreground));
  transition: color 0.18s;
}

.faqs-acc__q::-webkit-details-marker {
  display: none;
}

.faqs-acc__q:hover {
  color: hsl(var(--primary));
}

/* `.fa.faqs-acc__icon` outranks the global `.faqs-page .fa { display:inline-block }`
   so the flex centering actually applies and the chevron sits dead-centre. */
.faqs-page .fa.faqs-acc__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1.5px solid hsl(var(--border));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: hsl(var(--primary));
  transition:
    transform 0.25s ease,
    background 0.18s,
    border-color 0.18s;
}

.faqs-acc__q:hover .faqs-acc__icon {
  background: hsl(var(--primary-light));
  border-color: hsl(var(--primary) / 0.3);
}

.faqs-acc__item[open] .faqs-acc__icon {
  transform: rotate(180deg);
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: #fff;
}

.faqs-acc__a {
  overflow: hidden;
}

.faqs-acc__a p {
  margin: 0;
  padding: 0 44px 24px 4px;
  font-size: 15px;
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
  text-wrap: pretty;
  max-width: 72ch;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .faqs-hc__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .faqs-hc__sidebar {
    position: static;
  }

  /* Sidebar becomes a horizontal scroller of topic pills */
  .faqs-hc__sidebar-head {
    border-radius: var(--radius);
  }

  .faqs-topics {
    border-top: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-top: 10px;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .faqs-topics li {
    flex: 0 0 auto;
  }

  .faqs-topic {
    white-space: nowrap;
    border-radius: 9999px;
  }

  .faqs-topic + .faqs-topic {
    border-top: 0;
  }

  .faqs-topic__caret {
    display: none;
  }

  .faqs-topic.is-active {
    background: hsl(var(--primary));
    color: #fff;
  }
}

@media (max-width: 560px) {
  .faqs-hero {
    padding: 32px 18px 40px;
  }

  .faqs-hc {
    padding: 28px 18px 56px;
  }

  .faqs-acc__q {
    font-size: 15.5px;
    gap: 14px;
  }

  .faqs-acc__a p {
    padding-right: 4px;
  }
}
