/* NEBTRA Breaking News Marquee */

.news-ticker {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    min-height: 55px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.news-ticker > strong {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--accent, #b91c1c);
    color: #ffffff;
    padding: 14px 20px;
    font-size: 16px;
    white-space: nowrap;
    z-index: 2;
}

.ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    container-type: inline-size;
}

.news-ticker .ticker-track {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: max-content;
    max-width: none;
    overflow: visible;
    white-space: nowrap;
    padding: 12px 0;
    gap: 0;
    font-size: 16px;
    will-change: transform;

    animation: nebtra-marquee 25s linear infinite;
}

.news-ticker .ticker-track a {
    display: inline-block;
    flex-shrink: 0;
    color: #17283b;
    text-decoration: none;
    white-space: nowrap;
}

.news-ticker .ticker-track a:hover {
    color: var(--accent, #b91c1c);
    text-decoration: underline;
}

.news-ticker .ticker-separator {
    color: var(--secondary, #B08D42);
    font-size: 14px;
    padding: 0 25px;
    flex-shrink: 0;
}

@keyframes nebtra-marquee {
    from {
        transform: translateX(100cqw);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Pause when reading or clicking headlines */

.news-ticker:hover .ticker-track,
.news-ticker:focus-within .ticker-track {
    animation-play-state: paused;
}

.ticker-viewport:focus-within {
    overflow-x: auto;
}

.ticker-viewport:focus-within .ticker-track {
    animation: none;
    transform: none;
}

/* Mobile responsive */

@media (max-width: 768px) {

    .news-ticker {
        min-height: 44px;
    }

    .news-ticker > strong {
        font-size: 12px;
        padding: 10px 12px;
    }

    .news-ticker .ticker-track {
        font-size: 14px;
        padding: 10px 0;
    }

    .news-ticker .ticker-separator {
        padding: 0 15px;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {

    .news-ticker .ticker-track {
        animation: none;
        transform: none;
    }

    .ticker-viewport {
        overflow-x: auto;
    }
}