.hero-slider {
	--hero-accent: #ef233c;
	--hero-dark: #09111f;
	--hero-control-size: 48px;
	padding-top: 24px;
}

.hero-slider__stage {
	position: relative;
	overflow: hidden;
	min-height: clamp(520px, 68vw, 760px);
	background: var(--hero-dark);
	border-radius: 24px;
	box-shadow: 0 24px 70px rgba(4, 13, 28, 0.2);
	isolation: isolate;
}

.hero-slider__track {
	position: relative;
	min-height: inherit;
}

.hero-slide {
	position: absolute;
	inset: 0;
	display: flex;
	min-height: inherit;
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translateX(4%);
	transition:
		opacity 700ms ease,
		transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1),
		visibility 700ms ease;
}

.hero-slide.is-active {
	position: relative;
	z-index: 2;
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: translateX(0);
}

.hero-slide__background {
	position: absolute;
	inset: 0;
	z-index: -2;
	overflow: hidden;
}

.hero-slide__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.08);
	transition: transform 8s linear;
}

.hero-slide.is-active .hero-slide__image {
	transform: scale(1);
}

.hero-slide__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			90deg,
			rgba(5, 12, 24, 0.94) 0%,
			rgba(5, 12, 24, 0.78) 38%,
			rgba(5, 12, 24, 0.22) 72%,
			rgba(5, 12, 24, 0.18) 100%
		),
		linear-gradient(
			0deg,
			rgba(5, 12, 24, 0.8) 0%,
			transparent 48%
		);
}

.hero-slide__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	width: 100%;
	min-height: inherit;
	padding: clamp(34px, 6vw, 82px);
	padding-bottom: clamp(92px, 10vw, 126px);
}

.hero-slide__content {
	width: min(760px, 76%);
	color: #fff;
	transform: translateY(30px);
	opacity: 0;
	transition:
		transform 700ms ease 180ms,
		opacity 700ms ease 180ms;
}

.hero-slide.is-active .hero-slide__content {
	transform: translateY(0);
	opacity: 1;
}

.hero-slide__category {
	display: inline-flex;
	align-items: center;
	min-height: 31px;
	margin-bottom: 18px;
	padding: 6px 13px;
	background: var(--hero-accent);
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

.hero-slide__title {
	max-width: 820px;
	margin: 0;
	font-size: clamp(34px, 5.3vw, 76px);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.02;
	text-wrap: balance;
}

.hero-slide__title a {
	color: #fff;
	text-decoration: none;
}

.hero-slide__title a:hover,
.hero-slide__title a:focus-visible {
	color: rgba(255, 255, 255, 0.82);
}

.hero-slide__excerpt {
	max-width: 680px;
	margin: 22px 0 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: clamp(15px, 1.5vw, 19px);
	line-height: 1.7;
}

.hero-slide__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin-top: 24px;
	color: rgba(255, 255, 255, 0.74);
	font-size: 13px;
	font-weight: 600;
}

.hero-slide__meta time,
.hero-slide__meta span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.hero-slide__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 48px;
	margin-top: 30px;
	padding: 12px 22px;
	background: #fff;
	border: 1px solid #fff;
	border-radius: 999px;
	color: #111827;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	transition:
		background-color 200ms ease,
		border-color 200ms ease,
		color 200ms ease,
		transform 200ms ease;
}

.hero-slide__button:hover,
.hero-slide__button:focus-visible {
	background: var(--hero-accent);
	border-color: var(--hero-accent);
	color: #fff;
	transform: translateY(-2px);
}

.hero-slide__button span {
	font-size: 20px;
	line-height: 1;
}

.hero-slide__number {
	align-self: center;
	display: flex;
	align-items: flex-end;
	gap: 10px;
	color: rgba(255, 255, 255, 0.24);
	font-weight: 800;
	line-height: 1;
}

.hero-slide__number span {
	font-size: clamp(76px, 10vw, 156px);
	letter-spacing: -0.08em;
}

.hero-slide__number small {
	margin-bottom: 18px;
	font-size: 17px;
}

.hero-slider__controls {
	position: absolute;
	right: clamp(24px, 4vw, 58px);
	bottom: 30px;
	left: clamp(24px, 4vw, 58px);
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 18px;
}

.hero-slider__arrow {
	display: inline-flex;
	flex: 0 0 var(--hero-control-size);
	align-items: center;
	justify-content: center;
	width: var(--hero-control-size);
	height: var(--hero-control-size);
	padding: 0;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	transition:
		background-color 200ms ease,
		border-color 200ms ease,
		transform 200ms ease;
	backdrop-filter: blur(12px);
}

.hero-slider__arrow:hover,
.hero-slider__arrow:focus-visible {
	background: var(--hero-accent);
	border-color: var(--hero-accent);
	transform: translateY(-2px);
}

