:root {
	--ebm-primary: #667eea;
	--ebm-secondary: #764ba2;
	--ebm-gradient: linear-gradient(135deg, var(--ebm-primary) 0%, var(--ebm-secondary) 100%);
	--ebm-text-dark: #2d3748;
	--ebm-text-light: #718096;
	--ebm-white: #ffffff;
	--ebm-glass-bg: rgba(255, 255, 255, 0.75);
	--ebm-glass-border-color: rgba(255, 255, 255, 0.6);
	--ebm-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
	/* Softer, deeper shadow */
	--ebm-radius: 16px;
	/* Slightly more rounded */
}

/* Container */
.ebm-timeline-container {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.ebm-timeline-container * {
	box-sizing: border-box;
}

/* =========================================
   VERTICAL TIMELINE
   ========================================= */

.ebm-timeline-container.ebm-layout-vertical {
	padding: 40px 0;
}

/* Central Line */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-line {
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #e2e8f0;
	transform: translateX(-50%);
	z-index: 1;
	border-radius: 2px;
	overflow: hidden;
	/* For inner fill */
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-line-fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0%;
	/* JS will animate this */
	background: var(--ebm-gradient);
	border-radius: 2px;
	transition: height 0.1s linear;
	/* Smooth scroll sync */
	box-shadow: 0 0 10px rgba(118, 75, 162, 0.5);
	/* Glow effect */
}

/* Items Grid */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-items {
	display: flex;
	flex-direction: column;
	gap: 60px;
	/* Increased gap for breathing room */
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	position: relative;
	width: 100%;
	/* Perspective for 3D elements */
	perspective: 1000px;
}

/* Markers/Icons */
.ebm-timeline-marker {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translateX(-50%);
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
}

.ebm-timeline-icon {
	width: 48px;
	/* Slightly larger */
	height: 48px;
	background: var(--ebm-gradient);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 4px var(--ebm-white), var(--ebm-shadow);
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	/* Bouncy transition */
	position: relative;
}

/* Pulse Effect */
@keyframes ebm-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
	}

	70% {
		box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
	}
}

.ebm-timeline-item.active .ebm-timeline-icon {
	transform: scale(1.15);
	animation: ebm-pulse 2s infinite;
}

.ebm-timeline-item:hover .ebm-timeline-icon {
	transform: scale(1.1);
}

/* Content Card - Enhanced Glassmorphism */
.ebm-timeline-content {
	width: 45%;
	background: var(--ebm-glass-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);

	/* Gradient Border trick */
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-top: 1px solid rgba(255, 255, 255, 0.8);
	/* Light hits top */
	border-left: 1px solid rgba(255, 255, 255, 0.8);
	/* Light hits left */

	padding: 24px;
	border-radius: var(--ebm-radius);
	box-shadow: var(--ebm-shadow);
	position: relative;
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transform-style: preserve-3d;
	will-change: transform;
}

/* Hover Lift Effect */
.ebm-timeline-item:hover .ebm-timeline-content {
	transform: translateY(-8px) scale(1.02);
	/* Lift up */
	box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
	/* Deepen shadow */
	border-color: rgba(255, 255, 255, 0.9);
}

