.horizontal-timeline-wrapper {
	position: relative;
	width: 100%;
	padding: 40px 0;
	overflow: hidden;
}

.swiper-container {
	position: relative;
	width: 100%;
	/* Ensure container has enough height for the tallest content + padding */
	min-height: 300px; 
	padding-bottom: 40px; /* Space for nav/pagination if needed */
}

/* The Line Container - Absolute Center of the Swiper Viewport */
.timeline-line-container {
	position: absolute;
	top: 50%; /* Vertically centered */
	left: 0;
	width: 100%;
	height: 4px; /* Line thickness */
	transform: translateY(-50%);
	z-index: 1;
	pointer-events: none;
}

.timeline-line {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #e0e0e0;
	border-radius: 2px;
}

.timeline-line-progress {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0; /* JS updates this */
	background: #6EC1E4;
	transition: width 0.3s ease;
	border-radius: 2px;
}

.timeline-track {
	display: flex;
	align-items: stretch; /* Ensure all slides are same height */
}

/* Slide Item Layout - GRID for precise alignment */
/* Increased specificity to override theme/elementor defaults */
.swiper-container .swiper-wrapper .swiper-slide.timeline-item {
	display: grid !important;
	grid-template-rows: 1fr auto 1fr !important; /* Top(1fr) - Marker(auto) - Bottom(1fr) */
	align-items: center; /* Center content horizontally */
	justify-items: center;
	height: auto; /* Let Swiper/Flex stretch it */
	min-height: 100%; /* Fill the container height */
	position: relative;
}

/* Markers */
.timeline-marker-wrapper {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 15px 0; /* Vertical breathing room around marker */
	grid-row: 2 !important; /* Explicitly place in middle row */
}

.timeline-marker {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #6EC1E4;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	font-weight: bold;
	color: #333;
	font-size: 14px;
	box-shadow: 0 0 0 4px #fff; /* whitespace ring around marker to clear line */
}

.timeline-marker.active {
	background-color: #6EC1E4;
	color: #fff;
	transform: scale(1.1);
}

.timeline-marker i {
	font-size: 16px;
	color: #6EC1E4;
}

.timeline-marker.active i {
	color: #fff;
}

/* Content Wrappers */
.timeline-content-wrapper {
	width: 100%;
	display: flex;
	flex-direction: column;
	padding: 0 15px;
	text-align: center;
	/* Ensure content doesn't overflow or break grid centering */
	min-height: 0; 
}

.top-wrapper {
	grid-row: 1 !important;
	justify-content: flex-end; /* Push content down towards marker */
	padding-bottom: 10px;
}

.bottom-wrapper {
	grid-row: 3 !important;
	justify-content: flex-start; /* Push content up towards marker */
	padding-top: 10px;
}

/* Content Box */
.timeline-content {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 8px;
	position: relative;
	box-shadow: 0 5px 15px rgba(0,0,0,0.05);
	transition: transform 0.3s ease;
	width: 100%;
	max-width: 300px; /* Prevent overly wide cards */
	margin: 0 auto;
}

.timeline-item:hover .timeline-content {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Arrows */
.top-wrapper .timeline-content::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 16px;
	height: 16px;
	background: #f9f9f9;
	z-index: 0;
}

.bottom-wrapper .timeline-content::after {
	content: '';
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 16px;
	height: 16px;
	background: #f9f9f9;
	z-index: 0;
}

/* Typography */
.timeline-date {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
	padding: 4px 10px;
	background: rgba(110, 193, 228, 0.1);
	border-radius: 20px;
	color: #6EC1E4;
}

.timeline-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px;
	color: #333;
	line-height: 1.3;
}

.timeline-desc {
	font-size: 14px;
	color: #666;
	line-height: 1.6;
}

/* Navigation Buttons */
.timeline-nav-wrapper {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin-top: 30px;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 10;
	pointer-events: none; /* Let clicks pass through wrapper */
}

.timeline-button-prev,
.timeline-button-next {
	width: 44px;
	height: 44px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #333;
	transition: all 0.2s ease;
	pointer-events: auto; /* Re-enable clicks */
	border: 1px solid #eee;
}

.timeline-button-prev:hover,
.timeline-button-next:hover {
	background: #6EC1E4;
	color: #fff;
	border-color: #6EC1E4;
	transform: scale(1.05);
}

.timeline-button-disabled {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
}
