/**
 * Code Stack Avada Timeline frontend styles.
 *
 * Pseudocode overview:
 * 1. Scope every style inside .cs-timeline-wrap so Avada layouts are not accidentally affected.
 * 2. Draw one central timeline line on desktop.
 * 3. Alternate cards left and right automatically using classes generated by PHP.
 * 4. Collapse to a single-column mobile layout below 800px.
 * 5. Use a small reveal animation when JavaScript marks an item as visible.
 */

.cs-timeline-wrap {
	--cs-timeline-blue: #12497b;
	--cs-timeline-amber: #ffbf00;
	--cs-timeline-bg: transparent;
	--cs-timeline-card: #ffffff;
	--cs-timeline-text: #243447;
	--cs-timeline-muted: #5b6b7c;
	--cs-timeline-shadow: 0 18px 45px rgba(18, 73, 123, 0.16);
	--cs-timeline-radius: 0;
	position: relative;
	width: 100%;
	padding: 70px 20px;
	background: transparent;
	box-sizing: border-box;
}

.cs-timeline-wrap *,
.cs-timeline-wrap *::before,
.cs-timeline-wrap *::after {
	box-sizing: border-box;
}

.cs-timeline-inner {
	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	padding: 10px 0;
}

.cs-timeline-inner::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 4px;
	background: var(--cs-timeline-amber);
	transform: translateX(-50%);
	border-radius: 999px;
}

.cs-timeline-item {
	position: relative;
	width: 50%;
	margin: 0 0 54px;
	opacity: 0;
	transition: opacity 700ms ease, transform 700ms ease;
}

.cs-timeline-item:last-child {
	margin-bottom: 0;
}

.cs-timeline-left {
	left: 0;
	padding-right: 64px;
	transform: translateX(-28px);
}

.cs-timeline-right {
	left: 50%;
	padding-left: 64px;
	transform: translateX(28px);
}

.cs-timeline-item.cs-timeline-is-visible {
	opacity: 1;
	transform: translateX(0);
}

.cs-timeline-marker {
	position: absolute;
	top: 42px;
	width: 28px;
	height: 28px;
	background: var(--cs-timeline-amber);
	border: 6px solid transparent;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(255, 191, 0, 0.25);
	z-index: 2;
}

.cs-timeline-left .cs-timeline-marker {
	right: -14px;
}

.cs-timeline-right .cs-timeline-marker {
	left: -14px;
}

.cs-timeline-card {
	position: relative;
	overflow: hidden;
	background: var(--cs-timeline-card);
	border-radius: var(--cs-timeline-radius);
	box-shadow: var(--cs-timeline-shadow);
	border-bottom: 5px solid var(--cs-timeline-amber);
}

.cs-timeline-card::before {
	content: "";
	position: absolute;
	top: 42px;
	width: 0;
	height: 0;
	border-top: 13px solid transparent;
	border-bottom: 13px solid transparent;
}

.cs-timeline-left .cs-timeline-card::before {
	right: -13px;
	border-left: 13px solid var(--cs-timeline-card);
}

.cs-timeline-right .cs-timeline-card::before {
	left: -13px;
	border-right: 13px solid var(--cs-timeline-card);
}

.cs-timeline-media {
	position: relative;
	width: 100%;
	min-height: 210px;
	background: linear-gradient(135deg, var(--cs-timeline-blue), #0b2f50);
}

.cs-timeline-image {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: cover;
}

.cs-timeline-media-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 42px 28px;
	color: #ffffff;
	font-size: clamp(2rem, 5vw, 4.8rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
	text-align: center;
}

.cs-timeline-media-fallback::after {
	content: "";
	position: absolute;
	inset: 18px;
	border: 2px solid rgba(255, 191, 0, 0.55);
}

.cs-timeline-content {
	padding: 30px 32px 34px;
	background: var(--cs-timeline-card);
}

.cs-timeline-year {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 14px;
	padding: 6px 12px;
	background: var(--cs-timeline-amber);
	color: var(--cs-timeline-blue);
	font-size: 0.86rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	line-height: 1.2;
	text-transform: uppercase;
}

.cs-timeline-title {
	margin: 0 0 12px;
	color: var(--cs-timeline-blue);
	font-size: clamp(1.25rem, 2vw, 1.65rem);
	font-weight: 800;
	line-height: 1.18;
}

.cs-timeline-text {
	color: var(--cs-timeline-text);
	font-size: 1rem;
	line-height: 1.7;
}

.cs-timeline-text p {
	margin: 0 0 1em;
}

.cs-timeline-text p:last-child {
	margin-bottom: 0;
}

.cs-timeline-text a {
	color: var(--cs-timeline-blue);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.cs-timeline-text ul,
.cs-timeline-text ol {
	margin: 0 0 1em 1.2em;
	padding: 0;
}

.cs-timeline-empty {
	padding: 24px;
	background: transparent;
	border-left: 5px solid #ffbf00;
	color: #12497b;
	font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
	.cs-timeline-item {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

@media (max-width: 800px) {
	.cs-timeline-wrap {
		padding: 42px 14px;
	}

	.cs-timeline-inner {
		padding-left: 24px;
	}

	.cs-timeline-inner::before {
		left: 14px;
		transform: none;
	}

	.cs-timeline-item,
	.cs-timeline-left,
	.cs-timeline-right {
		left: 0;
		width: 100%;
		padding-right: 0;
		padding-left: 38px;
		margin-bottom: 34px;
		transform: translateY(20px);
	}

	.cs-timeline-item.cs-timeline-is-visible {
		transform: translateY(0);
	}

	.cs-timeline-left .cs-timeline-marker,
	.cs-timeline-right .cs-timeline-marker {
		left: -23px;
		right: auto;
		top: 32px;
	}

	.cs-timeline-left .cs-timeline-card::before,
	.cs-timeline-right .cs-timeline-card::before {
		left: -13px;
		right: auto;
		border-right: 13px solid var(--cs-timeline-card);
		border-left: 0;
	}

	.cs-timeline-image {
		height: 220px;
	}

	.cs-timeline-content {
		padding: 24px 22px 28px;
	}
}

@media (max-width: 480px) {
	.cs-timeline-wrap {
		padding-right: 10px;
		padding-left: 10px;
	}

	.cs-timeline-inner {
		padding-left: 16px;
	}

	.cs-timeline-item,
	.cs-timeline-left,
	.cs-timeline-right {
		padding-left: 30px;
	}

	.cs-timeline-image {
		height: 190px;
	}

	.cs-timeline-content {
		padding: 22px 18px 24px;
	}
}