.hero-slider__progress {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 13px;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.hero-slider__progress-track {
	position: relative;
	flex: 1;
	height: 3px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 999px;
}

.hero-slider__progress-bar {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: #fff;
	border-radius: inherit;
}

.hero-slider.is-playing .hero-slider__progress-bar {
	animation: heroProgress var(--hero-duration, 6500ms) linear forwards;
}

@keyframes heroProgress {
	from {
		width: 0;
	}

	to {
		width: 100%;
	}
}

/* Thumbnail navigation */

.hero-thumbnails {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.hero-thumbnail {
	position: relative;
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 13px;
	align-items: center;
	min-width: 0;
	padding: 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	color: #111827;
	cursor: pointer;
	text-align: left;
	transition:
		border-color 200ms ease,
		box-shadow 200ms ease,
		transform 200ms ease;
}

.hero-thumbnail::after {
	position: absolute;
	right: 12px;
	bottom: -1px;
	left: 12px;
	height: 3px;
	background: var(--hero-accent);
	border-radius: 999px 999px 0 0;
	content: "";
	opacity: 0;
	transform: scaleX(0);
	transform-origin: left;
	transition:
		opacity 250ms ease,
		transform 350ms ease;
}

.hero-thumbnail:hover,
.hero-thumbnail:focus-visible {
	border-color: #cbd5e1;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
	transform: translateY(-2px);
}

.hero-thumbnail.is-active {
	border-color: rgba(239, 35, 60, 0.45);
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.11);
}

.hero-thumbnail.is-active::after {
	opacity: 1;
	transform: scaleX(1);
}

.hero-thumbnail__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 1.2 / 1;
	border-radius: 9px;
	background: #e5e7eb;
}

.hero-thumbnail__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 350ms ease;
}

.hero-thumbnail:hover .hero-thumbnail__media img,
.hero-thumbnail.is-active .hero-thumbnail__media img {
	transform: scale(1.06);
}

.hero-thumbnail__content {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 5px;
}

.hero-thumbnail__content small {
	overflow: hidden;
	color: var(--hero-accent);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.hero-thumbnail__content strong {
	display: -webkit-box;
	overflow: hidden;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.hero-thumbnail__content time {
	color: #64748b;
	font-size: 10px;
	font-weight: 600;
}

/* Tablet */

@media (max-width: 1100px) {
	.hero-slider__stage {
		min-height: 620px;
	}

	.hero-slide__content {
		width: min(720px, 90%);
	}

	.hero-slide__number {
		display: none;
	}

	.hero-thumbnails {
		display: flex;
		overflow-x: auto;
		padding: 2px 2px 12px;
		scrollbar-width: thin;
		scroll-snap-type: x mandatory;
	}

	.hero-thumbnail {
		flex: 0 0 270px;
		scroll-snap-align: start;
	}
}

/* Mobile */

@media (max-width: 767px) {
	.hero-slider {
		--hero-control-size: 42px;
		padding-top: 12px;
	}

	.hero-slider__stage {
		min-height: 620px;
		border-radius: 18px;
	}

	.hero-slide__overlay {
		background:
			linear-gradient(
				0deg,
				rgba(4, 10, 20, 0.97) 0%,
				rgba(4, 10, 20, 0.78) 48%,
				rgba(4, 10, 20, 0.25) 100%
			);
	}

	.hero-slide__inner {
		align-items: flex-end;
		padding: 24px;
		padding-bottom: 94px;
	}

	.hero-slide__content {
		width: 100%;
	}

	.hero-slide__category {
		margin-bottom: 14px;
	}

	.hero-slide__title {
		font-size: clamp(32px, 10vw, 48px);
		line-height: 1.04;
	}

	.hero-slide__excerpt {
		display: -webkit-box;
		overflow: hidden;
		font-size: 14px;
		line-height: 1.6;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
	}

	.hero-slide__meta {
		gap: 8px 16px;
		margin-top: 18px;
		font-size: 11px;
	}

	.hero-slide__meta span:last-child {
		display: none;
	}

	.hero-slide__button {
		min-height: 44px;
		margin-top: 22px;
		padding: 10px 18px;
	}

	.hero-slider__controls {
		right: 20px;
		bottom: 22px;
		left: 20px;
		gap: 11px;
	}

	.hero-slider__progress {
		gap: 8px;
	}

	.hero-thumbnail {
		flex-basis: 245px;
		grid-template-columns: 76px minmax(0, 1fr);
	}
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.hero-slide,
	.hero-slide__image,
	.hero-slide__content,
	.hero-slider__arrow,
	.hero-slide__button,
	.hero-thumbnail,
	.hero-thumbnail__media img {
		transition: none;
	}

	.hero-slider__progress-bar {
		animation: none !important;
	}
}