/**
 * DeL Micro Courses v2.2.2 – front-end presentation.
 *
 * Changelog from v1.x:
 *  - Removed legacy .del-mc-filters--main-only, .del-mc-filter-main-list,
 *    .del-mc-filter-chip--root, --subgroup, .del-mc-filter-subgroup (dead code)
 *  - Added .del-mc-catalogue-bottom (pagination + footer row)
 *  - Added .del-mc-pagination, .del-mc-page-btn, .del-mc-page-num, .del-mc-page-dots
 *  - Added .del-mc-section--single, .del-mc-cols-1
 *  - Moved .del-mc-catalogue-footer inside .del-mc-catalogue-bottom
 */

/* ═══════════════════════════════════════════
   Design tokens & reset
   ═══════════════════════════════════════════ */

.del-mc-section {
	/* ── Core palette ── */
	--del-mc-dark: #102033;
	--del-mc-text: #22334a;
	--del-mc-muted: #667085;
	--del-mc-blue: #174f86;
	--del-mc-orange: #f57921;
	--del-mc-green: #30b34b;
	--del-mc-white: #ffffff;
	--del-mc-surface: #f3f6f8;
	--del-mc-border: #cfd9e2;
	--del-mc-border-light: #e5ebf0;
	--del-mc-radius-card: 18px;
	--del-mc-radius-chip: 999px;
	--del-mc-transition: 180ms ease;

	/* ── Controllable appearance (admin-overridable) ── */
	/* Section */
	--del-mc-section-bg: transparent;

	/* Card */
	--del-mc-card-bg: #ffffff;
	--del-mc-card-title-color: #102033;
	--del-mc-card-title-size: 18px;
	--del-mc-card-category-color: #174f86;
	--del-mc-card-category-size: 11px;
	--del-mc-card-meta-color: #667085;
	--del-mc-card-meta-size: 13px;

	/* Pricing */
	--del-mc-price-color: #b85a10;
	--del-mc-price-size: 14px;

	/* Badges (pill overlays on thumbnail) */
	--del-mc-badge-sale-bg: #D93025;
	--del-mc-badge-sale-color: #ffffff;
	--del-mc-badge-bundle-bg: #F57921;
	--del-mc-badge-bundle-color: #ffffff;
	--del-mc-badge-free-bg: #1A8D3A;
	--del-mc-badge-free-color: #ffffff;

	/* Sale pricing */
	--del-mc-sale-original-color: #667085;
	--del-mc-sale-current-color: #D93025;
	--del-mc-sale-saved-bg: #FDECEA;
	--del-mc-sale-saved-color: #D93025;

	/* Bundle info */
	--del-mc-bundle-count-bg: #FFF3E8;
	--del-mc-bundle-count-color: #c45e00;

	position: relative;
	max-width: 1320px;
	margin: 0 auto;
	background: var(--del-mc-section-bg);
}

.del-mc-section *,
.del-mc-section *::before,
.del-mc-section *::after {
	box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   Section heading
   ═══════════════════════════════════════════ */

.del-mc-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 26px;
}

.del-mc-header-left {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}

.del-mc-header-actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.del-mc-header--button-only {
	justify-content: flex-end;
}

.del-mc-eyebrow {
	display: block;
	color: var(--del-mc-orange);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.13em;
	line-height: 1.2;
	text-transform: uppercase;
}

.del-mc-heading {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--del-mc-dark) !important;
	font-size: clamp(26px, 3.5vw, 36px) !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.02em !important;
}

/* ═══════════════════════════════════════════
   Grouped category filters
   ═══════════════════════════════════════════ */

.del-mc-filters {
	margin-bottom: 34px;
}

