/* Home YouFormación — encapsulado en body.yf-home */

.yf-home #wrapper #main,
body.yf-home.home #wrapper #main {
	background: #fff;
	padding: 0;
}

.yf-home .container > .post_type_exist,
.yf-home .container > .text_block {
	display: none;
}

.yf-home-main {
	--yf-purple: #682682;
	--yf-purple-deep: #2a1038;
	--yf-purple-mid: #4a1b62;
	--yf-gold: #f2b100;
	--yf-ink: #1a1324;
	--yf-muted: #5c5666;
	--yf-line: #e8e2ee;
	--yf-soft: #f7f4fa;
	--yf-white: #fff;
	--yf-radius: 16px;
	--yf-wrap: 1120px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--yf-ink);
	line-height: 1.5;
}

.yf-home-main *,
.yf-home-main *::before,
.yf-home-main *::after {
	box-sizing: border-box;
}

.yf-wrap {
	width: min(100% - 32px, var(--yf-wrap));
	margin-inline: auto;
}

.yf-home-main h1,
.yf-home-main h2,
.yf-home-main h3 {
	margin: 0;
	font-weight: 750;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: inherit;
}

.yf-home-main h1 {
	font-size: clamp(2rem, 5vw, 3.4rem);
	max-width: 14ch;
}

.yf-home-main h2 {
	font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.yf-home-main h3 {
	font-size: 1.05rem;
}

.yf-lead {
	margin: 10px 0 0;
	max-width: 46rem;
	color: var(--yf-muted);
	font-size: 1.05rem;
}

.yf-lead--light {
	color: rgba(255, 255, 255, 0.82);
}

.yf-eyebrow {
	margin: 0 0 10px;
	color: var(--yf-gold);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.yf-section {
	padding: 64px 0;
}

.yf-section--soft {
	background: var(--yf-soft);
}

.yf-section-cta {
	margin-top: 28px;
	text-align: center;
}

.yf-swipe-hint {
	display: none;
}

.yf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none !important;
	line-height: 1.2;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.yf-btn:focus-visible,
.yf-card__link:focus-visible,
.yf-cat:focus-visible,
.yf-trust__seals a:focus-visible {
	outline: 3px solid var(--yf-gold);
	outline-offset: 3px;
}

.yf-btn--light {
	background: var(--yf-white);
	color: var(--yf-purple);
}

.yf-btn--light:hover {
	background: #f6e9ff;
}

.yf-btn--ghost {
	background: transparent;
	color: #fff !important;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.yf-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: #fff;
}

.yf-btn--purple {
	background: var(--yf-purple);
	color: #fff !important;
}

.yf-btn--purple:hover {
	background: #56206b;
}

.yf-btn--gold {
	background: var(--yf-gold);
	color: #1a1324 !important;
}

.yf-btn--gold:hover {
	background: #ffc53d;
}

.yf-btn--line {
	background: transparent;
	color: var(--yf-purple) !important;
	border: 1.5px solid var(--yf-purple);
}

.yf-btn--line:hover {
	background: #f3e8f8;
}

/* Hero */

.yf-hero {
	position: relative;
	min-height: min(88svh, 760px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	color: #fff;
}

.yf-hero__media,
.yf-hero__media picture,
.yf-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.yf-hero__media img {
	object-fit: cover;
	object-position: 72% 40%;
}

.yf-hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(28, 10, 42, 0.62) 0%, rgba(28, 10, 42, 0.28) 46%, rgba(28, 10, 42, 0.06) 78%, rgba(28, 10, 42, 0) 100%),
		linear-gradient(180deg, rgba(28, 10, 42, 0.04) 0%, rgba(28, 10, 42, 0.38) 100%);
}

.yf-hero__content {
	position: relative;
	z-index: 2;
	padding: 48px 0 56px;
}

.yf-hero__lead {
	margin: 16px 0 0;
	max-width: 34rem;
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.9);
}

.yf-hero__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.yf-hero__pills li {
	padding: 7px 12px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	font-size: 0.86rem;
	font-weight: 650;
	background: rgba(255, 255, 255, 0.08);
}

.yf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}

/* Universitario */

.yf-uni {
	background: var(--yf-purple-deep);
	color: #fff;
	padding: 72px 0 64px;
}

.yf-uni .yf-card--uni {
	background: #fff;
	color: var(--yf-ink);
}

.yf-uni .yf-card__badge {
	background: var(--yf-gold);
	color: #1a1324;
}

/* Tracks / cards */

.yf-track {
	display: grid;
	gap: 18px;
	margin-top: 28px;
}

.yf-track--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yf-track--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yf-card {
	background: #fff;
	border: 1px solid var(--yf-line);
	border-radius: var(--yf-radius);
	overflow: hidden;
	min-width: 0;
}

.yf-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none !important;
}

.yf-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #ddd6e6;
}

