/*--------------------------------------------------------------
# FAQ List
# Topic groups as cards, each a header row over a flat accordion.
# Group cards follow .ic-faq__group; the question rows inside follow
# .consult-faq — same toggle, chevron rotation and height animation.
--------------------------------------------------------------*/

.faq-list {
	background: var(--tpp-white);
	/* Bottom only — .faq-hero above supplies the gap. */
	padding: 0 0 100px;
}

.faq-list__container {
	width: 100%;
	/* Narrower than the theme's usual 1140px: a question is a line of prose,
	   and a wide measure makes the accordion tiring to scan. */
	max-width: 820px;
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}


/* ──────────────────────────────────────────────
   Group
   ────────────────────────────────────────────── */

/* Each group is a card, in the same language as .ic-faq__group: a bordered
   white panel with a header row, and the questions living inside it rather
   than floating loose beneath a label. Cards need less air between them than
   the old free-standing labels did.

   The reveal moved here from the individual items. Sliding rows around inside
   a fixed card looked wrong; the card arriving as one piece does not. */
.faq-list__group {
	background: var(--tpp-white);
	border: 1px solid var(--tpp-border-light);
	border-radius: 20px;
	/* Clips the first and last rows to the card's rounded corners. */
	overflow: hidden;

	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-list.is-visible .faq-list__group {
	opacity: 1;
	transform: translateY(0);
	transition-delay: calc(var(--group-index, 0) * 0.09s);
}

.faq-list__group + .faq-list__group {
	margin-top: 20px;
}


/* ── Group header ── */

.faq-list__group-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 24px;
	background: var(--tpp-off-white);
	border-bottom: 1px solid var(--tpp-border-light);
}

/* Icon disc, matching .ic-faq__group-icon. */
.faq-list__group-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tpp-black);
	color: var(--tpp-white);
	border-radius: 50%;
}

/* Was 0.75rem uppercase grey — smaller than the questions it introduced.
   Now the heading face at a size that actually leads the group. */
.faq-list__group-label {
	flex: 1;
	font-family: var(--tpp-font-heading);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--tpp-black);
	margin: 0;
}

.faq-list__group-count {
	flex-shrink: 0;
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--tpp-text-light);
	white-space: nowrap;
}

/* No gap: rows sit flush and are divided by hairlines, so the card reads as
   one object rather than a stack of separate tiles. */
.faq-list__items {
	display: flex;
	flex-direction: column;
}


/* ──────────────────────────────────────────────
   Item
   ────────────────────────────────────────────── */

/* Rows now, not tiles: the card supplies the border and radius, so an item
   only needs the hairline that separates it from the one above. */
.faq-list__item + .faq-list__item {
	border-top: 1px solid var(--tpp-border-light);
}

/* Faint wash on the open row, the same idea as .ic-faq__group.is-open marking
   its toggle. Kept lighter than the toggle's own hover so the two states stay
   distinguishable when the pointer is over an open row. */
.faq-list__item.is-open {
	background: rgba(0, 0, 0, 0.015);
}


/* ── Toggle row ── */
.faq-list__question {
	margin: 0;
}

.faq-list__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	transition: background 0.2s ease;
}

.faq-list__toggle:hover {
	background: var(--tpp-off-white);
}

.faq-list__toggle:focus-visible {
	outline: 2px solid var(--tpp-black);
	outline-offset: -3px;
	border-radius: 16px;
}

.faq-list__toggle-text {
	flex: 1;
	font-family: var(--tpp-font-heading);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.01em;
	color: var(--tpp-black);
}

.faq-list__chevron {
	flex-shrink: 0;
	color: var(--tpp-text-light);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-list__item.is-open .faq-list__chevron {
	transform: rotate(180deg);
	color: var(--tpp-black);
}


/* ── Answer panel ── */
/* Height, not max-height: the JS measures scrollHeight and animates to it, so
   the timing is the same whether an answer is two lines or ten. */
.faq-list__panel {
	overflow: hidden;
	background: var(--tpp-white);
	transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-list__answer {
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.75;
	color: var(--tpp-text-light);
	/* Right padding clears the chevron column so the answer sits under the
	   question rather than running past it. */
	margin: 0;
	padding: 0 60px 22px 24px;
}


/* ──────────────────────────────────────────────
   Reduced motion
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.faq-list__group,
	.faq-list__panel,
	.faq-list__chevron {
		transition: none;
	}

	.faq-list.is-visible .faq-list__group {
		transition-delay: 0s;
	}
}


/* ──────────────────────────────────────────────
   Tablet (≤991px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 991px) {
	.faq-list {
		padding: 0 0 80px;
	}

	.faq-list__group + .faq-list__group {
		margin-top: 18px;
	}
}


/* ──────────────────────────────────────────────
   Mobile (≤767px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 767px) {
	.faq-list {
		padding: 0 0 72px;
	}

	.faq-list__group + .faq-list__group {
		margin-top: 16px;
	}

	.faq-list__group-head {
		padding: 16px 18px;
		gap: 12px;
	}

	.faq-list__group-icon {
		width: 36px;
		height: 36px;
	}

	.faq-list__group-icon svg {
		width: 17px;
		height: 17px;
	}

	.faq-list__group-label {
		font-size: 1.05rem;
	}

	/* The count and the label compete for the same row on a phone, and the
	   label is the one that matters. */
	.faq-list__group-count {
		display: none;
	}

	.faq-list__toggle {
		padding: 17px 18px;
		gap: 12px;
	}

	.faq-list__toggle-text {
		font-size: 0.9375rem;
	}

	.faq-list__answer {
		font-size: 0.875rem;
		/* 60px of right padding is a sixth of a phone screen; the chevron is
		   no longer beside the answer once the question wraps. */
		padding: 0 18px 18px;
	}

	.faq-list__chevron {
		width: 18px;
		height: 18px;
	}
}


/* ──────────────────────────────────────────────
   Small mobile (≤480px)
   ────────────────────────────────────────────── */

@media screen and (max-width: 480px) {
	.faq-list {
		padding: 0 0 56px;
	}

	.faq-list__group {
		border-radius: 16px;
	}

	.faq-list__group-head {
		padding: 14px 16px;
		gap: 11px;
	}

	.faq-list__group-icon {
		width: 32px;
		height: 32px;
	}

	.faq-list__group-icon svg {
		width: 16px;
		height: 16px;
	}

	.faq-list__group-label {
		font-size: 1rem;
	}

	.faq-list__toggle {
		padding: 15px 16px;
	}

	.faq-list__toggle-text {
		font-size: 0.9rem;
	}

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