.del-mc-filter-overview {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.del-mc-filter-hint {
	color: var(--del-mc-muted);
	font-size: 14px;
	font-weight: 600;
}

.del-mc-filter-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.del-mc-filter-group {
	--del-mc-group-accent: var(--del-mc-blue);
	--del-mc-group-soft: #eef5fb;
	min-width: 0;
	padding: 17px;
	border: 1px solid var(--del-mc-border-light);
	border-left: 3.5px solid var(--del-mc-group-accent);
	border-radius: 0 16px 16px 0;
	background: linear-gradient(150deg, var(--del-mc-white) 0%, var(--del-mc-group-soft) 180%);
	box-shadow: 0 4px 12px rgba(16, 32, 51, 0.035);
}

.del-mc-filter-group--technology {
	--del-mc-group-accent: #2d8c8e;
	--del-mc-group-soft: #edf9f7;
}

.del-mc-filter-group--organisations {
	--del-mc-group-accent: #d79331;
	--del-mc-group-soft: #fff7e8;
}

.del-mc-filter-group--people {
	--del-mc-group-accent: #464ca3;
	--del-mc-group-soft: #f1f1ff;
}

.del-mc-filter-group-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 13px;
}

.del-mc-filter-group-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: var(--del-mc-group-soft);
	color: var(--del-mc-group-accent);
}

.del-mc-filter-group-icon .del-mc-filter-icon {
	width: 19px;
	height: 19px;
}

.del-mc-filter-group-title {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
	min-width: 0;
}

.del-mc-filter-group-title h3 {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--del-mc-dark) !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	line-height: 1.25 !important;
}

.del-mc-filter-group-title span {
	color: var(--del-mc-muted);
	font-size: 12px;
	font-weight: 600;
}

.del-mc-filter-group-body {
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.del-mc-filter-topic-list,
.del-mc-filter-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.del-mc-filter-topic-list {
	align-items: flex-start;
}

/* ─── Filter chips ─── */

.del-mc-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	padding: 8px 11px;
	border: 1px solid var(--del-mc-border);
	border-radius: 10px;
	background: var(--del-mc-white);
	color: var(--del-mc-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition:
		background var(--del-mc-transition),
		border-color var(--del-mc-transition),
		color var(--del-mc-transition),
		box-shadow var(--del-mc-transition),
		transform var(--del-mc-transition);
	user-select: none;
	-webkit-user-select: none;
}

.del-mc-filter-chip:hover {
	border-color: var(--del-mc-group-accent, var(--del-mc-orange));
	color: var(--del-mc-group-accent, var(--del-mc-orange));
	box-shadow: 0 4px 12px rgba(16, 32, 51, 0.08);
	transform: translateY(-1px);
}

.del-mc-filter-chip:focus-visible,
.del-mc-view-all:focus-visible,
.del-mc-enroll-btn:focus-visible,
.del-mc-page-btn:focus-visible,
.del-mc-page-num:focus-visible {
	outline: 3px solid rgba(245, 121, 33, 0.35);
	outline-offset: 3px;
}

.del-mc-filter-chip.is-active {
	border-color: var(--del-mc-group-accent, var(--del-mc-orange));
	background: var(--del-mc-group-accent, var(--del-mc-orange));
	color: var(--del-mc-white);
	box-shadow: 0 5px 14px rgba(16, 32, 51, 0.16);
}

.del-mc-filter-chip--all {
	--del-mc-group-accent: var(--del-mc-blue);
	padding: 10px 15px;
	border-radius: var(--del-mc-radius-chip);
	font-size: 14px;
}

.del-mc-filter-chip--compact {
	padding: 7px 9px;
	font-size: 12px;
	font-weight: 650;
}

.del-mc-filter-chip--compact .del-mc-filter-icon {
	width: 14px;
	height: 14px;
	flex-basis: 14px;
}

.del-mc-filter-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

/* ═══════════════════════════════════════════
   Course catalogue grid
   ═══════════════════════════════════════════ */

.del-mc-catalogue {
	position: relative;
	scroll-margin-top: 110px;
}

.del-mc-grid {
	display: grid;
	gap: 24px;
}

/* minmax(0, 1fr) prevents content from blowing out grid columns */
.del-mc-cols-1 { grid-template-columns: minmax(0, 400px); }
.del-mc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.del-mc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.del-mc-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Fade transition for AJAX swaps */
.del-mc-grid.is-loading {
	opacity: 0.28;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.del-mc-grid:not(.is-loading) {
	animation: delMcFadeIn 0.25s ease forwards;
}

@keyframes delMcFadeIn {
	from { opacity: 0.4; transform: translateY(6px); }
	to   { opacity: 1;   transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   Course card
   ═══════════════════════════════════════════ */

.del-mc-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: var(--del-mc-card-bg);
	border: 1.5px solid var(--del-mc-border-light);
	border-radius: var(--del-mc-radius-card);
	transition: border-color var(--del-mc-transition), box-shadow var(--del-mc-transition), transform var(--del-mc-transition);
}

.del-mc-card:hover {
	border-color: var(--del-mc-border);
	box-shadow: 0 10px 28px rgba(16, 32, 51, 0.09);
	transform: translateY(-2px);
}

/* ─── Card header: the featured image itself fills the entire header. ─── */

.del-mc-card-header {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 2.4 / 1;
	min-height: 120px;
	background: var(--del-mc-surface);
}

.del-mc-card-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	transition: transform 320ms ease;
}

.del-mc-card:hover .del-mc-card-img {
	transform: scale(1.025);
}

.del-mc-card-img-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	inset: 0;
	color: var(--del-mc-muted);
}

/* ─── Pill badges (sale / bundle / free — on thumbnail) ─── */

.del-mc-card-badges {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 4px;
	pointer-events: none;
}

.del-mc-pill-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	white-space: nowrap;
	pointer-events: auto;
}

