/* Fullscreen Carousel Menu - front end styles */

.fcm-carousel {
	--fcm-height: 100vh;
	--fcm-accent: #ffffff;
	--fcm-transition: 700ms cubic-bezier(0.16, 1, 0.3, 1);
	--fcm-grow-active: 8;

	display: flex;
	width: 100%;
	height: var(--fcm-height);
	overflow: hidden;
	background: #000;
	box-sizing: border-box;
}

.fcm-carousel.fcm-vertical {
	flex-direction: column;
}

/* Break out of Divi's boxed row (max-width container) to true edge-to-edge fullwidth.
   Use inside a Divi row set to "Custom Width: 100%, no padding" OR drop this class'
   parent module directly; this trick works even inside a boxed row. */
.fcm-carousel.fcm-breakout {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
}

.fcm-item {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	display: block;
	text-decoration: none;
	color: #fff;
	cursor: pointer;
	outline: none;
	transition: flex-grow var(--fcm-transition);
	border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.fcm-carousel.fcm-vertical .fcm-item {
	border-right: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fcm-item:last-child {
	border-right: none;
	border-bottom: none;
}

.fcm-item.is-active,
.fcm-item:focus-visible {
	flex-grow: var(--fcm-grow-active);
}

/* Media layer (image or video), full-bleed cover */
.fcm-media {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
}

.fcm-img,
.fcm-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(70%) brightness(0.55);
	transform: scale(1.08);
	transition: filter var(--fcm-transition), transform var(--fcm-transition), opacity 300ms ease;
}

.fcm-video {
	opacity: 0;
}

.fcm-item.is-active .fcm-img {
	filter: grayscale(0%) brightness(0.85);
	transform: scale(1);
}

.fcm-item.is-active .fcm-video {
	opacity: 1;
	filter: grayscale(0%) brightness(0.85);
	transform: scale(1);
}

.fcm-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.35));
	transition: background 300ms ease;
}

/* Collapsed-state vertical label running along the strip */
.fcm-label {
	position: absolute;
	left: 50%;
	bottom: 32px;
	transform: translateX(-50%);
	white-space: nowrap;
	z-index: 2;
	opacity: 1;
	transition: opacity 300ms ease;
	pointer-events: none;
}

.fcm-carousel.fcm-horizontal .fcm-label-text {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 14px;
	font-weight: 600;
}

.fcm-carousel.fcm-vertical .fcm-label {
	left: 32px;
	bottom: auto;
	top: 50%;
	transform: translateY(-50%);
}

.fcm-carousel.fcm-vertical .fcm-label-text {
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 14px;
	font-weight: 600;
}

.fcm-item.is-active .fcm-label {
	opacity: 0;
}

/* Expanded-state centered content */
.fcm-content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 400ms ease 100ms, transform 400ms ease 100ms;
	color: var(--fcm-accent);
}

.fcm-item.is-active .fcm-content {
	opacity: 1;
	transform: translateY(0);
}

.fcm-content-title {
	font-size: clamp(22px, 3vw, 40px);
	font-weight: 700;
	line-height: 1.15;
}

.fcm-content-subtitle {
	margin-top: 10px;
	font-size: clamp(13px, 1vw, 16px);
	opacity: 0.85;
	max-width: 32ch;
}

/* Touch devices: no hover, rely on tap-to-expand handled in JS.
   Slightly larger tap target hint. */
@media (hover: none) {
	.fcm-label {
		bottom: 20px;
	}
}

@media (max-width: 782px) {
	.fcm-carousel.fcm-horizontal {
		flex-direction: column;
		height: auto;
		min-height: var(--fcm-height);
	}
	.fcm-carousel.fcm-horizontal .fcm-item {
		flex: 1 1 0;
		min-height: 90px;
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}
	.fcm-carousel.fcm-horizontal .fcm-item.is-active {
		flex-grow: var(--fcm-grow-active);
		min-height: 220px;
	}
	.fcm-carousel.fcm-horizontal .fcm-label-text {
		writing-mode: horizontal-tb;
		transform: none;
	}
}
