/* ===========================================================================
   Nexus FAQ Accordion — frontend styles.
   Lives in the Nexus theme so visual styling can be swapped with the theme
   without requiring a plugin update. Toggle behavior is native <details>/
   <summary> — no JavaScript required, fully click- and keyboard-accessible.
   =========================================================================== */

.nexus-faq-accordion {
	width: 100%;
	padding: clamp(64px, 7vw, 96px) 0;
	background: var(--nexus-cream);
}

.nexus-faq-accordion__header {
	max-width: 680px;
	margin: 0 auto clamp(36px, 4vw, 56px);
	text-align: center;
}

.nexus-faq-accordion__eyebrow {
	margin-top: 0;
	margin-bottom: 14px;
	color: var(--nexus-green);
	font-family: var(--nexus-font-body);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.28em;
	text-transform: uppercase;
}

.nexus-faq-accordion__heading {
	margin: 0;
	color: var(--nexus-green-deep);
	font-family: var(--nexus-font-display);
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.08;
}

.nexus-faq-accordion__heading em {
	color: var(--nexus-green);
	font-family: var(--nexus-font-serif);
	font-style: italic;
	font-weight: 500;
}

.nexus-faq-accordion__desc {
	max-width: 560px;
	margin: 16px auto 0;
	color: var(--nexus-muted, #6b6558);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.6;
}

.nexus-faq-accordion__desc > :first-child { margin-top: 0; }
.nexus-faq-accordion__desc > :last-child { margin-bottom: 0; }

/* ── List ───────────────────────────────────────────────────────────────── */

.nexus-faq-accordion__list {
	display: flex;
	max-width: 840px;
	margin: 0 auto;
	flex-direction: column;
	gap: 14px;
}

.nexus-faq-accordion__item {
	border: 1px solid var(--nexus-rule-soft);
	border-radius: var(--nexus-radius-md);
	background: var(--nexus-white);
	transition: border-color var(--nexus-transition, 0.18s ease), box-shadow var(--nexus-transition, 0.18s ease);
}

.nexus-faq-accordion__item[open] {
	border-color: var(--nexus-mint);
	box-shadow: var(--nexus-shadow-card);
}

/* ── Summary (question row) ────────────────────────────────────────────── */

.nexus-faq-accordion__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 22px 26px;
	list-style: none;
	color: var(--nexus-green-deep);
	cursor: pointer;
	font-family: var(--nexus-font-display);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

/* display:flex already removes the native marker in modern browsers; these
   two rules are a defensive fallback for older WebKit/Safari builds. */
.nexus-faq-accordion__question::-webkit-details-marker {
	display: none;
}

.nexus-faq-accordion__question::marker {
	content: "";
}

.nexus-faq-accordion__question:focus-visible {
	outline: 2px solid var(--nexus-green);
	outline-offset: 2px;
}

.nexus-faq-accordion__question-text {
	flex: 1 1 auto;
}

/* Plus/minus toggle icon, built from two CSS bars so no SVG/JS is needed. */
.nexus-faq-accordion__icon {
	position: relative;
	display: inline-block;
	flex: none;
	width: 18px;
	height: 18px;
}

.nexus-faq-accordion__icon::before,
.nexus-faq-accordion__icon::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 2px;
	background: var(--nexus-green);
	border-radius: 2px;
	content: "";
	transform: translate(-50%, -50%);
	transition: transform var(--nexus-transition, 0.18s ease);
}

.nexus-faq-accordion__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.nexus-faq-accordion__item[open] .nexus-faq-accordion__icon::after {
	transform: translate(-50%, -50%) rotate(0deg);
}

/* ── Answer ─────────────────────────────────────────────────────────────── */

.nexus-faq-accordion__answer {
	max-width: 72ch;
	padding: 0 26px 24px;
	color: var(--nexus-muted, #6b6558);
	font-size: 16px;
	line-height: 1.65;
}

.nexus-faq-accordion__answer > :first-child { margin-top: 0; }
.nexus-faq-accordion__answer > :last-child { margin-bottom: 0; }

.nexus-faq-accordion__answer a {
	color: var(--nexus-green);
	text-decoration: underline;
}

@media (max-width: 760px) {
	.nexus-faq-accordion__question {
		padding: 18px 20px;
		font-size: 16px;
	}

	.nexus-faq-accordion__answer {
		padding: 0 20px 20px;
	}
}
