/* Plantilla "FAQs (ACF)" — template-faqs.php + inc/faqs.php (nov 2026) */

.cml-faqs {
	--cml-blue: #2f4bc4;
	--cml-blue-dark: #1f35a0;
	--cml-ink: #1d2433;
	--cml-text: #3a4254;
	--cml-muted: #4a5367;
	--cml-line: #e3e8f5;
	--cml-soft: #eef1fb;
	margin: -80px 0 64px; /* sube la cabecera hasta las migas de pan (el contenedor de Bridge trae 80px arriba) */
	font-family: 'Work Sans', sans-serif;
	color: var(--cml-ink);
}
.cml-faqs *,
.cml-faqs *::before,
.cml-faqs *::after { box-sizing: border-box; }

/* Cabecera a todo el ancho: título + intro + imagen destacada, alineados con el contenedor de 1170px */
.cml-faqs .cml-faqs__hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 40px;
	width: auto;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 56px max(32px, calc(50vw - 585px)) 64px;
	background: #eaefff;
}
.cml-faqs__hero-text { flex: 1 1 380px; min-width: 0; }
.cml-faqs .cml-faqs__title {
	margin: 0;
	font-family: inherit;
	font-size: 42px;
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--cml-ink);
}
.cml-faqs .cml-faqs__intro {
	margin: 16px 0 0;
	max-width: 520px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--cml-muted);
}
.cml-faqs__image { flex: 1 1 420px; min-width: 0; margin: 0; }
.cml-faqs__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 18px;
}

