/* ============================================================
   Studio Visuali — Featured Ticker  |  featured-ticker.css  |  v1.0.0
   ============================================================ */

.vft-root {
	--vft-icon-bg: #f3efe6;
	--vft-icon-color: #b9a880;
	--vft-divider: #ececec;
	--vft-rows: 4;
	--vft-duration: 30s;
	--vft-row-height: 68px;
}

.vft-viewport {
	overflow: hidden;
	height: calc(var(--vft-rows) * var(--vft-row-height));
	position: relative;
	mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

.vft-track {
	display: flex;
	flex-direction: column;
	animation: vft-scroll var(--vft-duration) linear infinite;
}

.vft-viewport:hover .vft-track {
	animation-play-state: paused;
}

@keyframes vft-scroll {
	from { transform: translateY(0); }
	to   { transform: translateY(-50%); }
}

.vft-item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--vft-row-height);
	padding: 10px 4px;
	box-sizing: border-box;
	border-bottom: 1px solid var(--vft-divider);
	text-decoration: none !important;
	color: inherit;
	cursor: pointer;
}

.vft-icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--vft-icon-bg);
	color: var(--vft-icon-color);
}

.vft-icon svg {
	width: 16px;
	height: 16px;
}

.vft-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.vft-title {
	font-size: 14px;
	font-weight: 600;
	color: #2d2d3a;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.vft-meta {
	font-size: 11px;
	color: #999;
}

.vft-empty,
.vft-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 24px 16px;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	color: #6b7280;
	font-size: 13px;
	text-align: center;
}

.vft-placeholder i {
	font-size: 22px;
	color: #9ca3af;
}

/* ============================================================
   Carousel layout (1.4.0) — horizontal cards, mobile list
   ============================================================ */
.vft-carousel {
	--vft-c-cols: 4;
	--vft-c-gap: 24px;
	--vft-c-accent: #033977;
	--vft-c-card-bg: #fff;
	--vft-c-line: #e1e7ef;
	position: relative;
}

.vft-c-viewport {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	/* The track's bottom padding leaves room for the hover shadow (the viewport clips it); pull the space back. */
	margin-bottom: -28px;
}

.vft-c-viewport::-webkit-scrollbar {
	display: none;
}

.vft-c-viewport:focus-visible {
	outline: 2px solid var(--vft-c-accent);
	outline-offset: 4px;
}

.vft-root .vft-c-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--vft-c-cols) - 1) * var(--vft-c-gap)) / var(--vft-c-cols));
	gap: var(--vft-c-gap);
	list-style: none;
	margin: 0;
	padding: 4px 0 40px;
}

.vft-c-item {
	scroll-snap-align: start;
	min-width: 0;
	margin: 0;
}

.vft-root a.vft-c-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--vft-c-card-bg);
	border: 1px solid var(--vft-c-line);
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 3px rgba(18, 23, 43, .08), 0 4px 12px rgba(18, 23, 43, .06);
	transition: box-shadow .2s ease;
}

.vft-root a.vft-c-card:hover {
	box-shadow: 0 4px 10px rgba(18, 23, 43, .10), 0 12px 28px rgba(18, 23, 43, .12);
}

.vft-root a.vft-c-card:focus-visible {
	outline: 2px solid var(--vft-c-accent);
	outline-offset: 2px;
}

.vft-c-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: #f2f6fa;
	overflow: hidden;
}

.vft-root .vft-c-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vft-c-fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--vft-c-accent);
	opacity: .35;
}

.vft-c-fallback svg {
	width: 40px;
	height: 40px;
}

