.timeline {
	background-color: var(--color-bg-lighter);
	color: var(--color-font-white);
	padding-bottom: 5rem !important;
}

.timeline-container {
	display: flex;
	justify-content: center;
}

.timeline-background {
	position: relative;
	margin: 80px 0;
	height: 1300px;

	&::before {
		content: "";
		position: absolute;
		top: 0;
		left: 50%;
		transform: translateX(-50%);
		width: 6px;
		height: 100%;
		background-color: var(--border-color);
		box-shadow: var(--shadow-primary);
		border-radius: 10px;
	}
}

.timeline-background .badge {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	padding: 8px 16px;
	width: 200px;
	background-image: var(--gradient-primary);
	text-align: center;
	font-weight: 900;
	font-size: 16px;
	text-transform: uppercase;
	border-radius: 8px;
	opacity: 0;
	transition: opacity 0.8s ease 0.2s;

	&.active {
		opacity: 1;
	}
}

.timeline-background .badge-1 {
	top: -60px;
}

.timeline-background .badge-2 {
	bottom: -60px;
}

.timeline-item {
	position: absolute;
	display: flex;
	align-items: center;
	padding: 62px 30px 32px;
	min-width: 600px;
	background-color: var(--color-bg);
	border: var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow-lighter);

	&:hover::after {
		box-shadow: var(--shadow-color-bg);
	}
}

.timeline-item.item1,
.timeline-item.item3 {
	top: 50px;
	right: 60px;
}

.timeline-item.item2,
.timeline-item.item4 {
	top: 300px;
	left: 60px;
}

.timeline-item.item3 {
	top: 550px;
}

.timeline-item.item4 {
	top: 850px;
}

.timeline-background .arrow {
	position: absolute;
	top: 50px;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	background-color: var(--color-bg);
	border: var(--border);
	rotate: 45deg;
}

.timeline-background .item1 .arrow,
.timeline-background .item3 .arrow {
	right: -5px;
	border-bottom: none;
	border-left: none;
}

.timeline-background .item2 .arrow,
.timeline-background .item4 .arrow {
	left: -26px;
	border-top: none;
	border-right: none;
}

.timeline-item::before {
	position: absolute;
	left: 50%;
	top: -10px;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 60%;
	height: 40px;
	background-color: var(--color-bg-hover);
	color: var(--color-main-accent);
	font-size: 20px;
	font-weight: 900;
	border: var(--border);
	border-radius: 4px 4px 16px 16px;
	transform: translateX(-50%);
}

.timeline-item.item1::before {
	content: "DZIEŃ 1";
}

.timeline-item.item2::before {
	content: "DZIEŃ 2";
}

.timeline-item.item3::before {
	content: "DZIEŃ 3-8";
}

.timeline-item.item4::before {
	content: "DZIEŃ 9";
}

.timeline-item::after {
	content: "";
	position: absolute;
	top: 55px;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	background-image: var(--gradient-primary);
	border-radius: 50%;
	border: 8px solid var(--color-bg-lighter);
	z-index: 100;
	transition: box-shadow 0.2s ease;
}

.timeline-item.item1::after,
.timeline-item.item3::after {
	right: -81px;
}

.timeline-item.item2::after,
.timeline-item.item4::after {
	left: -81px;
}

.timeline-item ul {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style-type: none;
}

.timeline-background ul li {
	padding-left: 20px;
	width: 100%;
	font-size: 20px;
	z-index: 10;
}

@media screen and (max-width: 1350px) {
	.timeline-background {
		height: 1380px;
	}

	.timeline-item {
		min-width: 500px;
	}
}

@media screen and (max-width: 1150px) {
	.timeline-background {
		display: flex;
		align-items: center;
		justify-content: space-evenly;
		flex-direction: column;
		gap: 160px;
		padding-top: 140px;
		padding-bottom: 80px;
		height: auto;
	}

	.timeline-item {
		position: relative;
		left: 0 !important;
		top: 0 !important;
		width: clamp(200px, 100%, 500px);
		min-width: 0;
	}

	.timeline-item::after {
		top: -90px !important;
		left: 50% !important;
		transform: translateX(-50%);
	}

	.timeline-item::before {
		z-index: 10;
	}

	.timeline-background .timeline-item .arrow {
		top: -10px;
		left: 50%;
		transform: translateX(calc(-50% - 6px));
		background-color: var(--color-bg-hover);
		border: var(--border);
	}
}
