/* Case Study Slider (orbisk/case-study-slider)
   One case study at a time — image/video left, content card right, paged by
   the arrows in the header row. Own copy of testimonial-slider's paging
   pattern (orbisk-csl-* vs orbisk-tsl-*), not shared code. */

/* ── Header: title + subtitle left, arrows right ── */
.orbisk-csl-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.orbisk-csl-title {
    margin: 0;
    padding: 0;
    font-family: 'Agrandir Bold', sans-serif;
    font-size: 44px;
    line-height: 100%;
    color: #13382A;
}

.orbisk-csl-subtitle {
    margin: 8px 0 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    color: #666666;
}

.orbisk-csl-arrows {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.orbisk-csl-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ECF4EC;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.orbisk-csl-arrow:hover {
    background-color: #004737;
}

.orbisk-csl-arrow:hover svg path {
    stroke: #ffffff;
}

.orbisk-csl-arrow--next svg {
    transform: scaleX(-1);
}

/* ── Viewport / track ── */
.orbisk-csl-viewport {
    overflow: hidden;
}

.orbisk-csl-track {
    display: flex;
    align-items: stretch; /* every slide as tall as the tallest one */
    transition: transform 0.4s ease;
}

/* Height chain: track (stretch) → slide module → slide grid → media + card,
   so the image/video box and the card always match, on every slide. */
.orbisk_case_study_slider_item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.orbisk_case_study_slider_item .et_pb_module_inner {
    padding: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* ── Slide: media | content card ── */
.orbisk-csl-slide {
    flex: 1 1 auto;
    display: grid;
    /* Media up to 668px, card takes the rest of the width. */
    grid-template-columns: minmax(0, 668px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

/* ── Media (left) ── */
.orbisk-csl-media {
    position: relative;
    min-height: 404px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #e9ede9;
}

.orbisk-csl-image,
.orbisk-csl-image-placeholder,
.orbisk-csl-media iframe,
.orbisk-csl-media video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.orbisk-csl-image {
    object-fit: cover;
}

.orbisk-csl-media video {
    object-fit: cover;
    background-color: #000;
}

.orbisk-csl-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 0 0 3px; /* optically centre the triangle */
    border: none;
    border-radius: 50%;
    background-color: #FFFFFF;
    color: #13382A;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.2s ease;
}

.orbisk-csl-play:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

/* ── Content card (right) ── */
.orbisk-csl-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    border-radius: 8px;
    background-color: #ECF4EC;
    box-sizing: border-box;
}

.orbisk-csl-logo {
    display: block;
    /* Default size; Design tab → Logo (Width/Height) overrides this with
       a more specific Divi-generated rule. */
    width: 56px;
    height: 56px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 20px;
}

.orbisk-csl-heading {
    margin: 0 0 24px;
    padding: 0;
    font-family: 'Agrandir Bold', sans-serif !important;
    font-size: 36px;
    line-height: 100%;
    color: #13382A;
}

.orbisk-csl-results {
    width: 100%;
    margin-bottom: 24px;
}

.orbisk-csl-results-label {
    display: block;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(19, 56, 42, 0.15);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 150%;
    color: #666666;
}

.orbisk-csl-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Each stat is its own orbisk/case-study-slider-stat module — strip Divi's
   default module margin/padding so the 12px gap above is the only spacing
   (same fix as .orbisk_pricing_table_feature). */
.orbisk_case_study_slider_stat {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Max 5 stats per slide — Divi can't block the "+" after 5, so any extra
   stat modules are simply not shown (frontend and canvas). */
.orbisk-csl-stats .orbisk_case_study_slider_stat:nth-child(n+6) {
    display: none !important;
}

.orbisk-csl-stat {
    display: flex;
    flex-direction: column;
}

.orbisk-csl-stat-value {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 120%;
    color: #13382A;
}

.orbisk-csl-stat-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 150%;
    color: #666666;
}

/* ── CTA — same light green button as the nav CTA (.orbisk-nav2-cta) ── */
.orbisk-csl-cta,
.orbisk-csl-cta .orbisk-csl-cta-text {
    /* !important for the same reason as .orbisk-pt-cta — site-wide link /
       button typography otherwise wins over a plain class selector. */
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 150% !important;
}

.orbisk-csl-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 8px 36px;
    border: none;
    border-radius: 12px;
    background-color: #B5E37C;
    color: #13382A !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.orbisk-csl-cta:hover {
    background-color: #BDE689;
}

.orbisk-csl-cta-icon {
    display: inline-flex;
}

.orbisk-csl-cta-icon svg {
    width: 9px;
    height: 10px;
}

/* ── Mobile nav row (indicators + arrows) — same pattern as
   testimonial-slider's .orbisk-tsl-nav. Hidden above tablet, where the
   arrows sit in the header instead. ── */
.orbisk-csl-nav {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

.orbisk-csl-indicators {
    display: flex;
    align-items: center;
    gap: 21px;
}

.orbisk-csl-indicator {
    display: block;
    height: 10px;
    width: 10.57px;
    border-radius: 3px;
    background-color: rgba(19, 56, 42, 0.1);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.orbisk-csl-indicator.is-active {
    width: 52.86px;
    background-color: #13382A;
}

/* ── Tablet + mobile (≤1023px, same tablet tier as info-card): stack media
   above the card ── */
@media (max-width: 1023px) {
    .orbisk-csl-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .orbisk-csl-title {
        font-size: 36px;
    }

    .orbisk-csl-header .orbisk-csl-arrows {
        display: none;
    }

    /* No title/subtitle → the header only held the arrows; drop it. */
    .orbisk-csl-header:has(.orbisk-csl-header-text:empty) {
        display: none;
    }

    .orbisk-csl-nav {
        display: flex;
    }

    .orbisk-csl-slide {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr; /* card fills the leftover height */
    }

    .orbisk-csl-media {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .orbisk-csl-content {
        padding: 24px;
    }

    .orbisk-csl-cta {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}
