/* CSS per Timeline Alternata - Layout Fisso 1168px - DESKTOP ONLY */
.timeline-desktop-section {
    display: block;
    width: 100%;
}

.timeline-mobile-section {
    display: none;
}

.timeline-section {
    width: 100%;
    position: relative;
    font-family: 'Barlow', sans-serif;
    overflow: visible;
}

/* CONTAINER ESTERNO AL 100% */
.timeline-section .timeline-container {
    width: 100%;
    margin: 0 auto;
    padding: 60px 0;
    position: relative;
    overflow: visible;
}

/* Ogni blocco occupa il 100% della larghezza */
.timeline-block-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 100px;
    overflow: visible;
}

/* IMMAGINE DI SFONDO - 50% DELLA PAGINA (esteso al 50% del viewport) */

    .timeline-block-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 50%;
        height: 430px;
        background-size: contain;
        background-repeat: no-repeat;
        z-index: 1;
        opacity: 1;
        pointer-events: none;
        z-index: 1;
    }

/* PRIMA RIGA E RIGHE DISPARI: sfondo SINISTRA a SINISTRA */
.timeline-block-wrapper:first-child .timeline-block-bg,
.timeline-block-wrapper:nth-child(odd) .timeline-block-bg {
    left: 0;
    right: auto;
    background-position: left center;
}

/* RIGHE PARI: sfondo DESTRA a DESTRA */
.timeline-block-wrapper:nth-child(even) .timeline-block-bg {
    left: auto;
    right: 0;
    background-position: right center;
}

/* CONTAINER INTERNO 1168px CENTRATO */
.timeline-block {
    display: flex;
    align-items: center; /* Centrato verticalmente */
    justify-content: space-between;
    max-width: 1168px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px; /* Padding laterale per schermi piccoli */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
    min-height: 400px; /* Altezza minima per centratura */
    z-index: 2;
}

.timeline-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* IMPORTANTE: La prima riga DEVE essere TESTO a SINISTRA e IMMAGINE a DESTRA */
.timeline-block-wrapper:first-child .timeline-block {
    flex-direction: row-reverse !important;
}

/* Poi alterniamo normalmente partendo dalla seconda riga */
.timeline-block-wrapper:nth-child(even) .timeline-block {
    flex-direction: row;
}

.timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-block {
    flex-direction: row-reverse;
}

/* Colonna immagine - 50% del container 1168px */
.timeline-col-image {
    flex: 0 0 50%;
    width: 50%;
    position: relative;
    z-index: 3;
    box-sizing: border-box;
    display: flex;
    align-items: center; /* Centrato verticalmente */
    justify-content: center; /* Centrato orizzontalmente */
    height: 100%;
}

/* Colonna contenuto - 50% del container 1168px */
.timeline-col-content {
    flex: 0 0 50%;
    width: 50%;
    background: transparent;
    position: relative;
    z-index: 3;
    box-sizing: border-box;
    display: flex;
    align-items: center; /* Centrato verticalmente */
    height: 100%;
}

/* Allineamento testo per le colonne */

/* PRIMA RIGA E RIGHE DISPARI: Testo SINISTRA (allineato a sinistra) */
.timeline-block-wrapper:first-child .timeline-col-content,
.timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-col-content {
    justify-content: flex-start; /* Allineato a sinistra */
    padding-right: 40px; /* Spazio tra testo e immagine */
}

/* PRIMA RIGA E RIGHE DISPARI: Immagine DESTRA (centrata) */
.timeline-block-wrapper:first-child .timeline-col-image,
.timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-col-image {
    justify-content: flex-end; /* Allineato a destra */
    padding-left: 40px; /* Spazio tra immagine e testo */
}

/* RIGHE PARI: Immagine SINISTRA (centrata) */
.timeline-block-wrapper:nth-child(even) .timeline-col-image {
    justify-content: flex-start; /* Allineato a sinistra */
    padding-right: 40px; /* Spazio tra immagine e testo */
}

/* RIGHE PARI: Testo DESTRA (allineato a destra) */
.timeline-block-wrapper:nth-child(even) .timeline-col-content {
    justify-content: flex-end; /* Allineato a destra */
    padding-left: 40px; /* Spazio tra testo e immagine */
}

/* Stile immagine */
.timeline-col-image img {
    max-width: 100%;
    width: auto;
    max-height: 350px;
    height: auto;
    border-radius: 16px !important;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 3;
    display: block;
    object-fit: contain;
}

.timeline-col-image img:hover {
    transform: scale(1.02);
}

/* Contenitore interno per il testo */
.timeline-content-inner {
    width: 92%;
    max-width: 100%;
    text-align: left; /* Testo sempre allineato a sinistra dentro il blocco */
    position: relative;
    z-index: 4;
    background-color: transparent;
}

