/* Magenta Catálogo – Terapias */

.mgc-th {
	--th-accent: var(--mgc-bg, #c2185b);
	--th-accent-2: #7b1fa2;
	--th-ink: #1f1a24;
	--th-muted: #6b6274;
	--th-soft: #fbf3f7;
	--th-line: #eadbe4;
	--th-radius: 18px;
	color: var(--th-ink);
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 40px;
}

.mgc-th *,
.mgc-th *::before,
.mgc-th *::after {
	box-sizing: border-box;
}

/* ---------- Encabezado ---------- */

.mgc-th-hero {
	text-align: center;
	padding: 56px 20px 44px;
	margin: 0 -16px 32px;
	border-radius: 0 0 32px 32px;
	color: #fff;
	background:
		radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .18), transparent 40%),
		radial-gradient(circle at 85% 80%, rgba(255, 255, 255, .12), transparent 45%),
		linear-gradient(135deg, var(--th-accent), var(--th-accent-2));
}

.mgc-th-eyebrow {
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: 12px;
	opacity: .85;
	margin: 0 0 10px;
}

.mgc-th-title {
	color: #fff !important;
	font-size: clamp(28px, 5vw, 46px);
	line-height: 1.1;
	margin: 0 0 14px;
}

.mgc-th-sub {
	max-width: 620px;
	margin: 0 auto 26px;
	font-size: 17px;
	opacity: .95;
}

.mgc-th-hero-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.mgc-th-hero .mgc-wa-btn {
	background: #fff !important;
	color: var(--th-accent) !important;
}

.mgc-th-trust {
	list-style: none;
	display: flex;
	gap: 8px 22px;
	justify-content: center;
	flex-wrap: wrap;
	margin: 26px 0 0;
	padding: 0;
	font-size: 14px;
}

/* ---------- Botones ---------- */

.mgc-th-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 999px;
	border: 2px solid var(--th-accent);
	background: var(--th-accent);
	color: #fff !important;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: transform .15s ease, background .15s ease, color .15s ease;
}

.mgc-th-btn:hover {
	transform: translateY(-1px);
}

.mgc-th-btn--ghost {
	background: transparent;
	color: var(--th-accent) !important;
}

.mgc-th-btn--ghost:hover {
	background: var(--th-soft);
}

.mgc-th-btn--light {
	background: rgba(255, 255, 255, .15);
	border-color: #fff;
}

.mgc-th-btn--link {
	background: none;
	border: 0;
	color: var(--th-muted) !important;
	text-decoration: underline !important;
	margin-top: 14px;
}

.mgc-th .mgc-wa-btn--therapy {
	font-size: 14px;
	padding: 10px 18px;
}

.mgc-th-btn:focus-visible,
.mgc-th-filters button:focus-visible,
.mgc-th-option input:focus-visible + span {
	outline: 2px solid var(--th-accent);
	outline-offset: 3px;
}

/* ---------- Filtros ---------- */

.mgc-th-filters {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 26px;
}

.mgc-th-filters button {
	border: 1.5px solid var(--th-line);
	background: #fff;
	color: var(--th-ink);
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 14px;
	cursor: pointer;
	transition: all .15s ease;
}

.mgc-th-filters button.is-active,
.mgc-th-filters button:hover {
	border-color: var(--th-accent);
	background: var(--th-accent);
	color: #fff;
}

/* ---------- Tarjetas ---------- */

.mgc-th-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 22px;
}

.mgc-th-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--th-line);
	border-radius: var(--th-radius);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}

.mgc-th-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(123, 31, 162, .14);
}

.mgc-th-card[hidden] {
	display: none;
}

.mgc-th-card.is-featured {
	border-color: var(--th-accent);
	box-shadow: 0 0 0 2px rgba(194, 24, 91, .15);
}

.mgc-th-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	background: #fff;
	color: var(--th-accent);
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.mgc-th-card-media,
.mgc-th-dialog-media {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--th-soft), #f3e5f5);
}

.mgc-th-card-media {
	height: 150px;
}

.mgc-th-card-media span,
.mgc-th-dialog-media span {
	font-size: 58px;
	line-height: 1;
	transition: transform .3s ease;
}

.mgc-th-card:hover .mgc-th-card-media span {
	transform: scale(1.12) rotate(-6deg);
}

.mgc-th-card-media.has-image,
.mgc-th-dialog-media.has-image {
	padding: 0;
}

