/* ============================================================
   FAQ accordion - shared styling
   ============================================================

   The +/- question list used on the SREC, Geothermal REC, DIY sales and
   GREC calculator pages. Moved here verbatim from srec-faq.css so a page can
   have the FAQ without the rest of that file's page layout.

   Colours come from the --fe-* tokens in styles.css; the geothermal pages
   swap them for the olive palette. Link it straight after srec-faq.css on
   pages that load both, which keeps the cascade order it always had.

   Pairs with js/faq-accordion.js.
   ============================================================ */

.faq-accordion {
	max-width: 800px;
	margin: 0 auto;
}

.faq-item {
	border-left: 3px solid transparent;
	padding: 20px 0 20px 20px;
	transition: border-color 0.3s ease;
}

.faq-item:hover {
	border-left-color: var(--fe-light-green-1);
}

.faq-item.active {
	border-left-color: var(--fe-primary-green);
}

.faq-item:not(:last-child) {
	border-bottom: 1px solid #f0f0f0;
}

.faq-question {
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

.faq-question h5 {
	color: var(--fe-dark-green-1);
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0;
	flex: 1;
	padding-right: 20px;
}

.faq-toggle {
	font-size: 28px;
	color: var(--fe-primary-green);
	font-weight: 300;
	transition: transform 0.3s ease;
	min-width: 28px;
	text-align: center;
	line-height: 1;
}

.faq-item.active .faq-toggle {
	transform: rotate(45deg);
}

.faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, padding 0.4s ease;
	padding: 0;
}

.faq-item.active .faq-answer {
	max-height: 500px;
	padding: 16px 0 0 0;
}

.faq-answer p {
	color: var(--dark-grey);
	margin: 0;
	line-height: 1.6;
	margin-bottom: 15px;
}

.faq-answer a {
	color: var(--fe-primary-green);
	font-weight: 500;
}

.faq-answer a:hover {
	color: var(--fe-dark-green-1);
}

@media (max-width: 768px) {
	.faq-item {
		padding: 16px 0 16px 16px;
	}

	.faq-question h5 {
		font-size: 1rem;
	}

	.faq-toggle {
		font-size: 24px;
		min-width: 24px;
	}

	.faq-item.active .faq-answer {
		padding: 12px 0 0 0;
	}
}
