/* Wherely Tour Timeline – Stile sincronizzato con theme.json */
:root {
	--wt-primary: #00d082; /* Colore "Primary" del tema */
	--wt-secondary: #1451a4; /* Colore "Secondary" */
	--wt-dark: #202124; /* Dark Black */
	--wt-light: #fff;
	--wt-gray-dark: #495057;
	--wt-bg-alt: #f8f9fa;
	--wt-font-family: var(--wp--preset--font-family--josefin-sans), sans-serif;
	--wt-font-size-normal: var(--wp--preset--font-size--normal, 1.1rem);
	--wt-font-size-large: var(--wp--preset--font-size--large, 2rem);
	--wt-font-size-extra-large: var(--wp--preset--font-size--extra-large, 3rem);
}

.wherely-tour-timeline {
	max-width: 840px; /* Allineato a contentSize del tema */
	margin: 2rem auto;
	font-family: var(--wt-font-family);
	padding: 0 20px;
	position: relative;
	color: var(--wt-gray-dark);
	font-size: var(--wt-font-size-normal);
	line-height: 1.7;
}

.tour-title {
	text-align: center;
	margin-bottom: 2.5rem;
	color: var(--wt-dark);
	font-size: var(--wt-font-size-large);
	font-weight: 600;
	line-height: 1.3;
}

.timeline-container {
	position: relative;
	padding: 30px 0;
}

/* Linea verticale centrale */
.timeline-container::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #ced4da; /* Colore "Gray" del tema */
	z-index: 1;
	transform: translateX(-50%);
}

.timeline-item {
	position: relative;
	margin: 25px 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}

.timeline-item.left {
	justify-content: flex-start;
}
.timeline-item.right {
	justify-content: flex-end;
}

/* Punto centrale (pin) */
.timeline-dot {
	position: absolute;
	left: 50%;
	top: 12px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--wt-primary);
	transform: translateX(-50%);
	z-index: 2;
	box-shadow: 0 0 0 4px rgba(0, 208, 130, 0.2);
}

.timeline-item.left .timeline-dot {
	left: 0;
	transform: translateX(-50%);
}
.timeline-item.right .timeline-dot {
	right: 0;
	left: auto;
	transform: translateX(50%);
}

/* Contenitore tappa */
.timeline-content {
	background: var(--wt-bg-alt); /* Sfondo chiaro come nel tema */
	padding: 18px;
	border-radius: 4px; /* Stesso radius dei bottoni */
	box-shadow: 0 2px 8px rgba(32, 33, 36, 0.1); /* Ombra sottile */
	max-width: 42%;
	z-index: 2;
	border: 1px solid #ced4da;
}

.timeline-item.left .timeline-content {
	margin-right: 20px;
	text-align: right;
}
.timeline-item.right .timeline-content {
	margin-left: 20px;
	text-align: left;
}

.timeline-content h4 {
	margin: 0 0 0.6rem;
	font-size: 1.15rem;
	color: var(--wt-dark);
	font-weight: 600;
	font-family: var(--wt-font-family);
}

.timeline-time {
	display: flex;
	gap: 12px;
	margin: 0.6rem 0;
	font-size: 0.92rem;
	color: var(--wt-gray-dark);
}

.time-start {
	background: rgba(0, 208, 130, 0.15);
	padding: 3px 10px;
	border-radius: 4px;
	color: var(--wt-primary);
	font-weight: 500;
}
.time-end {
	background: rgba(231, 76, 60, 0.15);
	padding: 3px 10px;
	border-radius: 4px;
	color: #dc3545;
	font-weight: 500;
}

.stop-desc {
	margin: 0.6rem 0 0;
	color: var(--wt-gray-dark);
	font-size: var(--wt-font-size-normal);
	line-height: 1.6;
}

.stop-desc ul, .stop-desc ol {
	margin: 0.6rem 0 0.6rem 1.5rem;
	padding: 0;
}
.stop-desc li {
	margin: 0.25rem 0;
}

/* Immagine della tappa */
.timeline-image img {
	max-width: 100%;
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(32, 33, 36, 0.1);
	margin-bottom: 12px;
}

/* Colori alternati per i pin (opzionale: puoi mantenerli tutti primari) */
.timeline-item:nth-child(3n+1) .timeline-dot { background: var(--wt-primary); box-shadow: 0 0 0 4px rgba(0, 208, 130, 0.25); }
.timeline-item:nth-child(3n+2) .timeline-dot { background: var(--wt-secondary); box-shadow: 0 0 0 4px rgba(20, 81, 164, 0.25); }
.timeline-item:nth-child(3n+3) .timeline-dot { background: #ffc107; box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.25); }

/* Mobile */
@media (max-width: 600px) {
	.wherely-tour-timeline { padding: 0 15px; }
	.timeline-container::before { left: 24px; transform: none; }
	.timeline-item {
		flex-direction: column;
		align-items: flex-start;
	}
	.timeline-item.left, .timeline-item.right {
		justify-content: flex-start;
	}
	.timeline-dot {
		left: 24px;
		top: 12px;
		transform: none;
	}
	.timeline-content {
		margin-left: 50px !important;
		max-width: 100% !important;
		text-align: left !important;
	}
	.tour-title {
		font-size: 1.5rem;
	}
	.timeline-image img {
		max-width: 100%;
	}
}