/**
 * Events Timeline Styles
 * Animated vertical timeline layout
 */

.nts-events-timeline {
	width: 100%;
	padding: 40px 20px;
}

.nts-timeline-container {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
}

/* Central timeline line */
.nts-timeline-container::before {
	content: '';
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(to bottom, var(--theme-palette-color-1), var(--theme-palette-color-2));
}

/* Timeline items */
.nts-timeline-item {
	margin-bottom: 50px;
	opacity: 0;
	animation: fadeInTimeline 0.6s ease-out forwards;
}

@keyframes fadeInTimeline {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Alternate left/right layout */
.nts-timeline-item:nth-child(odd) .nts-timeline-content {
	margin-left: 0;
	margin-right: auto;
	width: calc(50% - 40px);
	text-align: right;
}

.nts-timeline-item:nth-child(even) .nts-timeline-content {
	margin-left: auto;
	margin-right: 0;
	width: calc(50% - 40px);
	text-align: left;
}

/* Timeline marker (dot) */
.nts-timeline-marker {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 16px;
	height: 16px;
	background: white;
	border: 3px solid var(--theme-palette-color-1);
	border-radius: 50%;
	top: 10px;
	z-index: 1;
	box-shadow: 0 0 0 4px #f5f5f5;
	transition: all 0.3s ease;
}

.nts-timeline-item:hover .nts-timeline-marker {
	transform: translateX(-50%) scale(1.3);
	border-color: var(--theme-palette-color-2);
}

/* Timeline content and card */
.nts-timeline-content {
	position: relative;
}

.nts-timeline-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	border: 1px solid #f0f0f0;
	padding: 20px;
}

.nts-timeline-card:hover {
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
	transform: translateY(-5px);
	border-color: var(--theme-palette-color-1);
}

/* Timeline body */
.nts-timeline-body {
	padding: 0;
}

.nts-timeline-date {
	font-size: 12px;
	color: var(--theme-palette-color-1);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.nts-timeline-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
	line-height: 1.4;
	transition: color 0.3s ease;
}

.nts-timeline-card:hover .nts-timeline-title {
	color: var(--theme-palette-color-1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
	/* Hide central line on mobile */
	.nts-timeline-container::before {
		left: 20px;
		height: calc(100% + 50px);
	}

	/* Stack all items to the right */
	.nts-timeline-item:nth-child(odd) .nts-timeline-content,
	.nts-timeline-item:nth-child(even) .nts-timeline-content {
		margin-left: 60px;
		margin-right: 0;
		width: calc(100% - 60px);
		text-align: left;
	}

	/* Reposition marker for mobile */
	.nts-timeline-marker {
		left: 20px;
	}

	.nts-timeline-body {
		padding: 0;
	}

	.nts-timeline-title {
		font-size: 14px;
	}

	.nts-timeline-item {
		margin-bottom: 40px;
	}
}

/* Extra small screens */
@media (max-width: 480px) {
	.nts-events-timeline {
		padding: 30px 15px;
	}

	.nts-timeline-container::before {
		left: 15px;
	}

	.nts-timeline-item:nth-child(odd) .nts-timeline-content,
	.nts-timeline-item:nth-child(even) .nts-timeline-content {
		margin-left: 50px;
		width: calc(100% - 50px);
	}

	.nts-timeline-marker {
		left: 15px;
		width: 12px;
		height: 12px;
		border-width: 2px;
	}
}
