/* Course Card List — front-end styles */

.ccl-course-grid {
	--ccl-columns: 3;
	display: grid;
	grid-template-columns: repeat(var(--ccl-columns), 1fr);
	gap: 24px;
	margin: 24px 0;
	font-family: "Times New Roman", Times, serif;
}

@media (max-width: 900px) {
	.ccl-course-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ccl-course-grid {
		grid-template-columns: 1fr;
	}
}

.ccl-card {
	background: #ffffff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
	will-change: transform;
}

.ccl-card:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
	border-color: #c9c9c9;
}

.ccl-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* When a card's click action is "Open a Popup" it's rendered as a <button>
   instead of an <a> — reset button defaults so it looks identical. */
button.ccl-card-link {
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	text-align: left;
	cursor: pointer;
	font: inherit;
}

/* ---------------------------------------------------------------------
 * Popup (modal)
 * ------------------------------------------------------------------- */
.ccl-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 10, 0.65);
	padding: 20px;
	font-family: "Times New Roman", Times, serif;
	animation: ccl-fade-in 0.2s ease;
}

.ccl-popup-overlay.is-active {
	display: flex;
}

body.ccl-popup-open {
	overflow: hidden;
}

.ccl-popup-box {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	max-width: 520px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
	animation: ccl-pop-in 0.25s ease;
}

.ccl-popup-image {
	width: 100%;
	max-height: 260px;
	object-fit: cover;
	display: block;
	border-radius: 12px 12px 0 0;
}

.ccl-popup-content {
	padding: 22px 26px 28px;
}

.ccl-popup-badge {
	position: static;
	display: inline-block;
	margin-bottom: 10px;
}

.ccl-popup-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	color: #1c1c1c;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, background 0.2s ease;
	z-index: 1;
}

.ccl-popup-close:hover {
	transform: scale(1.1);
	background: #ffffff;
}

.ccl-popup-visit-btn {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 20px;
	background: #2f4858;
	color: #ffffff;
	font-family: "Times New Roman", Times, serif;
	font-weight: bold;
	font-size: 15px;
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.25s ease, transform 0.25s ease;
}

.ccl-popup-visit-btn:hover {
	background: #b5442c;
	transform: translateY(-2px);
}

@keyframes ccl-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes ccl-pop-in {
	from { opacity: 0; transform: scale(0.92) translateY(10px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ccl-card-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f2f2f2;
}

.ccl-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.ccl-card:hover .ccl-card-image {
	transform: scale(1.08);
}

.ccl-card-image-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: repeating-linear-gradient(
		45deg,
		#f2f2f2,
		#f2f2f2 10px,
		#e9e9e9 10px,
		#e9e9e9 20px
	);
}

.ccl-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 0.03em;
	border-radius: 999px;
	color: #ffffff;
	background: #2f4858;
	text-transform: uppercase;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

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

.ccl-category {
	display: inline-block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #b5442c;
	font-weight: bold;
	margin-bottom: 6px;
}

.ccl-title {
	margin: 0 0 8px;
	font-size: 21px;
	line-height: 1.3;
	font-family: "Times New Roman", Times, serif;
	color: #1c1c1c;
}

.ccl-description {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #4a4a4a;
	font-family: "Times New Roman", Times, serif;
}

.ccl-cta {
	display: inline-block;
	font-size: 14px;
	font-weight: bold;
	color: #2f4858;
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s ease, color 0.25s ease;
}

.ccl-card:hover .ccl-cta {
	color: #b5442c;
	border-color: #b5442c;
}

.ccl-no-courses {
	font-family: "Times New Roman", Times, serif;
	font-style: italic;
	color: #666;
}
