﻿
/* بنر اصلی */
.hero-banner {
    --banner-radius: 22px;
}

/* اسلایدر */
.hero-slider {
    height: 400px !important;
    overflow: hidden;
    border-radius: var(--banner-radius);
    background: #151515;
    isolation: isolate;
}

    .hero-slider .carousel-inner,
    .hero-slider .carousel-item {
        height: 100%;
    }

        .hero-slider .carousel-item img {
            width: 100%;
            height: 400px;
            object-fit: cover;
            transition: transform 5s ease;
        }

        .hero-slider .carousel-item.active img {
            transform: scale(1.04);
        }

/* لایه تیره برای خوانایی متن */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( 90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.25) 65%, rgba(0, 0, 0, 0.05) 100% );
}

.hero-slider .carousel-caption {
    right: auto;
    left: 8%;
    bottom: 15%;
    width: 75%;
    padding: 0;
    z-index: 2;
}

    .hero-slider .carousel-caption h2 {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
        font-weight: 800;
        line-height: 1.5;
        margin: 16px 0 10px;
    }

    .hero-slider .carousel-caption p {
        font-size: 0.95rem;
        color: rgba(255, 255, 255, 0.85);
        line-height: 1.9;
    }

.hero-tag,
.side-banner-label {
    display: inline-block;
    padding: 7px 13px;
    font-size: 0.78rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    backdrop-filter: blur(8px);
}

.hero-slider .carousel-indicators {
    justify-content: flex-start;
    margin-left: 8%;
    margin-right: 8%;
    margin-bottom: 20px;
    z-index: 3;
}

    .hero-slider .carousel-indicators [data-bs-target] {
        width: 25px;
        height: 4px;
        border: 0;
        border-radius: 10px;
    }

/* تصویر ثابت */
.side-banner {
    position: relative;
    display: block;
    height: 400px;
    overflow: hidden;
    border-radius: var(--banner-radius);
    background: #252525;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
    animation: sideBannerReveal 1s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: 0.15s;
}

.side-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(.2, .7, .2, 1);
    z-index: -2;
}

.side-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( 0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.05) 100% );
    z-index: -1;
}

.side-banner:hover .side-banner-img {
    transform: scale(1.08);
}

.side-banner-content {
    position: absolute;
    right: 24px;
    /* left: 24px; */
    bottom: 28px;
    text-align: end;
}

    .side-banner-content h3 {
        font-size: clamp(1.4rem, 2vw, 2rem);
        font-weight: 800;
        margin: 18px 0 8px;
    }

    .side-banner-content p {
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.9;
        font-size: 0.9rem;
    }

.side-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
    transition: gap 0.3s ease;
}

.side-banner:hover .side-banner-link {
    gap: 16px;
}

/* انیمیشن ورود تصویر ثابت */
@keyframes sideBannerReveal {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* نمایش در موبایل */
@media (max-width: 767.98px) {
    .hero-banner {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .hero-slider,
    .side-banner {
        height: 300px !important;
    }

        .hero-slider .carousel-item img {
            height: 300px;
        }

        .hero-slider .carousel-caption {
            bottom: 16%;
            width: 82%;
        }

            .hero-slider .carousel-caption h2 {
                font-size: 1.5rem;
            }

            .hero-slider .carousel-caption p {
                font-size: 0.82rem;
            }

    .side-banner-content {
        right: 20px;
        left: 20px;
        bottom: 20px;
    }
}

/* احترام به تنظیم کاهش انیمیشن کاربر */
@media (prefers-reduced-motion: reduce) {
    .side-banner {
        animation: none;
    }

    .side-banner-img,
    .hero-slider .carousel-item img,
    .side-banner-link {
        transition: none;
    }
}
