.works-section {
	margin-top: 160px;
	font-family: Golos, sans-serif; /* Замените на ваш шрифт */
}

.works-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 48px;
}

.works-title-main {
	color:#111827;
	font-size: 52px;
	font-style: normal;
	font-weight: 500;
	line-height: 60px;
}

.works-nav {
	display: flex;
	gap: 24px;
}

.works-button-prev,
.works-button-next {
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: 0.3s ease;
}

.works-button-prev:hover,
.works-button-next:hover {
	border-color: #B21B48;
}

/* Карточка */
.work-card {
	background: #F5F6FB;
	border-radius: 16px;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;

	padding: 12px;
}
/* Before / After Slider */
.work-compare-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius:14px;
	overflow: hidden;
	height: 300px;
	--position: 50%;
}

.work-img-after,
.work-img-before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none; /* Чтобы клики проходили сквозь картинки к ползунку */
}

.work-img-after {
	z-index: 1;
}

.work-img-before {
	z-index: 2;
	/* Магия здесь: обрезаем картинку полигоном, правый край которого привязан к переменной */
	clip-path: polygon(0 0, var(--position) 0, var(--position) 100%, 0 100%);
}

.work-compare-range {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: ew-resize;
	z-index: 10;
	margin: 0;
	/* Не перехватываем события: свайп вне кружка листает слайдер,
	   а перетаскивание разделителя идёт только с .work-compare-handle */
	pointer-events: none;
}

.work-compare-handle {
	position: absolute;
	top: 50%;
	/* Позиция кружка тоже привязана к переменной */
	left: var(--position);
	transform: translate(-50%, -50%);
	padding: 12px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Кружок ловит события — за него тянем разделитель */
	pointer-events: auto;
	cursor: ew-resize;
	touch-action: none;
	z-index: 15;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.work-compare-handle::before,
.work-compare-handle::after {
	content: '';
	position: absolute;
	width: 2px;
	height: 200px;
	background: #fff;
	left: 50%;
	transform: translateX(-50%);
}

.work-compare-handle::before { bottom: 100%; }
.work-compare-handle::after { top: 100%; }
/* Информация */
.work-info {
	padding: 24px 12px 12px 12px;
}

.work-category {
	overflow: hidden;
	color:#4B68D4;
	text-overflow: ellipsis;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
}

.work-title {
	overflow: hidden;
	color:#111827;
	text-overflow: ellipsis;
	font-size: 24px;
	font-style: normal;
	font-weight: 500;
	line-height: 32px;

	margin-top: 16px;

	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	align-self: stretch;
}

.work-preview-text {
	overflow: hidden;
	color:#5A616C;
	text-overflow: ellipsis;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;

	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	align-self: stretch;

	margin-top: 12px;
}

/* Кнопка внизу */
.works-footer {
	margin-top: 48px;
}

.works-btn-all {
	color:#FFF;
	font-size: 18px;
	font-style: normal;
	font-weight: 500;
	line-height: 24px;
	padding: 14px 20px 14px 24px;

	border-radius: 64px;
	background:#B90640;

	display: flex;
	align-items: center;
	gap: 12px;
	width: fit-content;
}

.works-btn-all:hover {
	background: #a30039;
	color: #fff;
}


.swiper.works-swiper{
	overflow: visible;
}

@media(max-width:991px){
	.works-section{
		margin-top: 80px;
	}

	.works-title-main{
		font-size: 24px;
		font-style: normal;
		font-weight: 500;
		line-height: 32px;
	}

	.works-nav{
		display: none;
	}

	.work-card{
		padding: 8px;
	}

	.work-compare-slider{
		height: 200px;
	}

	.work-info{
		padding: 16px 8px 8px 8px;
	}

	.work-category{
		font-size: 13px;
		font-style: normal;
		font-weight: 400;
		line-height: 20px;
		height: 20px;
		display: block;
	}

	.works-header{
		margin-bottom: 24px;
	}

	.work-title{
		font-size: 18px;
		font-style: normal;
		font-weight: 500;
		line-height: 24px;

		margin-top: 8px;
	}

	.work-preview-text{
		font-size: 14px;
		font-style: normal;
		font-weight: 400;
		line-height: 20px;

		margin-top: 8px;
	}

	.works-footer{
		margin-top: 24px;
	}

	.works-btn-all{
		font-size: 15px;
		font-style: normal;
		font-weight: 500;
		line-height: 22px;

		padding: 9px 12px 9px 20px;
		gap: 6px;
	}
}