/* Alternating Layout */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) {
	flex-direction: row-reverse;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) .ebm-timeline-content {
	margin-right: auto;
	margin-left: 0;
	text-align: right;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(even) .ebm-timeline-content {
	margin-left: auto;
	margin-right: 0;
	text-align: left;
}

/* Arrows - Simplified */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-content::before {
	content: '';
	position: absolute;
	top: 20px;
	width: 12px;
	height: 12px;
	background: var(--ebm-glass-bg);
	/* Match bg */
	transform: rotate(45deg);
	border: 1px solid rgba(255, 255, 255, 0.5);
	z-index: 0;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(even) .ebm-timeline-content::before {
	left: -7px;
	border-top: none;
	border-right: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.5);
	border-left: 1px solid rgba(255, 255, 255, 0.8);
	/* Match card light source */
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) .ebm-timeline-content::before {
	right: -7px;
	border-bottom: none;
	border-left: none;
	border-top: 1px solid rgba(255, 255, 255, 0.8);
	border-right: 1px solid rgba(255, 255, 255, 0.5);
}

/* Elements */
.ebm-timeline-date {
	font-size: 0.8em;
	color: var(--ebm-primary);
	margin-bottom: 8px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	display: inline-block;
	background: rgba(102, 126, 234, 0.1);
	padding: 4px 10px;
	border-radius: 20px;
}

.ebm-timeline-title {
	margin: 0 0 12px;
	color: var(--ebm-text-dark);
	font-size: 1.35em;
	font-weight: 700;
	letter-spacing: -0.5px;
}

.ebm-timeline-desc {
	color: var(--ebm-text-light);
	font-size: 0.95em;
	line-height: 1.7;
}

.ebm-timeline-desc p:last-child {
	margin-bottom: 0;
}

.ebm-timeline-image {
	margin-bottom: 18px;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ebm-timeline-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.5s ease;
}

.ebm-timeline-item:hover .ebm-timeline-image img {
	transform: scale(1.05);
}

.ebm-read-more {
	display: inline-flex;
	align-items: center;
	margin-top: 15px;
	color: var(--ebm-primary);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9em;
	transition: transform 0.2s ease;
}

.ebm-read-more:hover {
	transform: translateX(5px);
}

/* =========================================
   HORIZONTAL TIMELINE (SWIPER)
   ========================================= */

.ebm-layout-horizontal {
	overflow: hidden;
	padding-bottom: 50px !important;
	/* Space for pagination */
}

.ebm-layout-horizontal .ebm-timeline-item {
	width: 320px;
	height: auto;
	opacity: 0.5;
	transition: opacity 0.4s ease, transform 0.4s ease;
	transform: scale(0.9);
}

.ebm-layout-horizontal .ebm-timeline-item.swiper-slide-active {
	opacity: 1;
	transform: scale(1);
}

.ebm-layout-horizontal .ebm-timeline-content {
	width: 100%;
	margin-top: 25px;
	/* No arrow for horizontal typically, simplifies layout */
}

.ebm-layout-horizontal .ebm-timeline-content::before {
	display: none;
}

.ebm-layout-horizontal .ebm-timeline-marker {
	position: relative;
	left: auto;
	top: auto;
	transform: none;
	display: inline-flex;
	margin-bottom: 15px;
}

/* Horizontal Connector */
.ebm-layout-horizontal .ebm-timeline-marker::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 100%;
	width: 500px;
	/* Long line to connect to next */
	height: 2px;
	background: #e2e8f0;
	z-index: -1;
	transform: translateY(-50%);
	margin-left: 10px;
}

.ebm-layout-horizontal .ebm-timeline-item:hover .ebm-timeline-marker::after,
.ebm-layout-horizontal .ebm-timeline-item.swiper-slide-active .ebm-timeline-marker::after {
	background: var(--ebm-primary);
	/* Highlight flow */
}

.ebm-layout-horizontal .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	background: #cbd5e0;
	opacity: 1;
	transition: all 0.3s ease;
}

.ebm-layout-horizontal .swiper-pagination-bullet-active {
	background: var(--ebm-primary);
	width: 20px;
	/* Stretch active dot */
	border-radius: 5px;
}

/* =========================================
   STEPS LAYOUT
   ========================================= */

.ebm-layout-steps .ebm-timeline-items {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

.ebm-layout-steps .ebm-timeline-item {
	flex: 1;
	min-width: 250px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.ebm-layout-steps .ebm-timeline-marker {
	position: relative;
	left: auto;
	top: auto;
	transform: none;
	margin-bottom: 25px;
}

.ebm-layout-steps .ebm-timeline-marker::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 100%;
	width: 200%;
	/* Stretch far */
	height: 2px;
	background: #e2e8f0;
	transform: translateY(-50%);
	z-index: -1;
	margin-left: 20px;
	/* Gap from icon */
}

.ebm-layout-steps .ebm-timeline-item:last-child .ebm-timeline-marker::before {
	display: none;
}

.ebm-layout-steps .ebm-timeline-content {
	width: 100%;
	/* Simpler glass for steps */
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.4);
}

.ebm-layout-steps .ebm-timeline-content::before {
	display: none;
}


/* =========================================
   ANIMATIONS & STATES
   ========================================= */

/* Initial State for AOS */
.ebm-timeline-item {
	opacity: 1;
	/* Default to visible to prevent editor/JS data loss issues */
	transition: opacity 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000), transform 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

/* Only hide if animation attribute is present (and presumably JS will handle reveal) */
.ebm-timeline-item[data-aos] {
	opacity: 0;
}

/* Different Entry Transforms */
.ebm-timeline-item[data-aos="fade-up"] {
	transform: translateY(50px);
}

