/**
 * AAFE Milestone Glow Path CSS
 * Addronix Addons for Elementor
 */

/* ─── Variables & Base Track ─────────────────────────────── */
.aafe-scroll-cards {
	--ms-c: #FD551D;
	--ms-dot-center: #FEB399;
	--ms-path-inactive: rgba(255, 255, 255, 0.12);
	--ms-dot-inactive: rgba(255, 255, 255, 0.14);
	--ms-head-c: #ffffff;
	--mobile-line-c: #FD551D;
	--mobile-dot-c: #FD551D;
	--mobile-line-width: 2px;
	--mobile-dot-size: 12px;
	--mobile-gap: 28px;
	position: relative;
	width: 100%;
	background-color: #000000;
	box-sizing: border-box;
}

.aafe-scroll-cards * {
	box-sizing: border-box;
}

/* ─── Header Content (Subtitle, Heading, Description) ────── */
.aafe-scroll-cards__header {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 8px;
	text-align: center;
	box-sizing: border-box;
	z-index: 6;
	position: relative;
	flex-shrink: 0;
}

.aafe-scroll-cards__subtitle {
	display: inline-block;
	color: #FD551D;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 6px;
	box-sizing: border-box;
}

.aafe-scroll-cards__heading {
	margin: 0 0 8px 0;
	color: #ffffff;
	font-family: 'Inter', sans-serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	box-sizing: border-box;
}

.aafe-scroll-cards__desc {
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	box-sizing: border-box;
}

.aafe-scroll-cards__desc p {
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

.aafe-scroll-cards__desc p + p {
	margin-top: 0.4em;
}

@media (max-width: 767px) {
	.aafe-scroll-cards__heading {
		font-size: 24px;
	}
	.aafe-scroll-cards__desc {
		font-size: 14px;
	}
}

/* ─── Hint / Mouse Scroll Indicator ──────────────────────── */
.aafe-scroll-cards__hint {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: rgba(255, 255, 255, 0.7);
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	line-height: 1.3;
	text-align: center;
	margin-bottom: 10px;
	user-select: none;
	flex-shrink: 0;
}

.aafe-scroll-cards__hint-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.7);
	font-size: 16px;
	line-height: 1;
}

.aafe-scroll-cards__hint-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.aafe-scroll-cards__hint-text {
	display: inline-block;
}

/* ─── SVG Glow Path & Dots (Desktop Curve) ───────────────── */
.aafe-scroll-cards__svg svg,
.aafe-scroll-cards__svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.aafe-scroll-cards__path-bg {
	fill: none;
	stroke: var(--ms-path-inactive);
	stroke-linecap: round;
}

.aafe-scroll-cards__glow-outer,
.aafe-scroll-cards__glow-mid,
.aafe-scroll-cards__glow-core,
.aafe-scroll-cards .ms-l {
	fill: none;
	stroke: var(--ms-c);
	stroke-linecap: round;
	stroke-dasharray: 1 3;
	stroke-dashoffset: 1;
}

.aafe-scroll-cards__dot .on {
	opacity: 0;
	transition: opacity 0.45s ease;
}

.aafe-scroll-cards__dot.is-on .on {
	opacity: 1;
}

.aafe-scroll-cards__dot .on circle:first-child,
.aafe-scroll-cards__dot-halo {
	filter: drop-shadow(0 0 6px var(--ms-c));
}

.aafe-scroll-cards__dot-center {
	fill: var(--ms-dot-center);
}

