/**
 * Flamingo Marine — Overfeel Carousel (ROVE page).
 *
 * "Overfeel — Comfort without Compromise". Centered heading; prev/next arrows
 * top-right; a peek filmstrip (active image ~80% of the inner width, the next
 * panel peeking ~18% from the right) with a title + body caption overlaid
 * bottom-left; a segmented progress bar below. Mechanics mirror the tabbed
 * feature display; the tab bar is replaced by arrows + progress dots.
 */

.flm-overfeel {
	background-color: var(--wp--preset--color--surface-deep);
	color: var(--wp--preset--color--text-primary);
	padding-block: clamp(1.25rem, 2.5vw, 2rem) var(--wp--preset--spacing--giant);
	padding-inline: var(--wp--preset--spacing--xxl);
}

.flm-overfeel__inner {
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1180px);
	margin-inline: auto;
}

/* --- Heading ------------------------------------------------------------- */

.flm-overfeel__head {
	margin-bottom: var(--wp--preset--spacing--lg);
}

/* Mixed-color statement: white lead phrase flowing into a muted continuation
   (matches the rove-intro treatment), left-aligned. */
.flm-overfeel__title {
	margin: 0;
	max-width: 36ch;
	font-family: var(--wp--preset--font-family--plex);
	font-weight: 600;
	font-size: clamp(1.75rem, 3vw, 2.75rem);
	line-height: 1.2;
	color: var(--wp--preset--color--text-primary);
}

/* --- Controls (prev/next) ------------------------------------------------ */

.flm-overfeel__controls {
	display: flex;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--sm);
	margin-bottom: var(--wp--preset--spacing--md);
}

.flm-overfeel__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: transparent;
	color: var(--wp--preset--color--text-primary);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.flm-overfeel__arrow:hover,
.flm-overfeel__arrow:focus-visible {
	border-color: var(--wp--preset--color--accent-pink);
	background-color: var(--wp--preset--color--accent-pink);
	color: #fff;
	outline: none;
}

/* --- Stage / filmstrip --------------------------------------------------- */

.flm-overfeel__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 7;
	border-radius: 8px;
	overflow: hidden;
}

.flm-overfeel__track {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--flm-overfeel-gap, 14px);
	height: 100%;
	transform: translateX(0);
	transition: transform 440ms cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.flm-overfeel__panel {
	position: relative;
	flex: 0 0 var(--flm-overfeel-basis, 80%);
	margin: 0;
	height: 100%;
	border-radius: 6px;
	overflow: hidden;
}

.flm-overfeel__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Scrim under the caption so the title/body stay legible over bright imagery. */
.flm-overfeel__panel::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.7) 0%,
		rgba(0, 0, 0, 0.32) 26%,
		rgba(0, 0, 0, 0) 52%
	);
}

/* Non-active panels (the one peeking) dim slightly so the active reads first. */
.flm-overfeel__panel:not(.is-active) {
	opacity: 0.55;
	transition: opacity 440ms ease;
}
.flm-overfeel__panel.is-active {
	opacity: 1;
	transition: opacity 440ms ease;
}

.flm-overfeel__caption {
	position: absolute;
	left: var(--wp--preset--spacing--xl);
	right: var(--wp--preset--spacing--xl);
	bottom: var(--wp--preset--spacing--lg);
	z-index: 1;
	max-width: 46ch;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.flm-overfeel__caption-title {
	font-family: var(--wp--preset--font-family--plex, inherit);
	font-weight: 600;
	font-size: clamp(1.25rem, 1.9vw, 1.6rem);
	line-height: 1.1;
	color: var(--wp--preset--color--text-primary);
}

.flm-overfeel__caption-body {
	font-weight: 300;
	font-size: var(--wp--preset--font-size--body, 1rem);
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.88);
}

/* --- Progress bar -------------------------------------------------------- */

.flm-overfeel__progress {
	display: flex;
	gap: 8px;
	margin-top: var(--wp--preset--spacing--lg);
}

.flm-overfeel__dot {
	flex: 1 1 0;
	height: 4px;
	padding: 10px 0; /* enlarge hit target without changing the bar height */
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.flm-overfeel__dot span {
	display: block;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.18);
	transition: background-color 0.25s ease;
}

.flm-overfeel__dot:hover span {
	background: rgba(255, 255, 255, 0.4);
}

.flm-overfeel__dot.is-active span {
	background: var(--wp--preset--color--accent-pink);
}

.flm-overfeel__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-pink);
	outline-offset: 3px;
	border-radius: 3px;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 767px) {
	.flm-overfeel {
		padding-inline: var(--wp--preset--spacing--lg);
	}
	.flm-overfeel__stage {
		aspect-ratio: 4 / 3;
	}
	/* One feature at a time on narrow screens — drop the peek. */
	.flm-overfeel {
		--flm-overfeel-basis: 100%;
		--flm-overfeel-gap: 0px;
	}
	.flm-overfeel__panel {
		border-radius: 0;
	}
	.flm-overfeel__panel:not(.is-active) {
		opacity: 1;
	}
}

/* --- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.flm-overfeel__track,
	.flm-overfeel__panel,
	.flm-overfeel__dot span {
		transition: none;
	}
}