.mgc-th-card-media img,
.mgc-th-dialog-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mgc-th-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 18px 20px;
}

.mgc-th-card-title {
	font-size: 19px;
	margin: 0 0 8px;
	line-height: 1.25;
}

.mgc-th-card-excerpt {
	color: var(--th-muted);
	font-size: 14.5px;
	margin: 10px 0 16px;
	flex: 1;
}

.mgc-th-card-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.mgc-th-card-actions > * {
	flex: 1 1 auto;
}

.mgc-th-chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}

.mgc-th-chips li {
	background: var(--th-soft);
	color: var(--th-accent);
	font-size: 12px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
	margin: 0;
}

.mgc-th-card.is-pop {
	animation: mgc-th-pop .35s ease;
}

@keyframes mgc-th-pop {
	from { opacity: 0; transform: scale(.96); }
	to { opacity: 1; transform: none; }
}

.mgc-th-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .5s ease, transform .5s ease;
}

.mgc-th-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* ---------- Ventana de detalle ---------- */

html.mgc-th-lock {
	overflow: hidden;
}

.mgc-th-dialog {
	width: min(640px, calc(100% - 24px));
	max-width: min(640px, calc(100% - 24px));
	max-height: calc(100% - 40px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 22px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	color: var(--th-ink);
	overflow: auto;
}

.mgc-th-dialog::backdrop {
	background: rgba(31, 10, 40, .6);
	backdrop-filter: blur(3px);
}

.mgc-th-dialog[open] {
	animation: mgc-th-in .25s ease;
}

@keyframes mgc-th-in {
	from { opacity: 0; transform: translateY(20px) scale(.98); }
	to { opacity: 1; transform: none; }
}

.mgc-th-dialog-inner {
	position: relative;
	padding: 0 26px 26px;
}

.mgc-th-dialog-media {
	height: 170px;
	margin: 0 -26px 20px;
}

.mgc-th-dialog h2 {
	font-size: 26px;
	margin: 0 0 10px;
}

.mgc-th-dialog h3,
.mgc-th-single h3 {
	font-size: 17px;
	margin: 22px 0 10px;
}

.mgc-th-dialog-content {
	margin-top: 16px;
	font-size: 15.5px;
	line-height: 1.6;
}

.mgc-th-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: #fff;
	color: var(--th-ink);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.mgc-th-dialog-cta {
	position: sticky;
	bottom: -26px;
	margin: 22px -26px -26px;
	padding: 16px 26px;
	background: rgba(255, 255, 255, .96);
	border-top: 1px solid var(--th-line);
}

.mgc-th-single .mgc-th-dialog-cta {
	position: static;
	margin: 24px 0 0;
	padding: 0;
	border: 0;
	background: none;
}

.mgc-th-dialog-cta .mgc-wa-btn {
	width: 100%;
	font-size: 16px;
	padding: 14px 20px;
}

.mgc-th-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mgc-th-list li {
	position: relative;
	padding: 6px 0 6px 28px;
	margin: 0;
}

.mgc-th-list li::before {
	position: absolute;
	left: 0;
	top: 6px;
	font-weight: 700;
	color: var(--th-accent);
}

.mgc-th-list--check li::before {
	content: "✓";
}

.mgc-th-list--ideal li::before {
	content: "→";
}

.mgc-th-faq details {
	border: 1px solid var(--th-line);
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 8px;
}

.mgc-th-faq summary {
	cursor: pointer;
	font-weight: 600;
}

.mgc-th-faq details p {
	margin: 10px 0 0;
	color: var(--th-muted);
}

/* ---------- Cómo funciona ---------- */

.mgc-th-steps {
	margin: 56px 0 0;
	text-align: center;
}

.mgc-th-steps h2,
.mgc-th-quiz h2 {
	font-size: clamp(24px, 3.5vw, 32px);
	margin: 0 0 24px;
}

.mgc-th-steps ol {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.mgc-th-steps li {
	background: var(--th-soft);
	border-radius: var(--th-radius);
	padding: 26px 20px;
	margin: 0;
}

.mgc-th-steps li > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--th-accent);
	color: #fff;
	font-weight: 700;
	margin-bottom: 12px;
}

.mgc-th-steps li strong {
	display: block;
	font-size: 17px;
	margin-bottom: 6px;
}

.mgc-th-steps li p {
	margin: 0;
	color: var(--th-muted);
	font-size: 14.5px;
}

