/* =========================================================================
   FAQ ACCORDION  -  rendered by [faq_post] (inc/partials/faq.php)
   Enqueued as `pf-faq` only on pages that contain the shortcode.
   ========================================================================= */

.faq-container {
	--faq-line: #d9d9d9;
	--faq-ink: #14213D;
	--faq-body: #222222;
	--faq-accent: #FFCD04;

	box-sizing: border-box;
	width: 100%;
}

.faq-container * {
	box-sizing: inherit;
}

/* ----- Row ----- */
.faq-item {
	border-bottom: 1px solid var(--faq-line);
}

.faq-item:last-of-type {
	border-bottom: none;
}

/* ----- Question (a <button>, so the UA styling has to be undone) -----
   The trigger is a real button for keyboard and screen-reader support. Without
   this reset it inherits the theme's button background, border, padding and
   shrink-to-fit width, which pushed the chevron in beside the text instead of
   out to the right edge. */
.faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
	margin: 0;
	padding: 28px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.faq-question:hover,
.faq-question:focus {
	background: none;
	color: inherit;
}

.faq-question:focus-visible {
	outline: 3px solid var(--faq-accent);
	outline-offset: 2px;
}

.faq-question h3 {
	margin: 0;
	font-family: Teko, 'Arial Narrow', sans-serif;
	font-size: clamp(24px, 2.6vw, 40px);
	font-weight: 500;
	line-height: 1.1;
	color: var(--faq-ink);
	text-wrap: balance;
}

.faq-question .head-icon img {
	max-width: 34px;
	height: auto;
	margin-right: 10px;
	vertical-align: middle;
}

/* ----- Chevron ----- */
.faq-question .icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	color: var(--faq-ink);
	transition: transform .3s ease-in-out;
}

.faq-question .icon svg {
	width: 22px;
	height: 22px;
	display: block;
}

.faq-item.active .faq-question .icon {
	transform: rotate(90deg);
}

/* ----- Answer ----- */
.faq-answer {
	display: none;
	padding: 0 0 28px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(16px, 1.2vw, 20px);
	line-height: 1.6;
	color: var(--faq-body);
}

.faq-item.active .faq-answer {
	display: block;
	animation: pf-faq-reveal .25s ease-out;
}

@keyframes pf-faq-reveal {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.faq-question .icon,
	.faq-item.active .faq-answer {
		transition: none;
		animation: none;
	}
}

/* Style the answer content itself, not only <p> - a short answer entered
   without a paragraph wrapper was rendering unstyled. */
.faq-answer > :first-child { margin-top: 0; }
.faq-answer > :last-child  { margin-bottom: 0; }

.faq-answer p {
	margin: 0 0 12px;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.faq-answer ul,
.faq-answer ol {
	margin: 0 0 12px;
	padding-left: 22px;
}

.faq-answer li {
	margin-bottom: 6px;
}

.faq-answer a {
	color: var(--faq-ink);
	text-decoration: underline;
	text-underline-offset: .15em;
}

.faq-answer strong {
	font-weight: 700;
}

/* ----- Pagination ----- */
.faq-container .pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
}

.faq-container .pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--faq-line);
	border-radius: 4px;
	color: var(--faq-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.faq-container .pagination .page-numbers:hover,
.faq-container .pagination .page-numbers.current {
	border-color: var(--faq-accent);
	background: var(--faq-accent);
	color: #000;
}

/* ----- Responsive ----- */
@media screen and (max-width: 767px) {
	.faq-question {
		gap: 12px;
		padding: 20px 0;
	}

	.faq-question .icon {
		width: 24px;
		height: 24px;
	}

	.faq-question .icon svg {
		width: 18px;
		height: 18px;
	}

	.faq-answer {
		padding-bottom: 20px;
	}
}
