/* On-page FAQ section (home + product pages). Loaded only on pages that set $faq_page.
   Matches the site's branding: Poppins, PowerPump green, #e3e8e5 borders and 16px radius
   used by the contact and quote forms. Uses native <details>, so it needs no JavaScript. */

.faq-section {
  --faq-green: var(--powerpump-green, #57b009);
  --faq-ink: #0a281b;
  --faq-muted: #667d70;
  padding: clamp(60px, 6vw, 120px) 0;
  background: #fff;
  color: #0b271a;
  font-family: "Poppins", sans-serif;
  scroll-margin-top: 90px;
  /* site.min.css sets "body, footer, section { overflow-x: hidden !important }". On this section
     that breaks position: sticky (the intro was pushed ~120px down and never stuck).
     clip still hides horizontal overflow but does not create a scroll container. */
  overflow-x: clip !important;
  overflow-y: visible !important;
}

.faq-section *,
.faq-section *::before,
.faq-section *::after {
  box-sizing: border-box;
}

.faq-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 110px);
  align-items: start;
}

.faq-section__intro {
  position: sticky;
  top: 120px; /* below the fixed site header while scrolling */
}

.faq-section__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 22px;
  padding: 5px 20px;
  border: 1px solid var(--faq-green);
  border-radius: 100px;
  color: var(--faq-green);
  font-size: clamp(0.85rem, 0.95vw, 1.1rem);
  line-height: 1;
  letter-spacing: 0.06em;
}

.faq-section__intro h2 {
  margin: 0 0 18px;
  color: var(--faq-ink);
  font-size: clamp(1.9rem, 2.6vw, 3.3rem);
  letter-spacing: -0.036em;
  line-height: 1.13;
}

.faq-section__text {
  max-width: 460px;
  margin: 0 0 26px;
  color: var(--faq-muted);
  font-size: clamp(0.95rem, 1vw, 1.25rem);
  line-height: 1.6;
}

.faq-section__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(110deg, var(--powerpump-green, #239744), #79bd2b);
  font-size: clamp(0.8rem, 0.85vw, 1rem);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.faq-section__cta:hover {
  color: #fff;
  transform: translateY(-2px);
}

.faq-section__cta span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

/* ---------- Accordion ---------- */
.faq-section__list {
  display: grid;
  gap: clamp(12px, 1vw, 18px);
}

.faq-section__item {
  border: 1px solid #e3e8e5;
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-section__item[open] {
  border-color: color-mix(in srgb, var(--faq-green) 55%, #e3e8e5);
  box-shadow: 0 18px 44px rgba(10, 40, 27, 0.07);
}

.faq-section__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 1.4vw, 26px) clamp(18px, 1.6vw, 30px);
  cursor: pointer;
  list-style: none;
}

.faq-section__item summary::-webkit-details-marker {
  display: none;
}

.faq-section__item summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--powerpump-green, #57b009) 30%, transparent);
  outline-offset: 3px;
  border-radius: 16px;
}

.faq-section__item h3 {
  margin: 0;
  color: var(--faq-ink);
  font-size: clamp(0.98rem, 1.05vw, 1.3rem);
  font-weight: 600;
  line-height: 1.4;
}

.faq-section__icon {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid color-mix(in srgb, var(--faq-green) 40%, #fff);
  border-radius: 50%;
  transition: background-color 0.2s ease, transform 0.25s ease;
}

.faq-section__icon::before,
.faq-section__icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--faq-green);
  content: "";
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, background-color 0.2s ease;
}

.faq-section__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-section__item[open] .faq-section__icon {
  background: var(--faq-green);
}

.faq-section__item[open] .faq-section__icon::before,
.faq-section__item[open] .faq-section__icon::after {
  background: #fff;
}

.faq-section__item[open] .faq-section__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-section__answer {
  padding: 0 clamp(18px, 1.6vw, 30px) clamp(18px, 1.4vw, 26px);
  color: var(--faq-muted);
  font-size: clamp(0.92rem, 0.95vw, 1.15rem);
  line-height: 1.7;
}

.faq-section__answer p {
  margin: 0 0 12px;
}

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

.faq-section__answer ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.faq-section__answer a {
  color: var(--faq-green);
  font-weight: 600;
  text-decoration: none;
}

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

/* When the FAQ is followed by the quote form, tighten the gap between the two sections. */
.faq-section + .quote-section {
  padding-top: clamp(30px, 3vw, 60px);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .faq-section__inner {
    grid-template-columns: 1fr;
  }

  .faq-section__intro {
    position: static;
  }

  .faq-section__text {
    max-width: none;
  }
}

@media (max-width: 575px) {
  .faq-section__item summary {
    padding: 16px;
  }

  .faq-section__answer {
    padding: 0 16px 16px;
  }

  .faq-section__icon {
    width: 28px;
    height: 28px;
  }
}
