@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap');

.timeline-chi-siamo {
    position: relative;
    max-width: 900px;
    margin: 80px auto;
    padding: 40px 20px;
}

@media (max-width: 800px) {
    .timeline-chi-siamo {
        margin: 50px auto;
        padding: 30px 15px;
    }
    
    .timeline-step {
        width: 70%;
        left: 0 !important;
        padding: 30px 15px;
        text-align: right !important;
    }
    
    .timeline-step.left .timeline-content {
        text-align: center;
    }
    
    .timeline-step.right {
        left: 30% !important;
        text-align: left !important;
    }
    
    .timeline-icon {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: 50px;
        width: 60px;
        height: 60px;
        font-size: 28px;
        margin: 0;
    }
    
    .timeline-step:nth-child(2) .timeline-icon {
        top: 150px;
    }
    
    .timeline-step:nth-child(3) .timeline-icon {
        top: 0px;
    }
    
    .timeline-content {
        padding: 15px 20px;
    }
    
    .timeline-content h2 {
        font-size: 1.5rem;
    }
    
    .timeline-content p {
        font-size: 0.95rem;
    }
    
    .timeline-bar {
        top: -50px;
        height: calc(100% + 50px);
    }
    
    .timeline-end {
        margin-top: 10px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .timeline-chi-siamo {
        margin: 40px auto;
        padding: 20px 12px;
    }
    
    .timeline-step {
        width: 70%;
        padding: 20px 10px;
        text-align: right !important;
    }
    
    .timeline-step.left .timeline-content {
        text-align: center;
    }
    
    .timeline-step.right {
        left: 30% !important;
        text-align: left !important;
    }
    
    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: 40px;
        margin: 0;
    }
    
    .timeline-step:nth-child(2) .timeline-icon {
        top: 0px;
    }
    
    .timeline-step:nth-child(3) .timeline-icon {
    }
    
    .timeline-content {
        padding: 12px 15px;
    }
    
    .timeline-content h2 {
        font-size: 1.3rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    .timeline-bar {
        top: -40px;
        height: calc(100% + 40px);
    }
    
    .timeline-end {
        margin-top: 20px;
        padding: 0 12px;
    }
}

.timeline-bar {
    position: absolute;
    left: 50%;
    top: -180px;
    width: 4px;
    height: calc(100% + 200px);
    background: #FFC857;
    transform: translateX(-0%);
    z-index: 0;
    transition: height 0.3s;
}

/* STEP generici */
.timeline-step {
    position: relative;
    width: 80%;
    padding: 30px 20px;
}

.timeline-step.left {
    left: 0;
    text-align: right;
}

.timeline-step.right {
    left: 50%;
}

.timeline-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.timeline-step.right .timeline-icon {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

.timeline-content {
    background: #084C61;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    text-align: left;
}

/* ===== BLOCCO scritta eat enj..===== */

.end-cta {
    font-size: 4.2rem;
    font-weight: 900;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: nowrap;
    background: rgba(255,255,255,0.0);
    border-radius: 48px;
    box-shadow: none;
    padding: 0 8px 0 8px;
    animation: fadeUp 1.1s cubic-bezier(.7,-0.2,.5,1.5) 0.1s both;
    position: relative;
    z-index: 3;
    white-space: nowrap;
}

.end-cta .eat {
    color: #177E89;  
}
.end-cta .enjoy {
    color: #DB3A34;
}
.end-cta .repeat {
    color: #323031;
}

.end-cta span {
    text-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

/* Animazione di ingresso */
.end-cta span {
    opacity: 0;
    transform: translateY(32px);
}

.end-cta.animated span {
    animation: fadeUp 0.9s cubic-bezier(.7,-0.2,.5,1.5) forwards;
}

.end-cta.animated .eat { animation-delay: 0.1s; }
.end-cta.animated .enjoy { animation-delay: 0.25s; }
.end-cta.animated .repeat { animation-delay: 0.4s; }

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(32px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-6px) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile */
@media (max-width: 800px) {
    .end-cta {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        gap: 12px;
        padding: 18px 5vw 14px 5vw;
        white-space: normal;
        flex-wrap: wrap;
    }
    .timeline-bar {
        top: -50px;
        height: calc(100% + 50px);
    }
    .timeline-end {
        margin-top: 10px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .end-cta {
        font-size: clamp(1.5rem, 4.5vw, 2rem);
        gap: 8px;
        padding: 15px 3vw 12px 3vw;
    }
    .timeline-end {
        margin-top: 20px;
        padding: 0 12px;
    }
    .timeline-bar {
        top: -140px;
        height: calc(100% + 40px);
    }
}
