/* NDS Video Marquee */
.nds-vm {
	--nds-vm-gap: 10px;
	--nds-vm-duration: 35s;
	--nds-vm-ratio: 4/5;
	--nds-vm-play: 48px;
	--nds-vm-card-w: 420px;
	--nds-vm-shade: rgba(0, 0, 0, .85);
	display: flex;
	column-gap: 24px;
	height: 560px;
	overflow: hidden;
	position: relative;
	width: 100%;
}
.nds-vm--fade.nds-vm--v {
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.nds-vm--fade.nds-vm--h {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.nds-vm__col {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
}
.nds-vm__track {
	display: flex;
	flex-direction: column;
	will-change: transform;
	animation: nds-vm-up var(--nds-vm-duration) linear infinite;
}
/* margin (not gap) keeps both halves exactly equal, so -50% loops seamlessly */
.nds-vm__item {
	display: block;
	position: relative;
	flex: none;
	margin: 0 0 var(--nds-vm-gap);
	aspect-ratio: var(--nds-vm-ratio);
	overflow: hidden;
	border-radius: 12px;
	background: #EDF2F7;
	container-type: inline-size;
	-webkit-tap-highlight-color: transparent;
}
.nds-vm__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}
.nds-vm-zoom-yes .nds-vm__item:hover img { transform: scale(1.05); }
.nds-vm__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	width: var(--nds-vm-play);
	height: var(--nds-vm-play);
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #136B5D;
	box-shadow: 0 6px 20px rgba(16, 36, 56, .25);
	transition: transform .3s ease;
	pointer-events: none;
}
.nds-vm__play svg { margin-left: 8%; }
.nds-vm__item:hover .nds-vm__play { transform: translate(-50%, -50%) scale(1.1); }
.nds-vm__item:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* Card info: platform badge, views and stats over a bottom shade */
.nds-vm__item.has-info::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 60%;
	z-index: 1;
	background: linear-gradient(to top, var(--nds-vm-shade), transparent);
	pointer-events: none;
}
.nds-vm__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1;
	text-transform: uppercase;
}
.nds-vm__badge i { width: 6px; height: 6px; border-radius: 50%; background: #FFD878; }
.nds-vm__badge--tiktok i { background: #25F4EE; }
.nds-vm__badge--youtube i { background: #FF0033; }
.nds-vm__badge--instagram i { background: #E1306C; }
.nds-vm__badge--facebook i { background: #1877F2; }
.nds-vm__badge--snapchat i { background: #FFFC00; }
.nds-vm__badge--x i { background: #fff; }
.nds-vm__info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 22px 20px;
	padding: 0 6cqw 5cqw;
	color: #fff;
	text-align: left;
	pointer-events: none;
}
.nds-vm__views {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, .25);
}
.nds-vm__views b { font-size: 28px; font-size: clamp(18px, 10cqw, 44px); font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.nds-vm__views small { font-size: 11px; font-size: clamp(9px, 3cqw, 13px); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.nds-vm__stats { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; font-size: clamp(10px, 3.2cqw, 14px); }
.nds-vm__stats span { opacity: .8; }
.nds-vm__stats b { font-size: 1.2em; font-weight: 700; opacity: 1; }

/* Directions: "alternate" = middle column up, outer columns down (like the reference) */
.nds-vm--down .nds-vm__track,
.nds-vm--alternate .nds-vm__col:nth-child(odd) .nds-vm__track,
.nds-vm--alternate-reverse .nds-vm__col:nth-child(even) .nds-vm__track { animation-name: nds-vm-down; }

/* Horizontal rows */
.nds-vm.nds-vm--h { flex-direction: column; height: auto !important; }
.nds-vm--h .nds-vm__col { flex: none; width: 100%; }
.nds-vm--h .nds-vm__track {
	flex-direction: row;
	width: max-content;
	direction: ltr;
	animation-name: nds-vm-left;
}
.nds-vm--h .nds-vm__item { width: var(--nds-vm-card-w); margin: 0 var(--nds-vm-gap) 0 0; }
.nds-vm--right .nds-vm__track,
.nds-vm--alt-h .nds-vm__col:nth-child(even) .nds-vm__track,
.nds-vm--alt-h-reverse .nds-vm__col:nth-child(odd) .nds-vm__track { animation-name: nds-vm-right; }

.nds-vm--pausable:hover .nds-vm__track { animation-play-state: paused; }

@keyframes nds-vm-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes nds-vm-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes nds-vm-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes nds-vm-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* Responsive column counts for vertical mode (Elementor default breakpoints). Desktop count = rendered columns. */
@media (max-width: 1024px) {
	.nds-vm-cols-tablet-1 .nds-vm--v .nds-vm__col:nth-child(n+2),
	.nds-vm-cols-tablet-2 .nds-vm--v .nds-vm__col:nth-child(n+3),
	.nds-vm-cols-tablet-3 .nds-vm--v .nds-vm__col:nth-child(n+4) { display: none; }
}
@media (max-width: 767px) {
	.nds-vm-cols-mobile-2 .nds-vm--v .nds-vm__col:nth-child(-n+2),
	.nds-vm-cols-mobile-3 .nds-vm--v .nds-vm__col:nth-child(-n+3),
	.nds-vm-cols-mobile-4 .nds-vm--v .nds-vm__col:nth-child(-n+4) { display: block; }
	.nds-vm-cols-mobile-1 .nds-vm--v .nds-vm__col:nth-child(n+2),
	.nds-vm-cols-mobile-2 .nds-vm--v .nds-vm__col:nth-child(n+3),
	.nds-vm-cols-mobile-3 .nds-vm--v .nds-vm__col:nth-child(n+4) { display: none; }
}

/* NDS Logo Marquee */
.nds-lm {
	--nds-lm-h: 40px;
	--nds-lm-maxw: 180px;
	--nds-lm-gap: 80px;
	--nds-lm-op: .6;
	--nds-lm-fade: 8%;
	--nds-vm-duration: 40s;
	display: flex;
	flex-direction: column;
	row-gap: 28px;
	width: 100%;
	overflow: hidden;
}
.nds-lm--fade {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--nds-lm-fade), #000 calc(100% - var(--nds-lm-fade)), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 var(--nds-lm-fade), #000 calc(100% - var(--nds-lm-fade)), transparent 100%);
}
.nds-lm__row { width: 100%; overflow: hidden; }
.nds-lm__track {
	display: flex;
	align-items: center;
	width: max-content;
	direction: ltr;
	will-change: transform;
	animation: nds-vm-left var(--nds-vm-duration) linear infinite;
}
.nds-lm__item {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--nds-lm-h);
	margin-right: var(--nds-lm-gap);
}
.nds-lm__item img {
	display: block;
	width: auto;
	height: 100%;
	max-width: var(--nds-lm-maxw);
	object-fit: contain;
	opacity: var(--nds-lm-op);
	transition: filter .3s ease, opacity .3s ease;
}
.nds-lm-gray-yes .nds-lm__item img { filter: grayscale(1); }
.nds-lm-hover-yes .nds-lm__item:hover img { filter: none; opacity: 1; }
.nds-lm--right .nds-lm__track,
.nds-lm--alt-h .nds-lm__row:nth-child(even) .nds-lm__track,
.nds-lm--alt-h-reverse .nds-lm__row:nth-child(odd) .nds-lm__track { animation-name: nds-vm-right; }
.nds-lm--pausable:hover .nds-lm__track { animation-play-state: paused; }

/* NDS Review Marquee */
.nds-rm {
	--nds-rm-gap: 12px;
	--nds-rm-card-w: 380px;
	--nds-vm-duration: 40s;
	display: flex;
	column-gap: 16px;
	row-gap: 16px;
	height: 460px;
	width: 100%;
	overflow: hidden;
}
.nds-rm--fade.nds-rm--v {
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
}
.nds-rm--fade.nds-rm--h {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.nds-rm__lane { flex: 1 1 0; min-width: 0; overflow: hidden; }
.nds-rm__track {
	display: flex;
	flex-direction: column;
	will-change: transform;
	animation: nds-vm-up var(--nds-vm-duration) linear infinite;
}
.nds-rm__card {
	flex: none;
	margin: 0 0 var(--nds-rm-gap);
	padding: 20px 18px;
	background: #fff;
	border: 1px solid #DDE4E2;
	border-radius: 16px;
	text-align: left;
}
.nds-rm__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; font-style: normal; text-align: left; }
.nds-rm__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.nds-rm__stars { display: inline-flex; gap: 2px; font-size: 15px; line-height: 1; color: #E5A50A; letter-spacing: 0; }
.nds-rm__stars i { font-style: normal; }
.nds-rm__stars i.is-empty { opacity: .25; }
.nds-rm__who { display: flex; flex-direction: column; gap: 2px; }
.nds-rm__name { font-weight: 700; color: #102438; line-height: 1.3; }
.nds-rm__role { font-size: .85em; color: #5E6A73; }
.nds-rm__text { margin: 0; padding: 0; border: 0; font-style: normal; color: #5E6A73; line-height: 1.7; quotes: none; }
.nds-rm__text::before, .nds-rm__text::after { content: none; }

.nds-rm--down .nds-rm__track,
.nds-rm--alternate .nds-rm__lane:nth-child(odd) .nds-rm__track,
.nds-rm--alternate-reverse .nds-rm__lane:nth-child(even) .nds-rm__track { animation-name: nds-vm-down; }

.nds-rm.nds-rm--h { flex-direction: column; height: auto !important; }
.nds-rm--h .nds-rm__lane { flex: none; width: 100%; }
.nds-rm--h .nds-rm__track { flex-direction: row; align-items: stretch; width: max-content; direction: ltr; animation-name: nds-vm-left; }
.nds-rm--h .nds-rm__card { width: var(--nds-rm-card-w); margin: 0 var(--nds-rm-gap) 0 0; }
.nds-rm--right .nds-rm__track,
.nds-rm--alt-h .nds-rm__lane:nth-child(even) .nds-rm__track,
.nds-rm--alt-h-reverse .nds-rm__lane:nth-child(odd) .nds-rm__track { animation-name: nds-vm-right; }

.nds-rm--pausable:hover .nds-rm__track { animation-play-state: paused; }

@media (max-width: 1024px) {
	.nds-rm-cols-tablet-1 .nds-rm--v .nds-rm__lane:nth-child(n+2),
	.nds-rm-cols-tablet-2 .nds-rm--v .nds-rm__lane:nth-child(n+3) { display: none; }
}
@media (max-width: 767px) {
	.nds-rm-cols-mobile-2 .nds-rm--v .nds-rm__lane:nth-child(-n+2),
	.nds-rm-cols-mobile-3 .nds-rm--v .nds-rm__lane:nth-child(-n+3) { display: block; }
	.nds-rm-cols-mobile-1 .nds-rm--v .nds-rm__lane:nth-child(n+2),
	.nds-rm-cols-mobile-2 .nds-rm--v .nds-rm__lane:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.nds-vm__track, .nds-lm__track, .nds-rm__track { animation: none !important; }
	.nds-vm--v .nds-vm__col, .nds-rm--v .nds-rm__lane { overflow-y: auto; }
	.nds-vm--h .nds-vm__col, .nds-lm__row, .nds-rm--h .nds-rm__lane { overflow-x: auto; }
}

/* Lightbox */
.nds-vm-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(16, 36, 56, .88);
}
.nds-vm-lb__box {
	position: relative;
	width: min(960px, 100%);
	aspect-ratio: 16/9;
	max-height: calc(100vh - 80px);
}
.nds-vm-lb__box.is-vertical { width: auto; height: min(80vh, 720px); aspect-ratio: 9/16; }
.nds-vm-lb__box iframe,
.nds-vm-lb__box video { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }
.nds-vm-lb__close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #102438;
	font-size: 22px;
	line-height: 36px;
	cursor: pointer;
	padding: 0;
}

/* Cards with a caption underneath: the cell carries the size and spacing */
.nds-vm__cell { flex: none; margin: 0 0 var(--nds-vm-gap); }
.nds-vm__cell .nds-vm__item { margin: 0 !important; width: 100% !important; }
.nds-vm--h .nds-vm__cell { width: var(--nds-vm-card-w); margin: 0 var(--nds-vm-gap) 0 0; }
.nds-vm__caption { margin-top: 12px; color: #fff; font-size: 17px; line-height: 1.35; }
.nds-vm--h .nds-vm__track { align-items: flex-start; }

/* Original image shape: no fixed ratio, the picture is shown whole */
.nds-vm--natural .nds-vm__item { aspect-ratio: auto; }
.nds-vm--natural .nds-vm__item img { height: auto; object-fit: contain; }

/* Not moving: still cards that can be swiped / scrolled sideways */
.nds-vm--static .nds-vm__track { animation: none !important; }
.nds-vm--static.nds-vm--h .nds-vm__col { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.nds-vm--static.nds-vm--h .nds-vm__col::-webkit-scrollbar { display: none; }
.nds-vm--static.nds-vm--h .nds-vm__item, .nds-vm--static.nds-vm--h .nds-vm__cell { scroll-snap-align: start; }
