/* ─────────────────────────────────────────
   CLIENT STAT SLIDER
   Header (title + intro) with arrows, then a
   one-slide-at-a-time track. Each slide =
   Challenge / Action / image / Result.
───────────────────────────────────────── */

/* Outer layout: arrows sit top-right on desktop/tablet and move under
   the slide on mobile — done purely with grid areas so PHP renders the
   arrows once, in one place. */
.orbisk-cst {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "header   arrows"
        "viewport viewport";
    column-gap: 24px;
    row-gap: 40px;
}

.orbisk-cst-header {
    grid-area: header;
    min-width: 0;
}

/* !important: renders as an <h2>, and Divi's core heading typography is
   more specific / loads later — same fix as pricing-table's plan name. */
.orbisk-cst-title {
    font-family: 'Agrandir Bold', sans-serif !important;
    font-weight: 400 !important;
    font-size: 44px !important;
    line-height: 1.1 !important;
    color: #13382A !important;
    margin: 0 0 16px;
    padding: 0;
}

.orbisk-cst-intro {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #666666;
}

.orbisk-cst p {
    margin: 0;
    padding: 0;
}

/* ── Arrows (same look as testimonial-slider / info-card) ── */
.orbisk-cst-arrows {
    grid-area: arrows;
    align-self: end;
    display: flex;
    gap: 12px;
}

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

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

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

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

/* ── Viewport / track ── */
.orbisk-cst-viewport {
    grid-area: viewport;
    overflow: hidden;
    min-width: 0;
    /* Height is set by client-stat-slider.js to the active slide's height
       so slides of different lengths don't leave dead space. */
    transition: height 0.4s ease;
}

.orbisk-cst-track {
    display: flex;
    align-items: flex-start;
    transition: transform 0.4s ease;
}

.orbisk_client_stat_slider_item {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
}

.orbisk_client_stat_slider_item .et_pb_module_inner {
    padding: 0;
}

/* ─────────────────────────────────────────
   SLIDE — desktop: 3 columns, fixed height
───────────────────────────────────────── */
.orbisk-cst-slide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "challenge media result"
        "action    media result";
    gap: 16px 24px;
    /* min-height, not height: with 40px card padding the design's content
       needs roughly this much, and a hard height would clip longer copy. */
    min-height: 560px;
}

.orbisk-cst-card--challenge { grid-area: challenge; }
.orbisk-cst-card--action    { grid-area: action; }
.orbisk-cst-media           { grid-area: media; }
.orbisk-cst-card--result    { grid-area: result; }

/* ── Cards ── */
.orbisk-cst-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #ECF4EC;
    border-radius: 16px;
    padding: 40px;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.orbisk-cst-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 16px;
}

.orbisk-cst-badge-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

img.orbisk-cst-badge-icon {
    object-fit: contain;
}

.orbisk-cst-badge-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    color: #004737;
}

/* Challenge + Result stats. 'Agrandir Bold' is its own family (the bold
   cut), so weight stays 400 to avoid faux-bolding it again. */
.orbisk-cst-stat {
    display: block;
    font-family: 'Agrandir Bold', sans-serif;
    font-weight: 400;
    font-size: 54px;
    line-height: 1;
    color: #13382A;
    margin-bottom: 12px;
}

.orbisk-cst-heading {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.2;
    color: #13382A;
    margin-bottom: 12px;
}

.orbisk-cst-text {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
    color: #666666;
}

.orbisk-cst-result-stats {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* ── Image with client logo + name ── */
.orbisk-cst-media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #13382A;
    min-width: 0;
}

.orbisk-cst-media-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.orbisk-cst-client {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
}

.orbisk-cst-client-logo {
    display: block;
    max-width: 70%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.orbisk-cst-client-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
}

/* ─────────────────────────────────────────
   TABLET — image left spanning Challenge +
   Action, Result full width underneath
───────────────────────────────────────── */
@media (max-width: 1023px) {
    .orbisk-cst-slide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        grid-template-areas:
            "media  challenge"
            "media  action"
            "result result";
        min-height: 0;
    }

    .orbisk-cst-media {
        min-height: 280px;
    }

    .orbisk-cst-result-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px 64px;
    }
}

/* ─────────────────────────────────────────
   MOBILE — stacked: image → Challenge →
   Action → Result, arrows under the slide
───────────────────────────────────────── */
@media (max-width: 767px) {
    .orbisk-cst {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "viewport"
            "arrows";
        row-gap: 24px;
    }

    .orbisk-cst-arrows {
        justify-self: center;
    }

    .orbisk-cst-title {
        font-size: 32px !important;
    }

    .orbisk-cst-card {
        padding: 24px;
    }

    .orbisk-cst-heading {
        font-size: 24px;
    }

    .orbisk-cst-text {
        font-size: 16px;
    }

    .orbisk-cst-slide {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "media"
            "challenge"
            "action"
            "result";
        gap: 12px;
    }

    .orbisk-cst-media {
        min-height: 180px;
    }

    .orbisk-cst-result-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .orbisk-cst-stat {
        font-size: 40px;
    }
}