/* Per righe pari, il contenuto è allineato a destra ma il testo rimane a sinistra */
.timeline-block-wrapper:nth-child(even) .timeline-content-inner {
    text-align: right; /* Il blocco è a destra ma il testo dentro è allineato a destra */
}

/* Anno - stile Barlow */
.timeline-year {
    font-size: 56px;
    font-weight: 600;
    line-height: 60px;
    letter-spacing: 0.25px;
    color: #102132;
    margin-bottom: 20px;
    display: block;
    background: transparent;
    font-family: 'Barlow', sans-serif;
}

/* Titolo - stile Barlow */
.timeline-title {
    font-size: 50px;
    font-weight: 600;
    line-height: 54px;
    letter-spacing: 0.25px;
    color: #102132;
    margin-bottom: 24px;
    max-width: 100%;
    font-family: 'Barlow', sans-serif;
}

.timeline-title span {
    color: #349BD5;
    display: block;
}

.timeline-title br {
    display: block;
    margin: 8px 0;
    content: "";
}

/* Testo - stile Barlow */
.timeline-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    letter-spacing: 0.25px;
    color: #102132;
    font-family: 'Barlow', sans-serif;
    position: relative;
    z-index: 4;
}

.timeline-text p {
    margin-bottom: 15px;
}

.timeline-text p:last-child {
    margin-bottom: 0;
}

/* RESPONSIVE DESKTOP */

/* Schermi 4K e molto grandi (1600px+) - usiamo immagini 4K */
@media (min-width: 1600px) {
    .timeline-block-bg {
        background-size: cover; /* Copre l'area su schermi grandi */
    }
    
    .timeline-block {
        min-height: 500px;
    }
    
    .timeline-col-image img {
        max-height: 450px;
    }
}

/* Desktop grande (1400px - 1599px) */
@media (min-width: 1400px) {
    .timeline-block {
        min-height: 450px;
    }
    
    .timeline-col-image img {
        max-height: 400px;
    }
}

/* Desktop medio (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .timeline-block {
        min-height: 400px;
        padding: 0 20px;
    }
    
    .timeline-col-image img {
        max-height: 350px;
    }
}

/* Tablet orizzontale (tra 993px e 1200px) */
@media (max-width: 1200px) and (min-width: 993px) {
    .timeline-block {
        min-height: 380px;
        padding: 0 20px;
    }
    
    .timeline-title,
    .timeline-year {
        font-size: 48px;
        line-height: 52px;
    }
    
    .timeline-text {
        font-size: 17px;
        line-height: 26px;
    }
    
    .timeline-col-image img {
        max-height: 320px;
    }
    
    /* Riduci padding sui tablet orizzontali */
    .timeline-block-wrapper:first-child .timeline-col-content,
    .timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-col-content {
        padding-right: 30px;
    }
    
    .timeline-block-wrapper:first-child .timeline-col-image,
    .timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-col-image {
        padding-left: 30px;
    }
    
    .timeline-block-wrapper:nth-child(even) .timeline-col-image {
        padding-right: 30px;
    }
    
    .timeline-block-wrapper:nth-child(even) .timeline-col-content {
        padding-left: 30px;
    }
}

/* Schermi piccoli (sotto 1100px) - riduci padding */
@media (max-width: 1100px) and (min-width: 993px) {
    .timeline-block-wrapper:first-child .timeline-col-content,
    .timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-col-content {
        padding-right: 20px;
    }
    
    .timeline-block-wrapper:first-child .timeline-col-image,
    .timeline-block-wrapper:nth-child(odd):not(:first-child) .timeline-col-image {
        padding-left: 20px;
    }
    
    .timeline-block-wrapper:nth-child(even) .timeline-col-image {
        padding-right: 20px;
    }
    
    .timeline-block-wrapper:nth-child(even) .timeline-col-content {
        padding-left: 20px;
    }
}

/* Mobile - NASCONDI DESKTOP */
@media (max-width: 992px) {
    .timeline-desktop-section {
        display: none !important;
    }
}

@media (min-width: 1580px) {
  .timeline-block-bg {
       
        height: 480px;
}}

@media (min-width: 1680px) {
  .timeline-block-bg {
       
        height: 490px;
}}


@media (min-width: 1681px) {
  .timeline-block-bg {
       
        height: 496px;
}}


@media (min-width: 1780px) {
  .timeline-block-bg {
       
        height: 554px;
}}

@media (max-width: 1280px) 
{

.timeline-year {
    
    margin-bottom: 8px;     font-size: 46px;        line-height: 50px;
}
.timeline-title{margin-bottom: 10px;        font-size: 46px;        line-height: 50px;}
.timeline-col-content{padding-left:48px !important}

}