.marquee-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    /*background: #000000;*/
    color: #fff;
    padding: 14px 38px; /* ruang kiri & kanan untuk chevron */
    position: relative;
    z-index: 100;
    box-sizing: border-box;
}

.marquee-track {
    position: relative;
    width: 100%;
    height: 1.4em;
    overflow: hidden;
}

.marquee-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
}

.marquee-slide[aria-current="true"] {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Slide yang sedang keluar ke kiri */
.marquee-slide.is-leaving {
    opacity: 0;
    transform: translateX(-30px);
}

.marquee-slide:hover {
    text-decoration: underline;
}

.marquee-next {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .2s ease, transform .2s ease;
}

.marquee-prev {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .2s ease, transform .2s ease;
}

.marquee-next svg,
.marquee-prev svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.marquee-next:hover { color: #fff; transform: translateY(-50%) translateX(2px); }
.marquee-prev:hover { color: #fff; transform: translateY(-50%) translateX(-2px); }

.marquee-next:focus-visible,
.marquee-prev:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Item tanpa tujuan tautan (span, bukan <a>) — tampil sama, hanya tidak bisa diklik */
.marquee-slide:not(a),
.marquee-run-item:not(a) {
    cursor: default;
}
.marquee-slide:not(a):hover,
.marquee-run-item:not(a):hover {
    text-decoration: none;
}

/* ---- Mode: Teks Berjalan (marquee) ---- */
.marquee-container[data-mode="marquee"] {
    padding: 14px 20px; /* tidak butuh ruang untuk chevron */
}

.marquee-container[data-mode="marquee"] .marquee-track {
    display: flex;
    width: max-content;
    height: auto;
    overflow: visible;
    animation: marquee-run 20s linear infinite;
    will-change: transform;
}

.marquee-container[data-mode="marquee"]:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-run-item {
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    margin: 0 20px;
    white-space: nowrap;
    font-weight: 400;
}

.marquee-run-item:hover {
    text-decoration: underline;
}

.marquee-container[data-mode="marquee"] .separator {
    flex-shrink: 0;
    opacity: .5;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .marquee-container { padding: 12px 34px; }
    .marquee-container[data-mode="marquee"] { padding: 12px 16px; }
    .marquee-slide     { font-size: 15px; }
    .marquee-run-item  { font-size: 15px; margin: 0 16px; }
}

/* Mobile */
@media (max-width: 768px) {
    .marquee-container { padding: 10px 30px; }
    .marquee-container[data-mode="marquee"] { padding: 10px 12px; }
    .marquee-slide     { font-size: 13px; }
    .marquee-next, .marquee-prev { width: 20px; height: 20px; }
    .marquee-next  { right: 10px; }
    .marquee-prev  { left: 10px; }
    .marquee-run-item  { font-size: 13px; margin: 0 12px; }
    .marquee-container[data-mode="marquee"] .marquee-track { animation-duration: 14s; }
}

/* Hormati pengaturan "kurangi gerakan" */
@media (prefers-reduced-motion: reduce) {
    .marquee-slide { transition: none; }
    .marquee-container[data-mode="marquee"] .marquee-track { animation: none; overflow-x: auto; }
}