.del-mc-pill-badge svg {
	flex-shrink: 0;
}

.del-mc-pill-badge--sale {
	background: var(--del-mc-badge-sale-bg);
	color: var(--del-mc-badge-sale-color);
}

.del-mc-pill-badge--bundle {
	background: var(--del-mc-badge-bundle-bg);
	color: var(--del-mc-badge-bundle-color);
}

.del-mc-pill-badge--free {
	background: var(--del-mc-badge-free-bg);
	color: var(--del-mc-badge-free-color);
}

/* ─── Sale pricing row ─── */

.del-mc-sale-pricing {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
}

.del-mc-sale-pricing--inline {
	margin-top: 2px;
}

.del-mc-sale-original {
	font-size: 12px;
	font-weight: 500;
	color: var(--del-mc-sale-original-color);
	text-decoration: line-through;
}

.del-mc-sale-current {
	font-size: var(--del-mc-price-size);
	font-weight: 700;
	color: var(--del-mc-sale-current-color);
}

.del-mc-sale-saved {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 600;
	background: var(--del-mc-sale-saved-bg);
	color: var(--del-mc-sale-saved-color);
}

/* ─── Bundle info row ─── */

.del-mc-bundle-info {
	display: flex;
	align-items: center;
	gap: 8px;
}

.del-mc-bundle-count {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	background: var(--del-mc-bundle-count-bg);
	color: var(--del-mc-bundle-count-color);
}

.del-mc-bundle-count svg {
	flex-shrink: 0;
}

/* ─── Free badge (inline in meta row fallback) ─── */

.del-mc-badge--free {
	white-space: nowrap;
	background: #E6F4EA;
	color: #1A6B2E;
	font-weight: 700;
}

/* ─── Card body ─── */

.del-mc-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 22px 24px 24px;
}

.del-mc-card-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
}

.del-mc-card-category {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	color: var(--del-mc-card-category-color);
	font-size: var(--del-mc-card-category-size);
	font-weight: 800;
	letter-spacing: 0.055em;
	line-height: 1.35;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.del-mc-card-category + .del-mc-card-category::before {
	content: '•';
	margin-right: 8px;
	color: var(--del-mc-orange);
}

.del-mc-card-title {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--del-mc-card-title-color) !important;
	font-size: var(--del-mc-card-title-size) !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	letter-spacing: -0.01em !important;
	overflow-wrap: break-word;
	word-wrap: break-word;
	hyphens: auto;
}

/* ─── Meta badges (duration + price) ─── */

.del-mc-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
	margin-top: 2px;
}

.del-mc-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 6px 11px;
	border-radius: 999px;
	font-size: var(--del-mc-card-meta-size);
	font-weight: 600;
	line-height: 1.35;
}

.del-mc-badge svg {
	flex: 0 0 14px;
	margin-top: 1px;
}