/* ---------- Cuestionario ---------- */

.mgc-th-quiz {
	margin: 56px auto 0;
	max-width: 760px;
	padding: 34px 26px;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--th-line);
	box-shadow: 0 18px 40px rgba(123, 31, 162, .08);
	text-align: center;
	scroll-margin-top: 90px;
}

.mgc-th-quiz h2 {
	margin-bottom: 6px;
}

.mgc-th-quiz-sub {
	color: var(--th-muted);
	margin: 0 0 24px;
}

.mgc-th-step {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.mgc-th-step[hidden] {
	display: none;
}

.mgc-th-step legend {
	font-size: 18px;
	font-weight: 700;
	margin: 0 auto 16px;
	padding: 0;
}

.mgc-th-step legend small {
	font-weight: 400;
	color: var(--th-muted);
	font-size: 14px;
}

.mgc-th-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 10px;
	text-align: left;
}

.mgc-th-option {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.mgc-th-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mgc-th-option span {
	display: block;
	padding: 14px 16px 14px 44px;
	border: 1.5px solid var(--th-line);
	border-radius: 14px;
	font-size: 15px;
	transition: all .15s ease;
	position: relative;
}

.mgc-th-option span::before {
	content: "";
	position: absolute;
	left: 16px;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border: 2px solid var(--th-line);
	border-radius: 6px;
	background: #fff;
	transition: all .15s ease;
}

.mgc-th-option input[type="radio"] + span::before {
	border-radius: 50%;
}

.mgc-th-option input:checked + span {
	border-color: var(--th-accent);
	background: var(--th-soft);
}

.mgc-th-option input:checked + span::before {
	border-color: var(--th-accent);
	background: var(--th-accent);
	box-shadow: inset 0 0 0 3px #fff;
}

.mgc-th-quiz-error {
	color: #b00020;
	font-size: 14px;
	margin: 12px 0 0;
}

.mgc-th-quiz-nav {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 22px;
}

.mgc-th-quiz-nav [hidden] {
	display: none;
}

.mgc-th-progress {
	height: 6px;
	border-radius: 999px;
	background: var(--th-soft);
	margin-top: 22px;
	overflow: hidden;
}

.mgc-th-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--th-accent), var(--th-accent-2));
	transition: width .3s ease;
}

.mgc-th-quiz-result h3 {
	font-size: 22px;
	margin: 0 0 16px;
	outline: none;
}

.mgc-th-result-list {
	display: grid;
	gap: 12px;
	text-align: left;
}

.mgc-th-result {
	border: 1.5px solid var(--th-line);
	border-radius: 16px;
	padding: 16px 18px;
}

.mgc-th-result.is-top {
	border-color: var(--th-accent);
	background: var(--th-soft);
}

.mgc-th-result-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--th-accent);
	margin-bottom: 4px;
}

.mgc-th-result strong {
	display: block;
	font-size: 18px;
	margin-bottom: 12px;
}

/* ---------- Varios ---------- */

.mgc-th-empty {
	text-align: center;
	color: var(--th-muted);
	font-size: 16px;
}

.mgc-th-note {
	margin: 40px auto 0;
	max-width: 680px;
	text-align: center;
	font-size: 13px;
	color: var(--th-muted);
}

.mgc-th-single {
	padding: 0;
	margin: 16px 0;
}

@media (max-width: 600px) {
	.mgc-th-hero {
		padding: 40px 16px 32px;
		border-radius: 0 0 24px 24px;
	}

	.mgc-th-hero-actions > * {
		width: 100%;
	}

	/* Hoja inferior a todo lo ancho. El navegador limita el ancho de <dialog>
	   (max-width: calc(100% - 2em)) y por eso quedaba corrida a la izquierda. */
	.mgc-th-dialog,
	.mgc-th-dialog:modal {
		position: fixed;
		inset: auto 0 0 0;
		width: 100%;
		max-width: 100%;
		max-height: 92dvh;
		margin: 0;
		border-radius: 22px 22px 0 0;
	}

	.mgc-th-dialog[open] {
		animation: mgc-th-up .28s ease;
	}

	@keyframes mgc-th-up {
		from { transform: translateY(100%); }
		to { transform: none; }
	}

	.mgc-th-quiz {
		padding: 26px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mgc-th *,
	.mgc-th-dialog[open] {
		animation: none !important;
		transition: none !important;
	}
}
