/* css/faq.css
   The FAQ shared by the homepage (#wifi-gate-faq) and the use-case pages
   (#niche-faq): a heading column that stays in view beside the list of
   questions, each question a <details> with a "+" that turns into "x".
   js/faq.js animates opening and closing. */

.seo-faq {
  background: var(--home-soft);
}

.seo-faq__layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.75fr) minmax(0, 1.25fr);
  gap: 7rem;
  align-items: start;
}

.seo-faq .seo-faq__layout > :first-child {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  margin: 0;
}

.seo-faq__list {
  border-top: 1px solid var(--home-line);
}

.seo-faq__item {
  border-bottom: 1px solid var(--home-line);
}

.seo-faq__item summary {
  display: flex;
  gap: 1.5rem;
  min-height: 5rem;
  padding: 1.4rem 0;
  align-items: center;
  justify-content: space-between;
  color: var(--home-black);
  cursor: pointer;
  /* Remove the mobile tap overlay; keep the keyboard focus ring below. */
  -webkit-tap-highlight-color: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  list-style: none;
}

.seo-faq__item summary::-webkit-details-marker {
  display: none;
}

.seo-faq__item summary::after {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  place-items: center;
  color: var(--home-blue);
  border: 1px solid #cfd5dc;
  border-radius: 4px;
  content: "+";
  font-size: 1.2rem;
  font-weight: 500;
  transition: transform 180ms ease;
}

.seo-faq__item[open]:not(.is-closing) summary::after {
  transform: rotate(45deg);
}

.seo-faq__item summary:focus-visible {
  outline: 2px solid var(--home-blue);
  outline-offset: 4px;
}

.seo-faq__answer {
  max-width: 42rem;
  padding: 0 0 1.5rem;
  padding-inline-end: 3.5rem;
}

.seo-faq__answer p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.75;
}

@media (prefers-reduced-motion: reduce) {
  .seo-faq__item summary::after {
    transition: none;
  }
}

html.a11y-reduced-motion .seo-faq__item summary::after {
  transition: none;
}

@media (max-width: 1024px) {
  .seo-faq__layout {
    gap: 4rem;
  }
}

@media (max-width: 768px) {
  .seo-faq__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .seo-faq .seo-faq__layout > :first-child {
    position: static;
  }
}

@media (max-width: 480px) {
  .seo-faq__item summary {
    gap: 0.75rem;
    overflow-wrap: anywhere;
  }
}
