/* =========================================================
   SISGAIN Reusable Case Studies Slider Section
   Clean full-width dark navy theme, zero decorative blobs.
   All rules are strictly scoped under .sg-cs-slider-sec.
   ========================================================= */

section.sg-cs-slider-sec.sg-sec,
.sg-cs-slider-sec {
    position: relative;
    overflow: hidden;
    padding: 30px 0;
    background: #050a16;
    color: #f5f7fa;
    text-align: left;
}

.sg-cs-slider-sec *,
.sg-cs-slider-sec *::before,
.sg-cs-slider-sec *::after {
    box-sizing: border-box;
}

.sg-cs-slider-sec .sg-cs-wrap {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding-left: clamp(20px, 4vw, 64px);
    padding-right: clamp(20px, 4vw, 64px);
}

.sg-cs-slider-sec a,
.sg-cs-slider-sec a:hover {
    text-decoration: none;
}

.sg-cs-slider-sec :focus-visible {
    outline: 2px solid #38d6ff;
    outline-offset: 3px;
}

/* ---------- Centered Header & Reveal Animations ---------- */
.sg-cs-slider-sec .sg-cs-header {
    text-align: center;
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.sg-cs-slider-sec .sg-cs-heading {
    margin: 0 auto 12px;
    width: 100%;
    max-width: none;
    color: #ffffff;
    font-size: clamp(28px, 3vw, 46px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.sg-cs-slider-sec .sg-cs-hl {
    background: linear-gradient(90deg, #38d6ff 0%, #15b8ff 38%, #4d8eff 70%, #38d6ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: #38d6ff;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(56, 214, 255, 0.28));
    animation: sgCsShimmer 5.5s linear infinite;
}

@keyframes sgCsShimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.sg-cs-slider-sec .sg-cs-sub {
    margin: 0 auto;
    max-width: 920px;
    color: #c3d0e2;
    font-size: clamp(15px, 1.25vw, 18px);
    line-height: 1.55;
}

/* Viewport entrance animation (progressive enhancement via .sg-cs-js) */
.sg-cs-slider-sec.sg-cs-js .sg-cs-anim {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-cs-slider-sec.sg-cs-js.is-visible .sg-cs-anim {
    opacity: 1;
    transform: translateY(0);
}

.sg-cs-slider-sec.sg-cs-js.is-visible .sg-cs-anim--d1 {
    transition-delay: 0.08s;
}

.sg-cs-slider-sec.sg-cs-js.is-visible .sg-cs-anim--d2 {
    transition-delay: 0.16s;
}

/* ---------- Slider Stage & Arrows ---------- */
.sg-cs-slider-sec .sg-cs-stage {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 24px auto 0;
    padding: 0;
}

.sg-cs-slider-sec .sg-cs-stage--multi {
    padding: 0 60px;
}

.sg-cs-slider-sec .sg-cs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(56, 214, 255, 0.38);
    background: #0a162b;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.sg-cs-slider-sec .sg-cs-arrow--prev {
    left: 0;
}

.sg-cs-slider-sec .sg-cs-arrow--next {
    right: 0;
}

.sg-cs-slider-sec .sg-cs-arrow:hover {
    border-color: #38d6ff;
    background: #102344;
    box-shadow: 0 0 18px rgba(56, 214, 255, 0.28);
    transform: translateY(-50%) scale(1.05);
}

.sg-cs-slider-sec .sg-cs-arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.sg-cs-slider-sec .sg-cs-viewport {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(56, 214, 255, 0.22);
    background: #0b1426;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(56, 214, 255, 0.06);
}

.sg-cs-slider-sec .sg-cs-stage--multi .sg-cs-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
}

.sg-cs-slider-sec .sg-cs-stage--multi .sg-cs-viewport::-webkit-scrollbar {
    display: none;
}

.sg-cs-slider-sec .sg-cs-stage--multi .sg-cs-viewport.sg-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
    -webkit-user-select: none;
}

.sg-cs-slider-sec .sg-cs-track {
    display: flex;
    width: 100%;
}

.sg-cs-slider-sec .sg-cs-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* ---------- Large Full-Width Horizontal Card ---------- */
.sg-cs-slider-sec .sg-cs-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 18px;
    width: 100%;
}

.sg-cs-slider-sec .sg-cs-media {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: center;
}

.sg-cs-slider-sec .sg-cs-thumb {
    display: block;
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #0d182d;
}

.sg-cs-slider-sec .sg-cs-thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.45s ease;
}

.sg-cs-slider-sec .sg-cs-card:hover .sg-cs-thumb img {
    transform: scale(1.02);
}

.sg-cs-slider-sec .sg-cs-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #9aa4b2;
    font-size: 14px;
    background: #0f1b30;
}

