/* ============================================================
   Grouped FAQ accordions (layout "faq_groups")
   Design ref: designs/FAQs _ CONTENT TO BE FINALISED.png - one
   light-grey band holding 6 serif-headed groups of accordion
   rows (21 in total).

   The ROW styling (card, toggle, +/- icon, panel) is inherited
   from faq.css, because the template reuses .faq__item /
   .faq__toggle / .faq__panel verbatim. Only the band, the group
   headings and a few measured type deltas live here.

   LOAD ORDER WARNING: components/*.css are enqueued in glob()
   order, and "faq-groups.css" sorts BEFORE "faq.css". So a bare
   .faq__toggle rule here would be silently overwritten by
   faq.css loading later. Every shared-class override below is
   therefore scoped as `.faq-groups .faq__x` (0,2,0) to beat
   faq.css's (0,1,0) - which also stops it leaking into the
   signed-off Family Service accordion. Do NOT unscope these.
   ============================================================ */

.faq-groups {
	background: var(--color-light-grey);
	padding-block: var(--section-padding);
}

.faq-groups--cream {
	background: var(--color-cream-light);
}

/* ---- Optional section intro (this page leaves it empty - the
       page_intro above carries the H1) ---- */

.faq-groups__intro {
	max-width: 48rem;
	margin-inline: auto;
	margin-bottom: var(--space-lg);
	text-align: center;
}

.faq-groups__heading {
	margin-bottom: 0;
}

/* ---- Group ----
   Constrained to the same 1050px column as .faq__list so the serif
   heading sits flush with the card edges (design: both at x115). */

.faq-groups__group {
	max-width: 1050px;
	margin-inline: auto;
}

/* Design's inter-group gaps drift 56-98px with no system; one
   consistent 4rem reads as deliberate. */
.faq-groups__group + .faq-groups__group {
	margin-top: var(--space-xl);
}

/* Must stay SMALLER than the page_intro H1 above it at every width, or
   the group reads as outranking the page title (that happened at 834). */
.faq-groups__group-heading {
	margin-bottom: var(--space-md);
	font-size: 1.5rem;
	line-height: 1.25;
	color: var(--color-heading);
}

/* ---- Measured deltas, scoped to this section ----
   Only the card PADDING differs from faq.css here: the design's answer
   text starts at x142 against a card edge of x115, so 25px inline
   padding, not faq.css's 36px.
   TYPE SIZE IS *NOT* A DELTA. An earlier pass set 16px copy here after
   measuring the design's 28px line PITCH - but pitch alone cannot tell
   you the glyph size, and holding pitch at 28 with line-height 1.75
   made 16px look right. The glyphs are 18px, same as faq.css. So the
   sizes are inherited and only the line-height is set, to keep the
   design's 28px pitch at 18px (18 * 1.55 = 28). */

.faq-groups .faq__list {
	gap: 1.875rem; /* 30px, the design's card gap */
}

.faq-groups .faq__toggle {
	padding: 1.25rem 1.5625rem; /* 20px / 25px */
}

.faq-groups .faq__answer {
	padding-inline: 1.5625rem;
	line-height: 1.55;
}

/* ---- Tablet (768-1023): mandatory deliberate middle treatment.
       No mobile/tablet design was supplied for this page. ---- */

@media (min-width: 768px) {
	.faq-groups__group-heading {
		font-size: 1.625rem; /* stays under the 28px H1 at this width */
	}

	.faq-groups .faq__toggle {
		padding: 1.375rem 1.75rem;
	}

	.faq-groups .faq__answer {
		padding-inline: 1.75rem;
	}
}

/* ---- Desktop ---- */

@media (min-width: 1024px) {
	.faq-groups__group-heading {
		font-size: 2.125rem; /* 34px, measured */
		margin-bottom: 1.25rem;
	}

	.faq-groups__group + .faq-groups__group {
		margin-top: 4rem;
	}

	.faq-groups .faq__toggle {
		padding: 1.375rem 1.5625rem;
	}

	.faq-groups .faq__answer {
		padding-inline: 1.5625rem;
	}
}
