/* Phone and tablet usability. Desktop styles remain in their existing sheets. */
@media (max-width: 1199.98px) {
    .site-header .navbar-toggler { min-width: 48px; min-height: 48px; }
    .site-header .navbar-collapse {
        max-height: calc(100dvh - var(--header-h) - 92px - env(safe-area-inset-bottom, 0px));
        overscroll-behavior-y: contain;
    }
    .site-header .nav-link { min-height: 48px; display: flex; align-items: center; }
    .contact-actions .dropdown {
        max-height: calc(100dvh - 180px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
    .contact-actions .dropdown .menu-item a { white-space: normal; min-width: 0; }
    .contact-actions .menu-item .sub { flex-shrink: 0; }
    body.ff-keyboard-open .contact-actions { visibility: hidden; pointer-events: none; }
    .modal .modal-dialog { margin: 16px; }
    .modal .modal-content { max-height: calc(100dvh - 32px); overflow-y: auto; }
    .modal .btn-close { min-width: 44px; min-height: 44px; box-sizing: border-box; }
}
@media (max-width: 767px) {
    :root { --edge: 24px; }
    html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
    input, textarea, select { scroll-margin-block: 110px 100px; }
    body #crmWebToEntityForm form .zcwf_row .zcwf_col_lab {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 0 6px !important;
        padding: 0 !important;
        overflow: visible !important;
        clip: auto !important;
        clip-path: none !important;
        white-space: normal !important;
        float: none !important;
    }
    body #crmWebToEntityForm .zcwf_col_lab label { display: block; font-size: .875rem; line-height: 1.5; }
    body #crmWebToEntityForm input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=reset]),
    body #crmWebToEntityForm textarea,
    body #crmWebToEntityForm select,
    .ff-assessment-form input:not([type=hidden]):not([type=radio]):not([type=checkbox]),
    .ff-assessment-form textarea,
    .ff-assessment-form select {
        font-size: 16px !important;
        min-height: 48px;
        max-width: 100%;
    }
    body #crmWebToEntityForm textarea { min-height: 112px; resize: vertical; }
    body #crmWebToEntityForm input[type=submit],
    body #crmWebToEntityForm input[type=reset],
    .ff-step-actions button { min-height: 48px; }
    body #crmWebToEntityForm .zcwf_row { margin-bottom: 16px !important; }
    .ff-assessment-section, #appointment, #ff-contact-zoho { scroll-margin-top: calc(var(--header-h) + 20px); }
    .ff-step { scroll-margin-top: calc(var(--header-h) + 20px); }
    .compact-team .subLinks .team-filter-arrow { width: 44px; min-height: 44px; flex-basis: 44px; }
    body.child-development-refresh .ff-child-page .ff-child-card-image { aspect-ratio: auto; }
    body.child-development-refresh .ff-child-page .ff-child-card-image img { height: auto; }
    body.child-development-refresh .ff-child-page .ff-child-card-content { min-height: 0; padding: 18px; }
    body.child-development-refresh .ff-child-page .ff-child-card h3 { font-size: 1.0625rem; }
    .ff-insurance-contact .ff-insurance-button { width: 100%; min-height: 48px; }
    .ff-therapy-session .container { gap: 24px; }
}
@media (max-width: 480px) {
    .home-form-main #crmWebToEntityForm form { grid-template-columns: minmax(0, 1fr); }
    .home-form-main #crmWebToEntityForm form > .zcwf_row { grid-column: 1 / -1; }
    .contact-actions .menu-item a { gap: 8px; font-size: .875rem; }
    .contact-actions .menu-item .sub { font-size: .8125rem; }
}
@media (prefers-reduced-motion: reduce), (hover: none) {
    .home-services-slides { animation: none !important; transform: none !important; }
}

@media (max-width: 767px) {
    /* Keep the service heading close to its image, without a tall empty panel. */
    body.child-development-refresh .ff-child-page .banner.team-hero .banner_cont {
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        padding-block: 24px !important;
    }
    body.child-development-refresh .ff-child-page .banner.team-hero .banner_cont h1,
body.child-development-refresh .ff-child-page .banner.team-hero .banner_cont p.ff-banner-title {
        font-size: clamp(28px, 8vw, 34px) !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }
}
