/* FAQ Akkordeon – natives <details>/<summary>, kein JavaScript nötig */
.acf-faq {
	--faq-bg: #002f6c;
	--faq-text: #fff;
	--faq-question: #fff;
	--faq-divider: rgba(255, 255, 255, 0.85);
	--faq-width: 850px;
	--faq-question-pad: 1.35rem;
	--faq-icon-size: 26px;
	--faq-speed: 0.3s;

	background: var(--faq-bg);
	color: var(--faq-text);
	padding: 4rem 1.5rem;
}

.acf-faq__inner {
	max-width: var(--faq-width);
	margin-inline: auto;
}

.acf-faq__headline {
	margin: 0 0 2rem;
	color: var(--faq-text) !important;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem) !important;
	font-weight: 600;
	line-height: 1.2;
	margin-block-start: 0 !important;
}

/*
 * Volle Breite im Gutenberg-Block (Ausrichtung „Volle Breite“).
 * Block-Themes regeln das selbst; für klassische Themes ohne eigene
 * alignfull-Regeln bricht der Block hier aus dem Inhaltsbereich aus.
 */
:where(body:not(:has(.wp-site-blocks))) .acf-faq.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
}

/* Linie über jedem Eintrag – wie im Layout */
.acf-faq__item {
	border-top: 1px solid var(--faq-divider);
}

/* Frage (summary) */
.acf-faq .acf-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: var(--faq-question-pad) 0;
	list-style: none;
	color: var(--faq-question);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
}

.acf-faq .acf-faq__question::-webkit-details-marker {
	display: none;
}

.acf-faq .acf-faq__question:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Überschrift in der Frage: Theme-Stile für h2–h4 neutralisieren */
.acf-faq .acf-faq__question-text {
	margin: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
}

.acf-faq__icon {
	flex: 0 0 auto;
	width: var(--faq-icon-size);
	height: var(--faq-icon-size);
	transition: transform var(--faq-speed) ease;
}

.acf-faq__item[open] .acf-faq__icon {
	transform: rotate(180deg);
}

/* Antwort */
.acf-faq__answer-content {
	padding-bottom: 1.75rem;
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.6;
}

.acf-faq__answer-content > :first-child { margin-top: 0; }
.acf-faq__answer-content > :last-child  { margin-bottom: 0; }
.acf-faq__answer-content a { color: inherit; text-decoration: underline; }

/* Weiches Auf-/Zuklappen, wo der Browser es kann (sonst springt es einfach auf) */
@supports selector(::details-content) {
	.acf-faq {
		interpolate-size: allow-keywords;
	}
	.acf-faq__item::details-content {
		block-size: 0;
		overflow: hidden;
		transition: block-size var(--faq-speed) ease, content-visibility var(--faq-speed) allow-discrete;
	}
	.acf-faq__item[open]::details-content {
		block-size: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.acf-faq { --faq-speed: 0s; }
}

/* Nur im Editor sichtbar */
.acf-faq-notice {
	padding: 1rem;
	border: 1px dashed #c36;
	background: #fff4f7;
	color: #333;
	font-size: 14px;
}
