/* Helionex Timelines for Elementor — frontend styles */

.hxtl-timeline {
	--hxtl-line-color: #E3E8F0;
	--hxtl-line-style: solid;
	--hxtl-line-width: 2px;
	--hxtl-node-size: 46px;
	--hxtl-node-bg: #0E2340;
	--hxtl-node-icon: #1E9E4C;
	--hxtl-node-border-color: #1E9E4C;
	--hxtl-node-border-width: 3px;
	--hxtl-card-bg: #FFFFFF;
	--hxtl-card-border: #E3E8F0;
	--hxtl-card-radius: 14px;
	--hxtl-gap: 40px;
	--hxtl-item-color: var(--hxtl-node-border-color);
	position: relative;
	width: 100%;
	box-sizing: border-box;
}
.hxtl-timeline *, .hxtl-timeline *::before, .hxtl-timeline *::after { box-sizing: border-box; }

.hxtl-node {
	width: var(--hxtl-node-size);
	height: var(--hxtl-node-size);
	min-width: var(--hxtl-node-size);
	background: var(--hxtl-node-bg);
	border: var(--hxtl-node-border-width) solid var(--hxtl-item-color, var(--hxtl-node-border-color));
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 3;
	flex-shrink: 0;
}
.hxtl-node-icon,
.hxtl-node-icon svg {
	color: var(--hxtl-node-icon);
	fill: var(--hxtl-node-icon);
	font-size: calc(var(--hxtl-node-size) * 0.4);
	width: calc(var(--hxtl-node-size) * 0.4);
	height: calc(var(--hxtl-node-size) * 0.4);
}
.hxtl-node-number {
	font-family: inherit;
	font-weight: 700;
	font-size: calc(var(--hxtl-node-size) * 0.32);
	color: var(--hxtl-node-icon);
}

.hxtl-date {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 8px;
	color: #1E9E4C;
}
.hxtl-title { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.hxtl-title-link { text-decoration: none; }
.hxtl-title-link:hover .hxtl-title { text-decoration: underline; }
.hxtl-desc { margin: 0; font-size: 14.5px; line-height: 1.65; }
.hxtl-image { margin-bottom: 14px; border-radius: calc(var(--hxtl-card-radius) - 4px); overflow: hidden; }
.hxtl-image img { width: 100%; height: auto; display: block; }

/* ==================== VERTICAL LAYOUT ==================== */
.hxtl-layout-vertical .hxtl-track {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--hxtl-gap);
}
.hxtl-layout-vertical .hxtl-item {
	display: flex;
	gap: 22px;
	position: relative;
}
.hxtl-layout-vertical .hxtl-content { flex: 1; padding-top: 4px; }

/* connecting line for vertical: positioned behind nodes */
.hxtl-layout-vertical:not(.hxtl-no-line) .hxtl-track::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--hxtl-node-size) / 2);
	width: var(--hxtl-line-width);
	background: var(--hxtl-line-color);
	border-left: var(--hxtl-line-width) var(--hxtl-line-style) var(--hxtl-line-color);
	background: none;
	z-index: 1;
}

/* left / right alignment (default) */
.hxtl-valign-left .hxtl-item,
.hxtl-valign-right .hxtl-item { flex-direction: row; }

/* alternating (zigzag) alignment */
.hxtl-valign-alternate .hxtl-track::before,
.hxtl-style-zigzag .hxtl-track::before {
	left: 50%;
	transform: translateX(-50%);
}
.hxtl-valign-alternate .hxtl-item,
.hxtl-style-zigzag .hxtl-item {
	flex-direction: row;
	width: 50%;
}
.hxtl-valign-alternate .hxtl-item:nth-child(odd),
.hxtl-style-zigzag .hxtl-item:nth-child(odd) {
	align-self: flex-start;
	flex-direction: row;
	text-align: left;
}
.hxtl-valign-alternate .hxtl-item:nth-child(even),
.hxtl-style-zigzag .hxtl-item:nth-child(even) {
	align-self: flex-end;
	flex-direction: row-reverse;
	text-align: right;
}
.hxtl-valign-alternate .hxtl-item:nth-child(even) .hxtl-content,
.hxtl-style-zigzag .hxtl-item:nth-child(even) .hxtl-content { text-align: right; }

/* ==================== HORIZONTAL LAYOUT ==================== */
.hxtl-layout-horizontal { padding: 0 10px; }
.hxtl-layout-horizontal .hxtl-track {
	display: flex;
	align-items: flex-start;
	gap: var(--hxtl-gap);
	position: relative;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 30px 4px 16px;
	scrollbar-width: thin;
}
.hxtl-layout-horizontal.hxtl-hscroll-none .hxtl-track { overflow-x: hidden; flex-wrap: wrap; }
.hxtl-layout-horizontal .hxtl-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	scroll-snap-align: start;
	position: relative;
}
.hxtl-layout-horizontal .hxtl-node { margin-bottom: 18px; }
.hxtl-layout-horizontal:not(.hxtl-no-line) .hxtl-track::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(30px + (var(--hxtl-node-size) / 2));
	height: var(--hxtl-line-width);
	border-top: var(--hxtl-line-width) var(--hxtl-line-style) var(--hxtl-line-color);
	z-index: 1;
}