/* Cuerpo: menú de categorías + preguntas */
.cml-faqs__body {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 32px;
	margin-top: 40px;
}
.cml-faqs__nav {
	flex: 0 0 270px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px;
	border: 1px solid var(--cml-line);
	border-radius: 16px;
	background: #fff;
}
.cml-faqs .cml-faqs__navlink {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--cml-text);
	text-decoration: none;
	transition: background-color .15s;
}
.cml-faqs .cml-faqs__navlink:hover { background: #f3f5fd; color: var(--cml-ink); }
.cml-faqs .cml-faqs__navlink.is-active { background: var(--cml-blue); color: #fff; font-weight: 600; }
.cml-faqs__num { font-size: 12px; font-weight: 700; color: #5b6478; }
.cml-faqs__navlink.is-active .cml-faqs__num { color: #dce3ff; }
.cml-faqs__navtitle { flex: 1; }
.cml-faqs__count {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: var(--cml-soft);
	color: var(--cml-blue);
}
.cml-faqs__navlink.is-active .cml-faqs__count { background: #4a63d0; color: #fff; }

.cml-faqs__content { flex: 999 1 520px; min-width: 0; }
.cml-faqs__cat + .cml-faqs__cat { margin-top: 48px; }
.cml-faqs.is-js .cml-faqs__cat + .cml-faqs__cat { margin-top: 0; }
.cml-faqs.is-js .cml-faqs__cat[hidden] { display: none; }
.cml-faqs__cathead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cml-faqs__badge {
	flex: 0 0 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: var(--cml-blue);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}
.cml-faqs .cml-faqs__cattitle {
	margin: 0;
	font-family: inherit;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cml-ink);
}

/* Preguntas */
.cml-faqs__item {
	margin-bottom: 12px;
	overflow: hidden;
	border: 1px solid var(--cml-line);
	border-radius: 16px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.cml-faqs__item[open] { border-color: var(--cml-blue); box-shadow: 0 10px 28px rgba(47, 75, 196, .12); }
.cml-faqs__item summary {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 22px;
	cursor: pointer;
	list-style: none;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--cml-ink);
}
.cml-faqs__item summary::-webkit-details-marker { display: none; }
.cml-faqs__item summary::marker { content: ''; }
.cml-faqs__item summary:hover { background: #f8f9ff; }
.cml-faqs__item summary:focus-visible { outline: 3px solid #9db0ff; outline-offset: -3px; }
.cml-faqs__q { flex: 1; }
.cml-faqs__icon {
	flex: 0 0 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--cml-soft);
	color: var(--cml-blue);
	transition: transform .2s, background-color .2s;
}
.cml-faqs__item[open] .cml-faqs__icon { background: var(--cml-blue); color: #fff; transform: rotate(45deg); }
.cml-faqs__answer {
	max-width: 720px;
	padding: 0 22px 22px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--cml-text);
}
.cml-faqs__answer p,
.cml-faqs__answer ul,
.cml-faqs__answer ol { margin: 0 0 12px; }
.cml-faqs__answer > :last-child { margin-bottom: 0; }
.cml-faqs__answer ul,
.cml-faqs__answer ol { padding-left: 22px; }
.cml-faqs__answer li { margin-bottom: 4px; }
.cml-faqs__answer a { color: var(--cml-blue); text-decoration: underline; }
.cml-faqs__answer a:hover { color: var(--cml-blue-dark); }

/* FAQs de otros grupos */
.cml-faqs__others { margin-top: 56px; }
.cml-faqs .cml-faqs__others-title {
	margin: 0 0 18px;
	font-family: inherit;
	font-size: 24px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cml-ink);
}
.cml-faqs__others-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
}
.cml-faqs .cml-faqs__other {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	min-height: 120px;
	padding: 20px;
	border: 1px solid var(--cml-line);
	border-radius: 16px;
	background: #fff;
	text-decoration: none;
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cml-faqs .cml-faqs__other:hover,
.cml-faqs .cml-faqs__other:focus-visible {
	transform: translateY(-3px);
	border-color: var(--cml-blue);
	box-shadow: 0 10px 24px rgba(29, 36, 51, .10);
}
.cml-faqs__other-name { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--cml-ink); }
.cml-faqs__other-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--cml-blue); }

/* Bloque final de contacto */
.cml-faqs__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 56px;
	padding: 40px 48px;
	border-radius: 24px;
	background: var(--cml-blue);
	color: #fff;
}
.cml-faqs__cta-text { max-width: 560px; }
.cml-faqs .cml-faqs__cta-title { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; color: #fff; }
.cml-faqs .cml-faqs__cta-sub { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: #dce3ff; }
.cml-faqs__cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cml-faqs .cml-faqs__btn {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 12px 24px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.cml-faqs .cml-faqs__btn--light { background: #fff; color: var(--cml-blue); }
.cml-faqs .cml-faqs__btn--light:hover { background: #eef1fb; color: var(--cml-blue-dark); }

/* Móvil: categorías en una fila deslizable */
@media (max-width: 760px) {
	.cml-faqs { margin-top: -50px; }
	.cml-faqs .cml-faqs__hero { gap: 20px; padding: 28px 20px 32px; }
	.cml-faqs .cml-faqs__title { font-size: 30px; }
	.cml-faqs .cml-faqs__intro { font-size: 16px; }
	/* En móvil el contenedor de Bridge no tiene padding lateral */
	.cml-faqs__body { gap: 20px; margin-top: 24px; padding: 0 16px; }
	.cml-faqs__nav {
		flex: 1 1 100%;
		flex-direction: row;
		gap: 8px;
		overflow-x: auto;
		padding: 0 0 4px;
		border: 0;
		background: transparent;
		scrollbar-width: none;
	}
	.cml-faqs__nav::-webkit-scrollbar { display: none; }
	.cml-faqs .cml-faqs__navlink {
		flex: 0 0 auto;
		white-space: nowrap;
		padding: 10px 14px;
		border-radius: 999px;
		background: #fff;
		box-shadow: inset 0 0 0 1px var(--cml-line);
		font-size: 14px;
	}
	.cml-faqs__count { display: none; }
	.cml-faqs .cml-faqs__cattitle { font-size: 21px; }
	.cml-faqs__badge { flex-basis: 40px; height: 40px; font-size: 14px; border-radius: 12px; }
	.cml-faqs__item summary { padding: 16px; font-size: 16px; gap: 12px; }
	.cml-faqs__icon { flex-basis: 32px; height: 32px; }
	.cml-faqs__answer { padding: 0 16px 18px; font-size: 15px; }
	.cml-faqs__others { margin: 40px 16px 0; }
	.cml-faqs .cml-faqs__others-title { font-size: 20px; }
	.cml-faqs__others-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.cml-faqs .cml-faqs__other { min-height: 0; flex-direction: row; align-items: center; padding: 16px; }
	.cml-faqs__other-more { flex-shrink: 0; }
	.cml-faqs__cta { margin: 40px 16px 0; padding: 28px 22px; border-radius: 20px; }
	.cml-faqs .cml-faqs__cta-title { font-size: 22px; }
}