.sg-cs-slider-sec .sg-cs-body {
    flex: 1 1 50%;
    max-width: 50%;
    padding: 32px 38px 32px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.sg-cs-slider-sec .sg-cs-cat {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    margin-bottom: 16px;
    border-radius: 999px;
    border: 1px solid rgba(56, 214, 255, 0.52);
    background: rgba(56, 214, 255, 0.08);
    color: #38d6ff;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sg-cs-slider-sec .sg-cs-cat:hover {
    background: rgba(56, 214, 255, 0.16);
    border-color: #38d6ff;
    color: #7ee7ff;
}

.sg-cs-slider-sec .sg-cs-card h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(24px, 2.3vw, 35px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.sg-cs-slider-sec .sg-cs-title-link {
    color: #ffffff;
    transition: color 0.2s ease;
}

.sg-cs-slider-sec .sg-cs-title-link:hover {
    color: #38d6ff;
}

.sg-cs-slider-sec .sg-cs-card p {
    margin: 0 0 22px;
    color: #b9c7da;
    font-size: clamp(15px, 1.15vw, 17px);
    line-height: 1.65;
}

.sg-cs-slider-sec .sg-cs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.sg-cs-slider-sec .sg-cs-chips span {
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 25, 45, 0.72);
    font-size: 13px;
    line-height: 1.3;
    color: #dde7f5;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sg-cs-slider-sec .sg-cs-chips span a {
    color: #dde7f5;
    transition: color 0.2s ease;
}

.sg-cs-slider-sec .sg-cs-chips span:hover {
    border-color: rgba(56, 214, 255, 0.65);
    background: rgba(56, 214, 255, 0.1);
}

.sg-cs-slider-sec .sg-cs-chips span:hover a {
    color: #38d6ff;
}

.sg-cs-slider-sec .sg-cs-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 52px;
    padding: 13px 28px;
    border-radius: 999px;
    border: 1px solid rgba(56, 214, 255, 0.4);
    background: linear-gradient(90deg, #0b75f6 0%, #09b8e6 100%);
    color: #ffffff !important;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 10px 24px rgba(9, 148, 240, 0.28);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.sg-cs-slider-sec .sg-cs-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(56, 214, 255, 0.38);
    filter: brightness(1.06);
    color: #ffffff !important;
}

.sg-cs-slider-sec .sg-cs-cta svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: #ffffff;
    transition: transform 0.22s ease;
}

.sg-cs-slider-sec .sg-cs-cta:hover svg {
    transform: translateX(4px);
}

/* ---------- Pagination (only rendered when >1 slides) ---------- */
.sg-cs-slider-sec .sg-cs-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.sg-cs-slider-sec .sg-cs-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sg-cs-slider-sec .sg-cs-dot {
    width: 14px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.36);
    cursor: pointer;
    transition: width 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.sg-cs-slider-sec .sg-cs-dot.is-active {
    width: 28px;
    background: #18d4ff;
    box-shadow: 0 0 12px rgba(24, 212, 255, 0.65);
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */
@media (max-width: 991.98px) {
    .sg-cs-slider-sec .sg-cs-stage--multi {
        padding: 0 54px;
    }

    .sg-cs-slider-sec .sg-cs-media {
        flex: 0 0 48%;
        max-width: 48%;
    }

    .sg-cs-slider-sec .sg-cs-body {
        flex: 1 1 52%;
        max-width: 52%;
        padding: 22px 24px 22px 28px;
    }
}

@media (max-width: 767.98px) {
    section.sg-cs-slider-sec.sg-sec,
    .sg-cs-slider-sec {
        padding: 30px 0;
    }

    .sg-cs-slider-sec .sg-cs-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sg-cs-slider-sec .sg-cs-stage,
    .sg-cs-slider-sec .sg-cs-stage--multi {
        margin-top: 20px;
        padding: 0;
    }

    .sg-cs-slider-sec .sg-cs-card {
        flex-direction: column;
        padding: 12px;
    }

    .sg-cs-slider-sec .sg-cs-media {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .sg-cs-slider-sec .sg-cs-thumb {
        min-height: 0;
    }

    .sg-cs-slider-sec .sg-cs-body {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        padding: 20px 10px 12px;
    }

    .sg-cs-slider-sec .sg-cs-cta {
        width: 100%;
        padding: 12px 20px;
    }

    .sg-cs-slider-sec .sg-cs-arrow {
        position: static;
        transform: none;
        width: 38px;
        height: 38px;
    }

    .sg-cs-slider-sec .sg-cs-arrow:hover {
        transform: scale(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sg-cs-slider-sec .sg-cs-hl,
    .sg-cs-slider-sec.sg-cs-js .sg-cs-anim,
    .sg-cs-slider-sec .sg-cs-track,
    .sg-cs-slider-sec .sg-cs-thumb img,
    .sg-cs-slider-sec .sg-cs-cta,
    .sg-cs-slider-sec .sg-cs-arrow,
    .sg-cs-slider-sec .sg-cs-dot {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
