/* FAQ page — matches the homepage/legal-page design system: Inter type,
   brand colors, --pv-container-narrow content width, --pv-radius-md cards. */

.pv-faq-hero {
	padding-top: 96px;
	padding-bottom: 40px;
}

.pv-faq-hero__heading {
	font-family: var(--pv-font-heading);
	font-weight: var(--pv-weight-heading, 800);
	font-size: clamp(32px, 4.5vw, 56px);
	line-height: 1.1;
	color: var(--pv-black);
	margin-bottom: 16px;
}

.pv-faq-hero__intro {
	max-width: var(--pv-container-narrow);
	margin: 0 auto;
	font-size: 17px;
	line-height: 1.6;
	color: var(--pv-grey-subtext);
}

.pv-faq-search {
	position: relative;
	max-width: 560px;
	margin: 40px auto 0;
}

.pv-faq-search__icon {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	color: var(--pv-gray-500);
	pointer-events: none;
}

.pv-faq-search__input {
	width: 100%;
	padding: 16px 20px 16px 52px;
	font-family: var(--pv-font-body);
	font-size: 16px;
	color: var(--pv-black);
	background: var(--pv-white);
	border: 1px solid var(--pv-gray-200);
	border-radius: var(--pv-radius-btn);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
}

.pv-faq-search__input::-webkit-search-cancel-button {
	appearance: none;
}

.pv-faq-search__input:focus {
	outline: none;
	border-color: var(--pv-purple);
	box-shadow: 0 0 0 3px rgba(143, 73, 193, 0.15);
}

.pv-faq-search__input::placeholder {
	color: var(--pv-gray-500);
}

/* Accordion */
.pv-faq {
	max-width: var(--pv-container-narrow);
	padding-top: 56px;
	padding-bottom: 120px;
}

.pv-faq-category {
	margin-bottom: 48px;
}

.pv-faq-category:last-child {
	margin-bottom: 0;
}

.pv-faq-category__title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--pv-font-heading);
	font-weight: var(--pv-weight-heading, 800);
	font-size: 22px;
	color: var(--pv-black);
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--pv-gray-200);
}

.pv-faq-category__icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

.pv-faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pv-faq-item {
	border: 1px solid var(--pv-gray-200);
	border-radius: var(--pv-radius-md);
	background: var(--pv-white);
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.pv-faq-item:has(.pv-faq-item__trigger[aria-expanded="true"]) {
	border-color: var(--pv-purple);
}

.pv-faq-item__heading {
	margin: 0;
}

.pv-faq-item__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	background: none;
	border: none;
	text-align: left;
	font-family: var(--pv-font-heading);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.4;
	color: var(--pv-black);
}

.pv-faq-item__trigger:focus-visible {
	outline: 2px solid var(--pv-purple);
	outline-offset: -2px;
}

.pv-faq-item__question mark {
	background: rgba(245, 184, 0, 0.35);
	color: inherit;
	border-radius: 3px;
	padding: 0 1px;
}

.pv-faq-item__chevron {
	flex-shrink: 0;
	display: flex;
	color: var(--pv-purple);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pv-faq-item__chevron svg {
	width: 20px;
	height: 20px;
}

.pv-faq-item__trigger[aria-expanded="true"] .pv-faq-item__chevron {
	transform: rotate(180deg);
}

.pv-faq-item__panel {
	display: grid;
	/* minmax(0, ...) is required — a bare 0fr still respects the grid row's
	   implicit "auto" minimum size, which is at least the content's height,
	   so it never actually collapses. */
	grid-template-rows: minmax(0, 0fr);
	transition: grid-template-rows 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pv-faq-item__panel[data-open="true"] {
	grid-template-rows: minmax(0, 1fr);
}

.pv-faq-item__panel > .pv-faq-item__answer {
	min-height: 0;
	overflow: hidden;
}

.pv-faq-item__answer {
	padding: 0 24px 20px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--pv-gray-700);
}

.pv-faq-item__answer p {
	margin: 0 0 14px;
}

.pv-faq-item__answer p:last-child {
	margin-bottom: 0;
}

.pv-faq-item__answer mark {
	background: rgba(245, 184, 0, 0.35);
	color: inherit;
	border-radius: 3px;
	padding: 0 1px;
}

/* Search results (flat list, replaces the grouped view while searching) */
.pv-faq-results__count {
	font-size: 14px;
	font-weight: 600;
	color: var(--pv-grey-subtext);
	margin-bottom: 16px;
}

.pv-faq-results .pv-faq-item + .pv-faq-item {
	margin-top: 10px;
}

.pv-faq-item__category-tag {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pv-purple);
	padding: 20px 24px 0;
}

.pv-faq-empty {
	text-align: center;
	font-size: 16px;
	color: var(--pv-grey-subtext);
	padding: 48px 24px;
}

.pv-faq-empty a {
	color: var(--pv-purple);
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (max-width: 768px) {
	.pv-faq-hero {
		padding-top: 64px;
		padding-bottom: 32px;
	}

	.pv-faq {
		padding-top: 40px;
		padding-bottom: 72px;
	}

	.pv-faq-item__trigger {
		padding: 16px 18px;
		font-size: 15px;
	}

	.pv-faq-item__answer {
		padding: 0 18px 18px;
		font-size: 14.5px;
	}

	.pv-faq-category__title {
		font-size: 19px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pv-faq-item__panel,
	.pv-faq-item__chevron {
		transition: none;
	}
}
