/* ===================================================
   CBC Case Studies – Frontend Styles
   =================================================== */

:root {
    --css-bg:          #0d1b2a;
    --css-card-bg:     #1e2d3d;
    --css-accent:      #e05a3a;
    --css-green:       #7ed321;
    --css-white:       #ffffff;
    --css-muted:       #a0b4c8;
    --css-radius:      16px;
    --css-radius-sm:   10px;
    --css-font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Wrapper ─────────────────────────────────────── */
.cbc-slider {
    background-color: var(--css-bg);
    border-radius: var(--css-radius);
    overflow: hidden;
    font-family: var(--css-font);
    position: relative;
    width: 100%;
}

/* ── Track / slides ──────────────────────────────── */
.cbc-track {
    position: relative;
    width: 100%;
}

.cbc-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 360px;
}

.cbc-slide--active {
    display: grid;
    animation: cssSlideIn 0.5s ease forwards;
}

@keyframes cssSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Image column ────────────────────────────────── */
.cbc-image-col {
    position: relative;
    overflow: hidden;
    border-radius: var(--css-radius) 0 0 var(--css-radius);
    min-height: 320px;
}

.bbc-photo {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.cbc-slide--active .bbc-photo:hover {
    transform: scale(1.03);
}

/* Tags overlay */
.bbc-tags {
    position: absolute;
    bottom: 60px;
    left: 50px;
    right: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.bbc-tag {
    background-color: var(--css-accent);
    color: var(--css-white);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    border-radius:8px;
    white-space: nowrap;
    text-transform: capitalize;
}

/* ── Content column ──────────────────────────────── */
.cbc-content-col {
    padding: 36px 0px 28px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

/* Eyebrow */
.bbc-eyebrow {
    margin: 0 0 -10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--css-accent);
    line-height: 1.4;
}

/* Title */
.bbc-title {
    margin: 0;
    margin-top:-10px;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 800;
    color: var(--css-white);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* ── Stat grid ───────────────────────────────────── */
.bbc-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 20px;
    flex: 1;
}

.bbc-stat-card {
    background-color: var(--css-card-bg);
/*     border-radius: var(--css-radius-sm); */
	border-radius:50px;
    padding: 18px 16px;
    transition: background 0.2s;
    align-content: center;
}

.bbc-stat-card:hover {
    background-color: #253d52;
}

.bbc-stat-value {
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 800;
    color: var(--css-white);
    letter-spacing: -0.02em;
    line-height: 1;
    display: inline-block;
    width: 100%;
    /* Fixed-width digits keep the number from jittering as it counts up. */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.bbc-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--css-muted);
    line-height: 1.4;
    display: inline-block;
    width: 100%;
    margin-top: 6px;
}

/* ── Column order / image side swap ──────────────── */
/*
   The "Image Side" control adds a cbc-img-left / cbc-img-right class (plus
   -tablet- and -mobile- variants) to the widget wrapper. Swapping sides also
   mirrors the content padding, the photo's rounded corners and the tag
   overlay, so the flipped layout is a true mirror rather than just reordered.
*/
.cbc-image-col   { order: 0; }
.cbc-content-col { order: 1; }

.cbc-img-right .cbc-image-col   { order: 1; }
.cbc-img-right .cbc-content-col { order: 0; }

.cbc-img-right .cbc-content-col { padding: 36px 50px 28px 50px; }
.cbc-img-right .cbc-image-col   { border-radius: 0 var(--css-radius) var(--css-radius) 0; }
.cbc-img-right .bbc-tags        { left: 18px; right: 50px; }

@media (max-width: 1024px) {
    .cbc-img-tablet-left .cbc-image-col    { order: 0; }
    .cbc-img-tablet-left .cbc-content-col  { order: 1; padding: 36px 0 28px 50px; }
    .cbc-img-tablet-left .cbc-image-col    { border-radius: var(--css-radius) 0 0 var(--css-radius); }
    .cbc-img-tablet-left .bbc-tags         { left: 50px; right: 18px; }

    .cbc-img-tablet-right .cbc-image-col   { order: 1; }
    .cbc-img-tablet-right .cbc-content-col { order: 0; padding: 36px 50px 28px 50px; }
    .cbc-img-tablet-right .cbc-image-col   { border-radius: 0 var(--css-radius) var(--css-radius) 0; }
    .cbc-img-tablet-right .bbc-tags        { left: 18px; right: 50px; }
}

@media (max-width: 767px) {
    .cbc-img-mobile-left .cbc-image-col    { order: 0; }
    .cbc-img-mobile-left .cbc-content-col  { order: 1; }

    .cbc-img-mobile-right .cbc-image-col   { order: 1; }
    .cbc-img-mobile-right .cbc-content-col { order: 0; }
}

/* ── Single case study / navigation hidden ───────── */
/*
   With one slide there is nothing to navigate to, so the arrows, counter and
   progress bar are dropped server-side and the CTA is free to align on its own.
*/
.bbc-footer--no-nav {
    justify-content: flex-start;
}

/* A lone slide shouldn't slide in from the side — just fade. */
.cbc-slider--single .cbc-slide--active {
    animation: cssFadeIn 0.5s ease forwards;
}

@keyframes cssFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Footer: nav + CTA ───────────────────────────── */
.bbc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    flex-wrap: wrap;
    margin-top:25px;
}

