:root {
	--peek: 80px; /* сколько соседних слайдов видно по бокам */
	--accent: #ee612e; /* апельсиновый для карточек */
	--ink: #101114;
	--muted: #6b7280;
	--dot: #d1d5db;
	--dot-active: #111827;
	--btn-bg: #ffffffcc;
	--btn-bg-hover: #fff;
}

.carousel {
	width: 100%;
	position: relative;
	&::after {
		content: '';
		position: absolute;
		top: 70px;
		right: 0;
		width: 39px;
		height: 200px;
		transform: rotate(180deg);
		background: url('https://opendoors.xtf.com.ua/wp-content/uploads/2025/09/panel-open.png') center center / contain no-repeat;
	}
}

.carousel p:empty{
	display: none;
}

.carousel__viewport {
	position: relative;
	overflow: visible; /* важно — чтобы боковые кусочки были видны */
}

.carousel__mask { /* реальное окно прокрутки */
	overflow: hidden;
}

.carousel__track {
	display: flex;
	align-items: stretch;
	will-change: transform;
	transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}

/* ширина карточки = ширина окна минус два peek и минус половина gap с каждой стороны,
   чтобы визуально вокруг оставалось одинаково */
.carousel__slide {
	flex: 0 0 calc(100% - (var(--peek) * 2));
	min-width: 260px;
	border-radius: var(--radius);
	overflow: clip;
	background: #fff;
	position: relative;
	transform-origin: center center;
	transition: transform .35s ease;
}

.card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	height: calc(100vh - 100px);
	min-height: 600px;
}

.card__media {
	position: relative;
	height: inherit;
	min-height: 600px;
}

.card__body {
	position: relative;
	background: var(--accent);
	color: #fff;
	padding: 50px 20%;
	display: flex;
	row-gap: 20px;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;

	&::before {
		content: '';
		position: absolute;
		top: 70px;
		left: -38px;
		width: 39px;
		height: 200px;
		transform: rotate(180deg);
		background: url('https://opendoors.xtf.com.ua/wp-content/uploads/2025/09/panel-open.png') center center / contain no-repeat;
	}
}

.card__eyebrow {
	font-size: 12px;
	width: 150px;
	border-bottom: 1px solid #ffffff;
	padding-bottom: 10px;
}

.card__title {
	font-size: clamp(32px, 3.5vw, 48px);
	line-height: 1.2;
	margin: 10px 0 0;
	font-weight: 800;
	color: #ffffff !important;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.card__more {
	font-size: 16px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	overflow: hidden;
}

.card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	padding: 12px 18px;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-weight: 600;
	border: 0;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
}

/* Навигация */
.carousel__nav {
	display: flex;
	gap: 14px;
	margin-top: -40px;
	margin-left: calc(50% - var(--peek) + 20px);
	position: relative;
	align-items: center;
}

.carousel__dots {
	display: flex;
	gap: 15px;
}

.carousel__dot {
	padding: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid #ffffff;
	cursor: pointer;
}

.carousel__dot[aria-current="true"] {
	background: #ffffff;
}

.carousel__btn {
	appearance: none;
	border: 0;
	cursor: pointer;
	position: absolute;
	top: 50%;
	translate: 0 -50%;
	z-index: 10;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--btn-bg);
	backdrop-filter: blur(6px);
	display: grid;
	place-items: center;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.carousel__btn:hover {
	background: var(--btn-bg-hover);
}

.carousel__btn--prev {
	left: calc(var(--peek) / 2);
}

.carousel__btn--next {
	right: calc(var(--peek) / 2);
}

.carousel__btn svg {
	width: 22px;
	height: 22px;
}

.carousel__more {
	color: #ffffff;
}

.carousel__more a {
	color: #ffffff;
	text-decoration: underline;
}
.carousel__more a:hover {
	color: #000;
}

@media (max-width: 1000px) {
	:root {
		--peek: 40px;
	}
}


@media (max-width: 780px) {
	:root {
		--peek: 0px;
	}

	.carousel {
		&::after {
			display: none;
		}
	}

	.carousel__nav {
		align-items: center;
		justify-content: center;
		margin-left: 0;
	}

	.card {
		height: 100%;
		display: flex;
		flex-direction: column;
	}

	.card__media {
		min-height: 320px;
		object-fit: cover;
	}

	.card__body{
		padding: 50px 60px 70px;
		&::before {
			top: -119px;
			left: 78px;
			width: 39px;
			height: 200px;
			transform: rotate(270deg);
		}
	}

	.carousel__btn {
		width: 40px;
		height: 40px;
	}

	.carousel__btn--prev {
		left: 20px;
	}

	.carousel__btn--next {
		right: 20px;
	}
}