.del-mc-badge-text {
	min-width: 0;
}

.del-mc-badge--duration {
	align-items: flex-start;
	white-space: normal;
	background: rgba(48, 179, 75, 0.09);
	color: #1a7a35;
}

.del-mc-badge--duration .del-mc-badge-text {
	overflow-wrap: anywhere;
	word-break: normal;
}

.del-mc-badge--duration svg {
	color: var(--del-mc-green);
}

.del-mc-badge--price {
	white-space: nowrap;
	background: rgba(245, 121, 33, 0.09);
	color: var(--del-mc-price-color);
}

.del-mc-badge--price svg {
	color: var(--del-mc-orange);
}

/* ─── Delivery mode tabs (Instructor-led / Self-paced / Mentored) ─── */

.del-mc-delivery {
	margin-top: 4px;
	border: 1.5px solid var(--del-mc-border-light);
	border-radius: 13px;
	overflow: hidden;
}

.del-mc-delivery-tabs {
	display: flex;
	background: var(--del-mc-surface);
	border-bottom: 1.5px solid var(--del-mc-border-light);
}

.del-mc-delivery-tab {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 8px;
	border: 0;
	border-bottom: 2.5px solid transparent;
	background: transparent;
	color: var(--del-mc-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition:
		background var(--del-mc-transition),
		color var(--del-mc-transition),
		border-color var(--del-mc-transition);
	user-select: none;
	-webkit-user-select: none;
}

.del-mc-delivery-tab svg {
	flex: 0 0 15px;
}

.del-mc-delivery-tab:hover:not(.is-disabled) {
	background: rgba(16, 32, 51, 0.04);
	color: var(--del-mc-text);
}

.del-mc-delivery-tab.is-active {
	background: var(--del-mc-white);
	color: var(--del-mc-dark);
	border-bottom-color: var(--del-mc-orange);
	font-weight: 800;
}

.del-mc-delivery-tab.is-disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

.del-mc-delivery-panel {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 15px;
	min-height: 52px;
}

.del-mc-delivery-panel.is-active {
	display: flex;
}

.del-mc-delivery-duration {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--del-mc-card-meta-color);
	font-size: var(--del-mc-card-meta-size);
	font-weight: 600;
	line-height: 1.35;
}

.del-mc-delivery-duration svg {
	flex: 0 0 15px;
	color: var(--del-mc-green);
}

.del-mc-delivery-price {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
}

.del-mc-delivery-price-label {
	color: var(--del-mc-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.015em;
	line-height: 1.2;
}

.del-mc-delivery-price-value {
	color: var(--del-mc-price-color);
	font-size: var(--del-mc-price-size);
	font-weight: 800;
	line-height: 1.3;
	white-space: nowrap;
}

.del-mc-delivery-price.is-enquiry .del-mc-delivery-price-value {
	color: var(--del-mc-blue);
	font-style: italic;
	font-weight: 700;
	white-space: normal;
}

.del-mc-delivery-price--sale {
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.del-mc-delivery-price--sale .del-mc-sale-pricing {
	justify-content: flex-end;
}

/* ─── Actions row (tier badge + enrol + enquire buttons) ─── */

.del-mc-card-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
}

.del-mc-card-action-buttons {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	margin-left: auto;
}

.del-mc-tier-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border: 1px solid var(--del-mc-border-light);
	border-radius: 999px;
	background: var(--del-mc-surface);
	color: var(--del-mc-muted);
	font-size: 13px;
	font-weight: 700;
}

.del-mc-enroll-btn,
.del-mc-learn-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 10px 18px;
	border: 1.5px solid transparent;
	border-radius: var(--del-mc-radius-chip);
	font-family: inherit;
	font-size: 14px;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background var(--del-mc-transition),
		border-color var(--del-mc-transition),
		color var(--del-mc-transition),
		transform var(--del-mc-transition),
		box-shadow var(--del-mc-transition);
}

.del-mc-learn-more-btn {
	border-color: rgba(23, 79, 134, 0.45);
	background: var(--del-mc-white);
	color: var(--del-mc-blue);
}