.yf-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yf-card--brand .yf-card__media {
	aspect-ratio: 4 / 3;
	background: #fff;
}

.yf-card--brand .yf-card__media img {
	object-fit: contain;
	object-position: center;
}

.yf-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 9px;
	border-radius: 999px;
	background: var(--yf-purple);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.02em;
}

.yf-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 16px 18px;
	flex: 1;
}

.yf-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.3em;
}

.yf-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--yf-muted);
	font-size: 0.88rem;
}

.yf-card__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-top: auto;
}

.yf-card__price s {
	color: #8b8494;
	font-size: 0.9rem;
}

.yf-card__price strong {
	font-size: 1.2rem;
	color: var(--yf-purple);
}

.yf-card--compact .yf-card__title {
	-webkit-line-clamp: 2;
	min-height: 2.3em;
}

/* Categorías */

.yf-cats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-top: 28px;
}

.yf-cat {
	position: relative;
	display: block;
	min-height: 168px;
	border-radius: 14px;
	overflow: hidden;
	color: #fff !important;
	text-decoration: none !important;
}

.yf-cat img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 3 / 2;
}

.yf-cat::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(18, 6, 28, 0.05) 20%, rgba(18, 6, 28, 0.78) 100%);
}

.yf-cat span {
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 14px;
	z-index: 1;
	font-weight: 750;
	font-size: 1.15rem;
}

/* Confianza */

.yf-trust {
	padding: 48px 0;
	background: #fff;
	border-block: 1px solid var(--yf-line);
}

.yf-trust h2 {
	text-align: center;
}

.yf-trust__points {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 18px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
	color: var(--yf-muted);
	font-weight: 650;
}

.yf-trust__seals {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 28px;
	margin-top: 22px;
}

.yf-trust__seals img {
	display: block;
	height: 52px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
}

.yf-trust__note {
	margin: 18px 0 0;
	text-align: center;
	color: var(--yf-muted);
	font-size: 0.9rem;
}

/* Por qué */

.yf-why {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-top: 28px;
}

.yf-why__item {
	padding: 20px 18px;
	background: #fff;
	border: 1px solid var(--yf-line);
	border-radius: 14px;
}

.yf-why__item p {
	margin: 8px 0 0;
	color: var(--yf-muted);
	font-size: 0.95rem;
}

.yf-news {
	padding-bottom: 48px;
}

.yf-final {
	background: var(--yf-purple-mid);
	color: #fff;
	padding: 64px 0;
	text-align: center;
}

.yf-final .yf-lead {
	margin-inline: auto;
}

.yf-final .yf-hero__actions {
	justify-content: center;
}

/* Tablet */

@media (max-width: 1024px) {
	.yf-track--4,
	.yf-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.yf-track--3,
	.yf-why {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.yf-hero__media img {
		object-position: 80% 35%;
	}
}

/* Móvil: experiencia propia */

@media (max-width: 767px) {
	.yf-hero {
		min-height: calc(100svh - 132px);
		align-items: stretch;
	}

	.yf-hero__media img {
		object-position: 50% 42%;
	}

	.yf-hero__shade {
		background:
			linear-gradient(180deg, rgba(28, 10, 42, 0.08) 0%, rgba(28, 10, 42, 0.18) 42%, rgba(28, 10, 42, 0.78) 100%);
	}

	.yf-hero__content {
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		padding: 28px 0 32px;
		min-height: calc(100svh - 132px);
	}

	.yf-home-main h1 {
		max-width: none;
	}

	.yf-hero__actions,
	.yf-final .yf-hero__actions {
		flex-direction: column;
	}

	.yf-hero__actions .yf-btn,
	.yf-section-cta .yf-btn,
	.yf-final .yf-btn {
		width: 100%;
	}

	.yf-section,
	.yf-uni,
	.yf-final {
		padding: 48px 0;
	}

	.yf-track--4,
	.yf-track--3 {
		display: flex;
		grid-template-columns: none;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		padding-bottom: 6px;
		margin-inline: -16px;
		padding-inline: 16px;
		-webkit-overflow-scrolling: touch;
	}

	.yf-track--4::after,
	.yf-track--3::after {
		content: "";
		flex: 0 0 4px;
	}

	.yf-track .yf-card {
		flex: 0 0 min(82%, 320px);
		scroll-snap-align: start;
	}

	.yf-swipe-hint {
		display: block;
		margin: 10px 0 0;
		font-size: 0.82rem;
		color: inherit;
		opacity: 0.7;
	}

	.yf-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.yf-cat {
		min-height: 132px;
	}

	.yf-cat span {
		font-size: 1rem;
	}

	.yf-why {
		grid-template-columns: 1fr;
	}

	.yf-trust__seals img {
		height: 44px;
	}

	.yf-trust__points {
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yf-btn,
	.yf-card__link,
	.yf-cat {
		transition: none;
	}

	.yf-track {
		scroll-behavior: auto;
	}
}
