/* استایل ویجت اسلایدر کارتی */
.card-slider-container {
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.card-slider {
    position: relative;
    margin: 0 auto;
    overflow: visible !important;
}

.swiper-wrapper {
    box-sizing: content-box;
    display: flex;
    height: 100%;
    position: relative;
    transition-property: transform;
    width: 100%;
    z-index: 1;
}

.card-slider-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    padding: 20px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    transform-style: preserve-3d;
    /* اطمینان از نمایش درست در حالت RTL */
    direction: inherit;
}

.card-slider-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* استایل عنوان */
.card-slider-title {
    color: #fff;
    padding: 10px;
    text-align: center;
    z-index: 10;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

/* استایل توضیحات */
.card-slider-description {
    color: #fff;
    padding: 10px;
    text-align: center;
    z-index: 10;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

/* استایل دکمه */
.card-slider-button-wrapper {
    text-align: center;
    z-index: 10;
}

.card-slider-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.card-slider-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* دکمه‌های ناوبری */
.card-slider-button-next,
.card-slider-button-prev {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
}

/* تنظیم جهت‌گیری فلش‌ها برای RTL */
.rtl .card-slider-button-next:after {
    content: 'prev';
}

.rtl .card-slider-button-prev:after {
    content: 'next';
}

/* نقاط پیمایش */
.card-slider-pagination {
    position: absolute;
    bottom: -30px !important;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.card-slider-pagination .swiper-pagination-bullet {
    margin: 0 5px;
    opacity: 0.7;
    background-color: #fff;
}

.card-slider-pagination .swiper-pagination-bullet-active {
    opacity: 1;
}

/* تنظیمات واکنش‌گرا */
@media (max-width: 767px) {
    .card-slider-title,
    .card-slider-description {
        padding: 8px;
        font-size: 0.9em;
    }
    
    .card-slider-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

/* تنظیمات مخصوص افکت کارتی */
.swiper-cards {
    overflow: visible;
}

.swiper-cards .swiper-slide {
    transform-origin: center bottom;
    backface-visibility: hidden;
}

/* تنظیمات افکت کارتی */
.swiper-effect-cards.swiper-container, 
.swiper-effect-cards .swiper-wrapper {
    transform-style: preserve-3d;
}

.swiper-effect-cards .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition-property: transform;
}

/* مهم: اطمینان از نمایش درست در حالت افکت کارتی */
.swiper {
    overflow: visible !important;
}

/* تنظیم استایل دکمه‌های ناوبری */
.swiper-button-next:after, 
.swiper-button-prev:after {
    font-size: 1.5rem;
    font-weight: bold;
}

/* تضمین عدم تداخل استایل‌ها با افکت کارتی */
.card-slider .swiper-wrapper {
    perspective: 1200px;
    overflow: visible;
}

.swiper-slide-shadow-left,
.swiper-slide-shadow-right {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 18px;
}