/**
 * FAQ page.
 *
 * Reuses the theme's tokens (--header-text, --header-border, --ks-ease) and the
 * "+ / −" accordion language already established by the product-page FAQ, so
 * this page reads as the same site rather than a second design system.
 */

.faq-page {
	background: #ffffff;
	color: var(--header-text);
}

.faq-page__shell {
	width: min(100% - 32px, var(--header-shell-width));
	margin: 0 auto;
}

/*
 * The theme sets a global `p { text-align: justify }`, which opens rivers of
 * whitespace in a narrow answer column, so alignment is stated explicitly.
 */
.faq-page p {
	text-align: left;
}

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
.faq-page__hero {
	padding: clamp(2.4rem, 5vw, 4rem) 0 1.6rem;
	background:
		linear-gradient(135deg, rgba(16, 35, 63, 0.96), rgba(16, 35, 63, 0.88)),
		#10233f;
	text-align: center;
}

.faq-page__title {
	margin: 0;
	color: #fff;
	font-size: clamp(2.4rem, 5vw, 4.5rem);
	font-weight: 800;
	line-height: 1.02;
}

.faq-page__intro {
	max-width: 780px;
	margin: 1.25rem auto 0;
	color: rgba(255, 255, 255, 0.88);
	font-size: 1.05rem;
	line-height: 1.9;
}

.faq-page .faq-page__intro {
	text-align: center;
}

/*--------------------------------------------------------------
# List
--------------------------------------------------------------*/
.faq-page__section {
	padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(3rem, 6vw, 4.5rem);
}

/*
 * Answers are long-form prose, so the column is capped well short of the
 * 1440px shell to keep the measure readable.
 */
.faq-list,
.faq__status,
.faq__more-wrap,
.faq-page__empty {
	width: min(100%, 900px);
	margin-inline: auto;
}

.faq-group + .faq-group {
	margin-top: clamp(1.8rem, 4vw, 2.6rem);
}

.faq-group__title {
	margin: 0 0 0.9rem;
	padding-bottom: 0.7rem;
	border-bottom: 2px solid var(--header-border);
	color: var(--header-text);
	font-size: clamp(1.15rem, 2.4vw, 1.4rem);
	font-weight: 800;
	line-height: 1.3;
}

.faq-group__items {
	display: grid;
	gap: 0.6rem;
}

.faq-item {
	border: 1px solid var(--header-border);
	border-radius: 0.6rem;
	background: #fff;
	transition:
		border-color 0.3s var(--ks-ease),
		box-shadow 0.3s var(--ks-ease);
}

.faq-item:hover {
	border-color: #c7cedb;
	box-shadow: 0 10px 24px rgba(16, 35, 63, 0.08);
}

.faq-item--open {
	border-color: #ff6214;
}

/* Hidden until Load More reveals them. `display: none` also keeps them out of
   the tab order and the accessibility tree. */
.faq-item--hidden,
.faq-group--hidden {
	display: none;
}

/*--------------------------------------------------------------
# Question
--------------------------------------------------------------*/
.faq-item__heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.faq-item__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	/* Comfortably past the 44px touch target on phones. */
	min-height: 56px;
	margin: 0;
	padding: 0.9rem 1.1rem;
	border: 0;
	border-radius: 0.6rem;
	background: none;
	color: var(--header-text);
	font-family: inherit;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.5;
	text-align: left;
	cursor: pointer;
	appearance: none;
}

.faq-item__question:hover {
	color: #ff6214;
}

.faq-item__question:focus-visible {
	outline: 2px solid #ff6214;
	outline-offset: -2px;
}

/* The "+" that rotates into a "−", drawn rather than typed so the two strokes
   stay optically identical. */
