/* Overflow visible permette alle frecce di uscire dai bordi */
.st-timeline-wrapper {
    position: relative;
    width: 100%;
    overflow: visible; 
    padding: 40px 0;
    color: #fff;
}

/* -------- LINEA + PALLINI -------- */
.st-timeline-line {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;      
    padding: 0 40px;
    height: 80px;             
    margin-bottom: 40px;
}

.st-timeline-line::before {
    content: "";
    position: absolute; left: 40px; right: 40px; top: 50%;
    transform: translateY(-50%);
    height: 2px; background: #ffffff33;
}

.st-timeline-point {
    width: 14px; height: 14px; border-radius: 50%;
    background: #ffffff; border: 2px solid #ffffffaa;
}

.st-timeline-label {
    position: absolute; bottom: 100%; left: 50%;
    transform: translate(-50%, -8px); 
    font-size: 18px; font-weight: 500; white-space: nowrap;
    border: 1px solid white; padding: 5px 20px; border-radius: 300px;
}

/* -------- NAVIGAZIONE -------- */
.st-timeline-slider-main-container {
    position: relative;
    padding: 0 40px;
    overflow: visible;
}

.st-timeline-header-nav {
    display: flex;
    gap: 15px;
    z-index: 999;
}

.st-timeline-nav {
    border: none; width: 42px; height: 42px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; padding: 12px;
}

.st-timeline-nav svg { width: 100%; height: 100%; }

/* --- LOGICA LAYOUT: SOPRA (ABSOLUTE) --- */
.st-nav-layout-absolute .st-timeline-header-nav {
    position: absolute;
    right: 40px; /* Punto di partenza */
    top: -50px;  /* Punto di partenza */
}

/* --- LOGICA LAYOUT: AI LATI (SIDES) --- */
.st-nav-layout-sides .st-timeline-header-nav {
    position: static;
    display: block;
}

.st-nav-layout-sides .st-timeline-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.st-nav-layout-sides .st-timeline-prev { left: 0; }
.st-nav-layout-sides .st-timeline-next { right: 0; }

/* -------- SLIDER / CARD -------- */
.st-timeline-items {
    display: flex; gap: 40px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.st-timeline-items::-webkit-scrollbar { display: none; }

.st-timeline-card {
    flex: 0 0 calc(50% - 20px);
    background: #f5f5f5; border-radius: 16px;
    color: #000; scroll-snap-align: start;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    overflow: hidden;
}

@media (max-width: 1600px) {
    .st-timeline-card { flex: 0 0 100%; }
}

@media (max-width: 767px) {
    .st-timeline-slider-main-container { padding: 0 12px; }
    /* In mobile, se le frecce sono troppo lontane, Elementor permette di sovrascrivere */
}