.news-ticker-container {
    background: #f8f9fa;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    position: relative;
    height: 40px;
}

.news-ticker {
    display: flex;
    flex-direction: column;
    animation: sidebar-ticker-scroll-up 48s steps(8) infinite;
}

.ticker-item {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.news-category {
    padding: 2px 6px;
    margin-right: 10px;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    flex-shrink: 0;
}

/* 🆕 Wrapper per area che scrolla */
.news-text-wrapper {
    overflow: hidden;
    white-space: nowrap;
    flex: 1; /* riempie tutto lo spazio dopo il badge */
    position: relative;
}

/* 🆕 Elemento animato */
.news-text {
    display: inline-block;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    transform: translateX(100%);
    animation: scroll-left 12s linear infinite;
}


/* Animazione verticale */
@keyframes sidebar-ticker-scroll-up {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-320px); } /* 8 notizie da 40px */
}

/* Animazione orizzontale del testo */
@keyframes ticker-horizontal-scroll {
    0%   { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

@keyframes scroll-left {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}