.tim-route-map-main-title {
    margin-top: 20px;
}

div.route-stage-label {
	cursor: pointer;
	display: flex;
    transition: all 0.2s ease-in-out;
    margin-bottom: 2px;
}

.route-stage-info {
	line-height:14px;
}
	
	div.route-stage-label:hover,
	div.route-stage-label.active {
		background-color: #fff;
		box-shadow: 1px 1px 5px #898989;
	}
	
	img.route-stage-pic {
		width: 150px;
		margin-right: 15px;
	    transition: all 0.2s ease-in-out;
	}
	
		div.route-stage-label.active img.route-stage-pic {
			width: 175px;
		}
	
	div.route-stage-meta {
		display: flex;
		flex-direction: column;
		justify-content: center;
		color: #888888;
	}
	
		div.route-stage-label:hover div.route-stage-meta,
		div.route-stage-label.active div.route-stage-meta {
			color: #3c3c3b;
		}
	
		.route-stage-title {
			margin: 0;
			text-transform: uppercase;
			font-style: italic;
			font-size: 28px;
		}
		
		.route-stage-date {
			margin: 0;
		}
		
.tim-route-map-wrapper .tim-route-map-svg {
	display: none;
}
		
.tim-route-map-wrapper .tim-route-map-svg svg {
	height: 100%;
	position: relative;
	transform: translateX(-50%);
	left: 50%;
	max-width: 150%;
	width: auto;
}
		
svg.tim-route-map path.tim-route {
    fill: none;
    stroke: #fed400;
    stroke-width: 5px;
    stroke-miterlimit: 10;
    stroke-dasharray: 0 10000;
    transition: stroke-dasharray 1s linear;
}

svg.tim-route-map g.route-stage * {
	    transition: all 0.2s ease-in-out;
	    cursor: pointer;
	    opacity: 0.75;
}

svg.tim-route-map g.route-stage ellipse.inner-stage-point {
    	fill: red;
}

	svg.tim-route-map g#rimini.route-stage ellipse.inner-stage-point {
		    fill: #fed400;
		    opacity: 0.95;
	}

svg.tim-route-map g.route-stage ellipse.outer-stage-point {
	    fill: none;
	    stroke: #fff;
	    stroke-width: 6px;
}


svg.tim-route-map g.route-stage:hover *,
svg.tim-route-map g.route-stage.active * {
    	opacity: 1 !important;
}

@media only screen and (min-width: 768px) {
	.tim-route-map-wrapper {
		display: flex;
	}
	
		.tim-route-map-wrapper .tim-route-map-info {
			flex-grow: 1;
			min-width: 35%;
		}
	
		.tim-route-map-wrapper .tim-route-map-svg {
			max-width: 65%;
			display: block;
		}
		
		.tim-route-map-wrapper .tim-route-map-svg svg {
			transform: translateX(0);
			left: auto;
		}
		
		.route-stage-label {
			width: 250%;
		}
}

@media only screen and (min-width: 1024px) {
	div.route-stage-label {
		width: 265%;
	}
}









/* Tappe 2027: layout compatto con sovrapposizione controllata */
.tim-route-map-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px 0;
    width: 100%;
    max-width: 1160px;
    margin-inline: auto;
    isolation: isolate;
	padding-top:40px;
	padding-bottom:40px;
}

.tim-route-map-wrapper > .tim-route-map-info,
.tim-route-map-wrapper > .tim-route-map-svg {
    min-width: 0;
}

.tim-route-map-wrapper .tim-route-map-info div.route-stage-label {
    width: 100%;
    box-sizing: border-box;
}

/* La foto resta della stessa larghezza anche sulla tappa attiva */
.tim-route-map-wrapper div.route-stage-label img.route-stage-pic,
.tim-route-map-wrapper div.route-stage-label.active img.route-stage-pic {
    width: clamp(90px, 11vw, 130px);
    height: auto;
    flex-shrink: 0;
    align-self: center;
}

.tim-route-map-wrapper .route-stage-title {
    font-size: clamp(18px, 2vw, 24px);
    overflow-wrap: anywhere;
}

/* Mostra la mappa anche su mobile, sotto l'elenco */
.tim-route-map-wrapper > .tim-route-map-svg {
    display: block;
    width: 100%;
    max-width: 740px;
    justify-self: end;
}

.tim-route-map-wrapper > .tim-route-map-svg > svg.tim-route-map {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    position: static;
    left: auto;
    transform: none;
}

@media (min-width: 900px) {
    .tim-route-map-wrapper {
        /* Lista esclusiva | fascia condivisa | mappa esclusiva */
        grid-template-columns: minmax(0, 38fr) minmax(0, 5fr) minmax(0, 57fr);
        align-items: start;
    }

    .tim-route-map-wrapper > .tim-route-map-info {
        grid-column: 1 / 3;
        grid-row: 1;
        z-index: 2;
    }

    .tim-route-map-wrapper > .tim-route-map-svg {
        grid-column: 2 / 4;
        grid-row: 1;
        z-index: 1;
    }
}






@media (min-width: 900px) {

    /* Lista dietro alla mappa */
    .tim-route-map-wrapper > .tim-route-map-info {
        position: relative;
        z-index: 1;
    }

    /* Mappa davanti, allineata all'inizio delle località */
    .tim-route-map-wrapper > .tim-route-map-svg {
        position: relative;
        z-index: 2;
        margin-top: 0px;
    }
}

/*
 * Lo spazio trasparente della mappa non deve
 * impedire il passaggio del mouse sulle località.
 */
.tim-route-map-wrapper > .tim-route-map-svg {
    pointer-events: none;
}

/* I punti delle tappe restano interattivi */
.tim-route-map-wrapper svg.tim-route-map g.route-stage,
.tim-route-map-wrapper svg.tim-route-map g.route-stage * {
    pointer-events: auto;
}
