/* ============================================================
   Public courses listing
   ============================================================ */
:root {
	--zap-brand: #002448;
	--zap-brand-hover: #003a6e;
	--zap-line: #e1e6ec;
	--zap-muted: #5b6b7a;
	--zap-text: #1f2933;
}

.zap-courses-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 24px;
}
.zap-courses-select {
	appearance: none;
	-webkit-appearance: none;
	padding: 10px 40px 10px 20px;
	border: 2px solid #4b5858;
	border-radius: 999px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px;
	color: #5b6b7a;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}
.zap-courses-select:hover {
	border-color: var(--zap-brand);
	color: var(--zap-brand);
}
.zap-courses-select:focus {
	outline: none;
	border-color: var(--zap-brand);
	box-shadow: 0 0 0 3px rgba(0, 36, 72, .12);
}
.zap-courses-select--sort {
	padding-left: 46px;
	color: var(--zap-brand);
	font-weight: 700;
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002448' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3Cline x1='9' y1='4' x2='9' y2='8'/%3E%3Cline x1='15' y1='10' x2='15' y2='14'/%3E%3Cline x1='9' y1='16' x2='9' y2='20'/%3E%3C/svg%3E");
	background-repeat: no-repeat, no-repeat;
	background-position: right 16px center, left 16px center;
	background-size: 12px, 18px;
}

/* ----- Custom dropdown (enhanced selects) ----- */
.zap-dropdown {
	position: relative;
	display: inline-block;
}
.zap-dropdown-native {
	display: none !important;
}
.zap-dropdown-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 20px;
	border: 2px solid #4b5858;
	border-radius: 999px;
	background: #fff !important;
	box-shadow: none !important;
	color: #5b6b7a !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.zap-dropdown-btn:hover,
.zap-dropdown-btn:focus,
.zap-dropdown-btn:active {
	border-color: var(--zap-brand);
	background: #eef2f6 !important;
	color: var(--zap-brand) !important;
}
.zap-dropdown-btn::after {
	content: "";
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002448' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
	transition: transform .15s ease;
}
.zap-dropdown.is-open .zap-dropdown-btn::after {
	transform: rotate(180deg);
}
.zap-dropdown--sort .zap-dropdown-btn {
	color: var(--zap-brand) !important;
	font-weight: 700;
}
.zap-dropdown--sort .zap-dropdown-btn::before {
	content: "";
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002448' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3Cline x1='9' y1='4' x2='9' y2='8'/%3E%3Cline x1='15' y1='10' x2='15' y2='14'/%3E%3Cline x1='9' y1='16' x2='9' y2='20'/%3E%3C/svg%3E") no-repeat center / contain;
}
.zap-dropdown-panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 50;
	min-width: 240px;
	max-width: 340px;
	margin: 0;
	padding: 10px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--zap-line);
	border-radius: 12px;
	box-shadow: 0 18px 44px rgba(0, 36, 72, .16);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.zap-dropdown.is-open .zap-dropdown-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.zap-dropdown-option {
	padding: 14px 18px;
	border-radius: 8px;
	color: var(--zap-brand);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	transition: background .12s ease;
}
.zap-dropdown-option:hover {
	background: #eef2f6;
}
.zap-dropdown-option.is-selected {
	background: #f4f6f8;
}

.zap-courses-grid {
	display: grid;
	grid-template-columns: repeat(var(--zap-courses-cols, 3), 1fr);
	grid-auto-rows: 1fr;
	gap: 24px;
}

