/* Material You Slider Styles */
.material-you-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent; /* حذف رنگ سبز */
    overflow: hidden;
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: center;
    /* حذف ارتفاع حداقل */
}

.material-you-swiper {
    width: 100%;
    height: auto !important;
    padding: 50px 0 60px; /* افزایش فاصله بالا و پایین */
    position: relative;
}

.material-you-swiper .swiper-slide {
    width: 300px;
    height: auto;
    aspect-ratio: 9/16; /* نسبت تصویر عمودی مثل موبایل */
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    /* برای جلوگیری از بهم ریختگی در برخی مرورگرها */
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.material-you-swiper .swiper-slide-active,
.material-you-swiper .swiper-slide-prev,
.material-you-swiper .swiper-slide-next {
    opacity: 1;
    pointer-events: auto;
}

/* محتویات داخل اسلاید */
.slide-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.slide-image,
.slide-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

/* اطلاعات روی اسلاید */
.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 25px 20px 20px;
    color: #fff;
    text-align: right;
    direction: rtl;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translateY(10px); /* انیمیشن ورود نرم */
}

.swiper-slide-active .slide-overlay {
    opacity: 1;
    transform: translateY(0);
}

.slide-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-text {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.95);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slide-rating i {
    color: #fbbf24;
    font-size: 14px;
    margin-right: 2px;
}

/* دکمه‌های ناوبری */
.swiper-button-next,
.swiper-button-prev {
    color: #35ba9a !important; /* رنگ آیکون هماهنگ با پس‌زمینه */
    background: #fff;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0; /* مخفی در حالت عادی */
    transform: scale(0.8);
}

/* نمایش دکمه‌ها وقتی موس روی اسلایدر می‌رود */
.material-you-swiper:hover .swiper-button-next,
.material-you-swiper:hover .swiper-button-prev {
    opacity: 1;
    transform: scale(1);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #fff;
    transform: scale(1.15);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.5 !important;
    width: 6px !important;
    height: 6px !important;
    margin: 0 4px !important;
}

.swiper-pagination {
    bottom: 0 !important; /* پایین آوردن نقطه ها */
    margin-top: 8px;
    margin-bottom: 8px;
}

.swiper-pagination-bullet-active {
    opacity: 1 !important;
    width: 24px !important;
    border-radius: 4px !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* =========================================
   Responsive Styles (Mobile Optimization)
   ========================================= */
@media (max-width: 768px) {
    .material-you-slider-wrapper {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .material-you-swiper {
        height: auto !important;
        padding: 20px 0 !important;
    }

    .material-you-swiper .swiper-slide {
        width: 85% !important; /* کمی عریض‌تر */
        max-width: 320px;
        height: auto !important;
        aspect-ratio: 9/16; /* حفظ نسبت تصویر */
        transform: scale(0.9); /* اسلایدهای کناری کوچکتر */
        transition: all 0.3s;
        border-radius: 20px;
        margin-top: 0;
    }

    .material-you-swiper .swiper-slide-active {
        opacity: 1;
        transform: scale(1) !important;
        z-index: 20;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }
    
    .slide-overlay {
        display: none !important;
    }
    
    .slide-content {
        border-radius: 20px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
    
    .swiper-pagination {
        bottom: 20px !important;
    }
}
