/* =============================================
   Case Studies Slider — v2.0
   3D Perspective Depth Slider
   ============================================= */

.cs-slider-section {

    background: #ffffff;
    font-family: 'Inter', sans-serif;
    width: 100%;
    overflow: hidden;
}

/* ── Viewport: perspective container ── */
.cs-viewport {
    width: 100%;
    height: 460px;
    position: relative;
    perspective: 1400px;
    perspective-origin: 50% 45%;
    overflow: visible;
}

/* ── Track: 3D space ── */
.cs-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

/* ── Individual slide — absolutely placed, JS controls transform ── */
.cs-slide {
    position: absolute;
    width: 640px;
    height: 450px;
    top: 50%;
    left: 42%;
    margin-top: -210px;
    margin-left: -170px;
    cursor: pointer;
    transition:
        transform 0.65s cubic-bezier(0.25, 1, 0.5, 1),
        opacity   0.65s ease;
    will-change: transform, opacity;
}

/* ── Card ── */
.cs-slide-card {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(49, 49, 104, 0.06);
    transition: box-shadow 0.4s ease;
    pointer-events: none; /* slide handles click, not card */
}

.cs-slide.is-active .cs-slide-card {
    box-shadow: 0 24px 64px rgba(49, 49, 104, 0.16);
    pointer-events: auto;
}

.cs-slide.is-active {
    cursor: default;
}

.cs-cta-wrap a.cs-main-btn {
    text-decoration: none;
}

/* ── Image ── */
.cs-image-box {
    height: 230px;
    min-height: 230px;
    overflow: hidden;
    background: #f5f5fa;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(49, 49, 104, 0.1);
}

.cs-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.cs-slide.is-active .cs-slide-card:hover .cs-image-box img {
    transform: scale(1.04);
}

/* ── Content ── */
.cs-content-box {
    padding: 26px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cs-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #313168;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-content-box a.cs-read-more {
   background: linear-gradient(193.06deg, #F5F1FF -59.37%, #4F39E0 106.12%);
    font-size: calc(16px + (18 - 16) * ((100vw - 320px) / (1920 - 320)));
    padding: 12px 60px;
    border-radius: 15px;
    color: #ffffff;
    text-decoration: none !important;
}

.cs-excerpt {
    font-size: 14px;
    line-height: 1.6;
     color: #62628A;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #4F39E0;
    font-weight: 600;
    font-size: 13px;
    margin-top: 16px;
    width: fit-content;
    transition: color 0.2s ease, gap 0.2s ease;
}

.cs-read-more .material-icons {
    font-size: 17px;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.cs-read-more:hover {
    color: #313168;
    gap: 10px;
}

/* ── Nav ── */
.cs-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 36px;
}

.cs-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E2E2EC;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
}

.cs-dot.is-active {
    background: linear-gradient(193.06deg, #F5F1FF -59.37%, #4F39E0 106.12%);
    transform: scale(1.25);
    width: 24px;
    border-radius: 6px;
}

.cs-prev,
.cs-next {
    background: #ffffff;
    border: 1.5px solid #313168;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #313168;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.cs-prev:hover,
.cs-next:hover {
    background: #313168;
    color: #ffffff;
    transform: scale(1.08);
}

.cs-prev:active,
.cs-next:active {
    transform: scale(0.96);
}

/* ── CTA ── */
.cs-cta-wrap {
    text-align: center;
    margin-top: 48px;
}

.cs-main-btn {
    display: inline-block;
    padding: 14px 36px;
    background: transparent;
    color: #313168;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    border: 2px solid #313168;
    letter-spacing: 0.3px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.cs-main-btn:hover {
    background: #313168;
    color: #ffffff;
    transform: translateY(-2px);
}

.cs-read-more-btn {
    background: linear-gradient(193.06deg, #F5F1FF -59.37%, #4F39E0 106.12%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 26px;
    border-radius: 15px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-read-more-btn .material-icons {
    font-size: 17px;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.cs-read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 57, 224, 0.35);
}

.cs-read-more-btn:hover .material-icons {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .cs-read-more-btn {
        font-size: 13px;
        padding: 9px 20px;
    }
}
/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .cs-slide {
        width: 300px;
        height: 400px;
        margin-top: -200px;
        margin-left: -150px;
    }
    .cs-viewport {
        height: 430px;
    }
}

@media (max-width: 768px) {
    .cs-slider-section {
        padding: 0px 0 0px;
    }
    .cs-viewport {
        height: 460px;
        perspective: 900px;
        overflow: visible;
    }
    .cs-slide {
        left: 50%; 
        width: calc(100vw - 60px);
        max-width: 340px;
        height: 430px;
        margin-top: -215px;
        margin-left: calc(-1 * min(170px, (100vw - 60px) / 2));
    }
    .cs-image-box {
        height: 160px;
        min-height: 160px;
    }
    .cs-title {
        font-size: 16px;
    }
    .cs-content-box {
        padding: 18px 16px 16px;
    }
    .cs-excerpt {
        -webkit-line-clamp: 2;
    }
  
    .cs-content-box a.cs-read-more {
        font-size: 14px;
        padding: 10px 22px;
        display: inline-block;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .cs-viewport {
        height: 440px;
    }
    .cs-slide {
        left: 50%;
        width: calc(100vw - 48px);
        height: 410px;
        margin-top: -205px;
        margin-left: calc(-1 * (100vw - 48px) / 2);
    }
}