.zap-course-tile {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--zap-line);
	border-radius: 14px 14px 6px 6px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.zap-course-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(0, 36, 72, .10);
}
.zap-course-tile-media {
	display: block;
	position: relative;
	line-height: 0;
	text-decoration: none;
}
.zap-course-tile-price {
	position: absolute;
	top: 35px;
	right: 0px;
	padding: 8px 16px;
	border-radius: 999px 0px 0px 999px;
	background: #f2b705;
	color: var(--zap-brand);
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
}
.zap-course-tile-price,
.zap-course-tile-price .amount,
.zap-course-tile-price bdi {
	color: var(--zap-brand);
	text-decoration: none;
}
.zap-course-tile-media img,
.zap-course-tile-noimg {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.zap-course-tile-noimg {
	background: linear-gradient(135deg, var(--zap-brand), var(--zap-brand-hover));
}
.zap-course-tile-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 18px;
}
.zap-course-tile-cat {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--zap-muted);
}
.zap-course-tile-titlelink {
	display: block;
	text-decoration: none;
}
.zap-course-tile-title {
	display: block;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--zap-brand);
}
.zap-course-tile-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 12px;
	list-style: none;
	margin: 0 !important;
	margin-top: 19px !important;
	padding: 0;
	padding-left: 0 !important;
	padding-top: 1em !important;
}
.zap-course-tile-meta li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--zap-muted);
}
.zap-course-tile-meta .zap-meta-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	color: var(--zap-muted);
}
.zap-course-tile-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: auto;
	padding-top: 16px;
}
.zap-course-tile-btn,
.zap-course-tile-enrol {
	flex: 1 1 0;
	min-width: 120px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 14px;
	border-radius: 60px !important;
	font-weight: 700;
	font-size: 14px;
	text-align: center;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.zap-course-tile-btn {
	border: 1.5px solid var(--zap-brand);
	background: #fff;
	color: var(--zap-brand);
}
.zap-course-tile-btn:hover,
.zap-course-tile-btn:focus {
	background: var(--zap-brand);
	color: #fff;
}
.zap-course-tile-enrol {
	border: 1.5px solid var(--zap-brand);
	background: var(--zap-brand);
	color: #fff !important;
}
.zap-course-tile-enrol:hover,
.zap-course-tile-enrol:focus {
	background: var(--zap-brand-hover);
	border-color: var(--zap-brand-hover);
	color: #fff !important;
}

.zap-courses-empty {
	margin: 24px 0;
	text-align: center;
	color: var(--zap-muted);
}

/* ----- Pagination ----- */
.zap-courses-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 30px 0 0;
}
.zap-courses-page {
	display: inline-block;
	min-width: 2.5em;
	margin: 0 !important;
	padding: 8px 12px;
	border: 0 !important;
	border-radius: .25rem;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--zap-brand) !important;
	font-family: Inter !important;
	font-size: 24px;
	font-weight: 800;
	line-height: 2.25em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.zap-courses-page:hover {
	background: #eef2f6 !important;
}
.zap-courses-page.is-current {
	background: var(--zap-brand) !important;
	color: #fff !important;
}
.zap-courses-page.is-dots {
	min-width: auto;
	padding: 8px 4px;
	color: var(--zap-muted) !important;
	cursor: default;
}
.zap-courses-page[disabled] {
	opacity: .35;
	cursor: default;
}
.zap-courses-arrow svg {
	display: inline-block;
	width: 20px;
	height: 20px;
	vertical-align: middle;
}

@media (max-width: 992px) {
	.zap-courses-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.zap-courses-grid {
		grid-template-columns: 1fr;
	}
	.zap-courses-filter {
		justify-content: stretch;
	}
	.zap-courses-select {
		width: 100%;
	}
}

/* ===== Courses search box (inline, after Topic) ===== */
.zap-courses-searchbar {
	position: relative;
	flex: 0 0 auto;
	margin: 0;
}
.zap-courses-search-icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: #002448;
	pointer-events: none;
}
.zap-courses-search-icon svg {
	width: 16px;
	height: 16px;
	display: block;
}
.zap-courses-filter .zap-courses-searchbar .zap-courses-search-input {
	box-sizing: border-box;
	height: auto !important;
	margin: 0 !important;
	padding: 10px 20px 10px 46px !important;
	border: 2px solid #4b5858 !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #5b6b7a !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	box-shadow: none !important;
	transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.zap-courses-filter .zap-courses-searchbar .zap-courses-search-input::placeholder {
	color: #5b6b7a;
	opacity: .7;
}
.zap-courses-filter .zap-courses-searchbar .zap-courses-search-input:hover,
.zap-courses-filter .zap-courses-searchbar .zap-courses-search-input:focus {
	outline: none;
	border-color: var(--zap-brand) !important;
	background: #eef2f6 !important;
	color: var(--zap-brand) !important;
	box-shadow: none !important;
}
.zap-courses-searchbar:hover .zap-courses-search-icon,
.zap-courses-searchbar:focus-within .zap-courses-search-icon {
	color: var(--zap-brand);
}

/* ---- Loading state (hide FOUC: native selects / unsized icons) ---- */
.zap-courses-loader {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 40px 0;
}
.zap-courses.is-loading .zap-courses-loader {
	display: flex;
}
.zap-courses-loader::after {
	content: "";
	width: 42px;
	height: 42px;
	border: 4px solid #e1e6ec;
	border-top-color: #002448;
	border-radius: 50%;
	animation: zap-courses-spin 0.8s linear infinite;
}
@keyframes zap-courses-spin {
	to { transform: rotate(360deg); }
}
.zap-courses.is-loading .zap-courses-filter,
.zap-courses.is-loading .zap-courses-grid,
.zap-courses.is-loading .zap-courses-pagination {
	visibility: hidden;
	opacity: 0;
}
.zap-courses .zap-courses-filter,
.zap-courses .zap-courses-grid,
.zap-courses .zap-courses-pagination {
	transition: opacity 0.25s ease;
}
.zap-courses.is-ready .zap-courses-filter,
.zap-courses.is-ready .zap-courses-grid,
.zap-courses.is-ready .zap-courses-pagination {
	visibility: visible;
	opacity: 1;
}
