/* ==========================================================================
   FAQ page (template-faq.php)
   Hero + keyword search + category-filtered accordion list.
   Static UI ported from demo/faq.html. Filtering/search/accordion in js/faq.js.
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */
.faq-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 90px) clamp(20px, 4vw, 30px);
  background: #b597e9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-hero-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-25%);
  transform-origin: center center;
  height: 100%;
  width: max-content;
  scale: 2;
  pointer-events: none;
  z-index: 0;
}

.faq-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  max-width: 640px;
  width: 100%;
}

.faq-crumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #1d2122;
}

.faq-crumb a {
  color: #1d2122;
  font-weight: 400;
  text-decoration: none;
}

.faq-crumb a:hover {
  text-decoration: underline;
}

.faq-crumb-current {
  color: #111;
}

.faq-hero-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(56px, 11vw, 140px);
  line-height: 0.85;
  letter-spacing: -3px;
  text-transform: uppercase;
  color: #111;
}

.faq-hero-lead {
  margin: 0;
  max-width: 520px;
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  color: #1d2122;
  text-wrap: pretty;
}

/* ---- Search band --------------------------------------------------------- */
.faq-search {
  padding: clamp(40px, 6vw, 60px) clamp(20px, 4vw, 30px) 30px;
  background: #111;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 40px);
  align-items: flex-end;
  justify-content: space-between;
}

.faq-search-head {
  flex: 1 1 320px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-search-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  color: #fff;
}

.faq-search-desc {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 150%;
  color: #9a9a9a;
  text-wrap: pretty;
}

.faq-search-field {
  position: relative;
  flex: 1 1 380px;
  max-width: 550px;
  width: 100%;
}

.faq-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  border: 1px solid #333;
  border-radius: 0;
  padding: 16px 20px 16px 46px;
  color: #fff;
  font-size: 16px; /* >= 16px so iOS doesn't zoom on focus */
  font-family: inherit;
}

.faq-search-input::placeholder {
  color: #7a7a7a;
}

.faq-search-input:focus {
  outline: none;
  border-color: #c3ff74;
}

/* ---- List section -------------------------------------------------------- */
.faq-list {
  padding: clamp(40px, 6vw, 60px) clamp(20px, 4vw, 30px) clamp(64px, 8vw, 100px);
  background: #111;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 48px);
}

.faq-count {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #7a7a7a;
  position: sticky;
  top: 115px;
}

.faq-layout {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  align-items: flex-start;
}

/* ---- Category rail ------------------------------------------------------- */
.faq-aside {
  flex: 0 1 280px;
  min-width: 240px;
  position: sticky;
  top: 160px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  color: #e0e0e0;
  border: 1px solid #333;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.faq-cat:hover {
  background: #1c1c1c;
  border-color: #4a4a4a;
}

.faq-cat.is-on {
  background: #c3ff74;
  color: #111;
  border-color: #c3ff74;
}

.faq-cat-count {
  opacity: 0.6;
  font-size: 13px;
}

/* ---- Question panel ------------------------------------------------------ */
.faq-panel {
  flex: 1 1 480px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.faq-group {
  display: flex;
  flex-direction: column;
}

/* JS filtering sets [hidden] on filtered-out groups/items; without this the
   author display rules above would keep them visible (empty). */
.faq-group[hidden],
.faq-item[hidden],
.faq-noresult[hidden] {
  display: none !important;
}

.faq-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #1a1a1a;
  border: 1px solid #262626;
}

.faq-group-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: #c3ff74;
}

.faq-group-label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9a9a9a;
}

.faq-item {
  border: 1px solid #262626;
  border-top: none;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 16px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.faq-q-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #c3ff74;
}

.faq-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}

.faq-item.is-open .faq-a-wrap {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
}

.faq-a {
  padding: 0 16px 20px;
  font-size: 15px;
  font-weight: 500;
  line-height: 155%;
  color: #a0a0a0;
  text-wrap: pretty;
}

.faq-a p {
  margin: 0 0 10px;
}

.faq-a > :last-child {
  margin-bottom: 0;
}

.faq-a ul,
.faq-a ol {
  margin: 0 0 10px;
  padding-left: 1.3em;
}

.faq-a ul {
  list-style: disc;
}

.faq-a ol {
  list-style: decimal;
}

.faq-a li {
  margin: 0 0 4px;
}

.faq-a li::marker {
  color: #c3ff74;
}

.faq-a a {
  color: #c3ff74;
  text-decoration: underline;
}

.faq-a strong,
.faq-a b {
  color: #cfcfcf;
}

.faq-noresult {
  margin: 0;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 500;
  color: #9a9a9a;
}

/* ---- Responsive: stack the category rail above the list ------------------ */
@media (max-width: 1024px) {
  .faq-aside {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    position: static;
  }

  .faq-count {
    position: static;
  }
}
