/* ============================================================
   Hero Slider — премиум сворачивающиеся карточки на ПК + swipe.
   ============================================================ */

.hero-slider {
	--hs-track-height: 660px;
	--hs-collapsed-w: 95px;
	--hs-gap: 8px;
	--hs-radius: 0;
	--hs-easing: cubic-bezier(0.22, 1, 0.36, 1);
	--hs-duration: 700ms;

	background: var(--color-bg, #000);
	color: var(--color-fg, #fff);
	padding: 16px 16px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hero-slider__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--hs-radius);
}

.hero-slider__track {
	display: flex;
	gap: var(--hs-gap);
	height: var(--hs-track-height);
	will-change: transform;
}

/* ===== Slide ===== */
.hero-slider__slide {
	position: relative;
	overflow: hidden;
	flex: 0 0 var(--hs-collapsed-w);
	min-width: var(--hs-collapsed-w);
	transition: flex-basis var(--hs-duration) var(--hs-easing),
		min-width var(--hs-duration) var(--hs-easing),
		flex-grow var(--hs-duration) var(--hs-easing);
	cursor: pointer;
	border-radius: var(--hs-radius);
}

.hero-slider__slide.is-active {
	flex: 1 1 auto;
	min-width: 0;
	cursor: default;
}

.hero-slider__bg {
	position: absolute;
	inset: 0;
	background-color: #d9d9d9;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	z-index: 0;
}

.hero-slider__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.2) 100%);
	z-index: 1;
	pointer-events: none;
}

/* Кнопка-«разворот» поверх свернутого слайда */
.hero-slider__expand {
	position: absolute;
	inset: 0;
	z-index: 5;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
	font: inherit;
	color: transparent;
}

.hero-slider__slide.is-active .hero-slider__expand {
	display: none;
}

/* ===== Inner content ===== */
.hero-slider__inner {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 16px 24px 24px;
	gap: 24px;
}

/* Заголовок — крупный, чёрный, плотный */
.hero-slider__title {
	margin: 0;
	font-family: inherit;
	font-weight: 400;
	font-size: 96px;
	line-height: 90px;
	letter-spacing: -0.05em;
	color: #000;
	white-space: nowrap;
	transition: font-size var(--hs-duration) var(--hs-easing),
		opacity var(--hs-duration) var(--hs-easing);
}

.hero-slider__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hero-slider__slide-subtitle {
	margin: 0;
	font-size: 14px;
	line-height: 18px;
	color: #fff;
}

/* Свернутый: заголовок остаётся горизонтальным и обрезается узкой колонкой */
.hero-slider__slide:not(.is-active) .hero-slider__inner {
	pointer-events: none;
}

/* Кнопки внутри слайда */
.hero-slider__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	transition: opacity var(--hs-duration) var(--hs-easing),
		transform var(--hs-duration) var(--hs-easing);
}

.hero-slider__slide:not(.is-active) .hero-slider__buttons {
	pointer-events: none;
	flex-wrap: nowrap;
}

/* ===== Прогресс ===== */
.hero-slider__progress {
	display: flex;
	gap: 8px;
	align-items: center;
}

.hero-slider__progress-item {
	flex: 1 1 0;
	min-width: 0;
	height: 4px;
	background: rgba(83, 85, 76, 0.33);
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background var(--hs-duration) var(--hs-easing);
	border-radius: 2px;
}

.hero-slider__progress-item.is-active {
	background: #fff;
}

/* ===== Низ: тексты + кнопки ===== */
.hero-slider__bottom {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.hero-slider__copy {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 845px;
}

.hero-slider__heading {
	margin: 0;
	font-size: 38px;
	line-height: 32px;
	letter-spacing: -0.05em;
	font-weight: 400;
	color: #fff;
}

.hero-slider__subheading {
	margin: 0;
	font-size: 21px;
	line-height: 24px;
	letter-spacing: -0.02em;
	font-weight: 500;
	color: #fff;
}

.hero-slider__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.hero-slider__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 9px 44px;
	white-space: nowrap;
	flex-shrink: 0;
	border: 0;
	border-radius: 22px;
	font-weight: 400;
	font-size: 14px;
	line-height: 18px;
	letter-spacing: -0.05em;
	text-decoration: none;
	color: #fff;
	transition: background-color 180ms var(--hs-easing),
		color 180ms var(--hs-easing);
}

.hero-slider__btn--primary {
	background: #000;
}

