/* =========================================================
   Xtellaris FAQ Widget — xt-faq.css
   Usa max-height: 0 → max-height: X px (igual que kc-faq)
   ========================================================= */

/* ── Reset ──────────────────────────────────────────────── */
.xt-faq-wrap *,
.xt-faq-wrap *::before,
.xt-faq-wrap *::after {
	box-sizing: border-box;
}

/* ── Root wrapper ───────────────────────────────────────── */
.xt-faq-wrap {
	position: relative;
	overflow: hidden;
}

/* ── Decorative arcs (top-right) ────────────────────────── */
.xt-faq__deco {
	position: absolute;
	top: 0;
	right: 0;
	width: 320px;
	height: 320px;
	pointer-events: none;
	z-index: 0;
	overflow: visible;
}

.xt-faq__deco svg {
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* ── Section header ─────────────────────────────────────── */
.xt-faq__header {
	position: relative;
	z-index: 1;
	margin-bottom: 48px;
	text-align: left;
}

.xt-faq__title {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #0a0a0a;
	margin: 0 0 10px;
}

.xt-faq__subtitle {
	font-size: 1rem;
	color: #6b7280;
	margin: 0;
	line-height: 1.6;
}

/* ── FAQ List container ─────────────────────────────────── */
.xt-faq__list {
	position: relative;
	z-index: 1;
	background-color: #f8f9fb;
	border-radius: 16px;
	overflow: hidden;
}

/* ── Individual FAQ item ────────────────────────────────── */
.xt-faq-item {
	border-top: 1px solid #e5e7eb;
	transition: background-color 0.2s ease;
}

.xt-faq-item:first-child {
	border-top: none;
}

/* ── Trigger (div con role=button) ─────────────────────── */
.xt-faq-item__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 28px;
	background: none;
	border: none;
	cursor: pointer;
	user-select: none;
	text-align: left;
	transition: background-color 0.2s ease;
}

.xt-faq-item__trigger:focus-visible {
	outline: 2px solid #1e8eff;
	outline-offset: -2px;
	border-radius: 4px;
}

/* ── Question text ──────────────────────────────────────── */
.xt-faq-item__question {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	color: #111827;
	flex: 1;
	transition: color 0.2s ease;
}

.xt-faq-item.is-open .xt-faq-item__question {
	color: #1e8eff;
}

/* ── Chevron icon ───────────────────────────────────────── */
.xt-faq-item__icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: #9ca3af;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.xt-faq-item__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.xt-faq-item.is-open .xt-faq-item__icon {
	transform: rotate(180deg);
	color: #1e8eff;
}

/* ── Accordion content — max-height approach (simple y fiable) ── */
.xt-faq-item__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease-out;
}

.xt-faq-item.is-open .xt-faq-item__content {
	max-height: 1000px; /* Valor muy alto; la transición animará desde 0 */
	transition: max-height 0.45s ease-in;
}

/* ── Answer body ────────────────────────────────────────── */
.xt-faq-item__body {
	padding: 0 28px 24px;
}

/* ── Answer text ────────────────────────────────────────── */
.xt-faq-item__answer {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: #6b7280;
}

/* Proseable rich text elements inside answer */
.xt-faq-item__answer p {
	margin: 0 0 12px;
}

.xt-faq-item__answer p:last-child {
	margin-bottom: 0;
}

.xt-faq-item__answer ul,
.xt-faq-item__answer ol {
	padding-left: 20px;
	margin: 0 0 12px;
}

.xt-faq-item__answer a {
	color: #1e8eff;
	text-decoration: underline;
}

.xt-faq-item__answer strong {
	font-weight: 600;
	color: #374151;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
	.xt-faq__header {
		margin-bottom: 32px;
	}

	.xt-faq__title {
		font-size: 1.75rem;
	}

	.xt-faq-item__trigger {
		padding: 20px;
		gap: 16px;
	}

	.xt-faq-item__body {
		padding: 0 20px 20px;
	}

	.xt-faq__deco {
		width: 200px;
		height: 200px;
		opacity: 0.6;
	}
}

@media (max-width: 480px) {
	.xt-faq-item__trigger {
		padding: 18px 16px;
	}

	.xt-faq-item__body {
		padding: 0 16px 18px;
	}

	.xt-faq-item__question {
		font-size: 0.9375rem;
	}
}
