/* استایل‌های ویجت تیکر و کاروسل */
.ticker-carousel-container {
    display: flex;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.ticker-carousel-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* استایل‌های بخش تیکر */
.ticker-section {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 100px;
    overflow: hidden;
}

.ticker-content {
    overflow: hidden;
    height: 40px;
    display: flex;
    align-items: center;
}

.ticker-items {
    display: flex;
    align-items: center;
}

.ticker-item {
    padding-right: 50px;
    flex-shrink: 0;
    white-space: nowrap;
}

.ticker-item-text {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
}

/* استایل‌های بخش کاروسل */
.carousel-section {
    width: 60%;
    display: flex;
    flex-direction: column;
}

.carousel-main-container {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
}

.carousel-slides-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-content-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: absolute;
    right: 100%;
    bottom: 0;
    text-wrap: nowrap;
    padding-right: 40px;
}

.carousel-content {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    position: absolute;
    width: 100%;
}

.carousel-content.active {
    opacity: 1;
    transform: translateX(0);;
    position: relative;
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0s ease 1s;
    transform: translateX(100%);
    visibility: hidden;
}

.carousel-slide.active {
    transform: translateX(0);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
    visibility: visible;
}

.carousel-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 10px 0;
    color: var(--e-global-color-text);
}

.carousel-caption p {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    font-weight: 400;
    color: var(--e-global-color-text);
}

.carousel-navigation-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 25px 0;
    justify-content: flex-start;
    align-items: center;
}

.carousel-controls {
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    right: 100%;
    padding-right: 40px;
}

.carousel-counter {
    font-size: 18px;
    color: var(--e-global-color-text);;
    margin: 0 15px;
    text-wrap: nowrap;
    display: flex;
}

.carousel-counter span {
    width: 25px;
    text-align: center;
}

.carousel-prev,
.carousel-next {
    color: var(--e-global-color-text);
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.carousel-prev:hover,
.carousel-next:hover,
.carousel-next:active,
.carousel-prev:active,
.carousel-next:focus,
.carousel-prev:focus {
    color: var(--e-global-color-text);
    background: none;
}

.carousel-progress {
    position: absolute;
    height: 4px;
    width: 60%;
    background-color: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.carousel-progress-segment {
    height: 1px;
    background-color: var(--e-global-color-text);
    flex: 1;
    position: relative;
    overflow: visible;
}

.carousel-progress-segment::after {
    content: '';
    position: absolute;
    top: -1px;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--e-global-color-text);
    transition: width 0.5s ease-in;
    display: block;
    transform-origin: right center;
}

.carousel-progress-segment.active::after {
    width: 100%;
}

/* انیمیشن برای حالت غیرفعال */
.carousel-progress-segment.deactive::after {
    width: 0;
    right: auto;
    left: 0;
    transition: width 0.5s ease-in;
    transform-origin: left center;
}

/* استایل‌های ریسپانسیو */
@media (max-width: 1024px) {
    .ticker-carousel-wrapper {
        flex-direction: column;
    }
    
    .ticker-section,
    .carousel-section {
        width: 100%;
    }
    
    .ticker-section {
        order: 1;
        height: auto;
        padding-top: 0;
    }
    
    .carousel-section {
        order: 2;
        height: auto;
    }
    
    .carousel-main-container {
        flex-direction: column;
        height: auto;
    }
    
    .carousel-content-container {
        position: static;
        right: auto;
        bottom: auto;
        padding: 0px 16px;
        justify-content: flex-start;
        width: 100%;
        height: auto;
        order: 3; /* تغییر ترتیب به بعد از نوار پیشرفت */
    }

    .carousel-content {
        position: absolute;
        opacity: 0;
        transform: translateX(100%);
        transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    }
    
    .carousel-content.active {
        opacity: 1;
        transform: translateX(0);
    }
    
    .carousel-navigation-container {
        height: auto;
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .carousel-controls {
        display: none; /* مخفی کردن کنترل‌ها */
    }
    
    .carousel-progress {
        position: relative;
        width: 100%;
        margin: 0;
        order: 2; /* قرار دادن نوار پیشرفت بعد از اسلایدها */
        padding: 25px 16px;
    }
}