/*
 * Ticker CSS — Uganda Museums
 * Terracotta background, white text, infinite horizontal scroll
 */

.ticker {
    background-color: var(--terracotta);
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.78rem 0;
    position: relative;
}

/* Fade edges */
.ticker::before,
.ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}
.ticker::before {
    left: 0;
    background: linear-gradient(to right, var(--terracotta), transparent);
}
.ticker::after {
    right: 0;
    background: linear-gradient(to left, var(--terracotta), transparent);
}

/* The moving track — JS sets the animation duration based on content width */
.ticker__track {
    display: inline-block;
    animation: tickerScroll var(--ticker-duration, 40s) linear infinite;
    will-change: transform;
}

/* Pause on hover / reduced motion */
@media (hover: hover) {
    .ticker:hover .ticker__track {
        animation-play-state: paused;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker__track {
        animation: none;
        white-space: normal;
        padding: 0 1rem;
    }
    .ticker::before,
    .ticker::after { display: none; }
}

.ticker__item {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    padding: 0 1.5rem;
}

.ticker__sep {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.35);
    vertical-align: middle;
}

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