.bzbzi-news-ticker {
    position: relative;
    z-index: 9998;
    width: 100%;
    height: var(--bzbzi-height);
    overflow: hidden;
    background-color: var(--bzbzi-bg);
    background-image: var(--bzbzi-bg-desktop);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    font-family: inherit;
    color: var(--bzbzi-text);
    isolation: isolate;
    /* این خط باعث می شود گروه های متن همیشه از راست به چپ دقیق دنبال هم بیایند */
    direction: ltr !important; 
}

.bzbzi-news-ticker__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, var(--bzbzi-overlay));
    pointer-events: none;
}

.bzbzi-news-ticker__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bzbzi-news-ticker__track {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    will-change: transform;
    animation-duration: var(--bzbzi-duration);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.bzbzi-news-ticker__group {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
    gap: var(--bzbzi-gap);
    padding-right: var(--bzbzi-gap);
}

.bzbzi-news-ticker__item {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: var(--bzbzi-font-size);
    font-weight: var(--bzbzi-font-weight);
    line-height: 1;
    /* این خط جهت خوانایی متن فارسی را اصلاح می کند */
    direction: rtl; 
}

.bzbzi-news-ticker__item a,
.bzbzi-news-ticker__item span {
    color: var(--bzbzi-text);
    text-decoration: none;
    font: inherit;
}

.bzbzi-news-ticker__item a:hover {
    color: var(--bzbzi-text);
    text-decoration: underline;
}

/* انیمیشن راست به چپ */
@keyframes bzbzi-ticker-rtl {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

/* انیمیشن چپ به راست */
@keyframes bzbzi-ticker-ltr {
    from { transform: translate3d(-50%, 0, 0); }
    to { transform: translate3d(0, 0, 0); }
}

.bzbzi-hide-desktop { display: none; }

@media (min-width: 768px) {
    .bzbzi-hide-desktop { display: none !important; }
}

@media (max-width: 767px) {
    .bzbzi-news-ticker {
        background-image: var(--bzbzi-bg-mobile);
    }
    .bzbzi-hide-mobile { display: none !important; }
    .bzbzi-hide-desktop { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .bzbzi-news-ticker__track {
        animation: none;
        transform: none;
    }
}