/**
 * News ticker — pure CSS marquee. The front-page renders the ticker
 * content twice (to make a seamless loop) and the animation translates
 * the track by -50% every cycle.
 */

#newsScrollContainer {
    overflow: hidden;
    background: #b80c09;        /* diocese red */
    color: #fff;
    padding: 1rem 0;
    position: relative;
    z-index: 1;
    min-height: 60px;
}

#newsTickerContainer {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    animation: diocese-ticker-scroll 70s linear infinite;
    will-change: transform;
    align-items: center;
    padding: 0 1.5rem;
}

#newsTickerContainer p {
    flex-shrink: 0;
    margin: 0 4rem 0 0;
    white-space: nowrap;
    color: #fff;
    line-height: 1.5;
    font-size: 1rem;
}

#newsTickerContainer a {
    color: #fff;
    text-decoration: underline;
}

#newsTickerContainer a:hover {
    color: #ffe9b3;
}

@keyframes diocese-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

#newsScrollContainer:hover #newsTickerContainer {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    #newsTickerContainer {
        animation: none;
        flex-wrap: wrap;
        padding: 0 1rem;
    }
    #newsTickerContainer p {
        white-space: normal;
        margin: 0.25rem 1rem 0.25rem 0;
    }
}
