/* FAQ block — Figma 313-8117. Exact desktop values; responsive below.
   No rounded accordion corners (theme convention). */
.sun-faq {
  overflow-anchor: none;                         /* opening an entry never scrolls the page (no browser scroll anchoring) */
  padding: clamp(48px, 6vw, 80px) 0;
}
.sun-faq__inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* Left column: heading (432px at 1280 = the flex remainder next to the 800 list). */
.sun-faq__col { min-width: 0; }
.sun-faq__col--heading { flex: 1 1 0; }
.sun-faq__col--list    { flex: 0 1 800px; }

.sun-faq__heading {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--h2, 48px);
  line-height: 1.1667;                              /* 56/48 */
  letter-spacing: -0.01em;                          /* -0.48px @ 48px */
  color: var(--sun-secondary);                      /* #132140 */
  hyphens: auto;                                    /* long German compounds must not overflow the column */
  overflow-wrap: break-word;
}

/* Group-title variant — Figma 1267-26898: 32/40 beside the list, 16px top
   offset so it lines up with the first question. Several groups under one
   section header read as one FAQ: 48px after the header, 48px between groups,
   80px section bottom (Figma 1544-30714). Each group owns its top gap; only the
   last group carries the section's bottom padding. */
.sun-faq--small-heading { padding: 48px 0 0; }
.sun-faq--small-heading:not(:has(+ .sun-faq--small-heading)) {
  padding-bottom: clamp(48px, 4.2vw, 80px);
}
.sun-faq--small-heading .sun-faq__heading {
  padding-top: 16px;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.16px;
}

/* --- Accordion rows --- */
.sun-faq__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sun-faq__item {
  position: relative;
  padding: 0 24px;
  border-bottom: 1px solid var(--sun-muted);        /* #b6bac4 */
}
/* Active line grows in left→right over the grey divider (theme-wide pattern). */
.sun-faq__item::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--sun-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s ease;
}
.sun-faq__item[data-open]::after { transform: scaleX(1); }
.sun-faq__q { margin: 0; }
.sun-faq__btn {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  padding: 24px 0 25px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--sun-secondary);
}
.sun-faq__btn:focus-visible {
  outline: 3px solid var(--sun-accent);
  outline-offset: 2px;
}
.sun-faq__question {
  flex: 1 1 auto;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: var(--wp--preset--font-size--h5, 24px);
  line-height: 1.3334;                              /* 32/24 */
  color: var(--sun-secondary);                      /* #132140 */
}
.sun-faq .sun-faq__caret {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  color: var(--sun-secondary);
  transition: transform .25s ease;
}
.sun-faq__item[data-open] .sun-faq__caret { transform: rotate(180deg); }

/* --- Panel: smooth height animation via grid-template-rows --- */
.sun-faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.sun-faq__item[data-open] .sun-faq__panel { grid-template-rows: 1fr; }
/* Content fades out first on collapse (same smoothing as the problems block). */
.sun-faq__panel-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility 0s linear .25s;
}
.sun-faq__item[data-open] .sun-faq__panel-inner {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease .1s, visibility 0s;
}

.sun-faq__answer { padding-bottom: 25px; }
.sun-faq__answer,
.sun-faq__answer p {
  margin: 0;
  font-size: var(--wp--preset--font-size--md, 16px);
  line-height: 1.5;                                 /* 24/16 */
  color: var(--sun-bluegrey);                       /* #4f5563 */
}
.sun-faq__answer p + p { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .sun-faq__panel,
  .sun-faq__panel-inner,
  .sun-faq .sun-faq__caret { transition: none; }
}

/* --- Responsive: stack columns --- */
@media (max-width: 900px) {
  .sun-faq__inner { flex-direction: column; gap: 32px; }
  .sun-faq__col--list { flex: 1 1 auto; width: 100%; }
  .sun-faq__heading { font-size: clamp(32px, 6vw, 40px); line-height: 1.2; }
  .sun-faq__question { font-size: 20px; line-height: 28px; }
}
@media (max-width: 480px) {
  .sun-faq__item { padding: 0 12px; }
  .sun-faq__btn { gap: 12px; }
}
