/* apps\core\static\core\css\hero-banner.css */

.hero-banner-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 1.5rem;
    z-index: 10;
    margin-top: 0;
}

.hero-banner-slider {
    width: 100%;
    overflow: hidden;
    /* ارتفاع ثابت (420px) حذف شد؛ حالا با autoHeight در JS و نسبت طبیعی عکس، ارتفاع داینامیک محاسبه می‌شود */
}

.swiper-slide {
    width: 100%;
    /* height: 100%; حذف شد — با autoHeight هر اسلاید ارتفاع خودش را از روی محتوا می‌گیرد */
}

.hero-banner-item {
    display: block;
    width: 100%;
    position: relative;
    /* height: 100%; حذف شد به همین دلیل */
}

.hero-banner-item picture,
.hero-banner-item img {
    width: 100%;
    height: auto; /* قبلاً 100% + object-fit: cover بود؛ چون ارتفاع کانتینر دیگر ثابت نیست، عکس با نسبت طبیعی خودش رندر می‌شود و چیزی برش نمی‌خورد */
    display: block;
    object-fit: contain;
}

/* ==================== محتوای روی بنر ==================== */
.hero-banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 3rem 1.75rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.45) 40%,
        rgba(0, 0, 0, 0.12) 75%,
        transparent 100%
    );
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.hero-banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 3rem;
    right: 3rem;
    height: 1px;

}

.hero-banner-content h2 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
}

.hero-banner-content p {
    margin: 0 0 1rem;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
}

.hero-banner-cta {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.25s, border-color 0.25s;
}

.hero-banner-item:hover .hero-banner-cta {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.65);
}

/* ==================== Pagination دایره‌ای و خطی (مینیمال) ==================== */
.swiper-pagination {
    bottom: 25px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    direction: ltr;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.4); /* رنگ دایره‌های غیرفعال */
    opacity: 1 !important; /* لغو اوپسیتی پیشفرض سوایپر */
    margin: 0 !important; /* لغو فاصله پیشفرض سوایپر چون از gap استفاده کردیم */
    transition: width 0.4s ease, background-color 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* استایل اسلاید فعال (تبدیل شدن به خط) */
.swiper-pagination-bullet-active {
    width: 45px; /* طول خط در حالت فعال */
    background: rgba(255, 255, 255, 0.2); /* رنگ پس‌زمینه خط (کمرنگ) */
}

/* پر شدن رنگ داخل خط بر اساس زمان (متغیر متصل به JS) */
.swiper-pagination-bullet-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: inherit;

    transform-origin: left center;

    transform: scaleX(var(--progress-scale, 0));

    transition: transform 0.1s linear;
}

/* نسخه موبایل */
@media (max-width: 768px) {
    .hero-banner-slider {
        height: 400px;
    }

    .hero-banner-content {
        padding: 2rem 1.5rem 2rem; /* قبلاً 4rem بود */
    }
}

    .hero-banner-content::before {
        left: 1.5rem;
        right: 1.5rem;
    }

    .hero-banner-content h2 {
        font-size: 1.4rem;
    }

    .hero-banner-content p {
        font-size: 0.88rem;
        margin-bottom: 0.75rem;
    }

    .hero-banner-cta {
        padding: 0.4rem 1.2rem;
        font-size: 0.82rem;
    }

    .swiper-pagination {
        bottom: 18px !important;
        gap: 6px;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .swiper-pagination-bullet-active {
        width: 35px;
    }
}