/* GFM Refresh Product Features Slider — tabbed feature card grid */

.hrt-section.gfm-refresh-product-features-slider {
    background-color: var(--hrt-color-surface-raised, #fff);
    /* Figma footer frame uses spacing-15 (120px) bottom */
    padding: 88px 0 120px;
}

.gfm-refresh-product-features-slider__intro {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto 50px;
    max-width: 69.75rem;
    text-align: center;
}

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

.gfm-refresh-product-features-slider__intro h1,
.gfm-refresh-product-features-slider__intro h2,
.gfm-refresh-product-features-slider__intro h3 {
    color: var(--hrt-color-text-headings, #232323);
    font-size: var(--hrt-size-font-display-md, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

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

.gfm-refresh-product-features-slider .hrt-tab-list.gfm-refresh-product-features-slider__tabs {
    display: flex;
    justify-content: center;
    /* Beat theme `.hrt-tab-list { margin: 0 0 0 -.5rem }` without breaking centering */
    margin: 0 0 35px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.gfm-refresh-product-features-slider .hrt-tab-list.gfm-refresh-product-features-slider__tabs::-webkit-scrollbar {
    display: none;
}

.gfm-refresh-product-features-slider .hrt-tab-list.gfm-refresh-product-features-slider__tabs .hrt-tab {
    cursor: pointer;
    flex-shrink: 0;
}

.gfm-refresh-product-features-slider .hrt-tab-list.gfm-refresh-product-features-slider__tabs .hrt-tab--underline.hrt-tab--active .hrt-tab-label {
    color: var(--hrt-color-text-supporting-selected, #232323);
}

/* Swiper shell — hide non-active slides before JS initializes */
.gfm-refresh-product-features-slider__swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

.gfm-refresh-product-features-slider__swiper {
    /* 1px bottom pad: autoHeight + card border / subpixel transforms otherwise clip */
    overflow: hidden;
    padding-bottom: 1px;
    width: 100%;
}

.gfm-refresh-product-features-slider__slide {
    box-sizing: border-box;
    height: auto;
}

/* Fade-in-up the card grid when a slide becomes active */
.gfm-refresh-product-features-slider__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    margin: 0 auto;
    max-width: 69.75rem;
    opacity: 0;
    transform: translateY(1.25rem);
    transition:
        opacity 0.9s cubic-bezier(0.3, 0.01, 0, 1),
        transform 0.9s cubic-bezier(0.3, 0.01, 0, 1);
}

.gfm-refresh-product-features-slider__swiper .swiper-slide-active .gfm-refresh-product-features-slider__grid,
.gfm-refresh-product-features-slider__swiper:not(.swiper-initialized) .swiper-slide:first-child .gfm-refresh-product-features-slider__grid {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .gfm-refresh-product-features-slider__grid {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.gfm-refresh-product-features-slider__card {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 1rem;
    display: flex;
    min-width: 0;
    overflow: hidden;
    padding: 1rem;
}

.gfm-refresh-product-features-slider__card.is-featured {
    flex-direction: column;
    gap: 1.5rem;
    grid-column: 1;
    grid-row: 1 / span 2;
}

.gfm-refresh-product-features-slider__card.is-supporting {
    align-items: center;
    flex-direction: row-reverse;
    gap: 1.5rem;
    grid-column: 2;
}

.gfm-refresh-product-features-slider__card.is-supporting:nth-child(2) {
    grid-row: 1;
}

.gfm-refresh-product-features-slider__card.is-supporting:nth-child(3) {
    grid-row: 2;
}

.gfm-refresh-product-features-slider__card-media {
    background: #274a34;
    border-radius: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.gfm-refresh-product-features-slider__card.is-featured .gfm-refresh-product-features-slider__card-media {
    aspect-ratio: 514 / 343;
    width: 100%;
}

.gfm-refresh-product-features-slider__card.is-supporting .gfm-refresh-product-features-slider__card-media {
    aspect-ratio: 1 / 1;
    width: 13.6875rem;
}

.gfm-refresh-product-features-slider__card-media picture {
    display: block;
    height: 100%;
    width: 100%;
}

.gfm-refresh-product-features-slider__card-media img,
.gfm-refresh-product-features-slider__card-img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.gfm-refresh-product-features-slider__card-media-placeholder {
    height: 100%;
    min-height: 8rem;
    width: 100%;
}

.gfm-refresh-product-features-slider__card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    /* Figma: 8px between title ↔ body; action adds another 8px → 16px to button */
    gap: var(--hrt-size-spacing-1, 0.5rem);
    min-width: 0;
    padding: 0 0.5rem;
}

.gfm-refresh-product-features-slider__card-title,
.gfm-refresh-product-features-slider h3.gfm-refresh-product-features-slider__card-title {
    color: var(--hrt-color-text-headings, #232323);
    font-feature-settings: "ss10" on;
    font-size: var(--hrt-size-font-heading-md, 1.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0;
}

.gfm-refresh-product-features-slider__card-description,
.gfm-refresh-product-features-slider p.gfm-refresh-product-features-slider__card-description {
    color: var(--hrt-color-text-supporting, #6f6f6f);
    font-size: var(--hrt-size-font-body-sm, 0.875rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.25rem; /* Body/Sm 20px */
    margin: 0;
}

.gfm-refresh-product-features-slider__card-action {
    /* With body gap 8px, this makes title-stack → button = 16px (spacing-2) */
    margin-top: var(--hrt-size-spacing-1, 0.5rem);
}

.gfm-refresh-product-features-slider__card-action .hrt-secondary-button {
    width: auto;
}

/* Bottom WYSIWYG — Figma 142:6364 centered tertiary CTA */
.gfm-refresh-product-features-slider__footer {
    display: flex;
    flex-direction: column;
    gap: var(--hrt-size-spacing-1, 0.5rem);
    margin: 48px auto 0;
    max-width: 69.75rem;
    text-align: center;
}

.gfm-refresh-product-features-slider__footer > *:first-child {
    margin-top: 0;
}

.gfm-refresh-product-features-slider__footer > *:last-child {
    margin-bottom: 0;
}

.gfm-refresh-product-features-slider__footer,
.gfm-refresh-product-features-slider__footer p,
.gfm-refresh-product-features-slider__footer a,
.gfm-refresh-product-features-slider__footer li,
.gfm-refresh-product-features-slider__footer span {
    color: #232323 !important;
    font-size: var(--hrt-size-font-body-md, 1rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
}

.gfm-refresh-product-features-slider__footer a {
    text-decoration: none;
}

.gfm-refresh-product-features-slider__footer a:hover {
    color: #232323 !important;
    text-decoration: underline;
}

/* Mobile — stacked vertical cards, scrollable tabs */
@media (max-width: 897px) {
    .hrt-section.gfm-refresh-product-features-slider {
        padding: 40px 0 80px;
    }

    .gfm-refresh-product-features-slider__intro {
        margin-bottom: 50px;
        max-width: none;
        text-align: left;
    }

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

    .gfm-refresh-product-features-slider .hrt-tab-list.gfm-refresh-product-features-slider__tabs {
        justify-content: flex-start;
        /* Break out of .container-flexible (1.5rem inset each side) to viewport edges */
        margin: 0 -1.5rem 35px;
        max-width: none;
        padding-inline: 1.5rem;
        width: calc(100% + 3rem);
    }

    .gfm-refresh-product-features-slider__grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-width: none;
    }

    .gfm-refresh-product-features-slider__card,
    .gfm-refresh-product-features-slider__card.is-featured,
    .gfm-refresh-product-features-slider__card.is-supporting {
        flex-direction: column;
        gap: 1.5rem;
        grid-column: auto;
        grid-row: auto;
    }

    .gfm-refresh-product-features-slider__card.is-featured .gfm-refresh-product-features-slider__card-media,
    .gfm-refresh-product-features-slider__card.is-supporting .gfm-refresh-product-features-slider__card-media {
        aspect-ratio: 310 / 206;
        width: 100%;
    }

    .gfm-refresh-product-features-slider__card-body {
        padding: 0 0.5rem;
    }
}