.ebm-timeline-item[data-aos="fade-in"] {
	transform: translateY(0) scale(0.95);
}

.ebm-timeline-item[data-aos="zoom-in"] {
	transform: scale(0.8);
}

/* Animated State */
.ebm-timeline-item.ebm-scroll-in {
	opacity: 1;
	transform: translate(0) scale(1);
}

/* Stagger Delays (Generated by JS usually, but pre-set some helpful ones for CSS-only fallback or enhancement) */
.ebm-timeline-item:nth-child(1) {
	transition-delay: 0.1s;
}

.ebm-timeline-item:nth-child(2) {
	transition-delay: 0.2s;
}

.ebm-timeline-item:nth-child(3) {
	transition-delay: 0.3s;
}

.ebm-timeline-item:nth-child(4) {
	transition-delay: 0.4s;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {

	/* Convert Vertical to simple list on Mobile */
	.ebm-timeline-container.ebm-layout-vertical {
		padding: 20px 0;
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-line {
		left: 24px;
		/* Align with icon center */
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item {
		flex-direction: row !important;
		/* Force items to be right of line */
		justify-content: flex-start;
		padding-left: 60px;
		/* Space for line + icon */
		margin-bottom: 0;
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-marker {
		left: 24px;
		transform: translateX(-50%);
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-content {
		width: 100%;
		text-align: left !important;
		margin: 0 !important;
	}

	/* Arrow readjustment for mobile */
	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-content::before {
		left: -7px !important;
		right: auto !important;
		border-top: none !important;
		border-right: none !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
		border-left: 1px solid rgba(255, 255, 255, 0.8) !important;
	}

	.ebm-layout-steps .ebm-timeline-marker::before {
		display: none;
		/* Hide connector lines on mobile steps */
	}

	.ebm-layout-steps .ebm-timeline-item {
		width: 100%;
		min-width: 100%;
	}
}

/* Container */
.ebm-timeline-container {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.ebm-timeline-container * {
	box-sizing: border-box;
}

/* =========================================
   VERTICAL TIMELINE
   ========================================= */

.ebm-timeline-container.ebm-layout-vertical {
	padding: 20px 0;
}

/* Central Line */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-line {
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 4px;
	background: #e2e8f0;
	transform: translateX(-50%);
	z-index: 1;
	border-radius: 2px;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-line-fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0%;
	/* JS will animate this */
	background: var(--ebm-gradient);
	border-radius: 2px;
	transition: height 0.5s ease-out;
}

/* Items Grid */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-items {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	position: relative;
	width: 100%;
}

/* Markers/Icons */
.ebm-timeline-marker {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translateX(-50%);
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
}

.ebm-timeline-icon {
	width: 40px;
	height: 40px;
	background: var(--ebm-gradient);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 4px #fff, var(--ebm-shadow);
	transition: all 0.3s ease;
}

.ebm-timeline-item:hover .ebm-timeline-icon,
.ebm-timeline-item.active .ebm-timeline-icon {
	transform: scale(1.1);
}

/* Content Card */
.ebm-timeline-content {
	width: 45%;
	background: var(--ebm-glass-bg);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid var(--ebm-glass-border);
	padding: 20px;
	border-radius: var(--ebm-radius);
	box-shadow: var(--ebm-shadow);
	position: relative;
	transition: all 0.3s ease;
}

/* Alternating Layout */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) {
	flex-direction: row-reverse;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) .ebm-timeline-content {
	margin-right: auto;
	margin-left: 0;
	text-align: right;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(even) .ebm-timeline-content {
	margin-left: auto;
	margin-right: 0;
	text-align: left;
}

/* Arrows */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-content::after {
	content: '';
	position: absolute;
	top: 15px;
	width: 10px;
	height: 10px;
	background: inherit;
	transform: rotate(45deg);
	border-width: 1px;
	border-style: solid;
	border-color: transparent transparent var(--ebm-glass-border) var(--ebm-glass-border);
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) .ebm-timeline-content::after {
	right: -6px;
	border-color: var(--ebm-glass-border) var(--ebm-glass-border) transparent transparent;
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(even) .ebm-timeline-content::after {
	left: -6px;
	border-color: transparent transparent transparent var(--ebm-glass-border);
	/* Fix based on rotation */
	border-style: solid;
	border-width: 0 0 1px 1px;
}

/* Re-fix arrow logic simply */
.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(even) .ebm-timeline-content::after {
	left: -6px;
	border: none;
	background: inherit;
	border-bottom: 1px solid var(--ebm-glass-border);
	border-left: 1px solid var(--ebm-glass-border);
}

.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item:nth-child(odd) .ebm-timeline-content::after {
	right: -6px;
	left: auto;
	border: none;
	background: inherit;
	border-top: 1px solid var(--ebm-glass-border);
	border-right: 1px solid var(--ebm-glass-border);
}


/* Elements */
.ebm-timeline-date {
	font-size: 0.85em;
	color: var(--ebm-text-light);
	margin-bottom: 5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ebm-timeline-title {
	margin: 0 0 10px;
	color: var(--ebm-text-dark);
	font-size: 1.25em;
}

.ebm-timeline-desc {
	color: var(--ebm-text-light);
	font-size: 0.95em;
	line-height: 1.6;
}

.ebm-timeline-desc p:last-child {
	margin-bottom: 0;
}

.ebm-timeline-image {
	margin-bottom: 15px;
	border-radius: 8px;
	overflow: hidden;
}

.ebm-timeline-image img {
	width: 100%;
	height: auto;
	display: block;
}

.ebm-read-more {
	display: inline-block;
	margin-top: 10px;
	color: var(--ebm-primary);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9em;
}

.ebm-read-more:hover {
	text-decoration: underline;
}

/* =========================================
   HORIZONTAL TIMELINE (SWIPER)
   ========================================= */

.ebm-layout-horizontal {
	overflow: hidden;
	padding-bottom: 40px !important;
	/* Space for pagination */
}

.ebm-layout-horizontal .ebm-timeline-item {
	width: 300px;
	/* Default width, can be auto */
	height: auto;
}

.ebm-layout-horizontal .ebm-timeline-content {
	width: 100%;
	/* Full width of slide */
	margin-top: 20px;
}

.ebm-layout-horizontal .ebm-timeline-marker {
	position: relative;
	left: auto;
	top: auto;
	transform: none;
	display: inline-flex;
	margin-bottom: 15px;
}

.ebm-layout-horizontal .swiper-pagination-bullet-active {
	background: var(--ebm-primary);
}

/* =========================================
   STEPS LAYOUT
   ========================================= */

.ebm-layout-steps .ebm-timeline-items {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.ebm-layout-steps .ebm-timeline-item {
	flex: 1;
	min-width: 250px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.ebm-layout-steps .ebm-timeline-marker {
	position: relative;
	left: auto;
	top: auto;
	transform: none;
	margin-bottom: 20px;
}

.ebm-layout-steps .ebm-timeline-marker::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 100%;
	width: 200px;
	height: 2px;
	background: #e2e8f0;
	transform: translateY(-50%);
	z-index: -1;
}

.ebm-layout-steps .ebm-timeline-item:last-child .ebm-timeline-marker::before {
	display: none;
}

.ebm-layout-steps .ebm-timeline-content {
	width: 100%;
}

/* =========================================
   ANIMATIONS
   ========================================= */

[data-aos] {
	opacity: 0;
	transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"] {
	transform: translateY(30px);
}

[data-aos="fade-in"] {
	transform: translateY(0);
}

[data-aos="zoom-in"] {
	transform: scale(0.9);
}

.ebm-video-animated {
	opacity: 1;
	transform: translate(0) scale(1);
}

/* Scale Effect Control */
.ebm-effect-scale-yes .ebm-timeline-item.active .ebm-timeline-content,
.ebm-effect-scale-yes .ebm-timeline-item:hover .ebm-timeline-content {
	transform: translateY(-5px);
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {

	/* Convert Vertical to simple list on Mobile */
	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-line {
		left: 20px;
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-item {
		flex-direction: row !important;
		/* Force items to be right of line */
		justify-content: flex-start;
		padding-left: 50px;
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-marker {
		left: 20px;
		transform: translateX(-50%);
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-content {
		width: 100%;
		text-align: left !important;
		margin: 0 !important;
	}

	.ebm-timeline-container.ebm-layout-vertical .ebm-timeline-content::after {
		left: -6px !important;
		right: auto !important;
		border: none !important;
		border-bottom: 1px solid var(--ebm-glass-border) !important;
		border-left: 1px solid var(--ebm-glass-border) !important;
	}

	.ebm-layout-steps .ebm-timeline-marker::before {
		display: none;
		/* Hide connector lines on mobile steps */
	}
}