/*
 * Accordion: one pattern for the FAQ, the mobile menu and the mobile footer.
 *
 * <div class="acc" data-acc>               gets .is-open from accordion.js
 *   <button aria-expanded aria-controls="p">…<svg class="acc__chev"></button>
 *   <div class="acc__panel" id="p"><div class="acc__inner">…</div></div>
 * </div>
 *
 * The panel animates with grid-template-rows (0fr → 1fr), so no height has to
 * be measured. Closed panels are visibility:hidden, so nothing inside them can
 * be tabbed to. Without JS the panels are simply open.
 */

.acc__panel {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	opacity: 0;
	transition:
		grid-template-rows 0.55s var(--rbnl-ease),
		opacity 0.4s var(--rbnl-ease),
		visibility 0s linear 0.55s;
}

.acc__inner {
	min-height: 0;
	overflow: hidden;
}

.acc.is-open > .acc__panel {
	grid-template-rows: 1fr;
	visibility: visible;
	opacity: 1;
	transition-delay: 0s;
}

html:not(.js) .acc__panel {
	grid-template-rows: 1fr;
	visibility: visible;
	opacity: 1;
}

.acc__chev {
	flex: 0 0 auto;
	transition: transform 0.4s var(--rbnl-ease);
}

.acc.is-open > * .acc__chev,
.acc.is-open > .acc__chev {
	transform: rotate(180deg);
}

/* FAQ */
.faq {
	margin: 0;
	padding: 0;
	list-style: none;
}

.faq__item {
	border-bottom: 1px solid rgba(33, 30, 100, 0.12);
}

.faq__h {
	margin: 0;
	font: inherit;
	letter-spacing: inherit;
}

.faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-height: 76px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-size: clamp(18px, calc(18px + 3 * (100vw - 390px) / 1050), 21px);
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.faq__q-text {
	transition: color 0.3s var(--rbnl-ease);
}

.faq__q:hover .faq__q-text,
.faq__q:focus-visible .faq__q-text {
	color: var(--rbnl-orange);
}

.faq__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--rbnl-white);
	color: var(--rbnl-ink);
	transition:
		transform var(--rbnl-dur) var(--rbnl-ease),
		background-color 0.35s var(--rbnl-ease),
		color 0.35s var(--rbnl-ease);
}

.faq__item.is-open .faq__icon {
	background: var(--rbnl-ink);
	color: var(--rbnl-white);
	transform: rotate(45deg);
}

.faq__a {
	padding: 0 56px 22px 0;
	font-size: var(--rbnl-fs-body);
}

.faq__a > :last-child {
	margin-bottom: 0;
}

@media (max-width: 1023.98px) {
	.faq__a {
		padding-right: 8px;
	}
}
