/* cs-faq — accordion FAQ grid built on native <details>/<summary>.
   All rem values follow BB Theme's html { font-size: 10px } base — 1.6rem = 16px. */

/* Strip BB's default row bottom spacing so the next section butts up
   against this one's edge. */
.fl-row-content-wrap:has(.cs-faq) {
  padding-bottom: 0;
}
.fl-module-content:has(.cs-faq) {
  margin-bottom: 0;
}

.cs-faq {
  /* No top padding — the preceding section's bottom padding sets the gap. */
  padding-block: 0 var(--cs-space-2xl);
  font-family: var(--cs-font-body);
  color: var(--cs-ink);
}

.cs-faq__inner {
  max-width: var(--cs-container);
  margin: 0 auto;
  padding-inline: var(--cs-gutter);
  display: flex;
  flex-direction: column;
  gap: var(--cs-space-xl);
}

/* Doubled-up class specificity so the heading survives BB Global Styles'
   `.fl-builder-content h2 / h2 span` color & font rules. */
.cs-faq .cs-faq__heading {
  margin: 0;
  text-align: center;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 3vw + 1rem, 4.8rem); /* 32px → 48px */
  font-style: normal;
  line-height: 1.212;
  letter-spacing: var(--cs-tracking-tight);
  color: var(--cs-ink);
  text-transform: capitalize;
  text-wrap: balance;
}

.cs-faq .cs-faq__heading-accent {
  color: var(--cs-orange);
}

/* Subtitle under the heading — 24px regular per Figma */
.cs-faq__subtitle {
  margin: calc(-1 * var(--cs-space-md)) auto 0; /* tuck closer to the heading than the grid gap */
  max-width: 98rem;
  text-align: center;
  font-family: var(--cs-font-display);
  font-weight: 400;
  font-size: 2.4rem; /* 24px */
  line-height: 1.4;
  color: #383840;
  text-wrap: balance;
}

/* ---------- Grid ---------- */
.cs-faq__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.cs-faq--cols-1 .cs-faq__grid { grid-template-columns: minmax(0, 1fr); max-width: 82rem; margin-inline: auto; width: 100%; }
.cs-faq--cols-2 .cs-faq__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- FAQ item ---------- */
.cs-faq__item {
  background: var(--cs-white);
  border-radius: 0.5rem; /* subtle 5px */
  box-shadow: 0 2.4rem 3.3rem -1.5rem rgba(149, 149, 149, 0.25);
  padding: 2.4rem 2.8rem;
  transition: box-shadow 200ms ease;
}

.cs-faq__item:hover {
  box-shadow: 0 3.2rem 4rem -1.5rem rgba(149, 149, 149, 0.32);
}

/* Remove default browser marker */
.cs-faq__item summary { list-style: none; }
.cs-faq__item summary::-webkit-details-marker { display: none; }

/* Question row */
.cs-faq__question {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  cursor: pointer;
  user-select: none;
}

.cs-faq__question-text {
  flex: 1;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 1.8rem; /* 18px */
  line-height: 1.3;
  color: #1B1139;
  opacity: 0.88;
}

.cs-faq__item[open] .cs-faq__question-text {
  font-weight: 800;
}

/* Icon: horizontal + vertical bars forming a plus, transformed to minus when open */
.cs-faq__icon {
  position: relative;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cs-faq__icon-h,
.cs-faq__icon-v {
  position: absolute;
  background: #1B1139;
  opacity: 0.8;
  border-radius: 20px;
  transition: transform 300ms ease, background 300ms ease, opacity 300ms ease, width 300ms ease;
}

.cs-faq__icon-h {
  width: 2rem;
  height: 0.35rem;
}

.cs-faq__icon-v {
  width: 0.35rem;
  height: 2rem;
}

/* Open state: hide the vertical bar (becomes a minus), tint bar green */
.cs-faq__item[open] .cs-faq__icon-v {
  transform: scaleY(0);
  opacity: 0;
}

.cs-faq__item[open] .cs-faq__icon-h {
  background: #52BD95; /* soft green from Figma */
  opacity: 1;
  width: 2.4rem;
}

/* Answer */
.cs-faq__answer {
  padding-top: 1.6rem;
  padding-left: 3.6rem;  /* aligns with question text under the icon */
  font-family: var(--cs-font-display);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.507;
  letter-spacing: 0.1px;
  color: #363049;
  opacity: 0.7;
}

.cs-faq__answer p {
  margin: 0 0 var(--cs-space-sm);
}

.cs-faq__answer p:last-child {
  margin-bottom: 0;
}

.cs-faq__answer a {
  color: var(--cs-blue-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-faq__answer a:hover,
.cs-faq__answer a:focus-visible {
  color: var(--cs-blue);
}

/* Open animation using details-content (Chrome 131+, Safari 18.2+); progressive enhancement */
@supports (interpolate-size: allow-keywords) {
  .cs-faq__item {
    interpolate-size: allow-keywords;
  }
  .cs-faq__item::details-content {
    block-size: 0;
    height: 0;
    overflow: hidden;
    transition: block-size 300ms ease, height 300ms ease, content-visibility 300ms allow-discrete;
  }
  .cs-faq__item[open]::details-content {
    block-size: auto;
    height: auto;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cs-faq {
    padding-block: 0 var(--cs-space-xl);
  }
  .cs-faq--cols-2 .cs-faq__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 82rem;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .cs-faq__item {
    padding: 2rem 2rem;
  }
  .cs-faq__question-text {
    font-size: 1.6rem;
  }
  .cs-faq__answer {
    padding-left: 3.2rem;
    font-size: 1.5rem;
  }
}
