/* Card Slider Frontend Styles
   Version: 1.5.0
*/

/* === رپ اصلی اسلایدر === */
.csa-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    direction: rtl;
    overflow: hidden;
    padding: 20px 0;
}

/* === کانتینر اصلی === */
.csa-slider-container {
    position: relative;
    width: 100%;
}

/* === اسلایدها === */
.csa-slides {
    position: relative;
    min-height: 430px;
    width: 100%;
}

/* هر اسلاید */
.csa-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2.7s ease, transform 2.6s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* اسلاید فعال */
.csa-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
    z-index: 2;
}

/* === کارت اصلی === */
.csa-card {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    border-radius: 28px;
    transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* محتوای کارت */
.csa-card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    border-radius: 28px;
    color: #ffffff;
    background: #1E3D58;
    transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
    margin: 70px 50px 50px 50px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* عناصر پس‌زمینه - خارج از کارت اصلی */
.csa-card-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* المان اول (آبی روشن) */
.csa-card-bg-1 {
    z-index: -1;
    position: absolute;
    top: 10%;
    left: 15%;
    width: 70%;
    height: 70%;
    background: #AAD7FF;
    border-radius: 24px;
    transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

/* المان دوم (آبی خیلی روشن) */
.csa-card-bg-2 {
    z-index: -2;
    position: absolute;
    left: 18%;
    top: 7%;
    width: 60%;
    height: 60%;
    background: #E3F2FF;
    border-radius: 24px;
    transition: all 0.48s cubic-bezier(0.23, 1, 0.32, 1);
}

/* هاور effect - کارت اصلی */
.csa-card:hover {
    transform: translateY(-18px);
}

.csa-card:hover .csa-card-content {
    background: #254a6e;
    box-shadow: 0 30px 40px -15px rgba(0, 0, 0, 0.4);
}

/* هاور effect - المان اول */
.csa-card:hover .csa-card-bg-1 {
    transform: translate(-15%, 0%) translateY(0) rotate(-8deg);
    opacity: 1;
}

/* هاور effect - المان دوم */
.csa-card:hover .csa-card-bg-2 {
    transform: translate(30%, 0%) translateY(0) rotate(8deg);
    opacity: 1;
}

/* === محتوای متنی کارت === */
.csa-content {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    position: relative;
    z-index: 3;
}

/* آیکون SVG */
.csa-card-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.csa-card-icon svg {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* عنوان کارت */
.csa-card-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.4;
    color: #ffffff;
    text-align: center;
    position: relative;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

/* متن کارت */
.csa-card-text {
    text-align: center;
    font-size: 17px;
    line-height: 1.9;
    opacity: 0.95;
    margin: 0;
    color: #ffffff;
    position: relative;
    z-index: 3;
    max-width: 500px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* چرخش آیکون در هاور */
.csa-card:hover .csa-card-icon svg {
    transform: scale(1.1) rotate(5deg);
}

/* === ناوبری اسلایدر === */
.csa-slider-nav {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;

}

/* دات‌های پایین اسلایدر */
.csa-slider-dots {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* هر دات */
.csa-slider-dot {
    width: 8px;
    height:8px;
    border-radius: 50%;
    background: #4A769C;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* دات فعال */
.csa-slider-dot.active {
    background: #AAD7FF;
    transform: scale(1.2);
}

/* هاور دات */
.csa-slider-dot:hover {
    background: #AAD7FF;
    transform: scale(1.3);
    cursor: pointer;
}

/* === حالت خالی بودن اسلایدر === */
.csa-no-cards {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    color: #495057;
    font-size: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px dashed #adb5bd;
}

/* === انیمیشن‌های اضافی === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.csa-slide.active .csa-card {
    animation: fadeIn 0.7s ease forwards;
}

/* === حالت دسترسی‌پذیری === */
.csa-slider-dot:focus-visible {
    outline: 3px solid #AAD7FF;
    outline-offset: 3px;
}

.csa-slider-dot:active {
    transform: scale(1.1);
}

/* === رسپانسیو === */
@media only screen and (max-width: 768px) {
    .csa-slides {
        min-height: 375px;
    }

    .csa-card-content {
        margin: 50px 30px 30px 30px;
        padding: 40px 30px;
    }

    .csa-card-title {
        font-size: 24px;
    }

    .csa-card-text {
        font-size: 16px;
        line-height: 1.8;
    }

    .csa-card-icon {
        width: 60px;
        height: 60px;
    }
}

