/**
 * Frontend — Sección Programas CLU
 */

.sp-clusections-group {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.sp-clusections--block {
	position: relative;
}

.sp-clusections--block + .sp-clusections--block {
	margin-top: 0;
}

.sp-clusections {
	--sp-teal: #1a6b6b;
	--sp-teal-dark: #145656;
	--sp-teal-light: #2a8585;
	--sp-white: #ffffff;
	--sp-text: #333333;
	--sp-text-muted: #555555;
	--sp-radius: 16px;
	--sp-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	max-width: 1100px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--sp-text);
	box-sizing: border-box;
}

.sp-clusections *,
.sp-clusections *::before,
.sp-clusections *::after {
	box-sizing: border-box;
}

/* —— Sección 1 —— */
.sp-section-1 {
	position: relative;
	z-index: 2;
	text-align: center;
	margin-bottom: 1.5rem;
}

.sp-section-1__trigger {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
	text-align: left;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Elementor / temas suelen forzar flex en botones y encoger el banner */
.elementor .sp-section-1__trigger,
.elementor-widget .sp-section-1__trigger {
	display: block;
	width: 100%;
	max-width: 100%;
}

.sp-section-1__trigger:hover,
.sp-section-1__trigger:focus,
.sp-section-1__trigger:active,
.sp-section-1__trigger:focus-visible {
	outline: none;
	box-shadow: none;
	background: transparent !important;
	background-color: transparent !important;
}

.elementor .sp-section-1__trigger:hover,
.elementor .sp-section-1__trigger:focus,
.elementor .sp-section-1__trigger:active,
.elementor-widget .sp-section-1__trigger:hover,
.elementor-widget .sp-section-1__trigger:focus,
.elementor-widget .sp-section-1__trigger:active {
	background: transparent !important;
	background-color: transparent !important;
}

.sp-section-1__trigger.is-active .sp-section-1__image-wrap {
	box-shadow: none;
}

.sp-clusections .sp-section-1__trigger.is-active .sp-section-1__media > .sp-section-1__image,
.sp-clusections .sp-section-1__trigger.is-active .sp-section-1__media > .sp-section-1__placeholder {
	transform: scale(1.02);
}

.sp-clusections .sp-section-1__trigger:hover .sp-section-1__media > .sp-section-1__image,
.sp-clusections .sp-section-1__trigger:hover .sp-section-1__media > .sp-section-1__placeholder,
.sp-clusections .sp-section-1__trigger:focus-visible .sp-section-1__media > .sp-section-1__image,
.sp-clusections .sp-section-1__trigger:focus-visible .sp-section-1__media > .sp-section-1__placeholder,
.sp-clusections .sp-section-1__image-wrap:hover .sp-section-1__media > .sp-section-1__image,
.sp-clusections .sp-section-1__image-wrap:hover .sp-section-1__media > .sp-section-1__placeholder {
	transform: scale(1.05);
}

.sp-section-1__image-wrap {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 7;
	overflow: hidden;
	background: transparent;
	line-height: 0;
}

.sp-section-1__trigger:hover .sp-section-1__image-wrap,
.sp-section-1__trigger:focus-visible .sp-section-1__image-wrap,
.sp-section-1__trigger:active .sp-section-1__image-wrap {
	background: transparent;
}

/* Fallback si aspect-ratio no aplica (contenedor con altura definida) */
@supports not (aspect-ratio: 16 / 7) {
	.sp-section-1__image-wrap::before {
		content: "";
		display: block;
		padding-top: 43.75%; /* 7 / 16 */
	}
}

.sp-section-1__image-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.08) 0%,
		rgba(0, 0, 0, 0.25) 50%,
		rgba(0, 0, 0, 0.55) 100%
	);
}