.vft-c-tag {
	position: absolute;
	top: 8px;
	inset-inline-start: 8px;
	background: var(--vft-c-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	border-radius: 4px;
	padding: 1px 8px;
	max-width: calc(100% - 16px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vft-c-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 14px 16px;
	text-align: start;
}

.vft-c-date {
	font-size: 13px;
	color: #5d6678;
	font-variant-numeric: tabular-nums;
}

.vft-carousel .vft-title {
	font-weight: 600;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

/* Prev/next at the two edges, level with the images. Hidden when not needed. */
.vft-root button.vft-c-nav {
	position: absolute;
	top: calc(50% - 4px); /* middle of the cards (track has 4px top / 12px bottom padding) */
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--vft-c-line);
	background: #fff;
	color: var(--vft-c-accent);
	box-shadow: 0 2px 8px rgba(18, 23, 43, .15);
	cursor: pointer;
}

.vft-root button.vft-c-nav[hidden] {
	display: none;
}

.vft-carousel[dir="rtl"] .vft-c-prev { right: -12px; }
.vft-carousel[dir="rtl"] .vft-c-next { left: -12px; }
.vft-carousel[dir="ltr"] .vft-c-prev { left: -12px; }
.vft-carousel[dir="ltr"] .vft-c-next { right: -12px; }
.vft-carousel[dir="ltr"] .vft-c-nav svg { transform: scaleX(-1); }

.vft-root a.vft-c-all {
	display: none;
	width: fit-content;
	margin: 8px auto 0;
	color: var(--vft-c-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.vft-root a.vft-c-all--desktop {
	display: block;
}

@media (prefers-reduced-motion: reduce) {
	.vft-c-viewport { scroll-behavior: auto; }
	.vft-root a.vft-c-card { transition: none; }
}

/* Mobile carousel (no list): swipe, the next card peeks in; no arrows. */
@media (max-width: 767px) {
	.vft-root.vft-carousel:not(.vft-carousel--mobile-list) .vft-c-track {
		grid-auto-columns: calc((100% - (var(--vft-c-cols) - 1) * var(--vft-c-gap)) / (var(--vft-c-cols) + .15));
		--vft-c-gap: 14px;
	}
	.vft-root.vft-carousel:not(.vft-carousel--mobile-list) button.vft-c-nav {
		display: none;
	}
	.vft-root.vft-carousel:not(.vft-carousel--mobile-list) a.vft-c-all {
		display: block;
	}
}

/* Mobile list: a short static list of rows (image beside the text). */
@media (max-width: 767px) {
	.vft-carousel--mobile-list .vft-c-viewport {
		overflow: visible;
		scroll-snap-type: none;
	}
	.vft-root.vft-carousel--mobile-list .vft-c-track {
		display: flex;
		flex-direction: column;
		gap: 12px;
		padding: 0;
	}
	.vft-carousel--mobile-list .vft-c-more {
		display: none;
	}
	.vft-root.vft-carousel--mobile-list a.vft-c-card {
		flex-direction: row;
		align-items: flex-start;
		gap: 12px;
		padding: 10px;
	}
	.vft-carousel--mobile-list .vft-c-media {
		flex: 0 0 96px;
		width: 96px;
		border-radius: 6px;
	}
	.vft-carousel--mobile-list .vft-c-tag {
		display: none;
	}
	.vft-carousel--mobile-list .vft-c-body {
		padding: 0;
		gap: 4px;
		min-width: 0;
	}
	.vft-root.vft-carousel--mobile-list button.vft-c-nav {
		display: none;
	}
	.vft-root.vft-carousel--mobile-list a.vft-c-all {
		display: block;
	}
}

/* ============================================================
   "What's new" strip (1.5.0) — horizontal marquee on desktop,
   vertical on mobile; label box + "category: title" items
   ============================================================ */
.vft-marquee {
	--vft-m-bg: #6ec1e4;
	--vft-m-label-bg: #12172b;
	--vft-m-label-color: #fff;
	--vft-m-height: 80px;
	--vft-m-row: 44px;
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: var(--vft-m-height);
	background: var(--vft-m-bg);
	color: #fff;
	overflow: hidden;
}

.vft-m-label {
	flex: none;
	display: flex;
	align-items: center;
	padding: 0 28px;
	background: var(--vft-m-label-bg);
	color: var(--vft-m-label-color);
	font-weight: 600;
	white-space: nowrap;
}

.vft-m-empty {
	display: flex;
	align-items: center;
	padding: 0 20px;
}

.vft-m-viewport {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.vft-m-track {
	display: flex;
	width: max-content;
	animation: vft-m-x var(--vft-m-duration, 60s) linear infinite;
}

/* RTL: the content overflows to the left, so it travels to the right. */
.vft-marquee[dir="rtl"] .vft-m-track {
	animation-name: vft-m-x-rtl;
}

.vft-m-viewport:hover .vft-m-track,
.vft-m-viewport:focus-within .vft-m-track {
	animation-play-state: paused;
}

@keyframes vft-m-x {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@keyframes vft-m-x-rtl {
	from { transform: translateX(0); }
	to   { transform: translateX(50%); }
}

.vft-root .vft-m-list {
	display: flex;
	flex: none;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vft-m-item {
	display: flex;
	align-items: center;
	margin: 0;
	white-space: nowrap;
}

/* A small dot between items. */
.vft-m-item::after {
	content: "";
	width: 6px;
	height: 6px;
	margin: 0 28px;
	border-radius: 50%;
	background: currentColor;
	opacity: .55;
}

.vft-root .vft-m-item a {
	color: inherit;
	text-decoration: none;
}

.vft-root .vft-m-item a:hover .vft-title,
.vft-root .vft-m-item a:focus-visible .vft-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.vft-m-cat {
	font-weight: 700;
}

.vft-marquee .vft-title {
	font-size: 18px;
}

/* Mobile: label on top, items scroll upwards. */
@media (max-width: 767px) {
	.vft-marquee {
		flex-direction: column;
	}
	.vft-m-label {
		justify-content: center;
		padding: 8px 16px;
	}
	.vft-m-viewport {
		flex: none; /* a growing flex item would stretch to the full list height */
		align-items: flex-start;
		height: calc(var(--vft-m-rows, 2) * var(--vft-m-row));
		padding: 0 16px;
		/* 1.5.2: a real scroll box, moved by JS — a finger can scroll it too. */
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: none;
	}
	.vft-m-viewport::-webkit-scrollbar {
		display: none;
	}
	.vft-m-track,
	.vft-marquee[dir="rtl"] .vft-m-track {
		flex-direction: column;
		width: 100%;
		animation: none;
	}
	.vft-root .vft-m-list {
		flex-direction: column;
	}
	.vft-m-item {
		min-height: var(--vft-m-row);
		white-space: normal;
	}
	.vft-m-item::after {
		display: none;
	}
	.vft-marquee .vft-title {
		font-size: 16px;
	}
}

@keyframes vft-m-y {
	from { transform: translateY(0); }
	to   { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.vft-m-track { animation: none; }
	.vft-m-viewport { overflow-x: auto; }
}