.faq-item__icon {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.faq-item__icon::before,
.faq-item__icon::after {
	position: absolute;
	top: 50%;
	left: 50%;
	background: #ff6214;
	border-radius: 2px;
	content: "";
	transition: transform 0.32s var(--ks-ease);
}

.faq-item__icon::before {
	width: 16px;
	height: 2.5px;
	transform: translate(-50%, -50%);
}

.faq-item__icon::after {
	width: 2.5px;
	height: 16px;
	transform: translate(-50%, -50%);
}

.faq-item--open .faq-item__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

/*--------------------------------------------------------------
# Answer
--------------------------------------------------------------*/
/*
 * 0fr -> 1fr animates to the answer's natural height without measuring it in
 * JavaScript, so nothing has to be re-measured on resize.
 */
.faq-answer {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.32s var(--ks-ease);
}

.faq-item--open .faq-answer {
	grid-template-rows: 1fr;
}

.faq-answer__inner {
	overflow: hidden;
	/* Keeps a collapsed answer out of the tab order and off screen readers.
	   `visibility` holds `visible` for the whole close transition, so the text
	   does not vanish before the panel finishes collapsing. */
	visibility: hidden;
	transition: visibility 0.32s var(--ks-ease);
}

.faq-item--open .faq-answer__inner {
	visibility: visible;
}

.faq-answer__inner p {
	margin: 0;
	padding: 0 1.1rem 0.4rem;
	color: #4a5768;
	font-size: 0.95rem;
	line-height: 1.8;
}

.faq-answer__inner p:first-child {
	padding-top: 0.1rem;
}

.faq-answer__inner p:last-child {
	padding-bottom: 1.1rem;
}

/* The theme sets a global `ul { margin: 0 0 1.5em 3em }`, which pushes answer
   bullets far out of the card; restate it against the answer padding. */
.faq-answer__list {
	margin: 0;
	padding: 0.2rem 1.1rem 0.4rem 2.4rem;
	color: #4a5768;
	font-size: 0.95rem;
	line-height: 1.8;
	list-style: disc;
}

.faq-answer__list:last-child {
	padding-bottom: 1.1rem;
}

.faq-answer__list li {
	margin: 0;
}

/*--------------------------------------------------------------
# Load More
--------------------------------------------------------------*/
.faq__status {
	margin: 1.6rem 0 0;
	color: var(--header-muted);
	font-size: 0.9rem;
	text-align: center;
}

.faq-page .faq__status {
	text-align: center;
}

.faq__more-wrap {
	margin-top: 1rem;
	text-align: center;
}

.faq__more {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 48px;
	padding: 0.85rem 2rem;
	border: 1px solid var(--header-text);
	border-radius: 999px;
	background: var(--header-text);
	color: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	appearance: none;
	transition:
		background-color 0.3s var(--ks-ease),
		border-color 0.3s var(--ks-ease),
		transform 0.3s var(--ks-ease);
}

.faq__more:hover {
	border-color: #ff6214;
	background: #ff6214;
	transform: translateY(-2px);
}

.faq__more:focus-visible {
	outline: 2px solid #ff6214;
	outline-offset: 3px;
}

.faq__more-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.6rem;
	height: 1.6rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	font-size: 0.8rem;
	font-weight: 700;
}

.faq-page__empty {
	margin: 0;
	color: var(--header-muted);
	text-align: center;
}

/*--------------------------------------------------------------
# Homepage section
--------------------------------------------------------------*/
/*
 * Sits between Testimonials and Our Locations. A soft grey ground separates it
 * from the white sections around it without introducing a new accent colour.
 */
.home-faq {
	padding: clamp(3rem, 6vw, 5rem) 0;
	background: var(--header-surface-soft);
}

.home-faq__shell {
	width: min(100% - 32px, 1280px);
	margin: 0 auto;
}

.home-faq__header {
	margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
	text-align: center;
}

.home-faq__title {
	margin: 0;
	color: var(--header-text);
	font-size: clamp(2rem, 4vw, 3.2rem);
	font-weight: 800;
	line-height: 1.1;
}

.home-faq__description {
	max-width: 900px;
	margin: 1.25rem auto 0;
	color: var(--header-muted);
	font-size: clamp(1rem, 1.3vw, 1.12rem);
	line-height: 1.75;
}

/* Beats the theme's global `p { text-align: justify }`. */
.home-faq .home-faq__description {
	text-align: center;
}

/* The cards carry their own border, so on the grey ground they need to stay
   white rather than inheriting it. */
.home-faq .faq-item {
	background: #fff;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 782px) {
	.faq-item__question {
		padding: 0.85rem 0.95rem;
		font-size: 0.95rem;
	}

	.faq-answer__inner p {
		padding-inline: 0.95rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.faq-item,
	.faq-answer,
	.faq-answer__inner,
	.faq-item__icon::before,
	.faq-item__icon::after,
	.faq__more {
		transition: none;
	}

	.faq__more:hover {
		transform: none;
	}
}
