:root {
    --hiw-card-border-radius: 16px;
    --hiw-primary-color: #1C355E;
    --hiw-number-color: #000000;
    --hiw-bg-color: #f5f7f7;
    --hiw-card-bg: #ffffff;
    --hiw-border-color: #D0D5DD;
    --hiw-text-color: #344054;
    --hiw-sticky-top: 0px;
}

/* =====================================================
   OUTER SECTION � natural height determined by content
   ===================================================== */
.how-it-works-scroll {
    width: 100%;
    box-sizing: border-box;
    padding: 60px 20px;
    position: relative;
    z-index: 10;
    overflow: clip;
    scroll-margin-top: var(--hiw-sticky-top);
}

/* Override the parent .fixedSection overflow:hidden that breaks sticky.
   Applied via JS class (inline style also set as belt-and-braces). */
.fixedSection--sticky-enabled {
    overflow: clip !important;
}

/* =====================================================
   MAIN CONTAINER � flex layout, NO sticky, NO overflow
   HubSpot pattern: align-items: flex-start lets sticky work
   ===================================================== */
.how-it-works-scroll__container {
    display: flex;
    align-items: flex-start;
    max-width: 1360px;
    margin: 0 auto;
    background-color: var(--hiw-bg-color);
    border-radius: 24px;
    padding: 96px clamp(40px, 8%, 115px);
    gap: 120px;
    box-sizing: border-box;
    position: relative; /* Override stale bundle's position:sticky */
}

/* =====================================================
   LEFT CONTENT PANEL � position: sticky (HubSpot pattern)
   Stays pinned while cards on the right scroll past
   ===================================================== */
.how-it-works-scroll__left {
    flex: 0 0 auto;
    width: clamp(280px, 30%, 365px);
    position: -webkit-sticky;
    position: sticky;
    top: var(--hiw-sticky-top);
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
}

.how-it-works-scroll__left-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 50px;
}

/* Badge */
.how-it-works-scroll__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--hiw-primary-color);
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0px;
    padding: 2px 16px;
    border-radius: 40px;
    width: fit-content;
    white-space: nowrap;
}

/* Title & Description */
.how-it-works-scroll__title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.how-it-works-scroll__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--hiw-primary-color);
}

.how-it-works-scroll__description {
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.6;
    color: var(--hiw-text-color);
    margin: 0;
}

    .how-it-works-scroll__description p {
        margin: 0;
    }

/* =====================================================
   RIGHT PANEL � normal flow, all cards visible (HubSpot style)
   Only ~4 cards fit in viewport at a time naturally
   ===================================================== */
.how-it-works-scroll__right {
    flex: 1;
    min-width: 0;
    max-width: 563px;
    box-sizing: border-box;
    overflow: visible; /* Override stale bundle's overflow:hidden */
    position: static; /* Override stale bundle's position:relative */
}

/* Cards Wrapper � natural vertical flow, no transforms */
.how-it-works-scroll__cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    will-change: auto; /* Override stale bundle's will-change:transform */
    transform: none; /* Ensure no stale transforms */
}

/* =====================================================
   INDIVIDUAL CARD � Normal flow (no absolute positioning)
   ===================================================== */
.how-it-works-scroll__card {
    background-color: var(--hiw-card-bg);
    border: 1px solid var(--hiw-border-color);
    border-radius: var(--hiw-card-border-radius);
    box-shadow: none;
    overflow: hidden;
    transition: transform 0.15s ease-out;
    will-change: transform;
    min-height: 202px;
}

@media (hover: hover) {
    .how-it-works-scroll__card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
}

/* =====================================================
   CARD HEADER - Number row
   ===================================================== */
.how-it-works-scroll__card-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    min-height: 56px;
    box-sizing: border-box;
    background-color: var(--hiw-card-bg);
    border-radius: var(--hiw-card-border-radius) var(--hiw-card-border-radius) 0 0;
}

/* Number Circle */
.how-it-works-scroll__card-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--hiw-number-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--hiw-number-color);
    background-color: transparent;
    flex-shrink: 0;
}

/* =====================================================
   CARD BODY - Content area
   ===================================================== */
.how-it-works-scroll__card-body {
    padding: 0 20px 24px 20px;
    background-color: var(--hiw-card-bg);
    border-radius: 0 0 var(--hiw-card-border-radius) var(--hiw-card-border-radius);
}

/* Card Content Layout - Icon + Text side by side */
.how-it-works-scroll__card-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-left: 30px;
}

/* Card Icon */
.how-it-works-scroll__card-icon {
    flex-shrink: 0;
    width: 88px;
    height: 68px;
}

    .how-it-works-scroll__card-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* Card Text Content */
.how-it-works-scroll__card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card Description */
.how-it-works-scroll__card-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hiw-text-color);
    margin: 0;
}

    .how-it-works-scroll__card-description p {
        margin: 0;
    }

    .how-it-works-scroll__card-description strong,
    .how-it-works-scroll__card-description b {
        font-weight: 700;
        color: var(--hiw-number-color);
    }

/* Card Link */
.how-it-works-scroll__card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hiw-primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 4px;
    padding-bottom: 8px;
}

    .how-it-works-scroll__card-link:hover {
        color: #2a4a7f;
    }

        .how-it-works-scroll__card-link:hover .how-it-works-scroll__card-link-icon {
            transform: translateX(3px);
        }

.how-it-works-scroll__card-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

    .how-it-works-scroll__card-link-icon svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }

/* =====================================================
   CTA BUTTON
   ===================================================== */
.how-it-works-scroll__cta {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    padding: 0 4px;
    text-align: center;
}

