.nova-ugc {
	/*
	 * Figma: sides 250, center 280, gap 49 → cards row 878px;
	 * with arrow slots → ~1046px. Section max 1120.
	 * Track height is locked on the wrap (not on cards) so the section
	 * does not jump; JS sets the exact value from the tallest meta.
	 */
	--nova-ugc-slide-w: 250px;
	--nova-ugc-slide-w-active: 280px;
	--nova-ugc-media-h: 380px;
	--nova-ugc-media-h-active: 422px;
	/* Fallback reserve for the slider track only — not applied to cards. */
	--nova-ugc-meta-reserve: 92px;
	--nova-ugc-track-h: calc(var(--nova-ugc-media-h-active) + var(--nova-ugc-meta-reserve));
	--nova-ugc-gap: 49px;
	--nova-ugc-section-gap: 24px;
	--nova-ugc-arrow-slot: 84px;
	--nova-ugc-cards-w: 878px;
	--nova-ugc-frame-w: 1046px;
	/* Stable arrow Y: half of active media */
	--nova-ugc-arrow-top: calc(var(--nova-ugc-media-h-active) / 2);
	box-sizing: border-box;
	direction: ltr;
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 40px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--nova-ugc-section-gap);
	overflow: hidden;
}

.nova-ugc *,
.nova-ugc *::before,
.nova-ugc *::after {
	box-sizing: border-box;
}

.nova-ugc--empty {
	padding: 24px;
	color: #666;
	font-size: 14px;
	font-family: "Rubik", sans-serif;
	text-align: center;
}

/* Front end: hide Elementor wrappers when the UGC block is disabled or empty. */
body:not(.elementor-editor-active) .nova-ugc-section--hidden {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	background: none !important;
}

body:not(.elementor-editor-active) .elementor-widget-nova-ugc-videos:not(:has(.nova-ugc:not(.nova-ugc--empty))) {
	display: none !important;
}

body:not(.elementor-editor-active) .elementor-column:has(> .elementor-widget-wrap > .elementor-widget-nova-ugc-videos:not(:has(.nova-ugc:not(.nova-ugc--empty)))) {
	display: none !important;
	background: none !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body:not(.elementor-editor-active) .elementor-section:has(> .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-nova-ugc-videos:not(:has(.nova-ugc:not(.nova-ugc--empty)))) {
	display: none !important;
}

.nova-ugc__title {
	margin: 0;
	width: 100%;
	font-family: "Rubik", sans-serif;
	font-weight: 500;
	font-size: 32px;
	line-height: 40px;
	letter-spacing: 0;
	text-align: center;
	color: #000000;
}

.nova-ugc__slider-wrap {
	position: relative;
	width: 100%;
	max-width: var(--nova-ugc-frame-w);
	/* Lock to tallest (center) card — prevents pagination/section jump on slide change. */
	height: var(--nova-ugc-track-h);
	min-height: var(--nova-ugc-track-h);
	margin: 0 auto;
	padding: 0 var(--nova-ugc-arrow-slot) 2px;
	box-sizing: border-box;
	overflow: hidden;
}

.nova-ugc__swiper {
	width: 100%;
	max-width: var(--nova-ugc-cards-w);
	height: 100%;
	margin: 0 auto;
	overflow: hidden;
	padding: 0 0 2px;
	box-sizing: border-box;
}

.nova-ugc__swiper .swiper-wrapper {
	align-items: center;
	height: 100%;
}

.nova-ugc__swiper .swiper-slide {
	/* Fixed Figma width — !important beats stale Elementor inline vars */
	width: 250px !important;
	max-width: 250px !important;
	flex-shrink: 0;
	height: auto;
	max-height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	align-self: center;
	overflow: visible;
	transition: width 0.35s ease, max-width 0.35s ease;
}

.nova-ugc__swiper .swiper-slide-active {
	width: 280px !important;
	max-width: 280px !important;
	height: auto;
	z-index: 2;
}

.nova-ugc__card {
	width: 100%;
	height: auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	/* Figma: video flush with meta — no gap */
	gap: 0;
	background: transparent;
	opacity: 0.85;
	overflow: visible;
	transition: opacity 0.35s ease;
}

.swiper-slide-active .nova-ugc__card {
	opacity: 1;
}

.nova-ugc__media {
	position: relative;
	width: 100%;
	height: var(--nova-ugc-media-h);
	flex: 0 0 auto;
	background: #e8e8e8;
	overflow: hidden;
	transition: height 0.35s ease;
}

.swiper-slide-active .nova-ugc__media {
	height: var(--nova-ugc-media-h-active);
}

/*
 * Beat theme/Elementor `img, video { max-width:100%; height:auto }` —
 * otherwise posters render as a small strip at their intrinsic size.
 */
.nova-ugc .nova-ugc__media > .nova-ugc__poster,
.nova-ugc .nova-ugc__media > .nova-ugc__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	-webkit-user-drag: none;
	user-select: none;
	-webkit-user-select: none;
}

