/* template-parts/section/faq.php */
/* ----------------------------------------------------------
   FAQ SECTION
---------------------------------------------------------- */
.faq {
	background-color: var(--color-white);
	padding: var(--section-py) var(--section-px);
}

.faq__container {
	max-width: var(--container-max);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 60px;
}

.faq__heading {
	font-size: var(--fs-3xl);
	font-weight: 700;
	line-height: var(--lh-2xl);
	color: var(--color-text-dark);
	text-align: center;
}

.faq__list {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.faq__item {
	border-bottom: 1px solid var(--color-border-light);
	gap: 24px;
}

.faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 30px 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	gap: 24px;
}

.faq__item:first-child .faq__question {
	padding-top: 0;
}

.faq__item--open .faq__question {
	padding-bottom: 17px;
}

/* Question text */
.faq__question > span:first-child {
	font-size: var(--fs-lg);
	font-weight: 700;
	line-height: 26px;
	color: var(--color-text-dark);
	max-width: 1000px;
	flex: 1;
}

/* CSS plus / minus icon */
.faq__question > span:last-child {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.faq__question > span:last-child::before,
.faq__question > span:last-child::after {
	content: "";
	position: absolute;
	background-color: var(--color-text-dark);
}

/* Horizontal bar — always visible */
.faq__question > span:last-child::before {
	width: 14px;
	height: 1.5px;
}

/* Vertical bar — visible when closed, hidden when open */
.faq__question > span:last-child::after {
	width: 1.5px;
	height: 14px;
}
.faq__item--open .faq__question > span:last-child::after {
	display: none;
}

/* CSS grid trick: animates from 0 height to full height without JS measuring */
.faq__answer {
	display: grid;
	grid-template-rows: 0fr;
	transition:
		grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq__answer-text {
	overflow: hidden;
	min-height: 0;
	padding-bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 32px;
	transition: padding-bottom 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq__item--open .faq__answer {
	grid-template-rows: 1fr;
}

.faq__item--open .faq__answer-text {
	padding-bottom: 30px;
}

.faq__answer-text p {
	font-size: var(--fs-md);
	font-weight: 400;
	line-height: var(--lh-sm);
	color: var(--color-text-dark);
	max-width: 1140px;
}

@media (max-width: 1024px) {
	.faq {
		padding: var(--section-py) var(--section-px);
	}
}

@media (max-width: 767.9px) {
	.faq {
		padding: var(--section-py) var(--section-px);
	}
	.faq__heading {
		font-size: var(--fs-2xl);
		line-height: var(--lh-xl);
	}
	.faq__question > span:first-child {
		font-size: var(--fs-sm);
		line-height: 22px;
	}
}
