/**
 * Nadura customer stories.
 *
 * The rail is intentionally full bleed on its trailing edge; editorial copy
 * owns its padding. Slide slot geometry remains identical in every state.
 */

.nv-story-carousel {
	--nv-ink: var(--ecui-color-text, #161a17);
	--nv-muted: var(--ecui-color-muted, #69706b);
	--nv-line: var(--ecui-color-border, #dfe3df);
	--nv-paper: var(--ecui-color-surface, #fff);
	--nv-soft: #f1f3ef;
	--nv-accent: var(--ecui-color-accent, #32553d);
	--nv-active-inset: 24px;
	inline-size: 100%;
	min-inline-size: 0;
	overflow: hidden;
	background: var(--nv-paper);
	color: var(--nv-ink);
	font-family: var(--ecui-font-family, inherit);
}

.nv-story-carousel *,
.nv-story-carousel *::before,
.nv-story-carousel *::after {
	box-sizing: border-box;
}

.nv-story-carousel__shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 0;
	padding-block: clamp(3rem, 6vw, 6rem);
	padding-inline: 0;
}

.nv-story-carousel__intro {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	min-inline-size: 0;
	padding-block-start: clamp(0.25rem, 2vw, 2rem);
	padding-inline: max(clamp(1.5rem, 4vw, 4rem), env(safe-area-inset-left)) clamp(1.5rem, 3vw, 3rem);
}

.nv-story-carousel__trustpilot {
	display: inline-flex;
	max-inline-size: 174px;
	margin-block-end: clamp(2rem, 4vw, 3.75rem);
	border-radius: 3px;
}

.nv-story-carousel__trustpilot img {
	display: block;
	inline-size: auto;
	max-inline-size: 100%;
	block-size: auto;
}

.nv-story-carousel__trustpilot:focus-visible,
.nv-story-carousel__cta:focus-visible,
.nv-story-carousel__arrow:focus-visible,
.nv-story-carousel__dot:focus-visible,
.nv-story-carousel__play:focus-visible,
.nv-story-carousel__product-copy:focus-visible,
.nv-story-carousel__product-plus:focus-visible {
	outline: 2px solid var(--nv-accent);
	outline-offset: 4px;
}

.nv-story-carousel__eyebrow {
	margin: 0 0 0.75rem;
	color: var(--nv-muted);
	font-size: clamp(0.7rem, 0.68rem + 0.08vw, 0.78rem);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nv-story-carousel__heading {
	max-inline-size: 10ch;
	margin: 0;
	font-size: clamp(2.15rem, 1.75rem + 1.5vw, 3.75rem);
	font-weight: 500;
	line-height: 0.98;
	letter-spacing: -0.045em;
}

.nv-story-carousel__description {
	max-inline-size: 29rem;
	margin: 1.25rem 0 0;
	color: var(--nv-muted);
	font-size: clamp(0.92rem, 0.88rem + 0.15vw, 1rem);
	line-height: 1.65;
}

.nv-story-carousel__cta {
	display: inline-flex;
	align-items: center;
	gap: 1.5rem;
	min-block-size: 46px;
	margin-block-start: 1.75rem;
	padding: 0.7rem 1.2rem;
	border: 1px solid var(--nv-ink);
	border-radius: 999px;
	color: var(--nv-ink);
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease;
}

.nv-story-carousel__cta:hover {
	background: var(--nv-ink);
	color: #fff;
}

.nv-story-carousel__desktop-arrows,
.nv-story-carousel__mobile-controls {
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.nv-story-carousel__desktop-arrows {
	margin-block-start: auto;
	padding-block-start: 2.5rem;
}

.nv-story-carousel__arrow {
	display: inline-grid !important;
	place-items: center;
	inline-size: 44px !important;
	min-inline-size: 44px !important;
	block-size: 44px !important;
	min-block-size: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--nv-line) !important;
	border-radius: 50% !important;
	background: var(--nv-paper) !important;
	color: var(--nv-ink) !important;
	font: inherit !important;
	font-size: 1.1rem !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.nv-story-carousel__arrow:hover:not(:disabled) {
	border-color: var(--nv-ink) !important;
	background: var(--nv-ink) !important;
	color: #fff !important;
}

.nv-story-carousel__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.nv-story-carousel__stage {
	min-inline-size: 0;
	overflow: hidden;
}

.nv-story-carousel__viewport {
	container-type: inline-size;
	inline-size: 100%;
	min-inline-size: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding-block: 2.5rem 1rem;
	scroll-behavior: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline-start: var(--nv-active-inset);
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x pan-y pinch-zoom;
	cursor: grab;
}

.nv-story-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.nv-story-carousel__viewport.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
	user-select: none;
}

.nv-story-carousel__track {
	display: flex;
	align-items: flex-start;
	gap: clamp(0.8rem, 1.4vw, 1.25rem);
	inline-size: max-content;
	margin: 0;
	padding-block: 0;
	padding-inline: 0;
	list-style: none;
}

/*
 * Real flex spacers keep the first and final cards centreable even when a
 * theme normalises list padding or the browser reports offsets from a
 * different offset parent.
 */
.nv-story-carousel__track::before,
.nv-story-carousel__track::after {
	display: block;
	flex: 0 0 auto;
	block-size: 1px;
	content: "";
	pointer-events: none;
}

.nv-story-carousel__track::before {
	inline-size: var(--nv-carousel-leading, 0);
}

.nv-story-carousel__track::after {
	inline-size: var(--nv-carousel-trailing, 0);
}

.nv-story-carousel__track > li::before,
.nv-story-carousel__track > li::after {
	display: none !important;
	content: none !important;
}

.nv-story-carousel__slide {
	flex: 0 0 clamp(220px, 32cqi, 290px);
	min-inline-size: 0;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.nv-story-carousel__figure {
	margin: 0;
}

.nv-story-carousel__media {
	position: relative;
	inline-size: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--nv-soft);
	transform: scale(0.82);
	transform-origin: center bottom;
	transition: transform var(--nv-carousel-duration, 420ms) cubic-bezier(0.22, 1, 0.36, 1), opacity var(--nv-carousel-duration, 420ms) ease;
	opacity: 0.58;
}

.nv-story-carousel__slide.is-active .nv-story-carousel__media {
	transform: scale(1.08);
	opacity: 1;
}

.nv-story-carousel__media video {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	background: var(--nv-soft);
}

.nv-story-carousel__media::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 60%, rgb(10 14 11 / 14%));
	content: "";
	pointer-events: none;
}

.nv-story-carousel__play {
	position: absolute !important;
	z-index: 2;
	inset: 50% auto auto 50% !important;
	display: grid !important;
	place-items: center;
	inline-size: clamp(58px, 5vw, 64px) !important;
	min-inline-size: 58px !important;
	block-size: clamp(58px, 5vw, 64px) !important;
	min-block-size: 58px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgb(255 255 255 / 58%) !important;
	border-radius: 50% !important;
	background: rgb(255 255 255 / 92%) !important;
	box-shadow: 0 12px 35px rgb(9 16 11 / 18%);
	color: var(--nv-ink) !important;
	transform: translate(-50%, -50%);
	cursor: pointer;
	transition: background-color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.nv-story-carousel__play:hover {
	background: #fff !important;
	transform: translate(-50%, -50%) scale(1.05);
}

.nv-story-carousel__play-icon {
	inline-size: 0;
	block-size: 0;
	margin-inline-start: 4px;
	border-block: 7px solid transparent;
	border-inline-start: 11px solid currentColor;
}

.nv-story-carousel__play.is-playing {
	opacity: 0;
}

.nv-story-carousel__play.is-playing:focus-visible,
.nv-story-carousel__media:hover .nv-story-carousel__play.is-playing {
	opacity: 1;
}

.nv-story-carousel__play.is-playing .nv-story-carousel__play-icon {
	inline-size: 10px;
	block-size: 14px;
	margin: 0;
	border: 0;
	border-inline: 3px solid currentColor;
}

.nv-story-carousel__caption {
	min-block-size: 1.35rem;
	margin-block-start: 0.7rem;
	color: var(--nv-muted);
	font-size: 0.78rem;
	line-height: 1.35;
	opacity: 0;
	transition: opacity 180ms ease;
}

.nv-story-carousel__slide.is-active .nv-story-carousel__caption {
	opacity: 1;
}

.nv-story-carousel__product,
.nv-story-carousel__product-spacer {
	min-block-size: 78px;
}

.nv-story-carousel__product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding-block: 1rem;
	border-block-end: 1px solid var(--nv-line);
	color: var(--nv-ink);
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(5px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.nv-story-carousel__slide.is-active .nv-story-carousel__product {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition-delay: 100ms, 100ms, 0s;
}

.nv-story-carousel__product-copy {
	display: flex;
	min-inline-size: 0;
	flex-direction: column;
	gap: 0.22rem;
	color: inherit;
	text-decoration: none;
}

.nv-story-carousel__product-name {
	overflow: hidden;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nv-story-carousel__product-category {
	overflow: hidden;
	color: var(--nv-muted);
	font-size: 0.73rem;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nv-story-carousel__product-end {
	display: flex;
	align-items: center;
	gap: clamp(0.8rem, 1.5vw, 1.35rem);
}

.nv-story-carousel__product-price {
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.nv-story-carousel__product-price .amount,
.nv-story-carousel__product-price ins,
.nv-story-carousel__product-price del {
	color: inherit;
	font: inherit;
}

.nv-story-carousel__product-plus {
	display: grid;
	place-items: center;
	inline-size: 38px;
	min-inline-size: 38px;
	block-size: 38px;
	min-block-size: 38px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--nv-line);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.15rem;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nv-story-carousel__product-plus:hover,
.nv-story-carousel__product-plus:focus-visible {
	border-color: var(--nv-ink);
	background: var(--nv-ink);
	color: #fff;
}

.nv-story-carousel__mobile-controls {
	justify-content: center;
	min-block-size: 44px;
	margin-block-start: 1.25rem;
	padding-inline-end: max(clamp(1.5rem, 4vw, 4rem), env(safe-area-inset-right));
}

.nv-story-carousel__mobile-controls > .nv-story-carousel__arrow {
	display: none !important;
}

.nv-story-carousel__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
}

.nv-story-carousel__dot {
	position: relative;
	display: block !important;
	inline-size: 28px !important;
	min-inline-size: 28px !important;
	block-size: 28px !important;
	min-block-size: 28px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	cursor: pointer;
}

.nv-story-carousel__dot::before {
	position: absolute;
	inset: 50% auto auto 50%;
	inline-size: 5px;
	block-size: 5px;
	border-radius: 50%;
	background: #b7bdb8;
	content: "";
	transform: translate(-50%, -50%);
	transition: inline-size 180ms ease, background-color 180ms ease;
}

.nv-story-carousel__dot.is-active::before {
	inline-size: 18px;
	border-radius: 999px;
	background: var(--nv-ink);
}

@media (max-width: 767px) {
	.nv-story-carousel { --nv-active-inset: 20px; }

	.nv-story-carousel__shell {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
		padding-block: 2.5rem 2rem;
		padding-inline-start: 0;
		padding-inline-end: 0;
	}

	.nv-story-carousel__intro {
		padding: 0 max(1.25rem, env(safe-area-inset-left));
	}

	.nv-story-carousel__trustpilot {
		max-inline-size: 154px;
		margin-block-end: 2rem;
	}

	.nv-story-carousel__heading {
		max-inline-size: 12ch;
		font-size: clamp(2rem, 9vw, 2.8rem);
	}

	.nv-story-carousel__description {
		max-inline-size: 34rem;
		margin-block-start: 1rem;
	}

	.nv-story-carousel__cta {
		margin-block-start: 1.35rem;
	}

	.nv-story-carousel__desktop-arrows {
		display: none;
	}

	.nv-story-carousel__viewport {
		padding-block: 1.6rem 0.5rem;
		scroll-padding-inline-start: var(--nv-active-inset);
	}

	.nv-story-carousel__slide {
		flex-basis: min(84cqi, 390px);
		scroll-snap-align: start;
	}

	.nv-story-carousel__media {
		transform: scale(0.86);
		transform-origin: 50% 50%;
		opacity: 0.62;
	}

	.nv-story-carousel__slide.is-active .nv-story-carousel__media {
		transform: scale(1);
	}

	.nv-story-carousel__caption {
		padding-inline: 0.1rem;
	}

	.nv-story-carousel__mobile-controls {
		justify-content: space-between;
		margin-block-start: 0.7rem;
		padding-inline: max(1.25rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right));
	}

	.nv-story-carousel__mobile-controls > .nv-story-carousel__arrow {
		display: inline-grid !important;
	}

	.nv-story-carousel__product,
	.nv-story-carousel__product-spacer {
		min-block-size: 75px;
	}

	.nv-story-carousel__product {
		padding-block: 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nv-story-carousel__media,
	.nv-story-carousel__product,
	.nv-story-carousel__cta,
	.nv-story-carousel__arrow,
	.nv-story-carousel__dot::before {
		transition-duration: 0.01ms !important;
	}
}
