/* ============================================
   SECTION: ABA Therapy — Skills
   Full-width cream band, centered header + 7 slightly-
   tilted skill cards arranged in a centered wrap
   (4 + 3 on wide screens).
   ============================================ */

.aba-skills {
    overflow: clip;
    padding: 80px var(--section-side-padding);
    background-color: var(--color-accent-yellow-bg-soft);   /* cream #fffbf1 — full width */
    background-image: url("../../../images/aba-therapy/skills-swirl.6939b470b0e7.png");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: 1500px auto;     /* decorative swirl in the bottom-right */
}

.aba-skills__inner {
    max-width: 1320px;            /* wide enough for 4 tilted cards per row */
    margin-inline: auto;
}

/* ----- Header (centered) ----- */
.aba-skills__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    max-width: 688px;
    margin: 0 auto 56px;
}

.aba-skills__eyebrow {
    color: var(--color-accent-yellow-label);   /* gold */
    margin-bottom: 18px;
}

.aba-skills__heading {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: var(--font-weight-normal);
    line-height: 50px;
    color: #484336;
    margin: 0;
}

.aba-skills__lede {
    max-width: 486px;
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-faint);
    margin: 0;
}

/* ----- Cards (centered wrap, tilted) ----- */
.aba-skills__cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

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

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

.aba-skills__bar.is-active {
    background: var(--color-primary);
}

.aba-skill-card {
    flex: 0 0 310px;
    min-height: 284px;
    padding: 24px;
    background: var(--color-white);
    border: 2px solid var(--color-surface-line-soft);
    border-radius: 12px;
    box-shadow: 0 15px 32px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Alternating slight tilt for the scattered look */
.aba-skill-card:nth-child(odd)  { transform: rotate(-3deg); }
.aba-skill-card:nth-child(even) { transform: rotate(3deg); }

.aba-skill-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--color-primary-light);   /* #ffebf0 pink circle */
    border-radius: var(--radius-full);
}

.aba-skill-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aba-skill-card__title {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: var(--font-weight-medium);
    line-height: 32px;
    color: var(--color-text-heading);
    margin: 0;
}

.aba-skill-card__desc {
    font-size: 16px;
    line-height: 26px;
    color: var(--color-text-body);
    margin: 0;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .aba-skills {
        padding: 56px var(--section-side-padding);
        background-size: 90% auto;
    }
    .aba-skills__heading {
        font-size: 32px;
        line-height: 38px;
    }
    /* straighten the cards when they stack on small screens */
    .aba-skill-card:nth-child(odd),
    .aba-skill-card:nth-child(even) {
        transform: none;
        flex-basis: 100%;
        max-width: 360px;
        min-height: 0;
    }
}

/* ----- Phones: cards become a horizontal, snapping scroller -----
   Same mechanism as the Our Services scroller on the home page: the track
   bleeds to the section edges so the next card peeks in from the right,
   with position bars underneath. */
@media (max-width: 600px) {
    .aba-skills__cards {
        flex-wrap: nowrap;
        justify-content: flex-start;
        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;
    }

    .aba-skills__cards::-webkit-scrollbar {
        display: none;
    }

    /* Matches the specificity of the straighten-the-cards rule above. */
    .aba-skill-card:nth-child(odd),
    .aba-skill-card:nth-child(even) {
        flex: 0 0 300px;
        max-width: none;
        scroll-snap-align: start;
    }

    .aba-skills__bars {
        display: flex;
    }
}
