/* ===========================================================
   YB Advantages — sticky scroll-reveal timeline (RTL)
   Defaults reproduce the Yaron Ben-Dan Figma pixel-perfect.
   =========================================================== */

.yb-adv {
	--yb-blur: 2.5px;
	--yb-dim: 0.45;
	--yb-scale-off: 0.96;
	--yb-scale-on: 1.04;
	--yb-dot-scale: 2.5;          /* 10px base → 25px active */
	--yb-underline: #6C7284;
	--yb-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--yb-dur: 0.6s;
	--yb-reserve: 100vh;

	position: relative;
	direction: rtl;
	min-height: var(--yb-reserve);
}

/* ---- Pinned stage ------------------------------------------------ */
.yb-adv__stage {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.yb-adv.is-pinned .yb-adv__stage {
	position: fixed;
	top: 0;
}

.yb-adv.is-released .yb-adv__stage {
	position: absolute;
	top: auto;
	bottom: 0;
}

.yb-adv__stage-inner {
	display: flex;
	flex-direction: row;          /* RTL handles right→left order */
	align-items: center;
	justify-content: center;
	gap: 64px;
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding: 0 24px;
	box-sizing: border-box;
}

/* ---- Heading ----------------------------------------------------- */
.yb-adv__heading {
	flex: 0 0 auto;
	max-width: 420px;
	margin: 0;
	font-family: 'Days', sans-serif;
	font-size: 80px;
	font-weight: 700;
	line-height: 75px;
	color: #6B7184;
	text-align: right;
}

/* ---- Body: rail + list (one structure, so dots track items) ------ */
.yb-adv__body {
	position: relative;
	flex: 1 1 auto;
	max-width: 600px;
}

/* Vertical line, centered on the dot column (right edge of the body). */
.yb-adv__rail {
	position: absolute;
	top: 6px;
	bottom: 6px;
	right: 12px;                  /* center of the 25px dot column */
	width: 1px;
	background-color: #6C7284;
}

.yb-adv__list {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Each row: dot (right, RTL-first) + text (left). align-items:center
   keeps the dot on the vertical center of its text — even multi-line. */
.yb-adv__item {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 24px;
}

.yb-adv__dotcol {
	flex: 0 0 25px;
	width: 25px;
	height: 25px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.yb-adv__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #6C7284;    /* filled small dots */
	border: 1px solid #6C7284;
	box-sizing: border-box;
	transform: scale(1);
	transition: transform var(--yb-dur) var(--yb-ease),
		background-color var(--yb-dur) ease, border-color var(--yb-dur) ease;
}

.yb-adv__item.is-active .yb-adv__dot {
	transform: scale(var(--yb-dot-scale));   /* smooth GPU growth → 25px */
	background-color: #6C7284;
	border-color: #6C7284;
}

/* ---- Text -------------------------------------------------------- */
.yb-adv__text {
	position: relative;
	display: block;
	flex: 1 1 auto;
	max-width: 560px;
	margin: 0;
	font-family: 'Polin', sans-serif;
	font-size: 18px;
	font-weight: 400;             /* NEVER bold, active or not */
	line-height: 35px;
	color: #6B7184;
	text-align: right;
	filter: blur(var(--yb-blur));
	opacity: var(--yb-dim);
	transform: scale(var(--yb-scale-off));
	transform-origin: right center;
	transition: filter var(--yb-dur) ease, opacity var(--yb-dur) ease,
		transform var(--yb-dur) var(--yb-ease), color var(--yb-dur) ease;
}

/* 1px underline beneath the active text (no layout shift — uses ::after). */
.yb-adv__text::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -12px;
	height: 1px;
	background-color: var(--yb-underline);
	opacity: 0;
	transition: opacity var(--yb-dur) ease;
}

.yb-adv__item.is-active .yb-adv__text {
	filter: blur(0);
	opacity: 1;
	transform: scale(var(--yb-scale-on));
	color: #1C2A44;
}

.yb-adv__item.is-active .yb-adv__text::after {
	opacity: 1;
}

/* ---- Mobile / no-pin fallback ----------------------------------- */
.yb-adv.yb-adv--nopin {
	min-height: 0;
}

.yb-adv.yb-adv--nopin .yb-adv__stage {
	position: static;
	min-height: 0;
	overflow: visible;
}

.yb-adv.yb-adv--nopin .yb-adv__text {
	filter: blur(0);
	opacity: 1;
	transform: none;
	color: #1C2A44;
}

.yb-adv.yb-adv--nopin .yb-adv__text::after {
	opacity: 0;
}

/* ---- Mobile: heading on top, list (left) + rail/dots (right) ----- */
@media (max-width: 768px) {
	.yb-adv__stage-inner {
		flex-wrap: wrap;
		gap: 28px 0;
		padding: 40px 20px;
	}

	.yb-adv__heading {
		flex: 0 0 100%;
		max-width: 100%;
		width: 100%;
		font-size: 40px;
		line-height: 44px;
		text-align: right;
	}

	.yb-adv__body {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.yb-adv__text {
		max-width: none;
		font-size: 16px;
		line-height: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yb-adv__text,
	.yb-adv__dot {
		transition: none;
	}
}
