/* Homepage phone + tablet layer — load after home-polish.css.
   Phones: <= 640px. Tablets: 641px – 1023px. Desktop is left to the earlier files.
   Tap targets stay >= 44px; secondary text stays >= 12px. */

/* ——— Shared phone + tablet rhythm ——— */
@media (max-width: 1023px) {
    .public-body--home,
    .home-page {
        --home-section-y: clamp(2.5rem, 7vw, 3.75rem);
        --home-gutter: 1rem;
        --home-touch: 2.75rem;
        --home-touch-lg: 3rem;
    }

    .home-page .mendify-experts,
    .home-page .mendify-locations,
    .home-page .mendify-app-process,
    .home-page .mendify-news,
    .home-page .mendify-team-slider,
    .home-page .mendify-faq-section,
    .home-page .mendify-impact,
    .home-page .mendify-testimonials-v2,
    .home-page .mendify-story-tabs {
        padding: var(--home-section-y) var(--home-gutter);
    }

    /* Cap to parent width — never use 100vw (scrollbar overflow). */
    .home-page .mendify-experts__wrap,
    .home-page .mendify-locations__wrap,
    .home-page .mendify-app-process__wrap,
    .home-page .mendify-news__wrap,
    .home-page .mendify-team-slider__wrap,
    .home-page .mendify-faq-section__wrap,
    .home-page .mendify-impact__wrap,
    .home-page .mendify-testimonials-v2__wrap,
    .home-page .mstory-wrap,
    .home-page .mh-wrap {
        width: min(1320px, 100%);
        max-width: 100%;
        box-sizing: border-box;
    }

    .home-page .mendify-experts__head h2,
    .home-page .mendify-locations__head h2,
    .home-page .mendify-faq-section__head h2,
    .home-page .mendify-testimonials-v2__head h2,
    .home-page .mendify-app-process__head h2,
    .home-page .mendify-news__head h2,
    .home-page .mendify-team-slider__head h2,
    .home-page .mstory-left h2 {
        font-size: clamp(1.6rem, 5.2vw, 2.25rem);
        line-height: 1.18;
        margin-bottom: 0.6rem;
    }

    .home-page .mendify-experts__eyebrow,
    .home-page .mendify-locations__eyebrow,
    .home-page .mendify-faq-section__eyebrow,
    .home-page .mendify-testimonials-v2__eyebrow,
    .home-page .mendify-app-process__eyebrow,
    .home-page .mendify-news__eyebrow,
    .home-page .mendify-team-slider__eyebrow,
    .home-page .mstory-kicker {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .home-page .mendify-experts__sub,
    .home-page .mendify-locations__sub,
    .home-page .mendify-news__sub,
    .home-page .mendify-testimonials-v2__sub,
    .home-page .mstory-left p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 0;
    }

    .home-page .mendify-experts__head,
    .home-page .mendify-locations__head,
    .home-page .mendify-faq-section__head,
    .home-page .mendify-testimonials-v2__head,
    .home-page .mendify-app-process__head,
    .home-page .mendify-news__head,
    .home-page .mendify-team-slider__head {
        margin-bottom: 1.5rem;
        text-align: left;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .public-body--home,
    .home-page {
        --home-gutter: 1.5rem;
    }

    .home-page .mendify-experts__sub,
    .home-page .mendify-locations__sub,
    .home-page .mendify-testimonials-v2__sub,
    .home-page .mstory-left p {
        max-width: 38rem;
        font-size: 1rem;
    }
}

/* ——— 1. Hero ——— */
@media (max-width: 1023px) {
    .home-page .mendify-smart-hero {
        padding: 1rem var(--home-gutter) 2rem;
    }

    .home-page .mh-pill {
        margin-bottom: 0.85rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    .home-page .mh-headline {
        max-width: 18ch;
        line-height: 1.12;
        margin-bottom: 0.75rem;
    }

    .home-page .mh-subtext {
        max-width: 34rem;
        line-height: 1.55;
        margin-bottom: 1.25rem;
    }

    .home-page .mh-actions .mh-btn--hero-cta,
    .home-page .mh-actions .mh-btn--hero-secondary {
        justify-content: center;
        min-height: var(--home-touch-lg);
        padding: 0.7rem 1.35rem;
    }

    .home-page .mh-actions .mh-btn--hero-cta {
        font-size: 1rem;
    }

    .home-page .mh-actions .mh-btn--hero-secondary {
        font-size: 0.95rem;
        font-weight: 600;
        background: var(--surface);
        border-width: 1.5px;
        box-shadow: none;
    }

    .home-page .mh-actions .mh-btn--hero-secondary:hover {
        background: var(--lavender-50);
        color: var(--plum-700);
    }

    .home-page .mh-quick-item:hover {
        transform: none;
    }
}

/* Phone hero rhythm: tight inside a group, generous between groups
   (badge + headline + copy | buttons | quick links). */
@media (max-width: 640px) {
    .home-page .mendify-smart-hero {
        padding-top: 1.5rem;
        padding-bottom: 2.25rem;
    }

    .home-page .mh-wrap {
        gap: 2rem;
    }

    .home-page .mh-pill {
        gap: 0.4rem;
        margin-bottom: 1rem;
        padding: 0.32rem 0.75rem 0.32rem 0.6rem;
        background: rgba(255, 255, 255, 0.72);
        border-color: var(--lavender-300);
    }

    .home-page .mh-pill__icon {
        width: 14px;
        height: 14px;
    }

    /* Sized so the default headline stays on two lines from 360px up */
    .home-page .mh-headline {
        max-width: none;
        font-size: clamp(1.7rem, 7.6vw, 2.2rem);
        line-height: 1.1;
        letter-spacing: -0.025em;
        margin-bottom: 0.85rem;
        text-wrap: balance;
    }

    .home-page .mh-subtext {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .home-page .mh-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-bottom: 0;
    }

    .home-page .mh-actions .mh-btn--hero-cta,
    .home-page .mh-actions .mh-btn--hero-secondary {
        width: 100%;
    }

    .home-page .mh-actions .mh-btn--hero-cta {
        min-height: 3.25rem;
        font-size: 1.02rem;
        box-shadow:
            0 2px 0 rgba(255, 255, 255, 0.16) inset,
            0 8px 20px rgba(59, 122, 69, 0.22);
    }

    /* Secondary path stays visible but no longer competes with the main CTA */
    .home-page .mh-actions .mh-btn--hero-secondary {
        min-height: 2.875rem;
        border-width: 1px;
        border-color: var(--lavender-300);
        background: rgba(255, 255, 255, 0.72);
        color: var(--plum-700);
    }

    .home-page .mh-dashboard {
        border-radius: 20px;
        border-color: var(--lavender-200);
        box-shadow: 0 6px 22px rgba(79, 47, 138, 0.08);
    }

    /* The bar only repeats the brand name on phones */
    .home-page .mh-card-top {
        display: none;
    }

    .home-page .mh-card-body {
        padding: 1rem 1rem 0.85rem;
    }

    .home-page .mh-guest-intro {
        margin-bottom: 0.75rem;
    }

    .home-page .mh-guest-title {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 0;
    }

    /* Repeats the hero subtitle directly above it */
    .home-page .mh-guest-sub {
        display: none;
    }

    .home-page .mh-session {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .home-page .mh-session--empty .mh-btn--compact {
        min-height: var(--home-touch);
        font-size: 0.875rem;
    }

    /* Two equal tiles. Icon sits above the label so a longer name wraps cleanly. */
    .home-page .mh-quick-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

    .home-page .mh-quick-item {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0.35rem;
        min-height: 0;
        padding: 0.5rem 0.65rem 0.45rem;
        border-radius: 14px;
        background: #fff;
        border: 1px solid var(--lavender-200);
        box-shadow: 0 1px 2px rgba(79, 47, 138, 0.06);
        font-size: 0.84rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        line-height: 1.25;
        text-align: left;
    }

    .home-page .mh-quick-item:active {
        background: var(--lavender-50);
        transform: none;
    }

    .home-page .mh-quick-item__icon {
        width: 1.85rem;
        height: 1.85rem;
        border-radius: 10px;
        background: var(--lavender-50);
        box-shadow: none;
    }

    .home-page .mh-quick-item__icon img {
        object-fit: contain;
        padding: 0.2rem;
    }

    .home-page .mh-quick-item__label {
        display: block;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .home-page .mh-wrap {
        gap: 2rem;
    }

    .home-page .mh-headline {
        max-width: 24ch;
        font-size: clamp(2.2rem, 5.4vw, 2.75rem);
        text-wrap: balance;
    }

    .home-page .mh-subtext {
        font-size: 1.05rem;
    }

    .home-page .mh-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .home-page .mh-actions .mh-btn--hero-cta,
    .home-page .mh-actions .mh-btn--hero-secondary {
        width: auto;
    }

    .home-page .mh-quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .home-page .mh-quick-item {
        min-height: 5.75rem;
        font-size: 0.82rem;
    }
}

/* ——— 2. Trust marquee ——— */
@media (max-width: 1023px) {
    .home-page .marquee-wrap {
        padding: 0.55rem 0;
    }

    .home-page .mt-item {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .home-page .mt-item__icon {
        width: 1.4rem;
        height: 1.4rem;
        font-size: 0.75rem;
    }
}

/* ——— 3. Featured therapists ——— */
@media (max-width: 1023px) {
    .home-page .mendify-experts {
        background: var(--lavender-50);
    }

    /* One path only — View More sits under the grid */
    .home-page .mendify-experts__browse-btn {
        display: none;
    }

    .home-page .mendify-experts__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        overflow: visible;
        padding: 0;
        margin: 0;
        scroll-snap-type: none;
    }

    .home-page .mendify-experts__grid > .mendify-therapist-card,
    .home-page .mendify-experts__grid > .mendify-therapist-card:nth-child(n + 7),
    .home-page .mendify-experts__grid > .mendify-therapist-card:nth-child(n + 9),
    .home-page .mendify-experts__grid > .mendify-therapist-card:nth-child(n + 11) {
        display: flex;
        flex: none;
        width: auto;
        max-width: none;
    }

    .home-page .mendify-experts__grid > .mendify-therapist-card:nth-child(n + 9) {
        display: none;
    }

    .home-page .mendify-therapist-card {
        border-radius: 16px;
        box-shadow: 0 3px 14px rgba(79, 47, 138, 0.07);
    }

    .home-page .mendify-therapist-card:hover {
        transform: none;
    }

    /* Tall enough to show a face, not a thin strip */
    .home-page .mendify-therapist-card__top {
        height: auto;
        aspect-ratio: 6 / 5;
    }

    .home-page .mendify-card-img-link img {
        object-position: center 22%;
    }

    /* Compact play pill in the corner instead of a bar across the photo */
    .home-page .mendify-therapist-card__top .ft-audio-player--overlay,
    .home-page .mendify-therapist-card__top .ft-audio-player--overlay:hover {
        left: 0.45rem;
        right: auto;
        bottom: 0.45rem;
        transform: none;
        width: auto;
        max-width: calc(100% - 0.9rem);
        min-height: 2.75rem;
        padding: 0.2rem 0.65rem 0.2rem 0.25rem;
        gap: 0.4rem;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .home-page .mendify-therapist-card__top .ft-audio-player--overlay .ft-audio-player__wave {
        display: none;
    }

    .home-page .mendify-therapist-card__top .ft-audio-player--overlay .ft-audio-player__time {
        min-width: 0;
        font-size: 0.75rem;
        font-variant-numeric: tabular-nums;
    }

    .home-page .mendify-therapist-card__body {
        padding: 0.75rem 0.75rem 0.8rem;
        gap: 0;
    }

    .home-page .mendify-name-link h3 {
        font-size: 0.98rem;
        line-height: 1.3;
        margin-bottom: 0.1rem;
    }

    .home-page .mendify-therapist-designation {
        font-size: 0.82rem;
        margin-bottom: 0.4rem;
    }

    .home-page .mendify-therapist-meta-row {
        flex-wrap: nowrap;
        gap: 0.35rem;
        margin-bottom: 0.55rem;
    }

    .home-page .mendify-therapist-experience {
        font-size: 0.75rem;
        padding: 0.15rem 0.45rem;
    }

    .home-page .mendify-therapist-meta-static {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        -webkit-line-clamp: unset;
    }

    .home-page .mendify-therapist-btn.lav {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: var(--home-touch);
        padding: 0.5rem 0.6rem;
        font-size: 0.875rem;
    }

    .home-page .mendify-experts__bottom {
        margin-top: 1.25rem;
    }

    .home-page .mendify-experts__more-btn {
        min-height: var(--home-touch-lg);
        padding: 0.7rem 1.75rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .home-page .mendify-experts {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .home-page .mendify-experts__grid {
        gap: 0.5rem;
    }

    .home-page .mendify-therapist-card__body {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .home-page .mendify-experts__more-btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .home-page .mendify-experts__grid {
        gap: 0.6rem;
    }

    .home-page .mendify-therapist-card__body {
        padding: 0.6rem 0.45rem 0.65rem;
    }

    .home-page .mendify-therapist-btn {
        font-size: 0.82rem;
    }
}

/* Tablets: 3-up shows nine cards, 4-up shows eight — always full rows */
@media (min-width: 641px) and (max-width: 767px) {
    .home-page .mendify-experts__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-page .mendify-experts__grid > .mendify-therapist-card:nth-child(n + 9) {
        display: flex;
    }

    .home-page .mendify-experts__grid > .mendify-therapist-card:nth-child(n + 10) {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .home-page .mendify-experts__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.9rem;
    }
}

/* ——— 4. Story tabs ——— */
@media (max-width: 1023px) {
    .home-page .mstory-wrap {
        gap: 1.5rem;
    }

    .home-page .mstory-image-card {
        min-height: 0;
        aspect-ratio: 16 / 9;
        border-radius: 18px;
    }

    .home-page .mstory-image-bar {
        left: 0.65rem;
        right: 0.65rem;
        bottom: 0.65rem;
        padding: 0.65rem 0.8rem;
        border-radius: 12px;
    }

    .home-page .mstory-image-bar strong {
        font-size: 0.9rem;
    }

    .home-page .mstory-image-bar span {
        font-size: 0.78rem;
    }

    .home-page .mstory-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .home-page .mstory-tabs button,
    .home-page .mstory-tab {
        min-height: var(--home-touch);
        padding: 0.55rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .home-page .mstory-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ——— 5. Locations ——— */
@media (max-width: 1023px) {
    .home-page .mendify-loc-card {
        padding: 1rem;
        border-radius: 18px;
        gap: 1rem;
    }

    .home-page .mendify-loc-card__left h3 {
        font-size: 1.15rem;
    }

    .home-page .mendify-loc-desc {
        font-size: 0.9rem;
        line-height: 1.55;
        margin-bottom: 0.85rem;
    }

    .home-page .mendify-locations__tabs {
        justify-content: flex-start;
        margin-bottom: 0.85rem;
        gap: 0.45rem;
    }

    .home-page .mendify-locations__tabs button,
    .home-page .mendify-locations__tab {
        flex: 0 0 auto;
        min-height: var(--home-touch);
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }

    .home-page .mendify-loc-map {
        aspect-ratio: 16 / 10;
        border-radius: 14px;
    }

    .home-page .mendify-loc-btn {
        min-height: var(--home-touch);
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .home-page .mendify-loc-card__visuals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .home-page .mendify-loc-image,
    .home-page .mendify-loc-map {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 640px) {
    /* One visual is enough on phones — the map stays for usefulness */
    .home-page .mendify-loc-image {
        display: none;
    }

    .home-page .mendify-loc-btn {
        width: 100%;
    }
}

/* ——— 6. App process ——— */
@media (max-width: 1023px) {
    .home-page .mendify-app-process__head {
        gap: 1rem;
    }

    .home-page .mendify-download-btn {
        min-height: var(--home-touch-lg);
        justify-content: center;
    }

    .home-page .mendify-app-process__grid {
        display: flex;
        overflow-x: auto;
        gap: 0.75rem;
        margin: 0 calc(-1 * var(--home-gutter));
        padding: 0 var(--home-gutter) 0.35rem;
        scroll-padding-inline: var(--home-gutter);
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .home-page .mendify-app-process__grid::-webkit-scrollbar {
        display: none;
    }

    .home-page .mendify-step-card {
        flex: 0 0 min(78%, 17rem);
        scroll-snap-align: start;
        border-radius: 18px;
        padding: 1.15rem 1rem 1.2rem;
    }

    .home-page .mendify-step-connector {
        display: none;
    }
}

@media (max-width: 640px) {
    .home-page .mendify-app-buttons {
        width: 100%;
    }

    .home-page .mendify-download-btn {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
    }
}

/* ——— 7. News ——— */
@media (max-width: 1023px) {
    .home-page .mendify-news__grid {
        display: flex;
        overflow-x: auto;
        gap: 0.75rem;
        max-width: none;
        margin: 0 calc(-1 * var(--home-gutter));
        padding: 0 var(--home-gutter) 0.35rem;
        scroll-padding-inline: var(--home-gutter);
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .home-page .mendify-news__grid::-webkit-scrollbar {
        display: none;
    }

    .home-page .mendify-news-card {
        flex: 0 0 min(84%, 19rem);
        scroll-snap-align: start;
        border-radius: 18px;
    }

    .home-page .mendify-news-card:hover {
        transform: none;
    }

    .home-page .mendify-news-card__img-wrap {
        height: 160px;
    }

    .home-page .mendify-news-card__content {
        padding: 1.5rem 1rem 1.1rem;
    }

    .home-page .mendify-news-card__content h3 {
        font-size: 1rem;
    }

    .home-page .mendify-news-card__content p {
        font-size: 0.88rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ——— 8. Team slider ——— */
@media (max-width: 1023px) {
    .home-page .mendify-team-slider__filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
    }

    .home-page .mendify-team-slider__filters::-webkit-scrollbar {
        display: none;
    }

    .home-page .mendify-team-slider__filter {
        flex: 0 0 auto;
        min-height: var(--home-touch);
        white-space: nowrap;
    }

    .home-page .mendify-team-card {
        flex-basis: min(78%, 16.5rem);
        width: min(78%, 16.5rem);
        border-radius: 18px;
        padding: 1.1rem 1rem 1.15rem;
    }

    .home-page .mendify-team-card:hover {
        transform: none;
    }

    .home-page .mendify-team-card__avatar {
        width: 96px;
        height: 96px;
    }
}

/* ——— 9. FAQ ——— */
/* Override oversized FAQ titles from home-hero 1150px rule */
@media (max-width: 1150px) {
    .home-page .mendify-faq-section__head h2 {
        font-size: clamp(1.65rem, 4vw, 2.25rem);
    }

    .home-page .mendify-faq-support h3 {
        font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    }
}

@media (max-width: 1023px) {
    .home-page .mendify-faq-section__head h2 span {
        display: inline;
    }

    .home-page .mendify-faq-section__grid {
        gap: 1rem;
    }

    .home-page .mendify-faq-list {
        gap: 0.5rem;
    }

    .home-page .mendify-faq-item {
        border-radius: 14px;
    }

    .home-page .mendify-faq-question {
        min-height: 3rem;
        padding: 0.8rem 0.9rem;
        gap: 0.45rem 0.65rem;
    }

    .home-page .mendify-faq-number {
        font-size: 0.75rem;
    }

    .home-page .mendify-faq-title {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .home-page .mendify-faq-icon {
        width: 1.6rem;
        height: 1.6rem;
        font-size: 1rem;
    }

    .home-page .mendify-faq-answer {
        padding: 0 0.9rem 0.9rem;
    }

    .home-page .mendify-faq-answer p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .home-page .mendify-faq-support__inner {
        padding: 1.25rem 1.1rem;
        border-radius: 18px;
    }

    .home-page .mendify-faq-support__eyebrow {
        font-size: 0.75rem;
    }

    .home-page .mendify-faq-support h3 {
        font-size: clamp(1.25rem, 4.6vw, 1.6rem) !important;
        font-weight: 700;
        line-height: 1.25;
    }

    .home-page .mendify-faq-support__btn {
        min-height: var(--home-touch-lg);
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }

    .home-page .mendify-faq-support__info {
        margin-top: 1rem;
        padding-top: 1rem;
        gap: 0.6rem;
    }

    /* Two short facts fit side by side even on small phones */
    .home-page .mendify-faq-support__mini {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .home-page .mendify-faq-support__mini-card {
        padding: 0.7rem 0.75rem;
        border-radius: 12px;
    }

    .home-page .mendify-faq-support__mini-card span {
        font-size: 0.7rem;
    }

    .home-page .mendify-faq-support__mini-card strong {
        font-size: 0.9rem;
        line-height: 1.3;
    }
}

@media (max-width: 640px) {
    .home-page .mendify-faq-support__btn {
        width: 100%;
    }
}

/* ——— 10. Impact ——— */
@media (max-width: 1023px) {
    .home-page .mendify-impact__item h3,
    .home-page .mendify-count {
        font-size: clamp(1.9rem, 8vw, 2.5rem);
    }

    .home-page .mendify-impact__item p {
        font-size: 0.85rem;
        font-weight: 600;
    }
}

@media (max-width: 640px) {
    .home-page .mendify-impact__center {
        display: none;
    }

    .home-page .mendify-impact__wrap {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem 0.75rem;
    }
}

/* ——— 11. Testimonials — one swipeable row instead of a scroll box ——— */
@media (max-width: 1023px) {
    .home-page .mendify-testimonials-v2__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .home-page .mendify-testimonials-v2__intro,
    .home-page .mendify-testimonials-v2__slider,
    .home-page .mendify-testimonials-v2__side {
        min-height: 0;
    }

    .home-page .mendify-testimonials-v2__intro {
        border-radius: 18px;
    }

    .home-page .mendify-testimonials-v2__intro-scene {
        min-height: 130px;
    }

    .home-page .mendify-testimonials-v2__intro-content {
        padding: 1rem 1.1rem 1.2rem;
    }

    .home-page .mendify-testimonials-v2__intro-content h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .home-page .mendify-testimonials-v2__intro-content p {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .home-page .mendify-testimonials-v2__intro-btn {
        min-height: var(--home-touch);
        justify-content: center;
    }

    .home-page .mendify-testimonials-v2__slider {
        height: auto;
        max-height: none;
        overflow: visible;
        margin: 0 calc(-1 * var(--home-gutter));
        mask-image: none;
        -webkit-mask-image: none;
    }

    /* Both columns hold the same kind of quote; one row is enough */
    .home-page .mendify-testimonials-v2__slider.slider-up {
        display: none;
    }

    .home-page .mendify-testimonials-v2__track {
        flex-direction: row;
        align-items: stretch;
        gap: 0.75rem;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
        padding: 0.25rem var(--home-gutter) 0.5rem;
        scroll-padding-inline: var(--home-gutter);
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        animation: none !important;
        transform: none !important;
    }

    .home-page .mendify-testimonials-v2__track::-webkit-scrollbar {
        display: none;
    }

    .home-page .mendify-testi-card-v2 {
        flex: 0 0 min(85%, 20rem);
        display: flex;
        flex-direction: column;
        scroll-snap-align: start;
        border-radius: 16px;
        padding: 1.05rem 1rem 1rem;
    }

    .home-page .mendify-testi-card-v2.dup {
        display: none;
    }

    .home-page .mendify-testi-card-v2:hover {
        transform: none;
    }

    .home-page .mendify-testi-card-v2__quote {
        flex: 1 1 auto;
    }

    .home-page .mendify-testi-card-v2__quote p {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .home-page .mendify-testimonials-v2__side {
        flex-direction: row;
        align-items: stretch;
        gap: 0.75rem;
    }

    .home-page .mendify-rating-card-v2,
    .home-page .mendify-community-card-v2 {
        flex: 1 1 0;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .home-page .mendify-testimonials-v2__side {
        flex-direction: column;
    }

    /* Repeats the intro card's message; the rating card carries the proof */
    .home-page .mendify-community-card-v2 {
        display: none;
    }

    .home-page .mendify-rating-card-v2 {
        flex: none;
    }

    .home-page .mendify-rating-card-v2 h3 {
        font-size: 2.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .home-page .mendify-testi-card-v2 {
        flex-basis: min(46%, 22rem);
    }
}

/* ——— 12. Final CTA band ——— */
@media (max-width: 1023px) {
    .public-body--home .public-cta-band--light,
    .public-body--home .public-cta-band--dark {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .public-body--home .public-cta-band__card {
        border-radius: 20px;
        padding: 1.35rem 1.15rem 1.25rem;
    }

    .public-body--home .public-cta-band__title {
        font-size: clamp(1.45rem, 5.6vw, 2rem);
        line-height: 1.2;
    }

    .public-body--home .public-cta-band__desc {
        font-size: 0.92rem;
        margin-bottom: 1rem;
    }

    .public-body--home .public-cta-band__btn {
        justify-content: center;
        min-height: var(--home-touch);
        padding: 0.6rem 1.15rem;
        font-size: 0.95rem;
    }

    .public-body--home .public-cta-band__btn-primary {
        min-height: var(--home-touch-lg);
    }
}

@media (max-width: 640px) {
    .public-body--home .public-cta-band__actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }

    .public-body--home .public-cta-band__btn {
        width: 100%;
    }

    .public-body--home .public-cta-band__trust {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* Clinic specialty and treated capsules loop on phones and tablets. */
@media (max-width: 1023px) {
    .home-page .mendify-loc-box {
        overflow: hidden;
    }

    .home-page .mendify-loc-pills {
        flex-wrap: nowrap;
        width: max-content;
        animation: mendifyTagsScroll 22s linear infinite;
    }

    .home-page .mendify-loc-box:hover .mendify-loc-pills {
        animation-play-state: paused;
    }

    .home-page .mendify-loc-pills span {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .home-page .mendify-loc-pills [aria-hidden="true"] {
        display: inline-block;
    }
}

/* Same corner radius as the hero "My sessions" tile. */
@media (max-width: 640px) {
    .home-page .mh-btn,
    .home-page .mendify-experts__browse-btn,
    .home-page .mendify-experts__more-btn,
    .home-page .mendify-therapist-btn.lav,
    .home-page .mendify-loc-btn,
    .home-page .mendify-soon-btn,
    .home-page .mendify-faq-support__btn,
    .home-page .mendify-testimonials-v2__intro-btn,
    .home-page .mstory-tabs button,
    .home-page .mstory-tab,
    .home-page .mendify-locations__tabs button,
    .home-page .mendify-locations__tab,
    .home-page .mendify-team-slider__filter,
    .home-page .mendify-download-btn,
    .public-body--home .public-cta-band__btn {
        border-radius: 12px;
    }
}

/* ——— Reduced motion ——— */
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
    .home-page .mendify-experts__grid,
    .home-page .mendify-app-process__grid,
    .home-page .mendify-news__grid,
    .home-page .mendify-testimonials-v2__track {
        scroll-behavior: auto;
    }
}
