/**
 * Focus Cards — Vio Studio Widget
 * Horizontal drag/arrow carousel with hover-reveal cards.
 */

/* =============================================================================
   Layout
   ============================================================================= */

.vio-fcards {
	position: relative;
}

/* Navigation row — right-aligned above the track */
.vio-fcards__nav {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}

.vio-fcards__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.vio-fcards__nav-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.35);
}

.vio-fcards__nav-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.vio-fcards__nav-btn svg {
	display: block;
	width: 16px;
	height: 16px;
	stroke: currentColor;
	flex-shrink: 0;
}

/* Viewport — overflow visible so cards bleed off the right edge */
.vio-fcards__viewport {
	overflow: visible;
}

/* Track — flex row, translated by JS */
.vio-fcards__track {
	display: flex;
	gap: 16px;
	transform: translateX(0);
	will-change: transform;
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
}

.vio-fcards__track.is-dragging {
	cursor: grabbing;
	transition: none;
}

/* Applied by JS during instant repositioning (init, resize, clamp) */
.vio-fcards__track.is-no-transition {
	transition: none !important;
}

/* =============================================================================
   Card
   ============================================================================= */

.vio-fcards__item {
	position: relative;
	display: block;
	flex: 0 0 340px;
	width: 340px;
	height: 480px;
	overflow: hidden;
	border-radius: 2px;
	text-decoration: none;
	color: inherit;
	-webkit-tap-highlight-color: transparent;
}

/* Background image — zooms on hover */
.vio-fcards__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform: scale(1);
	transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.vio-fcards__item:hover .vio-fcards__bg {
	transform: scale(1.07);
}

/* Dark overlay */
.vio-fcards__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 30, 0.45);
	transition: background 0.4s ease;
}

.vio-fcards__item:hover .vio-fcards__overlay {
	background: rgba(10, 10, 30, 0.65);
}

/* =============================================================================
   Card content
   ============================================================================= */

/* Content wrapper — flex column, vertically centered */
.vio-fcards__content {
	position: absolute;
	inset: 0;
	padding: 28px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	z-index: 1;
}

/* Heading — moves up as reveal expands below it */
.vio-fcards__heading {
	margin: 0;
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1.2;
	transform: translateY(0);
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.vio-fcards__item:hover .vio-fcards__heading {
	transform: translateY(-32px);
}

/* Reveal — collapsed by default, expands on hover */
.vio-fcards__reveal {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-top: 0;
	transition:
		max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		opacity    0.4s ease 0.06s,
		padding-top 0.4s ease;
}

.vio-fcards__item:hover .vio-fcards__reveal {
	max-height: 300px;
	opacity: 1;
	padding-top: 20px;
}

/* Description text */
.vio-fcards__text {
	margin: 0;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.55;
}

/* Asterisk — sits in the flex flow, naturally below the heading by default.
   High-specificity hover rule beats any stale Elementor cached CSS
   (Elementor uses a 2-class chain; our hover rule uses 4). */
.vio-fcards__asterisk {
	color: #fff;
	font-size: 24px;
	line-height: 1;
	z-index: 1;
}

.vio-fcards__item .vio-fcards__content .vio-fcards__asterisk {
	align-self: center;
	margin-top: 8px;
}

/* On hover: remove from flow, pin to bottom-centre.
   .vio-fcards__content has inset:0 so it shares the card's dimensions. */
.vio-fcards__item:hover .vio-fcards__content .vio-fcards__asterisk {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 0;
}

/* =============================================================================
   Accessibility: reduced motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
	.vio-fcards__bg,
	.vio-fcards__overlay,
	.vio-fcards__heading,
	.vio-fcards__reveal {
		transition: none;
	}

	.vio-fcards__reveal {
		max-height: none;
		opacity: 1;
		padding-top: 16px;
	}

	.vio-fcards__track {
		transition: none !important;
	}
}