.sp-section-1__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.sp-clusections .sp-section-1__media > .sp-section-1__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	min-width: 100%;
	min-height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: none;
	object-fit: cover !important;
	object-position: center center;
	transform: scale(1);
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.sp-clusections .sp-section-1__media > .sp-section-1__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 2rem;
	background: #e8e8e8;
	color: var(--sp-text-muted);
	font-size: 0.95rem;
	transform: scale(1);
	transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-section-1__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1.75rem;
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	padding: 0 1.25rem;
	box-sizing: border-box;
	pointer-events: none;
	color: var(--sp-white);
}

.sp-section-1__overlay-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: max-content;
	max-width: 100%;
	text-align: center;
}

.sp-section-1__overlay-row {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	max-width: 100%;
}

.sp-section-1__overlay-icon-wrap {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #3eb8b8;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sp-section-1__overlay-icon {
	display: block;
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.sp-section-1__overlay-title {
	font-size: clamp(0.95rem, 2.2vw, 1.35rem);
	font-weight: 900;
	line-height: 1.15;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: center;
	color: var(--sp-white);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
	-webkit-font-smoothing: antialiased;
}

.sp-section-1__overlay-subtitle {
	display: block;
	width: 100%;
	margin-top: 0.2rem;
	font-size: clamp(0.875rem, 1.8vw, 1.05rem);
	font-weight: 400;
	line-height: 1.25;
	text-align: center;
	color: var(--sp-white);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.sp-section-1__description {
	margin: 1.25rem auto 0;
	max-width: 640px;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.6;
	color: var(--sp-text);
}

/* —— Sección 2 (expandible con transición) —— */
.sp-section-2 {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	margin-top: 0;
	transition:
		grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.4s ease,
		margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* La sección cerrada del bloque anterior interceptaba el hover del siguiente (p. ej. bloque 3) */
.sp-section-2[aria-hidden="true"],
.sp-section-2.is-closing {
	pointer-events: none;
}

.sp-section-2__inner {
	overflow: hidden;
	min-height: 0;
}

.sp-section-2.is-open,
.sp-section-2.is-opening {
	grid-template-rows: 1fr;
	opacity: 1;
	margin-top: 1.5rem;
}

.sp-section-2.is-open .sp-section-2__inner {
	animation: sp-fade-in-up 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.08s both;
}

.sp-section-2.is-closing .sp-section-2__inner {
	animation: sp-fade-out-up 0.35s ease both;
}

@keyframes sp-fade-in-up {
	from {
		opacity: 0;
		transform: translateY(-12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes sp-fade-out-up {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(-8px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-section-2,
	.sp-section-2__inner,
	.sp-section-1__media > .sp-section-1__image,
	.sp-section-1__media > .sp-section-1__placeholder,
	.sp-section-1__trigger {
		transition: none !important;
		animation: none !important;
	}

	.sp-section-2.is-open,
	.sp-section-2.is-opening {
		grid-template-rows: 1fr;
		opacity: 1;
	}
}

/* —— ¿Qué incluye? —— */
.sp-includes {
	position: relative;
	width: 100%;
	min-height: clamp(280px, 36vw, 420px);
	padding: clamp(2.5rem, 6vw, 5rem);
	margin-bottom: 2rem;
	overflow: hidden;
	/* Color por defecto; el inline del admin lo sobrescribe */
	background-color: var(--sp-includes-bg, #1f6668);
	clip-path: none;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
	color: var(--sp-white);
}

/* Círculos decorativos (anillos) */
.sp-includes::before,
.sp-includes::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

.sp-includes::before {
	width: 700px;
	height: 700px;
	left: -280px;
	bottom: -340px;
	border: 120px solid rgba(255, 255, 255, 0.06);
}

.sp-includes::after {
	width: 650px;
	height: 650px;
	right: -180px;
	top: -180px;
	border: 100px solid rgba(255, 255, 255, 0.06);
}

.sp-includes__circle-center {
	position: absolute;
	width: 500px;
	height: 500px;
	left: 18%;
	bottom: -260px;
	border-radius: 50%;
	border: 90px solid rgba(255, 255, 255, 0.05);
	pointer-events: none;
	z-index: 0;
}

.sp-includes__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	width: 100%;
}

.sp-includes__content {
	flex: 1 1 280px;
	max-width: 58%;
}

.sp-includes__heading {
	margin: 0 0 1.15rem;
	line-height: 1.2;
	color: var(--sp-white);
	/* font-size y font-weight se configuran desde el admin (inline) */
}

.sp-includes__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sp-includes__list li {
	position: relative;
	margin-bottom: 0.5rem;
	padding-left: 1.1rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.95);
	/* font-size y font-weight heredados del <ul> (config admin) */
}

.sp-includes__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--sp-white);
}

.sp-includes__cta {
	flex-shrink: 0;
	align-self: flex-start;
}

/* —— Botones —— */
.sp-btn {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
	border: none;
	text-align: center;
	white-space: nowrap;
}

.sp-btn--light {
	background: var(--sp-white);
	color: #1f6668;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	padding: 0.7rem 1.35rem;
	border-radius: 10px;
	font-weight: 600;
}

.sp-btn--light:hover,
.sp-btn--light:focus {
	background: #f5fafa;
	color: #1f6668;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.sp-btn--primary {
	background: var(--sp-teal);
	color: var(--sp-white);
	width: 100%;
}

.sp-btn--primary:hover,
.sp-btn--primary:focus {
	background: var(--sp-teal-dark);
	color: var(--sp-white);
}

.sp-link-disabled {
	opacity: 0.65;
	pointer-events: none;
	cursor: default;
}

/* —— Tarjetas de precio —— */
.sp-pricing {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.sp-pricing__card {
	display: flex;
	flex-direction: column;
	padding: 1.75rem 1.5rem;
	background: var(--sp-white);
	box-shadow: var(--sp-shadow);
	border: 1px solid #eee;
	text-align: center;
}

.sp-pricing__price {
	margin: 0 0 1.25rem;
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--sp-text);
	line-height: 1.2;
}

.sp-pricing__features {
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	text-align: left;
	flex-grow: 1;
}

.sp-pricing__features li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.88rem;
	color: var(--sp-text-muted);
	line-height: 1.4;
}

.sp-pricing__check {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	background: #2ecc71;
	border-radius: 50%;
	position: relative;
}

.sp-pricing__check::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 3px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.sp-pricing__title {
	margin: 0 0 1.25rem;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--sp-text);
	text-transform: uppercase;
}

.sp-pricing__btn-wrap {
	margin-top: auto;
}

/* —— Responsive —— */
@media (max-width: 900px) {
	.sp-pricing {
		grid-template-columns: 1fr;
		max-width: 400px;
		margin: 0 auto;
	}

	.sp-includes {
		padding: 2.5rem 1.5rem;
		min-height: auto;
	}

	.sp-includes::before {
		width: 420px;
		height: 420px;
		left: -200px;
		bottom: -220px;
		border-width: 70px;
	}

	.sp-includes::after {
		width: 380px;
		height: 380px;
		right: -120px;
		top: -120px;
		border-width: 60px;
	}

	.sp-includes__circle-center {
		width: 300px;
		height: 300px;
		left: 10%;
		bottom: -160px;
		border-width: 50px;
	}

	.sp-includes__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.sp-includes__content {
		max-width: 100%;
	}

	.sp-includes__cta {
		width: 100%;
	}

	.sp-includes__cta .sp-btn {
		display: block;
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.sp-section-1__overlay {
		bottom: 1rem;
		padding: 0 0.75rem;
	}

	.sp-section-1__overlay-row {
		gap: 0.6rem;
	}

	.sp-section-1__overlay-title {
		font-size: 0.9rem;
	}

	.sp-section-1__overlay-icon-wrap {
		width: 40px;
		height: 40px;
	}

	.sp-section-1__overlay-icon {
		width: 18px;
		height: 18px;
	}

	.sp-pricing__price {
		font-size: 1.5rem;
	}
}
