/**
 * Conduflex FAQ - estilos del acordeón.
 * Variables sobreescribibles desde el tema para adaptar la marca.
 *
 * Diseñado para leerse bien sobre secciones oscuras (contexto Conduflex).
 * Los colores de texto usan !important para no ser pisados por el tema (Divi).
 */
.cfx-faq {
	--cfx-border: rgba(255, 255, 255, 0.12);
	--cfx-bg: #21242c;
	--cfx-bg-hover: #2a2e38;
	--cfx-text: #f2f3f5;
	--cfx-answer: #cfd3da;
	--cfx-accent: #f5a623; /* Amarillo de marca Conduflex */
	--cfx-radius: 10px;
	--cfx-gap: 14px;

	max-width: 900px;
	margin: 0 auto;
	/* Aire arriba (separación de la sección previa) y abajo (footer). */
	padding: 60px 0 80px;
	color: var(--cfx-text);
}

.cfx-faq__title {
	margin: 0 0 24px;
	font-size: 1.8rem;
	line-height: 1.25;
	/* El título va sobre el fondo claro de la página -> negro. */
	color: #1a1c22 !important;
}

.cfx-faq__list {
	display: flex;
	flex-direction: column;
	gap: var(--cfx-gap);
}

.cfx-faq__item {
	border: 1px solid var(--cfx-border);
	border-radius: var(--cfx-radius);
	background: var(--cfx-bg);
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.cfx-faq__item.is-open {
	border-color: var(--cfx-accent);
}

.cfx-faq__question {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: var(--cfx-text) !important;
}

.cfx-faq__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 20px 22px;
	border: 0;
	background: transparent;
	color: var(--cfx-text) !important;
	font: inherit;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.cfx-faq__trigger:hover,
.cfx-faq__trigger:focus-visible {
	background: var(--cfx-bg-hover);
}

.cfx-faq__trigger:focus-visible {
	outline: 2px solid var(--cfx-accent);
	outline-offset: -2px;
}

.cfx-faq__question-text {
	color: var(--cfx-text) !important;
}

.cfx-faq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.cfx-faq__icon::before,
.cfx-faq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: var(--cfx-accent);
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.cfx-faq__icon::before {
	width: 100%;
	height: 2px;
}

.cfx-faq__icon::after {
	width: 2px;
	height: 100%;
}

.cfx-faq__trigger[aria-expanded="true"] .cfx-faq__icon::after {
	transform: translate(-50%, -50%) scaleY(0);
	opacity: 0;
}

/* Animación de apertura con grid-template-rows (robusta, sin medir con JS). */
.cfx-faq__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.25s ease;
}

.cfx-faq__panel[hidden] {
	display: none;
}

.cfx-faq__item.is-open .cfx-faq__panel {
	grid-template-rows: 1fr;
}

.cfx-faq__answer {
	min-height: 0;
	overflow: hidden;
	padding: 0 22px;
	color: var(--cfx-answer) !important;
	font-size: 1rem;
	line-height: 1.6;
}

.cfx-faq__item.is-open .cfx-faq__answer {
	padding-bottom: 20px;
}

.cfx-faq__answer p,
.cfx-faq__answer li,
.cfx-faq__answer span {
	color: var(--cfx-answer) !important;
}

.cfx-faq__answer a {
	color: var(--cfx-accent) !important;
	text-decoration: underline;
}

.cfx-faq__answer > :first-child {
	margin-top: 0;
}

.cfx-faq__answer > :last-child {
	margin-bottom: 0;
}