.nova-ugc__poster {
	z-index: 1;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.nova-ugc__poster.is-hidden {
	opacity: 0;
	visibility: hidden;
}

.nova-ugc__video {
	z-index: 0;
	/* Let slide/mute clicks work; block native iOS control interaction. */
	pointer-events: none;
	-webkit-touch-callout: none;
}

/* Hide native media chrome (older iOS often forces play/scrubber overlays). */
.nova-ugc__video::-webkit-media-controls,
.nova-ugc__video::-webkit-media-controls-enclosure,
.nova-ugc__video::-webkit-media-controls-panel,
.nova-ugc__video::-webkit-media-controls-start-playback-button,
.nova-ugc__video::-webkit-media-controls-overlay-play-button {
	display: none !important;
	-webkit-appearance: none !important;
	opacity: 0 !important;
	width: 0 !important;
	height: 0 !important;
	pointer-events: none !important;
}

.nova-ugc__mute {
	position: absolute;
	right: 10px;
	bottom: 10px;
	/* Own compositor layer so the button stays above <video> on older iOS. */
	z-index: 20;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: background 0.2s ease, opacity 0.2s ease;
}

/* Only the centered slide exposes sound control. */
.swiper-slide-active .nova-ugc__mute {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.nova-ugc__mute:hover,
.nova-ugc__mute:focus-visible {
	background: rgba(0, 0, 0, 0.65);
	outline: none;
}

.nova-ugc__mute-icon {
	display: none;
	line-height: 0;
}

.nova-ugc__mute.is-muted .nova-ugc__mute-icon--muted,
.nova-ugc__mute:not(.is-muted) .nova-ugc__mute-icon--unmuted {
	display: block;
}

.nova-ugc__meta {
	direction: rtl;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 8px;
	width: 100%;
	flex: 0 0 auto;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 0;
	text-align: right;
	box-sizing: border-box;
	background-clip: padding-box;
}

.nova-ugc__meta-top {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-height: 14px;
}

.nova-ugc__meta-title {
	flex: 1 1 auto;
	min-width: 0;
	font-family: "Rubik", sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 14px;
	letter-spacing: 0;
	text-align: right;
	color: #000000;
}

.nova-ugc__icon-row {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	flex-shrink: 0;
}

.nova-ugc__icon {
	width: 14px;
	height: 14px;
	object-fit: contain;
	flex-shrink: 0;
}

.nova-ugc__icon-text {
	font-family: "Rubik", sans-serif;
	font-weight: 400;
	font-size: 12px;
	line-height: 14px;
	letter-spacing: 0;
	text-align: right;
	color: #000000;
	font-variant-numeric: lining-nums proportional-nums;
	white-space: nowrap;
}

.nova-ugc__meta-text {
	font-family: "Rubik", sans-serif;
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: 0;
	text-align: right;
	color: #000000;
	/* Allow 2–3 sentences; no clamp / no clipping */
	white-space: normal;
	overflow: visible;
	word-break: break-word;
}

.nova-ugc__arrow {
	position: absolute;
	top: var(--nova-ugc-arrow-top);
	transform: translateY(-50%);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--nova-ugc-arrow-slot);
	height: 40px;
	padding: 0;
	border: 0;
	border-color: transparent;
	border-radius: 0;
	/* Kill Astra/global button hover (black bg). */
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: #000000 !important;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.nova-ugc__arrow-icon {
	display: block;
	width: 20px;
	height: 35px;
	object-fit: contain;
	pointer-events: none;
}

/* Arrows stay inside the beige section, beside the cards. */
.nova-ugc__arrow--prev {
	left: 0;
	right: auto;
}

.nova-ugc__arrow--next {
	right: 0;
	left: auto;
}

.nova-ugc__arrow:hover,
.nova-ugc__arrow:focus,
.nova-ugc__arrow:focus-visible,
.nova-ugc__arrow:active {
	opacity: 0.7;
	outline: none;
	background: transparent !important;
	background-color: transparent !important;
	border-color: transparent !important;
	color: #000000 !important;
	box-shadow: none !important;
}

.nova-ugc__arrow.swiper-button-disabled {
	opacity: 0.25;
	cursor: default;
}

/* Mute must keep its own pill; still block Astra black hover. */
.nova-ugc__mute,
.nova-ugc__mute:hover,
.nova-ugc__mute:focus,
.nova-ugc__mute:focus-visible,
.nova-ugc__mute:active {
	border-color: transparent !important;
	color: #fff !important;
	box-shadow: none !important;
}

.nova-ugc__mute {
	background: rgba(0, 0, 0, 0.55) !important;
	background-color: rgba(0, 0, 0, 0.55) !important;
}

.nova-ugc__mute:hover,
.nova-ugc__mute:focus-visible {
	background: rgba(0, 0, 0, 0.65) !important;
	background-color: rgba(0, 0, 0, 0.65) !important;
}

.nova-ugc__pagination {
	position: static !important;
	margin: 0;
	flex-shrink: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-height: 8px;
}

.nova-ugc__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	margin: 0 !important;
	background: #d1d5db;
	opacity: 1;
	transition: background 0.2s ease;
}

