
/* IF Horizontal Slider */
/*
.news-ticker-container {
    background: #f8f9fa;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    position: relative;
    z-index: 10;
    padding: 6px 0;
}

.news-ticker {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    margin-right: 50px;
    font-size: 16px;
    font-weight: 500;
}
*/
/* IF VERTICAL SCROLL*/
.news-ticker-container {
    background: #f8f9fa;
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    position: relative;
    height: 40px;
}

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

.news-ticker a {
    pointer-events: auto;
    z-index: 2;
    position: relative;
}

.ticker-item {
    display: flex;
    align-items: center;        /* Centra verticalmente */
    justify-content: center;    /* Centra orizzontalmente */
        text-transform: uppercase;
	height: 40px;
    padding-left: 10px;
    font-size: 16px;
    font-weight: 500;
}

.news-category {
    padding: 2px 8px;
    margin-right: 8px;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
}

.news-text {
    color: #333;
}

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

@keyframes ticker-vertical-scroll {
    0%    { transform: translateY(0); }
    10%   { transform: translateY(0); }
    20%   { transform: translateY(-40px); }
    30%   { transform: translateY(-40px); }
    40%   { transform: translateY(-80px); }
    50%   { transform: translateY(-80px); }
    60%   { transform: translateY(-120px); }
    70%   { transform: translateY(-120px); }
    80%   { transform: translateY(-160px); }
    90%   { transform: translateY(-160px); }
    100%  { transform: translateY(0); }
}

/* Animazione continua */
@keyframes ticker-scroll-up {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-480px); } /* 8 notizie x 40px */
}

@media screen and (max-width: 768px) {
    .ticker-item {
        font-size: 13px;
        height: 32px;
    }

    .news-ticker-container {
        height: 32px;
    }

    .news-category {
        font-size: 12px;
        padding: 1px 6px;
        margin-right: 6px;
    }

    .news-text {
        font-size: 13px;
        line-height: 1; /* evita linee doppie */
    }

    /* Regola la distanza verticale per l’animazione */
    @keyframes ticker-scroll-up {
        0%   { transform: translateY(0); }
        100% { transform: translateY(-384px); } /* 12 x 32px */
    }
}
