﻿/* تنظیمات کلی کانتینر اسلایدر */
.slideshow-container {
    position: relative;
    max-width: 1000px; /* عرض دلخواه خود را تنظیم کنید */
    margin: 2rem auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    direction: rtl; /* برای راست چین بودن محتوا */
}

/* نگهدارنده اسلایدها */
.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

/* هر اسلاید */
.slide {
    min-width: 100%;
    flex: 0 0 100%;
}

.slide-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.slide-content {
    position: relative;
    height: 450px; /* ارتفاع اسلایدر */
    width: 100%;
}

/* تصویر اسلاید */
.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* متن روی تصویر */
.slide-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    color: #ffffff;
    text-align: right;
}

    .slide-text h3 {
        margin: 0 0 10px 0;
        font-size: 1.5rem;
        font-weight: bold;
    }

    .slide-text p {
        margin: 0;
        font-size: 1rem;
        opacity: 0.9;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* محدود کردن متن به 2 خط */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

/* دکمه‌های چپ و راست */
.slide-prev, .slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.slide-next {
    left: 15px;
}
/* چون RTL است جای چپ و راست عوض میشود */
.slide-prev {
    right: 15px;
}

    .slide-prev:hover, .slide-next:hover {
        background-color: rgba(255, 255, 255, 0.8);
        color: #333;
    }

/* دکمه‌های نقطه ای (Dots) پایین اسلایدر */
.dots-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .dot.active, .dot:hover {
        background-color: #ffffff;
        transform: scale(1.2);
    }

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .slide-content {
        height: 300px;
    }

    .slide-text h3 {
        font-size: 1.2rem;
    }

    .slide-prev, .slide-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}