.nova-ugc__pagination .swiper-pagination-bullet-active {
	background: #4b5563;
}

@media (max-width: 1024px) {
	.nova-ugc {
		--nova-ugc-arrow-slot: 40px;
	}

	.nova-ugc__slider-wrap {
		max-width: 100%;
	}
}

@media (max-width: 767px) {
	/*
	 * Full-bleed section + side peeks.
	 * Clip page scroll on html/body; keep peeks visible inside 100vw section.
	 */
	html:has(.nova-ugc),
	body:has(.nova-ugc) {
		overflow-x: clip;
	}

	.elementor-section:has(.nova-ugc),
	.elementor-top-section:has(.nova-ugc) {
		position: relative;
		width: 100vw;
		max-width: 100vw;
		margin-inline: calc(50% - 50vw);
		left: auto;
		right: auto;
		transform: none;
		overflow-x: clip;
		box-sizing: border-box;
	}

	.elementor-section:has(.nova-ugc) > .elementor-container,
	.elementor-top-section:has(.nova-ugc) > .elementor-container {
		width: 100% !important;
		max-width: none !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.elementor-column:has(.nova-ugc) {
		width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.elementor-column:has(.nova-ugc) > .elementor-widget-wrap {
		padding-left: 0 !important;
		padding-right: 0 !important;
		width: 100%;
		max-width: none;
		overflow: visible;
	}

	.elementor-widget-nova-ugc-videos {
		width: 100%;
		max-width: none;
		overflow: visible;
	}

	.elementor-widget-nova-ugc-videos > .elementor-widget-container {
		padding-left: 0;
		padding-right: 0;
		width: 100%;
		max-width: none;
		overflow: visible;
	}

	.nova-ugc {
		/* Slightly smaller than desktop so peeks read clearly on ~390–430px. */
		--nova-ugc-slide-w: 210px;
		--nova-ugc-slide-w-active: 240px;
		--nova-ugc-media-h: 340px;
		--nova-ugc-media-h-active: 380px;
		--nova-ugc-meta-reserve: 88px;
		--nova-ugc-track-h: calc(var(--nova-ugc-media-h-active) + var(--nova-ugc-meta-reserve));
		--nova-ugc-gap: 16px;
		--nova-ugc-section-gap: 24px;
		--nova-ugc-arrow-slot: 0px;
		--nova-ugc-cards-w: 100%;
		--nova-ugc-frame-w: 100%;
		--nova-ugc-arrow-top: calc(var(--nova-ugc-media-h-active) / 2);
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 32px 0;
		overflow: visible;
	}

	.nova-ugc__swiper .swiper-slide {
		width: 210px !important;
		max-width: 210px !important;
	}

	.nova-ugc__swiper .swiper-slide-active {
		width: 240px !important;
		max-width: 240px !important;
	}

	.nova-ugc__title {
		font-size: 24px;
		line-height: 40px;
		padding: 0 16px;
	}

	.nova-ugc__arrow {
		display: none;
	}

	.nova-ugc__slider-wrap {
		width: 100%;
		max-width: none;
		height: var(--nova-ugc-track-h);
		min-height: var(--nova-ugc-track-h);
		padding: 0;
		overflow: visible;
	}

	.nova-ugc__swiper {
		max-width: none;
		height: 100%;
		overflow: visible;
	}

	.nova-ugc__mute {
		width: 32px;
		height: 32px;
		right: 8px;
		bottom: 8px;
		z-index: 3;
	}
}
