.tw-courses {
	--tw-bg: #ffffff;
	--tw-ink: #0e1b3d;
	--tw-muted: #5c6b82;
	--tw-link: #2457d6;
	--tw-badge-bg: #ffffff;
	--tw-badge: #12203a;
	--tw-size: 18px;
	--tw-desc: 14px;
	--tw-pad: 16px;
	--tw-border: 1px;
	--tw-border-color: #e6edf5;
	--tw-radius: 22px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	color: var(--tw-ink);
}

.tw-courses__items {
	display: grid;
	gap: 18px;
	align-items: stretch;
}

.tw-courses--grid .tw-courses__items {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tw-courses--list .tw-courses__items {
	grid-template-columns: 1fr;
	max-width: 720px;
}

.tw-course {
	display: flex;
	min-width: 0;
	height: 100%;
	flex-direction: column;
	margin: 0;
	padding: var(--tw-pad);
	border: var(--tw-border) solid var(--tw-border-color);
	border-radius: var(--tw-radius);
	background: var(--tw-bg);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.tw-course__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: calc(var(--tw-radius) - 8px);
	background: #e8eef6;
}

.tw-course__media img,
.tw-course__photo--empty {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tw-course__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	max-width: calc(100% - 24px);
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--tw-badge-bg);
	color: var(--tw-badge);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.tw-course__badge.is-popular {
	background: #f6b423;
	color: #1c2434;
}

.tw-course__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 16px 4px 0;
}

.tw-course__body h3 {
	margin: 0;
	color: var(--tw-ink);
	font-size: var(--tw-size);
	font-weight: 700;
	line-height: 1.3;
}

.tw-course__body h3 a {
	color: inherit;
	text-decoration: none;
}

.tw-course__body p {
	margin: 8px 0 0;
	color: var(--tw-muted);
	font-size: var(--tw-desc);
	line-height: 1.55;
}

.tw-course__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.tw-course__facts li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 6px 10px;
	border-radius: 999px;
	background: #f3f6fb;
	color: #3d4e68;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}

.tw-course__facts svg {
	flex: 0 0 auto;
	color: #607089;
}

.tw-course__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
	padding: 14px 4px 4px;
	border-top: 1px solid #e8eef6;
	color: var(--tw-link);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.tw-course__go {
	display: inline-grid;
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
	place-items: center;
	border-radius: 999px;
	background: #eef3fb;
	color: var(--tw-link);
	transition: background-color 0.25s ease, color 0.25s ease;
}

.tw-course__go svg {
	transition: transform 0.25s ease;
}

.tw-course__foot:hover .tw-course__go,
.tw-course__foot:focus-visible .tw-course__go,
.tw-course:hover .tw-course__go {
	background: var(--tw-link);
	color: #fff;
}

.tw-course__foot:hover .tw-course__go svg,
.tw-course__foot:focus-visible .tw-course__go svg,
.tw-course:hover .tw-course__go svg {
	transform: rotate(-45deg);
}

.tw-courses .tw-carousel {
	position: static;
	width: 100%;
	max-width: 100%;
	padding: 0;
}

.tw-courses .tw-carousel__bar {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin: 0 0 14px;
}

.tw-courses .tw-carousel__nav {
	position: static;
	top: auto;
	right: auto;
	left: auto;
	display: inline-grid;
	width: 44px;
	height: 44px;
	place-items: center;
	padding: 0;
	border: 1px solid #e6edf5;
	border-radius: 999px;
	background: #fff;
	color: var(--tw-arrow, #071633);
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(7, 22, 51, 0.08);
}

.tw-courses .tw-carousel__nav::before {
	content: "";
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
}

.tw-courses .tw-carousel__nav--prev::before {
	transform: translateX(2px) rotate(-135deg);
}

.tw-courses .tw-carousel__nav--next::before {
	transform: translateX(-2px) rotate(45deg);
}

.tw-courses .tw-carousel__nav:hover:not(:disabled),
.tw-courses .tw-carousel__nav:focus-visible:not(:disabled) {
	border-color: var(--tw-arrow-hover, #071633);
	background: var(--tw-arrow-hover, #071633);
	color: #fff;
}

.tw-courses .tw-carousel__nav:disabled {
	opacity: 0.4;
	cursor: default;
}

.tw-courses .tw-carousel__rail {
	display: flex;
	gap: 16px;
	width: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.tw-courses .tw-carousel__rail.is-jump {
	scroll-snap-type: none;
	scroll-behavior: auto;
}

.tw-courses .tw-carousel__rail::-webkit-scrollbar {
	display: none;
}

.tw-courses--carousel .tw-slide {
	flex: 0 0 calc((100% - 32px) / 3.15);
	min-width: 0;
	scroll-snap-align: start;
}

.tw-courses .tw-carousel__dots {
	position: static;
	right: auto;
	bottom: auto;
	left: auto;
	display: flex;
	justify-content: flex-start;
	gap: 8px;
	margin: 18px 0 0;
	padding: 0;
}

.tw-courses .tw-carousel__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #d5deeb;
	cursor: pointer;
}

.tw-courses .tw-carousel__dot.is-active {
	width: 22px;
	background: #071633;
}

@media (max-width: 1100px) {
	.tw-courses--grid .tw-courses__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tw-courses--carousel .tw-slide {
		flex-basis: calc((100% - 16px) / 2.15);
	}
}

@media (max-width: 680px) {
	.tw-courses--grid .tw-courses__items,
	.tw-courses--list .tw-courses__items {
		grid-template-columns: 1fr;
		max-width: none;
	}

	.tw-courses--carousel .tw-slide {
		flex-basis: 100%;
	}

	.tw-courses .tw-carousel__nav {
		display: inline-grid;
		width: 38px;
		height: 38px;
	}
}

.tw-motion .tw-courses:not(.tw-courses--carousel) .tw-course,
.tw-motion .tw-courses--carousel {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease var(--tw-delay, 0ms), transform 0.6s ease var(--tw-delay, 0ms), box-shadow 0.3s ease;
}

.tw-motion .tw-courses:not(.tw-courses--carousel) .tw-course.is-in,
.tw-motion .tw-courses--carousel.is-in {
	opacity: 1;
	transform: none;
}

.tw-course__media img {
	transition: transform 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
	.tw-motion .tw-courses:not(.tw-courses--carousel) .tw-course.is-in:hover {
		transform: translateY(-6px);
		box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
	}

	.tw-course:hover .tw-course__media img {
		transform: scale(1.045);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tw-motion .tw-courses:not(.tw-courses--carousel) .tw-course,
	.tw-motion .tw-courses--carousel,
	.tw-course__media img {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
