/* =====================================================
   TN24 CSS Ticker  — marquee replacement
   File: assets/front2/css/ticker.css
   ===================================================== */

/* Track: clips the scrolling content */
.tn24-ticker__track {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 2.6rem;
}

/* Inner: the element that actually translates */
.tn24-ticker__inner {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    animation: tn24TickerScroll var(--tn24-ticker-dur, 180s) linear infinite;
    will-change: transform;
}

/* Each set of news items (duplicated for seamless loop) */
.tn24-ticker__set {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    padding-right: 6rem; /* gap between end of set 1 and start of set 2 */
    white-space: nowrap;
}

/* Links inside ticker — inherit font from .scrool_2 */
.tn24-ticker__set a {
    display: inline-block;
    padding: 0 1.4rem 0 0;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.tn24-ticker__set a::after {
    content: '|';
    padding-left: 1.4rem;
    opacity: 0.4;
}
.tn24-ticker__set a:last-child::after {
    content: '';
    padding-left: 0;
}
.tn24-ticker__set a:hover,
.tn24-ticker__set a:focus-visible {
    text-decoration: underline;
    outline: none;
}

/* Keyframe: slide from right to left, exactly 50% = one full set width */
@keyframes tn24TickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause on hover/focus — readable headlines */
.tn24-ticker__track:hover .tn24-ticker__inner,
.tn24-ticker__track:focus-within .tn24-ticker__inner {
    animation-play-state: paused;
}

/* Reduced motion: freeze ticker, user can scroll manually if needed */
@media (prefers-reduced-motion: reduce) {
    .tn24-ticker__inner {
        animation-play-state: paused;
    }
}
