/* =========================================================
   Behido Celebration Coverflow Slider
   Matches Figma "Frame 3768" (1280px design width, RTL).
   Place in: your-child-theme/assets/css/celebration-slider.css
   ========================================================= */

.behido-cs {
	--cs-max-width: 1280px;
	--cs-accent: #f5a94e;      /* arrow-button orange — adjust to your palette */
	--cs-title: #1c3f73;       /* headline blue — adjust to your palette */
	--cs-eyebrow: #eceef2;     /* faint background word */
	--cs-desc: #6b7280;
	--cs-radius: 16px;
	--cs-transition: 600ms cubic-bezier(.22, .8, .28, 1);

	max-width: var(--cs-max-width);
	margin-inline: auto;
	padding: 64px 24px 48px;
	text-align: center;
	overflow: hidden; /* the head text; the stage below overrides this */
	direction: rtl;
}

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

.behido-cs__head {
	position: relative;
	margin-bottom: 40px;
}

.behido-cs__eyebrow {
	display: block;
	font-family: inherit;
	font-weight: 800;
	font-size: clamp(40px, 6vw, 72px);
	line-height: 1;
	letter-spacing: 0.02em;
	/*color: var(--cs-eyebrow);*/
	text-transform: uppercase;
	user-select: none;
}

.behido-cs__title {
	margin: -0.6em 0 0;
	position: relative;
	font-size: clamp(20px, 2.4vw, 28px);
	font-weight: 700;
	color: var(--cs-title);
}

.behido-cs__desc {
	max-width: 760px;
	margin: 12px auto 0;
	font-size: 15px;
	line-height: 1.9;
	color: var(--cs-desc);
}

/* ---------- Stage ---------- */
/* The stage must allow slides to overflow visibly (coverflow effect),
   so overflow is visible here even though the outer section clips text. */

.behido-cs__stage {
	position: relative;
	overflow: visible;
	height: clamp(260px, 35vw, 450px); /* matches the 450px design height */
}

.behido-cs__track {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
}

.behido-cs__slide {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 46.9%;             /* 600 / 1280 = center-card width */
	aspect-ratio: 600 / 450;
	border-radius: var(--cs-radius);
	overflow: hidden;
	box-shadow: 0 20px 40px -12px rgba(20, 30, 60, 0.28);
	transition: transform var(--cs-transition), opacity var(--cs-transition), filter var(--cs-transition), z-index 0s;
	will-change: transform, opacity;
}

.behido-cs__link,
.behido-cs__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---- Positions relative to the active slide (data-pos set by JS) ---- */

/* Active — full size, centered */
.behido-cs__slide[data-pos="0"] {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	z-index: 50;
	filter: none;
	box-shadow: 0 24px 48px -14px rgba(20, 30, 60, 0.35);
}

/* One step away — 360x272 mid card, offset 114px from center card edge at 1280 width */
.behido-cs__slide[data-pos="1"] {
	transform: translate(calc(-50% - 40.5%), -50%) scale(.6);
	opacity: .9;
	z-index: 40;
	filter: brightness(.72) saturate(.85);
}
.behido-cs__slide[data-pos="-1"] {
	transform: translate(calc(-50% + 40.5%), -50%) scale(.6);
	opacity: .9;
	z-index: 40;
	filter: brightness(.72) saturate(.85);
}

/* Two steps away — 248x184 far card, flush to the stage edge */
.behido-cs__slide[data-pos="2"] {
	transform: translate(calc(-50% - 66.7%), -50%) scale(.413);
	opacity: .55;
	z-index: 30;
	filter: grayscale(60%) brightness(.55);
}
.behido-cs__slide[data-pos="-2"] {
	transform: translate(calc(-50% + 66.7%), -50%) scale(.413);
	opacity: .55;
	z-index: 30;
	filter: grayscale(60%) brightness(.55);
}

/* Anything further away — hidden, ready to slide in from the side */
.behido-cs__slide[data-pos="far"] {
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%) scale(.35);
	z-index: 10;
}

.behido-cs__slide:not([data-pos="0"]) .behido-cs__link {
	pointer-events: none; /* only the active slide is clickable/linked */
}

/* ---------- Nav (arrow buttons) ---------- */

.behido-cs__nav {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 40px;
}

.behido-cs__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding:0px;
	border-radius: 50%;
	border: 1.5px solid var(--cs-accent);
	background: transparent;
	color: var(--cs-accent);
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, transform .15s ease;
}

.behido-cs__arrow svg {
	width: 20px;
	height: 20px;
}

.behido-cs__arrow:hover {
	background-color: var(--cs-accent);
	color: #fff;
}

.behido-cs__arrow:active {
	transform: scale(.92);
}

.behido-cs__arrow:focus-visible {
	outline: 2px solid var(--cs-accent);
	outline-offset: 3px;
}

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

@media (max-width: 782px) {
	.behido-cs {
		padding: 40px 16px 32px;
	}

	.behido-cs__slide {
		width: 72%;
	}

	.behido-cs__slide[data-pos="1"] {
		transform: translate(calc(-50% - 34%), -50%) scale(.68);
	}
	.behido-cs__slide[data-pos="-1"] {
		transform: translate(calc(-50% + 34%), -50%) scale(.68);
	}
	.behido-cs__slide[data-pos="2"],
	.behido-cs__slide[data-pos="-2"] {
		opacity: 0;
		pointer-events: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.behido-cs__slide {
		transition: opacity .3s ease;
	}
}
