/* 
 * Client Journey Timeline - Horizontal Roadmap
 */

.wb-journey-section {
	overflow: hidden; /* Prevent horizontal scroll on the document itself */
	padding-bottom: var(--wb-space-8);
}

.wb-journey-infographic {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	padding: var(--wb-space-12) 0;
	margin-top: var(--wb-space-8);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	cursor: grab;
}

.wb-journey-infographic::-webkit-scrollbar {
	display: none; /* Safari and Chrome */
}

.wb-journey-infographic:active {
	cursor: grabbing;
}

.wb-journey-infographic__scroll-wrapper {
	display: flex;
	position: relative;
	width: max-content;
	min-width: 100%;
	padding: 0 max(var(--wb-space-8), calc((100vw - 1200px) / 2));
	align-items: center;
}

/* The horizontal glowing track */
.wb-journey-infographic__track {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--wb-surface-300);
	transform: translateY(-50%);
	z-index: 1;
}

/* Add a glowing effect to the track */
.wb-journey-infographic__track::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, transparent 0%, var(--wb-primary-500) 15%, var(--wb-primary-500) 85%, transparent 100%);
	transform: translateY(-50%);
	filter: blur(2px);
	opacity: 0.5;
}

.wb-journey-step {
	position: relative;
	width: 340px;
	min-height: 440px;
	margin-right: var(--wb-space-8);
	flex-shrink: 0;
	z-index: 2;
}

.wb-journey-step:last-child {
	margin-right: var(--wb-space-8); /* keep padding at the end of scroll */
}

/* The circular node on the track */
.wb-journey-step__marker {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	background: var(--wb-surface-100);
	border: 2px solid var(--wb-primary-500);
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--wb-primary-400);
	box-shadow: 0 0 0 8px var(--wb-background), 0 0 20px rgba(var(--wb-primary-500-rgb), 0.3);
	z-index: 3;
	transition: all 0.3s ease;
}

.wb-journey-step__marker svg {
	width: 24px;
	height: 24px;
}

.wb-journey-step:hover .wb-journey-step__marker {
	background: var(--wb-primary-500);
	color: var(--wb-text-primary);
	box-shadow: 0 0 0 8px var(--wb-background), 0 0 30px rgba(var(--wb-primary-500-rgb), 0.6);
	transform: translate(-50%, -50%) scale(1.1);
}

/* Content cards */
.wb-journey-step__content {
	position: absolute;
	left: 0;
	width: 100%;
	background: var(--wb-surface-100);
	border: 1px solid var(--wb-surface-200);
	border-radius: var(--wb-radius-lg);
	padding: var(--wb-space-6);
	transition: all 0.3s ease;
}

/* Top staggered card */
.wb-journey-step--top .wb-journey-step__content {
	bottom: calc(50% + 40px);
}

.wb-journey-step--top .wb-journey-step__content::after {
	content: '';
	position: absolute;
	bottom: -40px;
	left: 50%;
	width: 2px;
	height: 40px;
	background: var(--wb-surface-200);
	transform: translateX(-50%);
	z-index: -1;
}

/* Bottom staggered card */
.wb-journey-step--bottom .wb-journey-step__content {
	top: calc(50% + 40px);
}

.wb-journey-step--bottom .wb-journey-step__content::after {
	content: '';
	position: absolute;
	top: -40px;
	left: 50%;
	width: 2px;
	height: 40px;
	background: var(--wb-surface-200);
	transform: translateX(-50%);
	z-index: -1;
}

.wb-journey-step:hover .wb-journey-step__content {
	border-color: var(--wb-primary-500);
	transform: translateY(-4px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.wb-journey-step--bottom:hover .wb-journey-step__content {
	transform: translateY(4px);
}

.wb-journey-step__num {
	font-family: var(--wb-font-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wb-primary-400);
	margin-bottom: var(--wb-space-2);
}

.wb-journey-step__title {
	font-size: 1.25rem;
	margin-bottom: var(--wb-space-2);
}

.wb-journey-step__desc {
	color: var(--wb-text-secondary);
	margin: 0;
	line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 900px) {
	.wb-journey-step {
		width: 280px;
		min-height: 480px;
		margin-right: var(--wb-space-6);
	}
	
	.wb-journey-step__content {
		padding: var(--wb-space-5);
	}
	
	.wb-journey-infographic__scroll-wrapper {
		padding: 0 var(--wb-space-4);
	}
}
