/* Course and lesson views. Colours follow the Astra global palette. */
.en-primary {
	width: 100%;
	--en-accent: var(--ast-global-color-0, #e20071);
	--en-text: var(--ast-global-color-3, #454f5e);
	--en-line: rgba(0, 0, 0, 0.12);
	--en-soft: color-mix(in srgb, var(--en-accent) 9%, #fff);
}

.en-curso {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 56px;
	align-items: start;
	padding: 48px 0 72px;
}

.en-curso__kicker {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--en-accent);
	font-size: 0.95rem;
	text-decoration: none;
}

.en-curso__kicker:hover {
	text-decoration: underline;
}

.en-curso__title {
	margin: 0 0 16px;
	color: var(--en-accent);
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	line-height: 1.2;
}

.en-curso__lead {
	margin: 0 0 24px;
	font-size: 1.2rem;
	line-height: 1.6;
	color: var(--en-text);
}

.en-curso__content {
	margin-bottom: 32px;
	line-height: 1.75;
}

.en-video {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 10px;
	background: #000;
}

.en-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.en-curso__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	margin-top: 20px;
}

/* "Mark as watched" toggles */
.en-check {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
	color: var(--en-text);
	font: inherit;
	font-size: 0.95rem;
	cursor: pointer;
}

.en-check:hover,
.en-check:focus {
	background: none;
	color: var(--en-accent);
}

.en-check.is-done {
	color: var(--en-accent);
}

.en-dot {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-radius: 50%;
	opacity: 0.6;
}

.is-done > .en-dot {
	border-color: var(--en-accent);
	background: var(--en-accent);
	opacity: 1;
}

.is-done > .en-dot::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.en-pager {
	display: flex;
	gap: 12px;
	margin-left: auto;
}

.en-pager__link,
.en-button {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--en-accent);
	border-radius: 999px;
	color: var(--en-accent);
	text-decoration: none;
	font-weight: 600;
}

.en-pager__link--next,
.en-button {
	background: var(--en-accent);
	color: #fff;
}

.en-pager__link:hover,
.en-button:hover {
	opacity: 0.85;
	color: inherit;
}

.en-pager__link--next:hover,
.en-button:hover {
	color: #fff;
}

/* Syllabus */
.en-syllabus {
	position: sticky;
	top: 32px;
}

.en-syllabus__title {
	margin: 0 0 8px;
	color: var(--en-accent);
	font-size: 1.5rem;
}

.en-syllabus .en-check--course {
	margin-bottom: 20px;
	font-size: 0.85rem;
}

.en-syllabus__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.en-syllabus__item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 6px;
	color: var(--en-text);
}

.en-syllabus__item > .en-dot {
	margin-top: 10px;
}

.en-syllabus__item a {
	flex: 1;
	padding: 7px 10px;
	border-radius: 8px;
	color: inherit;
	font-size: 0.95rem;
	line-height: 1.45;
	text-decoration: none;
}

.en-syllabus__item a:hover {
	background: var(--en-soft);
}

.en-syllabus__item.is-current a {
	background: var(--en-soft);
	color: var(--en-accent);
	font-weight: 600;
}

.en-syllabus__time {
	display: block;
	margin-top: 2px;
	font-size: 0.8rem;
	font-weight: 400;
	opacity: 0.7;
}

/* Course overview and progress */
.en-overview {
	display: grid;
	gap: 16px;
	justify-items: start;
}

.en-overview__meta,
.en-card__meta {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.8;
}

.en-progress {
	display: grid;
	gap: 6px;
	width: 100%;
	max-width: 420px;
}

.en-progress__bar {
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--en-line);
}

.en-progress__bar span {
	display: block;
	height: 100%;
	background: var(--en-accent);
	transition: width 0.3s ease;
}

.en-progress__text {
	font-size: 0.85rem;
	opacity: 0.8;
}

/* Course list */
.en-archive {
	padding: 48px 0 72px;
}

.en-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
	margin-top: 24px;
}

.en-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--en-line);
	border-radius: 12px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.en-card:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
	color: inherit;
}

.en-card__media {
	aspect-ratio: 16 / 9;
	background: var(--en-soft);
}

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

.en-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 16px;
	color: var(--en-accent);
	font-size: 1.3rem;
	font-weight: 700;
	text-align: center;
}

.en-card__body {
	display: grid;
	gap: 10px;
	padding: 18px 20px 22px;
}

.en-card__title {
	margin: 0;
	color: var(--en-accent);
	font-size: 1.2rem;
}

@media (max-width: 921px) {
	.en-curso {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
		padding-top: 28px;
	}

	.en-syllabus {
		position: static;
	}
}

/* Kits: how to get a course without it */
.en-button--ghost {
	background: transparent;
	color: var(--en-accent);
}

.en-button--ghost:hover {
	color: var(--en-accent);
}

