.astm-marquee {
    --astm-duration: 18s;
    --astm-gap: 12px;
    --astm-fade: 40px;
    --astm-fade-color: #111111;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    isolation: isolate;
}

.astm-track {
    display: flex;
    width: max-content;
    flex: 0 0 auto;
    gap: var(--astm-gap);
    animation: astm-marquee-left var(--astm-duration) linear infinite;
    will-change: transform;
}

.astm-marquee[data-direction="right"] .astm-track {
    animation-name: astm-marquee-right;
}

.astm-set {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--astm-gap);
}

.astm-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.astm-item:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.astm-pause-hover:hover .astm-track {
    animation-play-state: paused;
}

.astm-has-fade::before,
.astm-has-fade::after {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: var(--astm-fade);
    pointer-events: none;
}

.astm-has-fade::before {
    left: 0;
    background: linear-gradient(to right, var(--astm-fade-color), transparent);
}

.astm-has-fade::after {
    right: 0;
    background: linear-gradient(to left, var(--astm-fade-color), transparent);
}

@keyframes astm-marquee-left {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-50% - (var(--astm-gap) / 2)), 0, 0); }
}

@keyframes astm-marquee-right {
    from { transform: translate3d(calc(-50% - (var(--astm-gap) / 2)), 0, 0); }
    to { transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .astm-track { animation: none !important; transform: none !important; }
}