.del-mc-learn-more-btn:hover {
	border-color: var(--del-mc-blue);
	background: rgba(23, 79, 134, 0.08);
	color: var(--del-mc-blue);
	transform: translateY(-1px);
}

.del-mc-enroll-btn {
	border-color: var(--del-mc-dark);
	background: var(--del-mc-white);
	color: var(--del-mc-dark);
}

.del-mc-enroll-btn:hover {
	border-color: var(--del-mc-orange);
	background: var(--del-mc-orange);
	color: var(--del-mc-white);
	transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   Catalogue bottom: pagination + footer CTA
   ═══════════════════════════════════════════ */

.del-mc-catalogue-bottom {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-top: 30px;
}

.del-mc-pagination-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.del-mc-catalogue-footer {
	display: flex;
	justify-content: flex-end;
	flex: 0 0 auto;
}

/* ─── View-all CTAs ─── */

.del-mc-view-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 13px 22px;
	border: 1.5px solid transparent;
	border-radius: var(--del-mc-radius-chip);
	font-family: inherit;
	font-size: 16px;
	font-weight: 750;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	transition:
		background var(--del-mc-transition),
		border-color var(--del-mc-transition),
		color var(--del-mc-transition),
		box-shadow var(--del-mc-transition),
		transform var(--del-mc-transition);
}

.del-mc-view-all--header {
	min-height: auto;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--del-mc-blue);
	box-shadow: none;
	font-size: 16px;
	font-weight: 800;
}

.del-mc-view-all--header span {
	border-bottom: 1.5px solid currentColor;
	padding-bottom: 2px;
}

.del-mc-view-all--header:hover {
	border: 0;
	background: transparent;
	color: var(--del-mc-orange);
	box-shadow: none;
	transform: none;
}

.del-mc-view-all--catalogue {
	border-color: var(--del-mc-orange);
	background: var(--del-mc-orange);
	color: var(--del-mc-white);
	box-shadow: 0 5px 14px rgba(245, 121, 33, 0.2);
}

.del-mc-view-all--catalogue:hover {
	border-color: #c95d13;
	background: #c95d13;
	color: var(--del-mc-white);
	box-shadow: 0 8px 18px rgba(201, 93, 19, 0.22);
	transform: translateY(-1px);
}

.del-mc-view-all svg {
	flex: 0 0 auto;
	transition: transform var(--del-mc-transition);
}

.del-mc-view-all:hover svg {
	transform: translateX(3px);
}

/* ═══════════════════════════════════════════
   Pagination
   ═══════════════════════════════════════════ */

.del-mc-pagination {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.del-mc-page-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border: 1.5px solid var(--del-mc-border);
	border-radius: var(--del-mc-radius-chip);
	background: var(--del-mc-white);
	color: var(--del-mc-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background var(--del-mc-transition),
		border-color var(--del-mc-transition),
		color var(--del-mc-transition),
		box-shadow var(--del-mc-transition),
		transform var(--del-mc-transition);
	user-select: none;
	-webkit-user-select: none;
}

.del-mc-page-btn:hover {
	border-color: var(--del-mc-orange);
	color: var(--del-mc-orange);
	box-shadow: 0 3px 10px rgba(16, 32, 51, 0.08);
	transform: translateY(-1px);
}

.del-mc-page-btn.is-disabled {
	opacity: 0.38;
	cursor: default;
	pointer-events: none;
}

.del-mc-page-btn svg {
	flex: 0 0 16px;
}

.del-mc-page-numbers {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin: 0 4px;
}

.del-mc-page-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 6px;
	border: 1.5px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--del-mc-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 650;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition:
		background var(--del-mc-transition),
		border-color var(--del-mc-transition),
		color var(--del-mc-transition);
	user-select: none;
	-webkit-user-select: none;
}

.del-mc-page-num:hover {
	border-color: var(--del-mc-border);
	background: var(--del-mc-surface);
	color: var(--del-mc-dark);
}

.del-mc-page-num.is-current {
	border-color: var(--del-mc-orange);
	background: var(--del-mc-orange);
	color: var(--del-mc-white);
	cursor: default;
	font-weight: 750;
}

