/* GFM Refresh Product Stories Slider — case study cards */

.hrt-section.gfm-refresh-product-stories-slider {
    background-color: var(--hrt-color-surface-neutral-subtle, #f5f5f5);
    /*
     * Swiper stays overflow:visible so slides can bleed past the card column,
     * but the section clips horizontally so the transition never spawns a page scrollbar.
     */
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: visible;
    padding: 96px 0 80px;
}

.hrt-section.gfm-refresh-product-stories-slider > .container-flexible {
    overflow: visible;
}

.gfm-refresh-product-stories-slider__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin: 0 0 40px;
    width: 100%;
}

.gfm-refresh-product-stories-slider__tag {
    border-radius: 624.9375rem;
}

.gfm-refresh-product-stories-slider__intro {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.gfm-refresh-product-stories-slider__intro h1,
.gfm-refresh-product-stories-slider__intro h2,
.gfm-refresh-product-stories-slider__intro h3,
.gfm-refresh-product-stories-slider__intro h4,
.gfm-refresh-product-stories-slider__intro p,
.gfm-refresh-product-stories-slider__intro ul,
.gfm-refresh-product-stories-slider__intro ol {
    margin: 0;
    margin-bottom: 0 !important;
}

.gfm-refresh-product-stories-slider__intro h1,
.gfm-refresh-product-stories-slider__intro h2,
.gfm-refresh-product-stories-slider__intro h3 {
    color: var(--hrt-color-text-headings, #232323);
    font-feature-settings: "ss10" on;
    font-size: var(--hrt-size-font-display-sm, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.gfm-refresh-product-stories-slider__intro p {
    color: var(--hrt-color-text-supporting, #6f6f6f);
    font-size: var(--hrt-size-font-body-md, 1rem);
    font-weight: 400;
    line-height: 1.5;
}

.gfm-refresh-product-stories-slider__stage {
    margin: 0;
    max-width: none;
    overflow: visible;
    width: 100%;
}

.gfm-refresh-product-stories-slider__swiper {
    margin: 0;
    max-width: none;
    /* Override Swiper default — creative left/right fades must paint outside */
    overflow: visible !important;
    width: 100%;
}

.gfm-refresh-product-stories-slider__swiper .swiper-wrapper {
    overflow: visible;
}

.gfm-refresh-product-stories-slider__swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

.gfm-refresh-product-stories-slider__slide {
    box-sizing: border-box;
    height: auto;
    overflow: visible;
    width: 100%;
}

.gfm-refresh-product-stories-slider__card {
    align-items: center;
    background: var(--hrt-color-texture-neutral-on-subtle, rgba(255, 255, 255, 0.5));
    border-radius: var(--hrt-size-radius-xl, 1rem);
    box-sizing: border-box;
    display: flex;
    gap: 3rem;
    max-width: 100%;
    min-width: 0;
    padding: 3rem;
    width: 100%;
}

.gfm-refresh-product-stories-slider__media {
    background: var(--hrt-color-surface-brand-subtle, #ccf88e);
    border-radius: 1rem;
    /* 400×400 desktop → scales down → 295×295 mobile */
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    height: clamp(295px, 22vw + 140px, 400px);
    max-width: 100%;
    overflow: hidden;
    position: relative;
    width: clamp(295px, 22vw + 140px, 400px);
}

.gfm-refresh-product-stories-slider__media img,
.gfm-refresh-product-stories-slider__img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.gfm-refresh-product-stories-slider__media-placeholder {
    height: 100%;
    min-height: 12rem;
    width: 100%;
}

.gfm-refresh-product-stories-slider__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    min-width: 0;
}

.gfm-refresh-product-stories-slider__logo {
    max-width: 100%;
    width: 100%;
}

.gfm-refresh-product-stories-slider__logo img,
.gfm-refresh-product-stories-slider__logo-img {
    display: block;
    height: auto;
    max-height: 80px;
    max-width: 180px;
    object-fit: contain;
    object-position: left center;
    width: auto;
}

.gfm-refresh-product-stories-slider__logo-placeholder {
    background: var(--hrt-color-surface-neutral-subtle, #f5f5f5);
    border-radius: var(--hrt-size-radius-xl, 1rem);
    height: 80px;
    max-width: 100%;
    width: 180px;
}

.gfm-refresh-product-stories-slider__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gfm-refresh-product-stories-slider__content h1,
.gfm-refresh-product-stories-slider__content h2,
.gfm-refresh-product-stories-slider__content h3,
.gfm-refresh-product-stories-slider__content h4,
.gfm-refresh-product-stories-slider__content p {
    margin: 0;
    margin-bottom: 0 !important;
}

.gfm-refresh-product-stories-slider__content h1,
.gfm-refresh-product-stories-slider__content h2,
.gfm-refresh-product-stories-slider__content h3,
.gfm-refresh-product-stories-slider__content h4 {
    color: var(--hrt-color-text-headings, #232323);
    font-feature-settings: "ss10" on;
    font-size: var(--hrt-size-font-heading-lg, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.gfm-refresh-product-stories-slider__content p {
    color: var(--hrt-color-text-supporting, #6f6f6f);
    font-size: var(--hrt-size-font-body-sm, 0.875rem);
    font-weight: 400;
    line-height: 1.25rem;
}

.gfm-refresh-product-stories-slider__stats {
    display: flex;
    gap: 1rem;
    width: 100%;
}

/* 1 stat: full-width, content centered */
.gfm-refresh-product-stories-slider__stats.is-count-1 {
    justify-content: center;
}

.gfm-refresh-product-stories-slider__stats.is-count-1 .gfm-refresh-product-stories-slider__stat {
    flex: 1 1 100%;
    width: 100%;
}

/* 2–3 stats: equal columns in a row (Figma 663:2773 for three) */
.gfm-refresh-product-stories-slider__stats.is-count-2 .gfm-refresh-product-stories-slider__stat,
.gfm-refresh-product-stories-slider__stats.is-count-3 .gfm-refresh-product-stories-slider__stat {
    flex: 1 1 0;
}

.gfm-refresh-product-stories-slider__stat {
    background: var(--hrt-color-surface-neutral-subtle, #f5f5f5);
    border-radius: var(--hrt-size-radius-xl, 1rem);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    min-width: 0;
    padding: 1rem;
    text-align: center;
}

.gfm-refresh-product-stories-slider__stat-number,
.gfm-refresh-product-stories-slider p.gfm-refresh-product-stories-slider__stat-number {
    color: var(--hrt-color-text-headings, #232323);
    font-feature-settings: "ss10" on;
    font-size: var(--hrt-size-font-heading-md, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0;
    margin-bottom: 0 !important;
}

.gfm-refresh-product-stories-slider__stat-text,
.gfm-refresh-product-stories-slider p.gfm-refresh-product-stories-slider__stat-text {
    color: var(--hrt-color-text-headings, #232323);
    font-size: var(--hrt-size-font-body-xs, 0.75rem);
    font-weight: 400;
    line-height: 1rem;
    margin: 0;
    margin-bottom: 0 !important;
}

/* Desktop: arrows below card; hide dots */
.gfm-refresh-product-stories-slider .swiper-pagination.slide-bullets {
    display: none;
}

.gfm-refresh-product-stories-slider .swiper-nav-wrap.block-arrows {
    display: none;
    justify-content: center;
    margin-top: 0;
    padding-top: 0;
}

.gfm-refresh-product-stories-slider .swiper-nav-wrap.block-arrows button.swiper-nav-element {
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    margin: 0;
}

.gfm-refresh-product-stories-slider.has-stories-nav .swiper-nav-wrap.block-arrows {
    display: flex;
    margin-top: 2rem;
}

@media (max-width: 897px) {
    .hrt-section.gfm-refresh-product-stories-slider {
        padding: 40px 0 64px;
    }

    .gfm-refresh-product-stories-slider__header {
        margin-bottom: 1.5rem;
    }

    .gfm-refresh-product-stories-slider__intro h1,
    .gfm-refresh-product-stories-slider__intro h2,
    .gfm-refresh-product-stories-slider__intro h3 {
        font-size: 1.75rem;
        letter-spacing: -0.01em;
    }

    .gfm-refresh-product-stories-slider__card {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .gfm-refresh-product-stories-slider__media {
        flex: 0 0 auto;
        height: 295px;
        width: 295px;
        max-width: 100%;
    }

    .gfm-refresh-product-stories-slider__body {
        align-items: stretch;
        gap: 1.5rem;
    }

    .gfm-refresh-product-stories-slider__logo {
        align-items: center;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .gfm-refresh-product-stories-slider__logo img,
    .gfm-refresh-product-stories-slider__logo-img {
        margin-inline: auto;
        max-height: 56px;
        object-position: center;
    }

    .gfm-refresh-product-stories-slider__logo-placeholder {
        margin-inline: auto;
    }

    .gfm-refresh-product-stories-slider__stats,
    .gfm-refresh-product-stories-slider__stats.is-count-1,
    .gfm-refresh-product-stories-slider__stats.is-count-2,
    .gfm-refresh-product-stories-slider__stats.is-count-3 {
        flex-direction: column;
    }

    .gfm-refresh-product-stories-slider__stats .gfm-refresh-product-stories-slider__stat,
    .gfm-refresh-product-stories-slider__stats.is-count-1 .gfm-refresh-product-stories-slider__stat,
    .gfm-refresh-product-stories-slider__stats.is-count-2 .gfm-refresh-product-stories-slider__stat,
    .gfm-refresh-product-stories-slider__stats.is-count-3 .gfm-refresh-product-stories-slider__stat {
        flex: none;
        width: 100%;
    }

    .gfm-refresh-product-stories-slider__content h1,
    .gfm-refresh-product-stories-slider__content h2,
    .gfm-refresh-product-stories-slider__content h3,
    .gfm-refresh-product-stories-slider__content h4 {
        font-size: var(--hrt-size-font-heading-md, 1.25rem);
    }

    /* Mobile: dots instead of arrows (shared slide-bullets styles) */
    .gfm-refresh-product-stories-slider.has-stories-nav .swiper-nav-wrap.block-arrows {
        display: none;
    }

    .gfm-refresh-product-stories-slider .swiper-pagination.slide-bullets {
        display: block;
        margin-top: 1.5rem;
        padding: 0;
        text-align: center;
    }
}
