/* ==========================================================================
   FAQ Page Styles
   Matches the staff page design language (colors, shadows, typography).
   Uses CSS max-height transition so answer text is always in the DOM.
   ========================================================================== */

/* ---------- Page-level title suppression ---------- */
body.node-type-faq #block-lifetime11-page-title,
body.view-faq #block-lifetime11-page-title,
body.view-faq .block-page-title-block,
body.view-faq h1.page-title,
body.view-faq .region-content > h1:first-child {
  display: none !important;
}

/* ---------- Container ---------- */
.faq-page {
  margin: 0 auto;
  padding: 0px 20px 60px;
}

.faq-container {
  background: #fff;
  padding: 50px;
  border-radius: 4px;
  /*box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);*/
}

/* ---------- Header ---------- */
.faq-header {
  text-align: left;
  margin-bottom: 30px;
}

.faq-title {
  font-size: 34px;
  color: #22aae0;
  margin: 0 0 12px 0;
  padding: 0;
  line-height: 34px;
}

.faq-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #69797f;
  margin: 0 0 0 0;
}

/* ---------- Category Filters ---------- */
.faq-filters {
  margin-bottom: 30px;
  text-align: center;
  padding: 0;
}

.faq-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.faq-filter-btn {
  display: inline-block;
  font-family: "Work Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 20px;
  border: none;
  background-color: #86b830;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-transform: uppercase;
  position: relative;
  white-space: nowrap;
  min-width: fit-content;
  line-height: 1.3rem;
}

.faq-filter-btn:hover {
  background-color: #6f9a26;
  color: white;
}

.faq-filter-btn.active {
  background-color: #109bd2;
  color: white;
}

/* ---------- Footer Quote ---------- */
.faq-footer-quote {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #eaf1f1;
}

.faq-footer-quote blockquote {
  max-width: 580px;
  margin: 0;
  padding: 16px 24px;
  border-left: 4px solid #8cba2d;
  background: #f7fbf3;
  border-radius: 0 4px 4px 0;
}

.faq-footer-quote blockquote p {
  font-size: 1.1rem;
  font-style: italic;
  color: #444;
  line-height: 1.6;
  margin: 0;
}

.faq-footer-quote blockquote footer {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #109bd2;
  font-style: normal;
}

.faq-footer-quote blockquote footer::before {
  content: "— ";
}

/* ---------- Category grouping ---------- */
.faq-category-title {
  display: none; /* Hidden since we use filter buttons instead */
}

/* Filter animation states */
.faq-item.hidden-filter {
  display: none;
}

.faq-item.show-filter {
  display: block;
}

/* ---------- FAQ List ---------- */
.faq-list {
  margin-bottom: 0;
}

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

/* ---------- Single FAQ item ---------- */
.faq-item {
  border-bottom: 1px solid #eaf1f1;
}

.faq-item:last-child {
  border-bottom: none;
}

/* ---------- Question (button) ---------- */
.faq-question {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 8px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: background-color 0.2s ease;
  font-family: inherit;
}

.faq-question:hover {
  background-color: #f7fbf3;
}

.faq-question:focus-visible {
  outline: 2px solid #109bd2;
  outline-offset: -2px;
  border-radius: 4px;
}

.faq-dot {
  display: block;
  min-width: 34px;
  height: 34px;
  background: #109bd2;
  border-radius: 50%;
  flex-shrink: 0;
}

.faq-question-text {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.faq-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #8cba2d;
  transition: transform 0.3s ease;
}

.faq-toggle svg {
  display: block;
}

/* Plus → minus animation: the vertical line rotates away */
.faq-icon-h {
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
}

.faq-question[aria-expanded="true"] .faq-icon-h {
  transform: rotate(90deg);
  opacity: 0;
}

/* ---------- Answer ---------- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease;
}

.faq-answer-inner {
  padding: 0 8px 0 8px;
  font-size: 1rem;
  line-height: 1.8;
  color: #69797f;
}

/* Expanded state */
.faq-item.faq-open .faq-answer {
  max-height: 2000px; /* generous upper bound; transition handles the visual */
  transition:
    max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease;
}

.faq-item.faq-open .faq-answer-inner {
  padding: 0 8px 24px 8px;
}

/* Override Drupal field markup within answers */
.faq-answer-inner .field__item,
.faq-answer-inner .field {
  margin: 0;
  padding: 0;
}

.faq-answer-inner p {
  margin: 0 0 14px;
}

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

.faq-answer-inner ul,
.faq-answer-inner ol {
  margin: 0 0 14px 20px;
  padding: 0;
}

.faq-answer-inner a {
  color: #109bd2;
  text-decoration: underline;
}

.faq-answer-inner a:hover {
  color: #0c7aa8;
}

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

  .faq-title {
    font-size: 26px;
    line-height: 30px;
  }

  .faq-filter-buttons {
    gap: 8px;
  }

  .faq-filter-btn {
    font-size: 13px;
    padding: 8px 14px;
  }

  .faq-question {
    padding: 16px 4px;
    gap: 12px;
  }

  .faq-question-text {
    font-size: 0.95rem;
  }

  .faq-answer-inner {
    padding: 0 4px 0 4px;
  }

  .faq-item.faq-open .faq-answer-inner {
    padding: 0 4px 20px 4px;
  }
}

@media (max-width: 480px) {
  .faq-page {
    padding: 20px 10px 40px;
  }

  .faq-title {
    font-size: 22px;
    line-height: 26px;
  }

  .faq-filter-btn {
    font-size: 12px;
    padding: 7px 10px;
  }

  .faq-question-text {
    font-size: 0.9rem;
  }

  .faq-answer-inner {
    padding: 0 4px 0 4px;
    font-size: 0.93rem;
  }

  .faq-item.faq-open .faq-answer-inner {
    padding: 0 4px 18px 4px;
  }
}

