/* ============================================
   SECTION: Autism Testing — Benefits
   Header (title left, intro right) + a 3 × 2 grid of
   benefit cards, each with a colored icon circle, title,
   and description.
   ============================================ */

.at-benefits {
    padding: 100px var(--section-side-padding);
    background: var(--color-white);
}

.at-benefits__inner {
    max-width: var(--container-max);
    margin-inline: auto;
}

/* ----- Header ----- */
.at-benefits__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 48px;
}

.at-benefits__heading-block {
    flex: 0 1 610px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.at-benefits__heading {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: var(--font-weight-normal);
    line-height: 50px;
    letter-spacing: -1.26px;
    color: var(--color-text-heading);
    margin: 0;
}

.at-benefits__heading .accent-script {
    color: var(--color-accent-yellow);   /* #e09b2b */
}

.at-benefits__intro {
    flex: 0 1 400px;
    align-self: center;
    font-size: 16px;
    line-height: 26px;
    color: #776d79;
    margin: 0;
}

/* ----- Benefit cards ----- */
.at-benefits__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.at-benefits__card {
    min-height: 288px;
    padding: 24px;
    background: var(--color-white);
    border: 2px solid var(--color-primary-light);   /* #ffebf0 */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.at-benefits__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 60px;
}

.at-benefits__icon--a { background: #8cdcff; }   /* blue */
.at-benefits__icon--b { background: #ff98c6; }   /* pink */
.at-benefits__icon--c { background: #76f6ab; }   /* green */
.at-benefits__icon--d { background: #9ad9ce; }   /* teal */
.at-benefits__icon--e { background: #ffda8c; }   /* amber */
.at-benefits__icon--f { background: #ff6485; }   /* primary pink */

.at-benefits__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.at-benefits__card-title {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    line-height: 26px;
    color: var(--color-text-heading);
    margin: 0;
}

.at-benefits__card-desc {
    font-size: 16px;
    line-height: 26px;
    color: #776d79;
    margin: 0;
}

/* Scroll-position bars — phones only */
.at-benefits__bars {
    display: none;
    gap: 7px;
    margin-top: 24px;
}

.at-benefits__bar {
    flex: 1 1 0;
    height: 4px;
    border-radius: 100px;
    background: var(--color-primary-light);
    transition: background-color var(--transition-fast);
}

.at-benefits__bar.is-active {
    background: var(--color-primary);
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .at-benefits__header {
        flex-direction: column;
        gap: 24px;
    }
    .at-benefits__heading-block,
    .at-benefits__intro {
        flex: initial;
        max-width: none;
        align-self: auto;
    }
    .at-benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .at-benefits {
        padding: 60px var(--section-side-padding);
    }
    .at-benefits__heading {
        font-size: 32px;
        line-height: 38px;
    }
    .at-benefits__grid {
        grid-template-columns: 1fr;
    }
    .at-benefits__card {
        min-height: 0;
        gap: 24px;
    }
}

/* ----- Phones: the cards become a horizontal, snapping scroller -----
   The grid gives way to a flex row that bleeds to the section edges so the
   next card peeks in from the right, with position bars underneath. */
@media (max-width: 600px) {
    .at-benefits__grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;         /* equal heights; ragged looks broken */
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: calc(-1 * var(--section-side-padding));
        padding-inline: var(--section-side-padding);
        /* keeps the snap point from cancelling the padding above */
        scroll-padding-inline: var(--section-side-padding);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .at-benefits__grid::-webkit-scrollbar {
        display: none;
    }

    .at-benefits__card {
        flex: 0 0 288px;
        scroll-snap-align: start;
    }

    .at-benefits__bars {
        display: flex;
    }
}