.en-notice {
	margin: 0 0 8px;
	padding: 16px 20px;
	border-left: 4px solid var(--en-accent);
	border-radius: 0 10px 10px 0;
	background: var(--en-soft);
}

.en-notice p {
	margin: 0;
	line-height: 1.6;
}

.en-kit {
	display: grid;
	gap: 14px;
	justify-items: start;
	margin-top: 8px;
	padding: 28px;
	border: 2px solid var(--en-accent);
	border-radius: 14px;
	background: var(--en-soft);
}

.en-kit p {
	margin: 0;
	line-height: 1.6;
}

.en-kit__eyebrow {
	color: var(--en-accent);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.en-kit__title {
	margin: 0;
	font-size: 1.5rem;
	line-height: 1.25;
}

.en-kit__login {
	display: grid;
	gap: 10px;
	justify-items: start;
	width: 100%;
	margin-top: 6px;
	padding-top: 18px;
	border-top: 1px solid var(--en-line);
}

.en-lock {
	position: relative;
	flex: none;
	width: 14px;
	height: 11px;
	margin: 12px 2px 0;
	border-radius: 2px;
	background: currentColor;
	opacity: 0.45;
}

.en-lock::before {
	content: "";
	position: absolute;
	bottom: 100%;
	left: 2px;
	width: 10px;
	height: 7px;
	border: 2px solid currentColor;
	border-bottom: 0;
	border-radius: 6px 6px 0 0;
	box-sizing: border-box;
}

.en-syllabus__name {
	flex: 1;
	padding: 7px 10px;
	font-size: 0.95rem;
	line-height: 1.45;
}

/* Course cards: title, image and actions link on their own; actions sit at the bottom
   so they line up across a row whatever the title length. */
.en-card__media {
	display: block;
}

.en-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.en-card__title a {
	color: inherit;
	text-decoration: none;
}

.en-card__kit {
	align-self: flex-start;
	margin: 2px 0 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--en-soft);
	color: var(--en-accent);
	font-size: 0.8rem;
	font-weight: 700;
}

.en-card__kit.is-soon {
	background: var(--en-line);
	color: var(--en-text);
}

.en-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 14px;
}

.en-card__actions .en-button {
	padding: 9px 18px;
	font-size: 0.95rem;
}

.en-card__link {
	color: var(--en-accent);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

/* Courses the user has: gold frame and a "Tu curso" badge on the image (top right,
   away from the title printed on the cover). */
.en-card.is-owned {
	border: 2px solid var(--en-accent);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--en-accent) 18%, transparent);
}

.en-card__media {
	position: relative;
}

.en-card__badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--en-accent);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

/* /cursos/ split into "Tus cursos" and "Más cursos" */
.en-archive__section + .en-archive__section {
	margin-top: 56px;
}

.en-archive__heading {
	margin: 0 0 4px;
	color: var(--en-accent);
	font-size: 1.6rem;
}

.en-card__link:hover {
	color: var(--en-accent);
	text-decoration: underline;
}

.en-kit-tag {
	display: inline-block;
	margin: 0 0 20px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--en-soft);
	font-size: 0.9rem;
	font-weight: 600;
}

.en-kit-tag a {
	color: var(--en-accent);
}

.en-curso__cover {
	aspect-ratio: 16 / 9;
	margin: 0 0 24px;
	overflow: hidden;
	border-radius: 10px;
	background: var(--en-soft);
}

.en-curso__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Banner under the header: breadcrumbs, title and, for visitors, the kit tag */
.en-banner {
	background: linear-gradient(100deg, var(--ast-global-color-1, #816216) 0%, var(--ast-global-color-0, #ad831d) 100%);
	color: #fff;
}

.en-banner__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 34px 20px 38px;
}

.en-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
}

.en-breadcrumbs li + li::before {
	content: "›";
	margin: 0 10px;
	opacity: 0.7;
}

.en-breadcrumbs a {
	color: #fff;
	opacity: 0.85;
	text-decoration: none;
}

.en-breadcrumbs a:hover {
	color: #fff;
	opacity: 1;
	text-decoration: underline;
}

.en-breadcrumbs [aria-current] {
	opacity: 0.7;
}

.en-banner__title {
	margin: 0;
	color: #fff;
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	line-height: 1.2;
}

.en-banner .en-kit-tag {
	margin: 16px 0 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.en-banner .en-kit-tag a {
	color: #fff;
	text-decoration: underline;
}

.en-curso,
.en-archive {
	padding-top: 40px;
}

/* Astra puts 4em above #primary; the banner already separates content from the header. */
body .site-content #primary.en-primary {
	margin-top: 0;
	padding-top: 0;
}

@media (max-width: 921px) {
	.en-banner__inner {
		padding: 24px 20px 28px;
	}

	.en-curso {
		padding-top: 28px;
	}
}
