/* Timeline con immagine quadrata integrata */
.timeline-content-img {
        display: flex;
        align-items: flex-start;
    gap: 2.2rem;
}

/* Immagini timeline più grandi e valorizzate */
.timeline-img-square {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 4px 32px 0 rgba(255,107,0,0.18), 0 2px 12px rgba(0,0,0,0.18);
    flex-shrink: 0;
    background: #222;
    transition: transform 0.25s cubic-bezier(.4,1.6,.6,1), box-shadow 0.25s cubic-bezier(.4,1.6,.6,1);
    border: 3px solid rgba(255,107,0,0.18);
    position: relative;
    z-index: 2;
}

.timeline-img-square:hover, .timeline-item:hover .timeline-img-square {
    transform: scale(1.13) rotate(-2deg);
    box-shadow: 0 8px 48px 0 rgba(255,107,0,0.32), 0 4px 24px rgba(0,0,0,0.22);
    border: 3px solid var(--primary-color);
    filter: brightness(1.08) saturate(1.15);
}


.timeline-text {
        flex: 1 1 0%;
        min-width: 0;
}

@media (max-width: 700px) {
    .timeline-content-img {
        flex-direction: column;
        align-items: center;
        gap: 0.7rem;
        text-align: center;
    }
    .timeline-img-square {
        width: 100px;
        height: 100px;
        border-radius: 14px;
    }
    .timeline-img-square:hover, .timeline-item:hover .timeline-img-square {
        transform: scale(1.09) rotate(-1deg);
        box-shadow: 0 6px 32px 0 rgba(255,107,0,0.22), 0 2px 12px rgba(0,0,0,0.18);
    }
    .timeline-text {
        width: 100%;
    }
}
/* Timeline Section Styles */
:root {
    --primary-color: #FF6B00;
    --bg-dark: #030303;
    --text-light: #f4f4f4;
}

.section-timeline {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding-top: 2rem 0;
    padding-bottom: 10%;
}

/* Effetto sfondo sfumato */
.section-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    z-index: 0;
}


/* Container sopra gli effetti di sfondo */
.section-timeline .container {
    position: relative;
    z-index: 1;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
}

/* Linea temporale orizzontale */
.timeline-points {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 0 2rem;
}

/* Linea arancione di base */
.timeline-points::before {
    content: '';
    position: absolute;
    left: 10px;
    right: 20px; /* Aumentato per lasciare spazio alla freccia */
    top: 50%;
    height: 3px;
    background: var(--primary-color);
    transform: translateY(-50%);
    z-index: 1;
}

/* Aggiunta della freccia */
.timeline-points::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 16px solid var(--primary-color);
    z-index: 1;
}

/* Stile dei pallini */
.timeline-point {
    position: relative;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease-in-out;
}

/* Etichetta anni sotto il pallino */
.timeline-point span {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: color 0.3s ease-in-out;
}

/* Hover state */
.timeline-point:hover {
    transform: scale(1.2);
}

/* Stato attivo del pallino */
.timeline-point.active {
    transform: scale(1.3);
    background-color: #fff;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

.timeline-point.active span {
    color: var(--primary-color);
    font-weight: bold;
}

/* Contenitore dei gruppi */
.timeline-groups {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}

.timeline-groups.active {
    opacity: 1;
    height: auto;
    margin-top: 1rem; /* Ridotto lo spazio */
}

/* Gruppo singolo */
.timeline-group {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.timeline-group.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Eventi nel gruppo */
.timeline-item {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    border-left: 3px solid var(--primary-color);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.timeline-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
}

.timeline-item p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* Group header styles */
.group-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.group-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.group-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Istruzioni utente */
.timeline-instruction {
    text-align: center;
    margin: 1.5rem auto;
    color: var(--text-light);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
    font-size: 0.9rem;
    max-width: 600px;
    padding: 0 1rem;
    line-height: 1.5;
}

.timeline-instruction span {
    color: var(--primary-color);
    display: inline-block;
    margin: 0 0.2rem;
}

/* Aggiungere queste media queries alla fine del file */
@media screen and (max-width: 768px) {
    .timeline-points {
        padding: 0 1rem;
        margin: 2.5rem 0; /* Aumentiamo il margine per dare spazio alle date */
    }
    
    .timeline-point {
        width: 15px;
        height: 15px;
    }

    .timeline-points::before {
        left: 7px;    /* Ridotto per mobile */
        right: 7px;   /* Ridotto per mobile */
    }

    /* Stile base per tutti i punti in mobile */
    .timeline-point span {
        font-size: 0.8rem;
        transform: translateX(-50%);
    }
    
    /* Alterna la posizione delle date */
    .timeline-point:nth-child(odd) span {
        top: 30px; /* Prima data sotto */
    }
    
    .timeline-point:nth-child(even) span {
        top: -30px; /* Seconda data sopra */
        bottom: auto;
    }

    .timeline-points::after {
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-left: 12px solid var(--primary-color);
    }

    .timeline-link {
        text-decoration: none;
        color: inherit;
        position: relative;
        z-index: 2;
    }
    
    .timeline-link:hover .timeline-point {
        transform: scale(1.2);
    }
}

/* Per schermi ancora più piccoli, possiamo ridurre ulteriormente le dimensioni */
@media screen and (max-width: 480px) {
    .timeline-point {
        width: 12px;
        height: 12px;
    }

    .timeline-point span {
        font-size: 0.75rem;
    }
    
    .timeline-point:nth-child(odd) span {
        top: 25px;
    }
    
    .timeline-point:nth-child(even) span {
        top: -25px;
    }
}

/* Pulsante foto */
.photo-button {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.photo-button:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.photo-button span {
    margin-left: 0.5rem;
    font-size: 0.8em;
}