.how-it-works-scroll__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--button-primary, #80CC00);
    color: var(--button-color, #000000);
    font-family: "aktiv-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    padding: 16px 28px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

    .how-it-works-scroll__cta-btn:hover {
        background-color: #fff;
    }

/* =====================================================
   RESPONSIVE - LARGE DESKTOP (1400px+)
   ===================================================== */
@media (min-width: 1400px) {
    .how-it-works-scroll__container {
        padding: 96px 115px;
        gap: 210px;
    }
}

/* =====================================================
   RESPONSIVE - TABLET LANDSCAPE (1024px - 1199px)
   ===================================================== */
@media (max-width: 1199px) {
    .how-it-works-scroll__container {
        padding: 72px 40px;
        gap: 80px;
    }

    .how-it-works-scroll__left {
        width: 260px;
    }

    .how-it-works-scroll__right {
        max-width: none;
    }

    .how-it-works-scroll__card-icon {
        width: 72px;
        height: 56px;
    }
}

/* =====================================================
   RESPONSIVE - TABLET PORTRAIT (768px - 1023px)
   ===================================================== */
@media (max-width: 1023px) {
    .how-it-works-scroll__container {
        padding: 48px 24px;
        gap: 48px;
    }

    .how-it-works-scroll__left {
        width: 220px;
    }

    .how-it-works-scroll__title {
        font-size: 24px;
    }

    .how-it-works-scroll__description {
        font-size: 14px;
    }

    .how-it-works-scroll__card-header {
        padding: 12px 16px;
    }

    .how-it-works-scroll__card-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .how-it-works-scroll__card-content {
        padding-left: 20px;
    }

    .how-it-works-scroll__card-icon {
        width: 60px;
        height: 48px;
    }
}

/* =====================================================
   RESPONSIVE - MOBILE (below 768px)
   Stack layout, disable sticky
   ===================================================== */
@media (max-width: 767px) {
    .how-it-works-scroll {
        padding: 32px 16px;
    }

    .how-it-works-scroll__container {
        flex-direction: column;
        padding: 40px 24px;
        gap: 32px;
        border-radius: 16px;
    }

    .how-it-works-scroll__left {
        width: 100%;
        position: static;
    }

    .how-it-works-scroll__right {
        width: 100%;
        max-width: 100%;
    }

    .how-it-works-scroll__cards-wrapper {
        gap: 16px;
    }

    .how-it-works-scroll__title {
        font-size: 22px;
    }

    .how-it-works-scroll__card {
        border-radius: 12px;
    }

    .how-it-works-scroll__card-header {
        padding: 12px 14px;
        min-height: 44px;
        border-radius: 12px 12px 0 0;
    }

    .how-it-works-scroll__card-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .how-it-works-scroll__card-body {
        border-radius: 0 0 12px 12px;
        padding-bottom: 20px;
    }

    .how-it-works-scroll__card-content {
        padding-left: 16px;
        gap: 12px;
    }

    .how-it-works-scroll__card-icon {
        width: 50px;
        height: 40px;
    }

    .how-it-works-scroll__card-description {
        font-size: 13px;
    }

    .how-it-works-scroll__card-link {
        font-size: 13px;
    }

    .how-it-works-scroll__cta {
        margin-top: 24px;
    }

    .how-it-works-scroll__cta-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* =====================================================
   RESPONSIVE - SMALL MOBILE (below 480px)
   ===================================================== */
@media (max-width: 479px) {
    .how-it-works-scroll {
        padding: 24px 12px;
    }

    .how-it-works-scroll__container {
        padding: 32px 16px;
        gap: 24px;
        border-radius: 12px;
        height: auto;
        padding-top: 40px;
        min-height: 700px;
    }

    .how-it-works-scroll__badge {
        font-size: 16px;
        padding: 2px 16px;
    }

    .how-it-works-scroll__title {
        font-size: 20px;
    }

    .how-it-works-scroll__description {
        font-size: 13px;
    }

    .how-it-works-scroll__card-header {
        padding: 10px 20px;
        min-height: 42px;
    }

    .how-it-works-scroll__card-number {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .how-it-works-scroll__card-content {
        gap: 10px;
        padding-left: 0;
        flex-direction: column;
    }

    .how-it-works-scroll__card-icon {
        width: 44px;
        height: 36px;
    }

    .how-it-works-scroll__card-description {
        font-size: 12px;
    }

    .how-it-works-scroll__card-link {
        font-size: 12px;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .how-it-works-scroll__container {
        padding: 24px;
    }

    .how-it-works-scroll__left {
        position: static;
    }

    .how-it-works-scroll__cards-wrapper {
        gap: 16px;
    }
}

/* =====================================================
   CTA BUTTON
   ===================================================== */
.how-it-works-scroll__cta {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    padding: 0 4px;
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.how-it-works-scroll__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--button-primary, #80CC00);
    color: var(--button-color, #000000);
    font-family: "aktiv-grotesk", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    padding: 15px 28px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.15s ease;
    border: 2px solid transparent;
}

    .how-it-works-scroll__cta-btn:hover {
        background-color: #fff;
        border: 2px solid #80CC00;
    }

@media (max-width: 767px) {
    .how-it-works-scroll__cta {
        justify-content: center;
        margin-top: 24px;
        bottom: 30px;
    }

    .how-it-works-scroll__cta-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* =====================================================
   ACCESSIBILITY - Reduced Motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    .how-it-works-scroll__card {
        transition: none;
    }

    .how-it-works-scroll__card-link-icon {
        transition: none;
    }
}

/* =====================================================
   STICKY TOGGLE BAR ADJUSTMENTS
   The --hiw-sticky-top var is updated dynamically by JS
   ===================================================== */
