/*
 * Questions and answers (data-section «Preguntas y respuestas», pattern transpirenaica/faq, anchor #preguntas).
 * Ported from base.css and mobile.css of 02-preguntas with docs/class-map.md (the classes were already in
 * English). Tokens: --faq-row-pad 48/32/24 and --faq-col-gap 64/48 in global.css (desktop/tablet/mobile).
 *
 * - The margins GP gives p and h2 are reset by «:where([data-section]) :is(…)» in global.css; the rules below
 *   carry two classes so they also win over GP's dynamic h2 typography.
 * - The arrow of the closing link is the mask of components.css (mask-icon-after mask-icon--arrow) at 20 px.
 */

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

.faq .faq-list {
	border-bottom: 1px solid var(--border);
}

.faq .faq-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	column-gap: var(--faq-col-gap);
	align-items: start;
	padding: var(--faq-row-pad) 0;
	border-top: 1px solid var(--border);
}

.faq .faq-item__question {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: var(--fs-h3);
	line-height: 1.05;
	letter-spacing: var(--ls-heading);
	text-transform: uppercase;
	color: var(--forest-800);
	text-wrap: balance;
}

.faq .faq-item__answer {
	max-width: 65ch;
	padding-top: 2px;
}

.faq .faq-item__answer p {
	margin: 0;
	font-size: var(--fs-body);
	line-height: 1.6;
	color: var(--body-text);
}

.faq .faq-item__answer p + p {
	margin-top: var(--space-4);
}

.faq :is(.faq-item__answer, .faq-item__question) em {
	font-style: italic;
}

/* Closing link «¿Tienes más dudas?» */
.faq .faq__more {
	display: flex;
	justify-content: center;
	padding-top: var(--space-7);
	text-align: center;
}

.faq .faq__more-link {
	--icon-size: 20px;
	--icon-color: var(--forest);
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	min-height: 48px;
	font-weight: 600;
	font-size: var(--fs-lead);
	line-height: 1.35;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

/* Colours repeated for the link states: GP colours every link with a:hover, a:focus, a:active (0,1,1). */
.faq .faq__more-link,
.faq .faq__more-link:is(:focus, :active) {
	color: var(--forest);
	text-decoration-color: var(--mustard);
}

.faq .faq__more-link:hover {
	color: var(--forest-800);
	text-decoration-color: var(--forest);
}

@media (max-width: 767px) {
	.faq .faq-item {
		grid-template-columns: 1fr;
		row-gap: var(--space-3);
		padding: var(--faq-row-pad) 0 calc(var(--faq-row-pad) + var(--space-1));
	}

	.faq .faq-item__answer {
		max-width: none;
		padding-top: 0;
	}

	.faq .faq__more {
		padding-top: var(--space-6);
	}

	.faq .faq__more-link {
		min-height: 52px;
		justify-content: center;
	}
}
