.apt-timeline {
	--apt-columns: 5;
	--apt-gap: 24px;
	--apt-node-size: 44px;
	--apt-node-bg: #0e1420;
	--apt-node-border: #3a4356;
	--apt-node-color: #9aa4b5;
	--apt-line-color: #3a4356;
	--apt-active-color: #ff5a1f;

	position: relative;
	width: 100%;
}

/* Connector track sits above the row of circles, positioned at node center height.
   Left/width/top are set precisely by JS to match the actual first/last
   node centers (robust regardless of column count vs. item count). These
   left/right values are just a sane fallback if JS hasn't run yet. */
.apt-timeline__track {
	position: absolute;
	top: calc( var( --apt-node-size ) / 2 );
	left: calc( 100% / var( --apt-columns ) / 2 );
	right: calc( 100% / var( --apt-columns ) / 2 );
	height: 0;
	border-top: 1px dashed var( --apt-line-color );
	z-index: 0;
	transform: translateY( -0.5px );
}

.apt-timeline__track-fill {
	position: absolute;
	top: -1px;
	left: 0;
	height: 1px;
	width: 0%;
	background: var( --apt-active-color );
	filter: drop-shadow( 0 0 5px rgba( 255, 90, 31, 0.5 ) );
	transition: width 1.1s cubic-bezier( .25, .8, .25, 1 );
}

.apt-timeline--animated .apt-timeline__track-fill.apt-fill-in {
	width: 100%;
}

.apt-timeline__steps {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat( var( --apt-columns ), 1fr );
	gap: var( --apt-gap );
}

/* "Fit Content" width mode: columns shrink to their natural content size
   instead of stretching to fill the row, and the whole block can then be
   aligned left / center / right within its container. */
.apt-timeline__steps--auto {
	grid-template-columns: repeat( var( --apt-columns ), max-content );
	width: max-content;
	max-width: 100%;
}

.apt-timeline[data-align="left"] .apt-timeline__steps--auto {
	margin-left: 0;
	margin-right: auto;
}

.apt-timeline[data-align="center"] .apt-timeline__steps--auto {
	margin-left: auto;
	margin-right: auto;
}

.apt-timeline[data-align="right"] .apt-timeline__steps--auto {
	margin-left: auto;
	margin-right: 0;
}

/* Alignment also controls each step's own content: the circle/number and
   the text block shift and re-justify together, not just the row's
   position within the container. */
.apt-timeline[data-align="center"] .apt-step {
	align-items: center;
	text-align: center;
}

.apt-timeline[data-align="right"] .apt-step {
	align-items: flex-end;
	text-align: right;
}

@media ( max-width: 1024px ) {
	.apt-timeline__steps {
		grid-template-columns: repeat( 3, 1fr );
		row-gap: 40px;
	}
	.apt-timeline__track {
		display: none;
	}
}

@media ( max-width: 640px ) {
	.apt-timeline__steps {
		grid-template-columns: 1fr;
		row-gap: 28px;
	}
	.apt-timeline {
		padding-left: 8px;
		border-left: 1px dashed var( --apt-line-color );
	}
}

.apt-step {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	text-decoration: none;
	color: inherit;
	gap: 14px;
}

/* Steps stay fully visible by default. The reveal-on-scroll animation is
   progressive enhancement: it only engages once the "apt-js-ready" class
   has been added by JS, so a JS failure (or the Elementor editor loading
   the widget before scripts run) never leaves content invisible. */
.apt-timeline--animated.apt-js-ready .apt-step {
	opacity: 0;
	transform: translateY( 18px );
	transition: opacity .6s ease, transform .6s cubic-bezier( .25, .8, .25, 1 );
	transition-delay: calc( var( --apt-index, 0 ) * var( --apt-stagger, 90ms ) );
}

.apt-timeline--animated.apt-js-ready .apt-step.apt-in-view {
	opacity: 1;
	transform: translateY( 0 );
}

.apt-step__node {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var( --apt-node-size );
	height: var( --apt-node-size );
	border-radius: 50%;
	background: var( --apt-node-bg );
	border: 1px solid var( --apt-node-border );
	flex-shrink: 0;
}

.apt-step__number {
	font-family: inherit;
	font-size: calc( var( --apt-node-size ) * 0.3 );
	font-weight: 600;
	letter-spacing: 0.5px;
	color: var( --apt-node-color );
}

.apt-step--active .apt-step__node {
	border-color: var( --apt-active-color );
	box-shadow: 0 0 0 1px var( --apt-active-color ), 0 0 18px rgba( 255, 90, 31, 0.35 );
}

.apt-step--active .apt-step__number {
	color: var( --apt-active-color );
}

/* Pulsing ring around the active node */
.apt-step__ring {
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 1px solid var( --apt-active-color );
	opacity: 0;
	pointer-events: none;
}

.apt-timeline[data-pulse="yes"] .apt-step--active .apt-step__ring {
	animation: apt-pulse 2.2s ease-out infinite;
}

@keyframes apt-pulse {
	0% {
		transform: scale( 0.85 );
		opacity: 0.7;
	}
	70% {
		transform: scale( 1.35 );
		opacity: 0;
	}
	100% {
		transform: scale( 1.35 );
		opacity: 0;
	}
}

.apt-step__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 260px;
}

.apt-step__eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #7c8698;
}

.apt-step__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: #f5f6f8;
}

.apt-step__desc {
	font-size: 15px;
	line-height: 1.55;
	color: #8b95a7;
}

a.apt-step:hover .apt-step__node {
	transform: translateY( -2px );
	transition: transform .25s ease;
}

a.apt-step:hover .apt-step__title {
	text-decoration: underline;
	text-decoration-color: var( --apt-active-color );
}
