/* ================================================================
 * Scrolling promo strip — rendered above the header by
 * templates/element/top_banner.php. Pure CSS marquee, no JS.
 * ================================================================ */

.top-banner {
    background: linear-gradient(90deg, #9667E0 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    overflow: hidden;
    position: relative;
    height: 32px;
    line-height: 32px;
}

.top-banner-link,
.top-banner-link:hover,
.top-banner-link:focus {
    color: inherit;
    text-decoration: none;
    display: block;
}

.top-banner-track {
    display: flex;
    width: max-content;
    /* Two copies of the row are concatenated horizontally and translated by
       50% so the loop seamless wraps. */
    animation: top-banner-marquee 35s linear infinite;
    will-change: transform;
}

.top-banner-row {
    flex: 0 0 auto;
    padding-right: 40px;
    white-space: nowrap;
}

@keyframes top-banner-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Pause animation when the user hovers — gives them a chance to read */
.top-banner:hover .top-banner-track {
    animation-play-state: paused;
}

/* Slower scroll on small screens so it stays readable */
@media (max-width: 576px) {
    .top-banner {
        font-size: 12px;
    }
    .top-banner-track {
        animation-duration: 25s;
    }
}

/* Respect users who prefer reduced motion — show static centered text */
@media (prefers-reduced-motion: reduce) {
    .top-banner {
        text-align: center;
    }
    .top-banner-track {
        animation: none;
        justify-content: center;
        width: 100%;
    }
    .top-banner-row + .top-banner-row {
        display: none;
    }
}