.hero-slider__btn--secondary {
	background: #0458f4;
}

.hero-slider__btn--primary:hover,
.hero-slider__btn--primary:focus-visible {
	background: #000;
	color: #969696;
}

.hero-slider__btn--primary:active {
	background: rgba(0, 0, 0, 0.9);
	color: #969696;
}

.hero-slider__btn--primary.is-disabled,
.hero-slider__btn--primary[aria-disabled="true"] {
	background: #d9d9d9;
	color: #fff;
	pointer-events: none;
}

.hero-slider__btn--secondary:hover,
.hero-slider__btn--secondary:focus-visible {
	background: #0458f4;
	color: rgba(255, 255, 255, 0.5);
}

.hero-slider__btn--secondary:active {
	background: rgba(4, 88, 244, 0.9);
	color: rgba(255, 255, 255, 0.5);
}

.hero-slider__btn--secondary.is-disabled,
.hero-slider__btn--secondary[aria-disabled="true"] {
	background: rgba(4, 88, 244, 0.25);
	color: #fff;
	pointer-events: none;
}

.hero-slider__arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	text-decoration: none;
	margin-left: auto;
	font-size: 14px;
	font-weight: 500;
	line-height: 18px;
	letter-spacing: -0.05em;
}

.hero-slider__arrow-icon {
	width: 36px;
	height: 36px;
	border-radius: 9.536px;
	border: 1px solid rgba(150, 150, 150, 0.33);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.hero-slider__arrow-icon svg {
	width: 32.571px;
	height: 32.571px;
}

/* ============================================================
   Mobile (≤ 900px): swipe-карусель
   ============================================================ */

/* ============================================================
   Tablet (901–1280px): такие же сворачивающиеся карточки,
   но компактнее: collapsed 91px, gap 9px, padding 9px.
   ============================================================ */

@media (min-width: 901px) and (max-width: 1280px) {
	.hero-slider {
		--hs-collapsed-w: 91px;
		--hs-gap: 9px;
		padding: 12px 12px 20px;
	}

	.hero-slider__inner {
		padding: 12px 16px 18px;
		gap: 16px;
	}

	.hero-slider__title {
		font-size: 72px;
		line-height: 70px;
	}

	.hero-slider__btn {
		padding: 9px 28px;
	}

	.hero-slider__heading {
		font-size: 32px;
		line-height: 30px;
	}

	.hero-slider__subheading {
		font-size: 18px;
		line-height: 22px;
	}
}

@media (max-width: 900px) {
	.hero-slider {
		--hs-track-height: 532px;
		padding: 0 12px 24px;
		gap: 16px;
		/* Трек из N слайдов по 100% шире вьюпорта — клипуем на корне,
		   чтобы peek соседних слайдов не растягивал страницу. */
		overflow: hidden;
	}

	.hero-slider__viewport {
		overflow: visible;
	}

	.hero-slider__track {
		gap: 0;
		transition: transform var(--hs-duration) var(--hs-easing);
		touch-action: pan-y;
	}

	.hero-slider__slide,
	.hero-slider__slide.is-active {
		flex: 0 0 100%;
		min-width: 100%;
		cursor: default;
		transition: opacity 0.4s ease;
	}

	.hero-slider__slide:not(.is-active) {
		opacity: 1;
	}

	.hero-slider__slide:not(.is-active) .hero-slider__title {
		position: static;
		transform: none;
		font-size: 40px;
		line-height: 40px;
	}

	.hero-slider__slide:not(.is-active) .hero-slider__buttons {
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}

	.hero-slider__inner {
		padding: 16px 21px 20px;
		gap: 16px;
	}

	.hero-slider__title {
		font-size: 40px;
		line-height: 40px;
		letter-spacing: -0.05em;
	}

	.hero-slider__expand {
		display: none;
	}

	.hero-slider__heading {
		font-size: 24px;
		line-height: 24px;
		letter-spacing: -0.05em;
	}

	.hero-slider__subheading {
		display: none;
	}

	.hero-slider__actions,
	.hero-slider__buttons {
		gap: 8px;
		align-items: stretch;
		flex-wrap: nowrap;
		width: 100%;
	}

	.hero-slider__btn {
		flex: 1 1 0;
		min-width: 0;
		padding: 9px 14px;
	}

	.hero-slider__arrow {
		order: -1;
		margin-left: 0;
		margin-bottom: 4px;
		width: 100%;
	}
}