.hxtl-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--hxtl-card-border);
	background: var(--hxtl-card-bg);
	color: var(--hxtl-node-icon);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	font-size: 16px;
	transition: background .15s ease, color .15s ease;
}
.hxtl-arrow:hover { background: var(--hxtl-node-icon); color: #fff; }
.hxtl-arrow-prev { left: -14px; }
.hxtl-arrow-next { right: -14px; }

/* ==================== STYLE: CLASSIC ==================== */
.hxtl-style-classic .hxtl-content { padding: 0; background: none; border: none; }

/* ==================== STYLE: CARDS ==================== */
.hxtl-style-cards .hxtl-content {
	background: var(--hxtl-card-bg);
	border: 1px solid var(--hxtl-card-border);
	border-radius: var(--hxtl-card-radius);
	padding: 22px;
}

/* ==================== STYLE: ZIGZAG ==================== */
.hxtl-style-zigzag .hxtl-content {
	background: var(--hxtl-card-bg);
	border: 1px solid var(--hxtl-card-border);
	border-radius: var(--hxtl-card-radius);
	padding: 20px 24px;
}

/* ==================== STYLE: MINIMAL ==================== */
.hxtl-style-minimal {
	--hxtl-node-size: 14px;
}
.hxtl-style-minimal .hxtl-node { border-width: 0; }
.hxtl-style-minimal .hxtl-content { padding: 0; }
.hxtl-style-minimal.hxtl-layout-vertical .hxtl-item { gap: 16px; }

/* ==================== STYLE: NUMBERED ==================== */
.hxtl-style-numbered {
	--hxtl-node-size: 56px;
}
.hxtl-style-numbered .hxtl-node { border-style: solid; }
.hxtl-style-numbered .hxtl-content {
	background: var(--hxtl-card-bg);
	border: 1px solid var(--hxtl-card-border);
	border-radius: var(--hxtl-card-radius);
	padding: 20px 22px;
}

/* Diamond node shape: rotate the node, counter-rotate its contents */
.hxtl-shape-diamond .hxtl-node { transform: rotate(45deg); }
.hxtl-shape-diamond .hxtl-node-icon,
.hxtl-shape-diamond .hxtl-node-number { display: inline-flex; transform: rotate(-45deg); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
	.hxtl-valign-alternate .hxtl-item,
	.hxtl-valign-alternate .hxtl-item:nth-child(even),
	.hxtl-style-zigzag .hxtl-item,
	.hxtl-style-zigzag .hxtl-item:nth-child(even) {
		width: 100%;
		flex-direction: row;
		text-align: left;
		align-self: flex-start;
	}
	.hxtl-valign-alternate .hxtl-item:nth-child(even) .hxtl-content,
	.hxtl-style-zigzag .hxtl-item:nth-child(even) .hxtl-content { text-align: left; }
	.hxtl-valign-alternate .hxtl-track::before,
	.hxtl-style-zigzag .hxtl-track::before {
		left: calc(var(--hxtl-node-size) / 2);
		transform: none;
	}

	.hxtl-layout-horizontal.hxtl-stack-mobile .hxtl-track {
		flex-direction: column;
		overflow-x: hidden;
		padding: 10px 4px;
	}
	.hxtl-layout-horizontal.hxtl-stack-mobile .hxtl-item {
		flex-direction: row;
		text-align: left;
		width: 100% !important;
		flex: none !important;
	}
	.hxtl-layout-horizontal.hxtl-stack-mobile .hxtl-node { margin-bottom: 0; margin-right: 18px; }
	.hxtl-layout-horizontal.hxtl-stack-mobile:not(.hxtl-no-line) .hxtl-track::before {
		left: calc(30px + (var(--hxtl-node-size) / 2) - 30px);
		top: 0;
		bottom: 0;
		right: auto;
		width: var(--hxtl-line-width);
		height: auto;
		border-top: none;
		border-left: var(--hxtl-line-width) var(--hxtl-line-style) var(--hxtl-line-color);
	}
	.hxtl-layout-horizontal.hxtl-stack-mobile .hxtl-arrow { display: none; }
}

/* Fade-in reveal (progressively enhanced via JS, safe fallback = always visible) */
.hxtl-item.hxtl-in-view { animation: hxtl-fade-up .5s ease both; }
@keyframes hxtl-fade-up {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}
