/* =========================================================
   هارد تاپ - اسلایدر بنر صفحه اصلی (راست‌چین)
========================================================= */

.ht-hero-slider {
    padding-top: var(--s5, 24px);
}

.ht-slider {
    position: relative;
    border-radius: var(--r-lg, 20px);
    background: #e9e8f3;
    box-shadow: var(--shadow-2, 0 12px 32px rgba(25, 22, 66, .1));
    overflow: hidden;
}

.ht-slider:focus-visible {
    outline-offset: 3px;
}

.ht-slider-viewport {
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
}

.ht-slider-viewport:active {
    cursor: grabbing;
}

/* اسلاید اول سمت راست قرار می‌گیرد و بعدی‌ها سمت چپ */
.ht-slider-track {
    display: flex;
    flex-wrap: nowrap;
    direction: rtl;
    width: 100%;
    transition: transform .7s cubic-bezier(.65, 0, .25, 1);
    will-change: transform;
}

.ht-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
}

.ht-slide a {
    display: block;
}

/* بنر با نسبت اصلی خودش نمایش داده می‌شود (بدون برش و بزرگ‌نمایی) */
.ht-slide img,
.ht-slide-img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
    user-select: none;
}

/* فلش‌ها: بعدی سمت چپ، قبلی سمت راست */

.ht-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #25205f;
    box-shadow: 0 4px 16px rgba(25, 22, 66, .18);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity .25s, background .2s, color .2s, transform .2s;
}

.ht-slider:hover .ht-slider-arrow,
.ht-slider:focus-within .ht-slider-arrow {
    opacity: 1;
}

.ht-slider-arrow:hover {
    background: #25205f;
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.ht-slider-prev {
    right: 16px;
}

.ht-slider-next {
    left: 16px;
}

/* نقطه‌ها با نوار پیشرفت زمان */

.ht-slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(25, 22, 66, .35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transform: translateX(-50%);
}

.ht-slider-dot {
    position: relative;
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .6);
    overflow: hidden;
    transition: width .3s, background .3s;
}

.ht-slider-dot.active {
    width: 32px;
    background: rgba(255, 255, 255, .4);
}

.ht-dot-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 0;
    border-radius: inherit;
    background: #fff;
}

.ht-slider-dot.active .ht-dot-fill {
    animation: ht-dot-fill 6s linear forwards;
}

.ht-slider.is-paused .ht-slider-dot.active .ht-dot-fill {
    animation-play-state: paused;
}

/* اگر کاربر انیمیشن را کم کرده باشد، اسلایدر خودکار نمی‌چرخد */
.ht-slider.no-motion .ht-slider-dot.active .ht-dot-fill {
    animation: none;
    width: 100%;
}

.ht-slider.no-motion .ht-slider-track {
    transition: none;
}

@keyframes ht-dot-fill {
    from { width: 0; }
    to   { width: 100%; }
}

@media (max-width: 680px) {

    .ht-hero-slider {
        padding-top: var(--s3, 12px);
    }

    .ht-slider {
        border-radius: var(--r-md, 14px);
        box-shadow: var(--shadow-1, 0 4px 16px rgba(25, 22, 66, .08));
    }

    /* در موبایل با کشیدن انگشت جابه‌جا می‌شود */
    .ht-slider-arrow {
        display: none;
    }

    .ht-slider-dots {
        bottom: 8px;
        padding: 6px 10px;
        gap: 6px;
    }

    .ht-slider-dot.active {
        width: 24px;
    }
}

/* روی دستگاه‌های لمسی (تبلت) فلش‌ها همیشه دیده شوند */
@media (hover: none) {
    .ht-slider-arrow {
        opacity: 1;
    }
}