/* Navigation */
.bbc-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bbc-nav-btn {
    background-color: transparent !important;
    border: none;
    color: var(--css-white) !important;
    font-size: 22px !important;
    cursor: pointer;
    padding: 4px 6px !important;
    line-height: 1;
    opacity:1;
    transition: opacity 0.2s;
}

.bbc-nav-btn:hover {
    opacity: .75;
    box-shadow: none !important;
}

.bbc-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size:22px;
    color: var(--css-white);
    font-weight: 700;
}

.bbc-counter-bar {
    width: 60vw;
    max-width: 350px;
    height: 2px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;

}
@media screen and (max-width: 767px){
    .bbc-counter-bar{
        max-width: 150px;
    }
}
.bbc-counter-current{
    color:#A8FC29 !important;
}
.bbc-counter-fill {
    display: block;
    height: 100%;
    background: var(--css-white);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.bbc-counter-total {
    opacity: 1;
}

/* CTA Button */
.bbc-cta {
    display: inline-flex;
    align-items: center;
    background-color: var(--css-green);
    color: var(--css-bg);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 8px;
    white-space: nowrap;
    transition: filter 0.2s, transform 0.15s;
}

.bbc-cta:hover {
    filter: brightness(1.1);
    /*transform: translateY(-1px);*/
    color: var(--css-bg);
    text-decoration: none;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .cbc-slide--active {
        /* Beats the "Image Column Width" control so the layout always
           stacks on small screens. */
        grid-template-columns: 1fr !important;
    }

    .cbc-image-col {
        border-radius: var(--css-radius) var(--css-radius) 0 0;
        min-height: 220px;
    }

    /* Match the specificity of the side-swap rules above so a flipped
       layout still gets stacked (not mirrored) spacing on small screens. */
    .cbc-img-left .cbc-image-col,
    .cbc-img-right .cbc-image-col {
        border-radius: var(--css-radius) var(--css-radius) 0 0;
    }

    .cbc-img-left .cbc-content-col,
    .cbc-img-right .cbc-content-col {
        padding: 24px 20px 20px;
    }

    .cbc-img-left .bbc-tags,
    .cbc-img-right .bbc-tags {
        left: 18px;
        right: 18px;
    }

    .cbc-content-col {
        padding: 24px 20px 20px;
    }

    .bbc-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .bbc-stat-card {
        padding: 14px 12px;
    }

    .bbc-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .bbc-stats {
        grid-template-columns: 1fr;
    }
}
