.section {
	display: grid;
	gap: 1.05rem;
}

.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;

	h2 {
		font-size: 1.25rem;
		line-height: 1.1;
		letter-spacing: -0.03em;
	}

	a {
		color: var(--primary);
		font-weight: 500;
		font-size: 0.9rem;
	}
}

.courseList {
	display: grid;
	gap: 0.85rem;
}

.courseCard {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"badge body"
		"cta cta";
	gap: 0.85rem;
	padding: 0.95rem;
	border-radius: var(--radius-xl);
	background: var(--surface-panel);
	border: 1px solid var(--border-soft);
	box-shadow: var(--shadow-soft);
	min-width: 0;

	@include respond(compact) {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "badge body cta";
		align-items: center;
	}

	.ctaLink {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		padding: 0.68rem 0.95rem;
		border-radius: var(--radius-full);
		background: var(--surface-info);
		color: var(--info);
		font-weight: 500;
		font-size: 0.9rem;
		transition:
			transform 0.2s ease,
			background-color 0.2s ease;
		text-decoration: none;
		grid-area: cta;

		&:hover {
			transform: translateY(-1px);
			background: color-mix(in srgb, var(--surface-info) 70%, var(--blue-100));
			text-decoration: none;
		}
	}
}

@include respond(compact) {
	.courseCard .ctaLink {
		width: auto;
	}
}

.badge {
	width: 2.8rem;
	height: 2.8rem;
	display: grid;
	place-items: center;
	border-radius: var(--radius-sm);
	font-weight: 600;
	grid-area: badge;
}

.yellow { background: var(--yellow-200); color: var(--yellow-500); }
.pink { background: var(--red-100); color: var(--red-400); }
.teal { background: var(--teal-100); color: var(--teal-500); }
.blue { background: var(--blue-100); color: var(--blue-500); }

.courseBody {
	display: grid;
	gap: 0.25rem;
	grid-area: body;
	min-width: 0;

	h3 {
		font-size: 1rem;
		font-weight: 500;
		line-height: 1.15;
		overflow-wrap: anywhere;
	}

	p {
		font-size: 0.9rem;
		color: var(--text-muted);
		overflow-wrap: anywhere;
	}
}
