/* Variabili di colore */
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #2563eb;
    --light-blue: #87ceeb;
    --extra-light-blue: #f0f8ff;
    --text-dark: #374151;
}

/* Corpo della pagina */
body {
    background-color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Contenitore principale della timeline */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}


/* Timeline verticale centrale */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--light-blue), var(--primary-blue));
    border-radius: 2px;
}

/* Elemento timeline */
.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
    padding: 0 30px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }
.timeline-item:nth-child(4) { animation-delay: 0.7s; }

/* Alternanza a sinistra/destra */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* Contenuto dell'evento */
.timeline-content {
    background: linear-gradient(135deg, #ffffff, var(--extra-light-blue));
    border: 2px solid var(--light-blue);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(135, 206, 235, 0.5);
    border-color: var(--primary-blue);
}

/* Freccia laterale */
.timeline-item:nth-child(odd) .timeline-content::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 12px solid var(--light-blue);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-right: 12px solid var(--light-blue);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

/* Punto centrale */
.timeline-marker {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border: 4px solid var(--light-blue);
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -40px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -40px;
}

/* Contenuto testuale */
.timeline-year {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-item:nth-child(odd) .timeline-year {
    justify-content: flex-end;
}

.timeline-company {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-blue);
    margin-bottom: 8px;
}

.timeline-description {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.timeline-icon {
    color: var(--light-blue);
    font-size: 1.2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 60px;
        padding-right: 20px;
    }

    .timeline-marker {
        left: 10px !important;
        right: auto !important;
    }

    .timeline-content::after {
        left: -12px !important;
        right: auto !important;
        border-left: none !important;
        border-right: 12px solid var(--light-blue) !important;
    }

    .timeline-year {
        justify-content: flex-start !important;
    }

   
}

/* Animazione fade in */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