.del-mc-page-dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 38px;
	color: var(--del-mc-muted);
	font-size: 16px;
	letter-spacing: 0.1em;
	user-select: none;
	-webkit-user-select: none;
}

/* ═══════════════════════════════════════════
   Single-course section
   ═══════════════════════════════════════════ */

.del-mc-section--single .del-mc-grid {
	justify-content: flex-start;
}

/* ─── Empty state ─── */

.del-mc-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 48px 24px;
	color: var(--del-mc-muted);
	font-size: 16px;
	text-align: center;
}

/* ═══════════════════════════════════════════
   Loading overlay
   ═══════════════════════════════════════════ */

.del-mc-loading {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 10;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	background: rgba(255, 255, 255, 0.42);
}

.del-mc-catalogue.is-loading .del-mc-loading {
	display: flex;
}

.del-mc-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid var(--del-mc-border-light);
	border-top-color: var(--del-mc-orange);
	border-radius: 50%;
	animation: delMcSpin 0.65s linear infinite;
}

@keyframes delMcSpin {
	to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   v1.6 Topic-group filter overrides
   ═══════════════════════════════════════════ */

.del-mc-filters--topic-groups {
	margin-bottom: 38px;
}

.del-mc-filters--topic-groups .del-mc-filter-overview {
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

.del-mc-filters--topic-groups .del-mc-filter-hint {
	max-width: 660px;
	font-weight: 600;
	line-height: 1.45;
}

.del-mc-filters--topic-groups .del-mc-filter-groups {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.del-mc-filters--topic-groups .del-mc-filter-group {
	min-height: 100%;
	padding: 16px;
	border-radius: 0 16px 16px 0;
}

.del-mc-filters--topic-groups .del-mc-filter-group-heading {
	margin-bottom: 13px;
}

.del-mc-filters--topic-groups .del-mc-filter-group-body {
	gap: 0;
}

.del-mc-filters--topic-groups .del-mc-filter-topic-list {
	gap: 8px;
}

.del-mc-filters--topic-groups .del-mc-filter-chip--compact {
	min-height: 38px;
	padding: 8px 10px;
	border-radius: 9px;
	text-decoration: none;
}

.del-mc-filters--topic-groups .del-mc-filter-chip--compact small {
	display: none;
}

/* ═══════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════ */

/* Large tablets / small desktops */
@media (max-width: 1024px) {
	.del-mc-cols-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Tablets */
@media (max-width: 820px) {
	.del-mc-cols-3,
	.del-mc-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.del-mc-header {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}

	.del-mc-header-actions,
	.del-mc-catalogue-footer {
		align-self: flex-start;
		justify-content: flex-start;
	}

	.del-mc-view-all {
		align-self: flex-start;
		justify-content: center;
	}

	.del-mc-card-header {
		min-height: 100px;
	}

	.del-mc-filter-groups {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}

	.del-mc-card-body {
		padding: 18px 20px 22px;
	}

	.del-mc-card-title {
		font-size: 17px !important;
	}

	/* Catalogue bottom stacks when there's not enough room. */
	.del-mc-catalogue-bottom {
		flex-wrap: wrap;
	}

	/* Pagination prev/next labels hidden on tablets to save space. */
	.del-mc-page-btn span {
		display: none;
	}

	.del-mc-page-btn {
		padding: 9px 11px;
	}
}

@media (max-width: 980px) {
	.del-mc-filters--topic-groups .del-mc-filter-groups {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}
}

/* Mobile */
@media (max-width: 580px) {
	.del-mc-section {
		padding: 0 12px;
	}

	.del-mc-cols-2,
	.del-mc-cols-3,
	.del-mc-cols-4 {
		grid-template-columns: 1fr;
	}

	.del-mc-heading {
		font-size: 24px !important;
	}

	.del-mc-eyebrow {
		font-size: 13px;
	}

	.del-mc-filter-overview {
		align-items: flex-start;
		flex-direction: column;
		gap: 9px;
	}

	.del-mc-filter-groups {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.del-mc-filter-group {
		padding: 15px;
	}

	.del-mc-filters {
		margin-bottom: 24px;
	}

	.del-mc-card-header {
		min-height: 110px;
	}

	.del-mc-card-body {
		padding: 18px 18px 20px;
	}

	.del-mc-card-title {
		font-size: 17px !important;
	}

	.del-mc-delivery-panel {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.del-mc-delivery-price {
		align-items: flex-start;
		text-align: left;
	}

	.del-mc-card-actions {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}

	.del-mc-card-action-buttons {
		width: 100%;
		margin-left: 0;
		justify-content: stretch;
	}

	.del-mc-enroll-btn,
	.del-mc-learn-more-btn {
		flex: 1 1 0;
		padding: 10px 14px;
		font-size: 14px;
	}

	.del-mc-header-actions,
	.del-mc-catalogue-footer {
		width: 100%;
	}

	.del-mc-view-all {
		width: 100%;
		min-height: 54px;
		padding: 14px 18px;
		font-size: 16px;
	}

	.del-mc-view-all--header {
		width: auto;
		min-height: auto;
		padding: 4px 0;
	}

	/* Catalogue bottom stacks vertically on mobile. */
	.del-mc-catalogue-bottom {
		flex-direction: column;
		gap: 16px;
	}

	.del-mc-catalogue-footer {
		justify-content: flex-start;
	}

	/* Pagination adapts to small screens. */
	.del-mc-pagination {
		gap: 3px;
	}

	.del-mc-page-btn {
		padding: 8px 10px;
		font-size: 13px;
	}

	.del-mc-page-btn span {
		display: none;
	}

	.del-mc-page-num {
		min-width: 34px;
		height: 34px;
		font-size: 13px;
	}

	.del-mc-page-numbers {
		gap: 1px;
		margin: 0 2px;
	}
}

@media (max-width: 620px) {
	.del-mc-filters--topic-groups .del-mc-filter-overview {
		align-items: flex-start;
		flex-direction: column;
	}

	.del-mc-filters--topic-groups .del-mc-filter-groups {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

/* ═══════════════════════════════════════════
   Pagination hierarchy v2.1
   - Informational compact controls above the grid
   - Primary 42px controls between rules below the grid
   - Catalogue CTA centred beneath pagination
   ═══════════════════════════════════════════ */

.del-mc-catalogue-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
	padding: 14px 16px;
	border: 1px solid var(--del-mc-border-light);
	border-radius: 14px;
	background: var(--del-mc-white);
}

.del-mc-results-summary-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.del-mc-results-summary {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--del-mc-text);
	font-size: 15px;
	font-weight: 650;
	line-height: 1.35;
}

.del-mc-pagination-wrap {
	min-width: 0;
}

.del-mc-pagination-wrap:empty,
.del-mc-catalogue-footer:empty {
	display: none;
}

.del-mc-pagination-wrap--top {
	flex: 0 1 auto;
	margin-left: auto;
	padding: 3px 1px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.del-mc-catalogue-bottom {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 12px;
	margin-top: 28px;
}

.del-mc-pagination-stage {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
}

.del-mc-pagination-stage[hidden] {
	display: none !important;
}

.del-mc-pagination-rule {
	display: block;
	flex: 1 1 24px;
	min-width: 24px;
	height: 1px;
	background: var(--del-mc-border-light);
}

.del-mc-pagination-wrap--bottom {
	flex: 0 1 auto;
	max-width: calc(100% - 76px);
	padding: 3px 1px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.del-mc-catalogue-footer {
	display: flex;
	justify-content: center;
	width: 100%;
}

.del-mc-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: max-content;
	max-width: none;
	margin: 0 auto;
	flex-wrap: nowrap;
}

.del-mc-page-btn,
.del-mc-page-num {
	box-shadow: none;
	transform: none;
}

.del-mc-page-btn {
	min-height: 42px;
	padding: 9px 16px;
	border: 1.5px solid var(--del-mc-border);
	border-radius: 12px;
	background: var(--del-mc-white);
	font-size: 14px;
	font-weight: 700;
	transition:
		background var(--del-mc-transition),
		border-color var(--del-mc-transition),
		color var(--del-mc-transition),
		box-shadow var(--del-mc-transition);
}

.del-mc-page-btn:hover,
.del-mc-page-btn:focus-visible {
	border-color: var(--del-mc-orange);
	background: #fff8f2;
	color: var(--del-mc-orange);
	box-shadow: none;
	transform: none;
}

.del-mc-page-btn.is-disabled {
	border-color: var(--del-mc-border-light);
	background: #fafbfc;
	color: var(--del-mc-muted);
	opacity: 0.48;
}

.del-mc-page-numbers {
	gap: 6px;
	margin: 0;
}

.del-mc-page-num {
	min-width: 42px;
	height: 42px;
	padding: 0 8px;
	border: 1.5px solid var(--del-mc-border-light);
	border-radius: 11px;
	background: var(--del-mc-white);
	font-size: 14px;
	font-weight: 700;
}

.del-mc-page-num:hover,
.del-mc-page-num:focus-visible {
	border-color: var(--del-mc-orange);
	background: #fff8f2;
	color: var(--del-mc-orange);
	box-shadow: none;
	transform: none;
}

.del-mc-page-num.is-current {
	border-color: var(--del-mc-orange);
	background: var(--del-mc-orange);
	color: var(--del-mc-white);
	box-shadow: 0 4px 12px rgba(245, 121, 33, 0.2);
}

.del-mc-page-dots {
	min-width: 30px;
	height: 42px;
	font-size: 17px;
}

/* Compact duplicate controls in the informational top bar. */
.del-mc-pagination-wrap--top .del-mc-pagination {
	gap: 4px;
}

.del-mc-pagination-wrap--top .del-mc-page-btn {
	min-height: 38px;
	padding: 7px 12px;
	border-width: 1px;
	border-radius: 10px;
	font-size: 13px;
}

.del-mc-pagination-wrap--top .del-mc-page-numbers {
	gap: 4px;
}

.del-mc-pagination-wrap--top .del-mc-page-num {
	min-width: 38px;
	height: 38px;
	padding: 0 6px;
	border-width: 1px;
	border-radius: 10px;
	font-size: 13px;
}

.del-mc-pagination-wrap--top .del-mc-page-num.is-current {
	border-color: var(--del-mc-dark);
	background: var(--del-mc-dark);
	color: var(--del-mc-white);
	box-shadow: none;
}

.del-mc-pagination-wrap--top .del-mc-page-dots {
	min-width: 24px;
	height: 38px;
	font-size: 15px;
}

@media (max-width: 820px) {
	.del-mc-catalogue-top {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}

	.del-mc-pagination-wrap--top {
		width: 100%;
		margin-left: 0;
	}

	.del-mc-pagination-wrap--top .del-mc-pagination {
		margin-left: 0;
	}

	.del-mc-pagination-wrap--top .del-mc-page-btn span {
		display: none;
	}

	.del-mc-pagination-wrap--bottom .del-mc-page-btn span {
		display: inline;
	}
}

@media (max-width: 580px) {
	.del-mc-catalogue-top {
		margin-bottom: 20px;
		padding: 12px;
		border-radius: 12px;
	}

	.del-mc-results-summary {
		font-size: 14px;
	}

	.del-mc-pagination-stage {
		gap: 8px;
	}

	.del-mc-pagination-rule {
		flex-basis: 8px;
		min-width: 8px;
	}

	.del-mc-pagination-wrap--bottom {
		max-width: calc(100% - 32px);
	}

	.del-mc-pagination {
		gap: 4px;
	}

	.del-mc-page-numbers {
		gap: 4px;
		margin: 0;
	}

	.del-mc-page-btn {
		min-width: 42px;
		min-height: 42px;
		padding: 8px 11px;
	}

	.del-mc-page-btn span,
	.del-mc-pagination-wrap--bottom .del-mc-page-btn span {
		display: none;
	}

	.del-mc-page-num {
		min-width: 42px;
		height: 42px;
		font-size: 14px;
	}

	.del-mc-page-dots {
		min-width: 22px;
	}

	.del-mc-catalogue-footer .del-mc-view-all {
		width: 100%;
		max-width: 420px;
	}
}