.aafe-scroll-cards__head {
	fill: var(--ms-head-c);
	opacity: 0;
	filter: drop-shadow(0 0 5px #fff);
	transition: opacity 0.25s ease;
}

/* ─── Milestone Card Content ─────────────────────────────── */
.aafe-scroll-cards__item .elementor-icon-box-content,
.aafe-scroll-cards__item-content {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.aafe-scroll-cards__item--peak .aafe-scroll-cards__item-content {
	flex-direction: column-reverse !important;
}

.aafe-scroll-cards__item--valley .aafe-scroll-cards__item-content {
	flex-direction: column !important;
}

.aafe-scroll-cards__item .elementor-icon-box-title,
.aafe-scroll-cards__item-title {
	margin: 0 !important;
	color: #ffffff;
	font-family: 'Inter', sans-serif;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.03em;
}

.aafe-scroll-cards__item-title a {
	color: inherit;
	text-decoration: none;
}

.aafe-scroll-cards__item .elementor-icon-box-description,
.aafe-scroll-cards__item-desc {
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.aafe-scroll-cards__item-desc,
.aafe-scroll-cards__item-desc *,
.aafe-scroll-cards__item-desc i,
.aafe-scroll-cards__item-desc span {
	font-style: inherit;
	font-family: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

/* Word split animation base */
.ms-w {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding-bottom: 0.15em;
	margin-bottom: -0.15em;
}

.ms-w > i,
.ms-w > span,
.ms-w > .ms-w-i {
	display: inline-block;
	font-style: inherit !important;
	font-family: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	letter-spacing: inherit !important;
	color: inherit !important;
}

/* ─── VERTICAL TIMELINE ANIMATED GLOW LINE & DOTS ────────── */
.aafe-scroll-cards__timeline-line {
	display: none;
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: var(--mobile-line-width, 2px);
	background: var(--ms-path-inactive, rgba(255, 255, 255, 0.14));
	border-radius: 4px;
	overflow: visible;
	z-index: 1;
}

.aafe-scroll-cards__timeline-line-fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0%;
	background: var(--mobile-line-c, var(--ms-c, #FD551D));
	box-shadow: 0 0 12px var(--mobile-line-c, var(--ms-c, #FD551D)), 0 0 3px #ffffff;
	border-radius: 4px;
	transition: height 0.08s ease-out;
}

.aafe-scroll-cards__timeline-head {
	position: absolute;
	bottom: -4px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(var(--mobile-line-width, 2px) + 6px);
	height: calc(var(--mobile-line-width, 2px) + 6px);
	min-width: 8px;
	min-height: 8px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 0 10px var(--mobile-line-c, var(--ms-c, #FD551D)), 0 0 3px #ffffff;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.aafe-scroll-cards__timeline-dot {
	display: none;
	position: absolute;
	left: calc(-26px - (var(--mobile-dot-size, 12px) / 2) + (var(--mobile-line-width, 2px) / 2));
	top: 8px;
	width: var(--mobile-dot-size, 12px);
	height: var(--mobile-dot-size, 12px);
	border-radius: 50%;
	background: var(--ms-dot-inactive, rgba(255, 255, 255, 0.2));
	border: 2px solid #000000;
	box-sizing: border-box;
	z-index: 3;
	transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.aafe-scroll-cards__item.is-on .aafe-scroll-cards__timeline-dot {
	background: var(--ms-dot-center, #FEB399);
	border-color: var(--mobile-line-c, var(--ms-c, #FD551D));
	box-shadow: 0 0 16px var(--mobile-line-c, var(--ms-c, #FD551D)), 0 0 5px var(--mobile-line-c, var(--ms-c, #FD551D));
	transform: scale(1.3);
}

/* ─── DESKTOP CURVE VIEW (min-width: 768px) ──────────────── */
@media (min-width: 768px) {
	.aafe-scroll-cards:not(.aafe-timeline-bp-always) {
		min-height: calc(180vh + 500px);
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__sticky {
		position: sticky !important;
		top: 0 !important;
		height: 100vh !important;
		max-height: 100vh !important;
		display: flex !important;
		flex-direction: column !important;
		justify-content: center !important;
		align-items: center !important;
		padding: 20px 24px 16px 24px !important;
		box-sizing: border-box !important;
		width: 100%;
		z-index: 10;
		overflow: visible;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__stage {
		display: block !important;
		position: relative;
		width: 100% !important;
		max-width: min(1100px, calc((100vh - 160px) * (1100 / 320)));
		aspect-ratio: 1100 / 320;
		height: auto !important;
		max-height: calc(100vh - 150px);
		margin: 0 auto !important;
		padding: 0 !important;
		flex-shrink: 1;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__stage > .aafe-scroll-cards__svg {
		position: absolute !important;
		inset: 0;
		width: 100% !important;
		max-width: none !important;
		height: 100% !important;
		margin: 0 !important;
		pointer-events: none;
		z-index: 1;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__stage > .aafe-scroll-cards__item {
		position: absolute !important;
		width: 200px;
		max-width: none !important;
		margin: 0 !important;
		text-align: center !important;
		z-index: 5;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__item-title {
		white-space: nowrap;
		font-size: 20px;
		opacity: 0.35;
		transition: opacity 0.5s ease;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__item-desc {
		opacity: 0;
		font-size: 14px;
		line-height: 1.3;
		transform: translateY(8px);
		transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-title,
	.aafe-scroll-cards:not(.aafe-timeline-bp-always) .aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-desc {
		opacity: 1 !important;
		transform: none !important;
	}

	/* Word split animation */
	.ms-split .aafe-scroll-cards__item .aafe-scroll-cards__item-desc {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.ms-w > i,
	.ms-w > span,
	.ms-w > .ms-w-i {
		display: inline-block;
		font-style: inherit !important;
		transform: translateY(105%);
		opacity: 0;
		transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
	}

	.aafe-scroll-cards__item.is-on .ms-w > i,
	.aafe-scroll-cards__item.is-on .ms-w > span,
	.aafe-scroll-cards__item.is-on .ms-w > .ms-w-i {
		transform: none !important;
		opacity: 1 !important;
	}
}

/* ─── TABLET SIZING REFINEMENTS (768px - 1024px) ─────────── */
@media (min-width: 768px) and (max-width: 1024px) {
	.aafe-scroll-cards:not(.aafe-timeline-bp-always):not(.aafe-timeline-bp-tablet) .aafe-scroll-cards__stage > .aafe-scroll-cards__item {
		width: 160px;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always):not(.aafe-timeline-bp-tablet) .aafe-scroll-cards__item-title {
		font-size: 18px;
	}

	.aafe-scroll-cards:not(.aafe-timeline-bp-always):not(.aafe-timeline-bp-tablet) .aafe-scroll-cards__item-desc {
		font-size: 13px;
	}
}

/* ─── TABLET BREAKPOINT OVERRIDE (when timeline on tablet is chosen) ─── */
@media (max-width: 1024px) {
	.aafe-scroll-cards.aafe-timeline-bp-tablet {
		min-height: auto !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__sticky {
		position: relative !important;
		top: 0 !important;
		padding: 50px 24px;
		align-items: flex-start;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__svg {
		display: none !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__timeline-line {
		display: block !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__timeline-dot {
		display: block !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__stage {
		display: flex !important;
		flex-direction: column !important;
		gap: var(--mobile-gap, 28px) !important;
		padding-left: 26px !important;
		border-left: none !important;
		width: 100% !important;
		aspect-ratio: auto !important;
		position: relative;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__stage > .aafe-scroll-cards__item {
		position: relative !important;
		inset: auto !important;
		left: auto !important;
		top: auto !important;
		transform: none !important;
		width: 100% !important;
		text-align: left !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__item-content {
		flex-direction: column !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__item-title {
		white-space: normal !important;
		opacity: 0.35;
		transition: opacity 0.4s ease;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__item-desc {
		opacity: 0;
		transform: translateY(8px);
		transition: opacity 0.4s ease, transform 0.4s ease;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-title {
		opacity: 1 !important;
	}

	.aafe-scroll-cards.aafe-timeline-bp-tablet .aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-desc {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ─── MOBILE (Standard Vertical Timeline Layout <= 767px) ── */
@media (max-width: 767px) {
	.aafe-scroll-cards {
		min-height: auto !important;
	}

	.aafe-scroll-cards__sticky {
		position: relative !important;
		top: 0 !important;
		padding: 60px 20px 60px 30px;
		align-items: flex-start;
	}

	.aafe-scroll-cards__svg {
		display: none !important;
	}

	.aafe-scroll-cards__timeline-line {
		display: block !important;
	}

	.aafe-scroll-cards__timeline-dot {
		display: block !important;
	}

	.aafe-scroll-cards__stage {
		display: flex !important;
		flex-direction: column !important;
		gap: var(--mobile-gap, 28px) !important;
		padding-left: 26px !important;
		border-left: none !important;
		width: 100% !important;
		aspect-ratio: auto !important;
		position: relative;
	}

	.aafe-scroll-cards__stage > .aafe-scroll-cards__item {
		position: relative !important;
		inset: auto !important;
		left: auto !important;
		top: auto !important;
		transform: none !important;
		width: 100% !important;
		text-align: left !important;
	}

	.aafe-scroll-cards__item-content {
		flex-direction: column !important;
	}

	.aafe-scroll-cards__item-title {
		white-space: normal !important;
		opacity: 0.35;
		transition: opacity 0.4s ease;
	}

	.aafe-scroll-cards__item-desc {
		opacity: 0;
		transform: translateY(8px);
		transition: opacity 0.4s ease, transform 0.4s ease;
	}

	.aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-title {
		opacity: 1 !important;
	}

	.aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-desc {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ─── ALWAYS TIMELINE LAYOUT (Option) ────────────────────── */
.aafe-scroll-cards.aafe-timeline-bp-always {
	min-height: auto !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__sticky {
	position: relative !important;
	top: 0 !important;
	padding: 50px 24px;
	align-items: flex-start;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__svg {
	display: none !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__timeline-line {
	display: block !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__timeline-dot {
	display: block !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__stage {
	display: flex !important;
	flex-direction: column !important;
	gap: var(--mobile-gap, 28px) !important;
	padding-left: 26px !important;
	border-left: none !important;
	width: 100% !important;
	aspect-ratio: auto !important;
	position: relative;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__stage > .aafe-scroll-cards__item {
	position: relative !important;
	inset: auto !important;
	left: auto !important;
	top: auto !important;
	transform: none !important;
	width: 100% !important;
	text-align: left !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__item-content {
	flex-direction: column !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__item-title {
	white-space: normal !important;
	opacity: 0.35;
	transition: opacity 0.4s ease;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__item-desc {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-title {
	opacity: 1 !important;
}

.aafe-scroll-cards.aafe-timeline-bp-always .aafe-scroll-cards__item.is-on .aafe-scroll-cards__item-desc {
	opacity: 1 !important;
	transform: none !important;
}

/* ─── STATIC EDITING PREVIEW MODE (When user picks static preview) ─── */
.aafe-scroll-cards[data-editor-mode="static_preview"] .ms-l {
	stroke-dashoffset: 0 !important;
}

.aafe-scroll-cards[data-editor-mode="static_preview"] .ms-dot .on {
	opacity: 1 !important;
}

.aafe-scroll-cards[data-editor-mode="static_preview"] .aafe-scroll-cards__timeline-line-fill {
	height: 100% !important;
}

.aafe-scroll-cards[data-editor-mode="static_preview"] .aafe-scroll-cards__item-title,
.aafe-scroll-cards[data-editor-mode="static_preview"] .aafe-scroll-cards__item-desc {
	opacity: 1 !important;
	transform: none !important;
}

/* ─── ELEMENTOR EDITOR PREVIEW ENHANCEMENTS ──────────────── */
body.elementor-editor-active .elementor-element.elementor-widget-aafe_scroll_cards {
	overflow: visible !important;
}

body.elementor-editor-active .aafe-scroll-cards__stage {
	pointer-events: auto;
}

body.elementor-editor-active .aafe-scroll-cards__item {
	pointer-events: auto;
}

/* ─── ACCESSIBILITY: PREFERS REDUCED MOTION ──────────────── */
@media (prefers-reduced-motion: reduce) {
	.aafe-scroll-cards .ms-l {
		stroke-dashoffset: 0 !important;
	}
	.aafe-scroll-cards .aafe-scroll-cards__timeline-line-fill {
		height: 100% !important;
	}
	.aafe-scroll-cards .ms-dot .on,
	.aafe-scroll-cards__item-title,
	.aafe-scroll-cards__item-desc {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
