/* =================================================================
   AFMedia – FAQ (element WPBakery [afm_faq])
   ================================================================= */

.afm-faq {
	--afm-faq-ink: #111111;
	--afm-faq-text: #3b3b3b;
	--afm-faq-line: #e3e7e6;
	--afm-faq-bg: #ffffff;
	--afm-faq-item-bg: #ffffff;
	--afm-faq-item-open: #f3f6f5;

	padding: 72px 20px;
	background: var(--afm-faq-bg);
	color: var(--afm-faq-text);
	font-family: "Work Sans", sans-serif;
}

.afm-faq--dark {
	--afm-faq-ink: #ffffff;
	--afm-faq-text: #d7dbe0;
	--afm-faq-line: #374151;
	--afm-faq-bg: #111827;
	--afm-faq-item-bg: #111827;
	--afm-faq-item-open: #1f2937;
}

.afm-faq *,
.afm-faq *::before,
.afm-faq *::after {
	box-sizing: border-box;
}

.afm-faq__inner {
	max-width: 820px;
	margin: 0 auto;
}

/* ---------- Nagłówek ---------- */

.afm-faq__header {
	margin-bottom: 32px;
	text-align: center;
}

.afm-faq .afm-faq__title {
	margin: 0;
	color: var(--afm-faq-ink);
	font-family: "Work Sans", sans-serif;
	font-size: clamp(27px, 5.5vw, 40px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-transform: none;
}

.afm-faq .afm-faq__subtitle {
	margin: 12px 0 0;
	padding: 0;
	color: var(--afm-faq-text);
	font-size: 18px;
	line-height: 1.55;
}

/* ---------- Lista ---------- */

.afm-faq__list {
	display: grid;
	gap: 10px;
}

.afm-faq__item {
	border: 1px solid var(--afm-faq-line);
	border-radius: 14px;
	background: var(--afm-faq-item-bg);
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.afm-faq__item[open] {
	border-color: var(--afm-faq-accent);
	background: var(--afm-faq-item-open);
}

.afm-faq__question {
	position: relative;
	display: block;
	padding: 18px 64px 18px 22px;
	cursor: pointer;
	list-style: none;
	border-radius: 14px;
}

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

/* Okrągła ikona +/– */
.afm-faq__question::before,
.afm-faq__question::after {
	content: "";
	position: absolute;
	right: 22px;
	top: 50%;
	width: 14px;
	height: 2px;
	margin-top: -1px;
	border-radius: 1px;
	background: var(--afm-faq-ink);
	transition: transform 0.2s ease;
}

.afm-faq__question::after {
	transform: rotate(90deg);
}

.afm-faq__item[open] .afm-faq__question::after {
	transform: rotate(0deg);
}

.afm-faq__question:hover::before,
.afm-faq__question:hover::after {
	background: var(--afm-faq-accent);
}

.afm-faq .afm-faq__question h3 {
	display: inline;
	margin: 0;
	color: var(--afm-faq-ink);
	font-family: "Work Sans", sans-serif;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
}

.afm-faq__question:focus-visible {
	outline: 3px solid var(--afm-faq-ink);
	outline-offset: 2px;
}

.afm-faq--dark .afm-faq__question:focus-visible {
	outline-color: var(--afm-faq-accent);
}

/* ---------- Odpowiedź ---------- */

.afm-faq__answer {
	padding: 0 22px 20px;
	color: var(--afm-faq-text);
	font-size: 17px;
	line-height: 1.65;
}

.afm-faq .afm-faq__answer p,
.afm-faq .afm-faq__answer ul,
.afm-faq .afm-faq__answer ol {
	margin: 0 0 12px;
	padding: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.afm-faq .afm-faq__answer ul,
.afm-faq .afm-faq__answer ol {
	padding-left: 20px;
}

.afm-faq .afm-faq__answer > :last-child {
	margin-bottom: 0;
}

.afm-faq .afm-faq__answer a {
	color: var(--afm-faq-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.afm-faq .afm-faq__answer a:hover {
	text-decoration-thickness: 2px;
}

@media (min-width: 900px) {
	.afm-faq {
		padding: 96px 20px;
	}

	.afm-faq__header {
		margin-bottom: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.afm-faq__item,
	.afm-faq__question::before,
	.afm-faq__question::after {
		transition: none;
	}
}
