/* The course catalog ("קטלוג קורסים" widget): one card per course.
   The card reads like a short course page: image, category, title, facts, three points, price and one clear
   button. The whole card is clickable through the title link; the button sits above it as its own link.
   Selectors start with "body .rac-cat" so the theme's link colours never win over the button. */

body .rac-cat {
	--cat-ease: cubic-bezier(0.23, 1, 0.32, 1);
	--cat-line: rgba(194, 205, 232, .12);
	font-family: var(--ra-font, "Assistant", system-ui, sans-serif);
}
body .rac-cat .rac-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

body .rac-cat .rac-cat-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
	gap: 28px;
}

/* ---------------------------------------------------------------- the card */
body .rac-cat .rac-cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--cat-line);
	border-radius: var(--ra-r-lg, 24px);
	background: linear-gradient(180deg, rgba(19, 27, 58, .92), rgba(12, 18, 38, .96));
	box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
	transition: transform 260ms var(--cat-ease), border-color 200ms ease, box-shadow 260ms var(--cat-ease);
}
body .rac-cat .rac-cat-media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--ra-navy-900, #090e21);
}
body .rac-cat .rac-cat-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 500ms var(--cat-ease);
}
body .rac-cat .rac-cat-badge {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-start: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(7, 11, 26, .86);
	border: 1px solid rgba(47, 224, 230, .35);
	color: var(--ra-cyan-300, #7df0f4);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}
body .rac-cat .rac-cat-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 14px;
	padding: 22px 24px 24px;
}
body .rac-cat .rac-cat-eyebrow {
	margin: 0;
	color: var(--ra-cyan-300, #7df0f4);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.4;
}
body .rac-cat .rac-cat-title {
	margin: -6px 0 0;
	color: var(--ra-text, #f2f6ff);
	font-family: inherit;
	font-size: 23px;
	font-weight: 800;
	line-height: 1.3;
	text-wrap: balance;
}
body .rac-cat .rac-cat-title a {
	color: inherit;
	text-decoration: none;
}
/* The title link covers the card, so a click anywhere opens the course. */
body .rac-cat .rac-cat-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

/* Facts: lessons, stages, level */
body .rac-cat .rac-cat-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
body .rac-cat .rac-cat-facts li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 5px 11px;
	border: 1px solid rgba(47, 224, 230, .2);
	border-radius: 999px;
	background: rgba(47, 224, 230, .07);
	color: var(--ra-text-2, #c2cde8);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
body .rac-cat .rac-cat-facts svg {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--ra-cyan-400, #2fe0e6);
}

/* Points from the course */
body .rac-cat .rac-cat-points {
	list-style: none;
	margin: 2px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
body .rac-cat .rac-cat-points li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	color: var(--ra-text-2, #c2cde8);
	font-size: 16px;
	line-height: 1.5;
}
body .rac-cat .rac-cat-points svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	color: var(--ra-cyan-400, #2fe0e6);
}
body .rac-cat .rac-cat-more {
	margin: -2px 0 0;
	padding-inline-start: 28px;
	color: var(--ra-text-3, #8b99bc);
	font-size: 14px;
	line-height: 1.4;
}

/* Price and the button */
body .rac-cat .rac-cat-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 16px;
	margin-top: auto;
	padding-top: 18px;
	border-top: 1px solid var(--cat-line);
}
body .rac-cat .rac-cat-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	margin: 0;
}
body .rac-cat .rac-cat-now {
	color: var(--ra-text, #f2f6ff);
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
body .rac-cat .rac-cat-was {
	color: var(--ra-text-3, #8b99bc);
	font-size: 16px;
	font-weight: 600;
}
body .rac-cat .rac-cat-note {
	flex-basis: 100%;
	color: var(--ra-text-3, #8b99bc);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}
body .rac-cat a.rac-cat-btn {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 20px 12px 18px;
	border: 0;
	border-radius: var(--ra-r-btn, 14px);
	background: var(--ra-cyan-400, #2fe0e6);
	box-shadow: 0 10px 26px -12px rgba(47, 224, 230, .65), 0 1px 0 rgba(255, 255, 255, .35) inset;
	color: #041018;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 160ms var(--cat-ease), background-color 180ms ease, box-shadow 200ms ease;
}
body .rac-cat a.rac-cat-btn svg {
	flex: none;
	width: 18px;
	height: 18px;
	transition: transform 200ms var(--cat-ease);
}
body .rac-cat a.rac-cat-btn:active {
	transform: scale(.97);
}
body .rac-cat a.rac-cat-btn:focus-visible,
body .rac-cat .rac-cat-title a:focus-visible {
	outline: 2px solid var(--ra-cyan-300, #7df0f4);
	outline-offset: 3px;
}
body .rac-cat .rac-cat-title a:focus-visible::after {
	outline: 2px solid var(--ra-cyan-300, #7df0f4);
	outline-offset: -2px;
}
body .rac-cat .rac-cat-card:focus-within {
	border-color: rgba(47, 224, 230, .45);
}

@media (hover: hover) and (pointer: fine) {
	body .rac-cat .rac-cat-card:hover {
		transform: translateY(-4px);
		border-color: rgba(47, 224, 230, .4);
		box-shadow: 0 28px 50px -28px rgba(0, 0, 0, .85), 0 0 0 1px rgba(47, 224, 230, .08);
	}
	body .rac-cat .rac-cat-card:hover .rac-cat-media img {
		transform: scale(1.03);
	}
	body .rac-cat a.rac-cat-btn:hover,
	body .rac-cat .rac-cat-card:hover a.rac-cat-btn {
		background: var(--ra-cyan-300, #7df0f4);
		box-shadow: 0 14px 30px -12px rgba(47, 224, 230, .75), 0 1px 0 rgba(255, 255, 255, .4) inset;
	}
	body .rac-cat .rac-cat-card:hover a.rac-cat-btn svg {
		transform: translateX(-3px);
	}
}

body .rac-cat-empty {
	margin: 0;
	color: var(--ra-text-2, #c2cde8);
	font-size: 18px;
}

@media (max-width: 420px) {
	body .rac-cat .rac-cat-body { padding: 20px 18px 20px; }
	body .rac-cat .rac-cat-title { font-size: 21px; }
	body .rac-cat a.rac-cat-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
	body .rac-cat .rac-cat-card,
	body .rac-cat .rac-cat-media img,
	body .rac-cat a.rac-cat-btn,
	body .rac-cat a.rac-cat-btn svg { transition: none; }
	body .rac-cat .rac-cat-card:hover,
	body .rac-cat .rac-cat-card:hover .rac-cat-media img,
	body .rac-cat .rac-cat-card:hover a.rac-cat-btn svg,
	body .rac-cat a.rac-cat-btn:active { transform: none; }
}
