/* SchoolMissionModern mobile shell and resource breadcrumb refinement.
   Loaded after site.css so it only overrides the specific mobile/breadcrumb rules below. */

:root {
    --sm-sticky-header-offset: 154px;
}

/* Resource breadcrumbs remain readable while the visitor scrolls long pages. */
.site-breadcrumb,
.worksheets-breadcrumb {
    position: sticky;
    top: var(--sm-sticky-header-offset);
    z-index: 90;
    background: rgba(246, 249, 252, .96);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

/* The Educational Links category page had extra top padding before its breadcrumb. */
@media (max-width: 760px) {
    /* Hide the mobile browser scrollbar while preserving normal page scrolling. */
    html {
        scrollbar-width: none;
    }

    html::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    body {
        -ms-overflow-style: none;
    }

    body::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    :root {
        --sm-sticky-header-offset: 84px;
    }

    .header-inner {
        min-height: 84px;
        padding: 10px 16px;
        justify-content: flex-start;
    }

    /* Reserve a real, non-overlapping zone for the Menu button. */
    .brand {
        max-width: calc(100% - 128px) !important;
        margin: 0;
        flex: 0 1 auto;
    }

    .brand img {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 58px;
    }

    .menu-toggle {
        right: -18px;
        padding: 9px 12px;
    }

    .site-breadcrumb,
    .worksheets-breadcrumb {
        width: calc(100% - 20px);
        margin-left: auto;
        margin-right: auto;
        padding-top: 7px;
        padding-bottom: 9px;
        font-size: 13px;
        line-height: 1.35;
    }

    .site-breadcrumb-separator {
        margin-left: 5px;
        margin-right: 5px;
    }

    .edu-list-page {
        padding-top: 10px !important;
    }

    .worksheets-breadcrumb {
        margin-top: 0 !important;
        margin-bottom: 12px !important;
    }

    /* Mobile footer: the top menu already provides navigation links.
       Keep only the copyright mark, centered in the footer. */
    .site-footer .footer-links {
        display: none;
    }

    .site-footer .footer-inner {
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .site-footer .footer-brand {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .site-footer .footer-brand img {
        margin: 0 auto;
    }

}

/* Public navigation: keep the dropdown trigger aligned with the label on desktop. */
.nav-link-split {
    display: inline-flex;
    align-items: stretch;
    vertical-align: top;
}

.nav-link-split .nav-link {
    flex: 0 0 auto;
    padding-right: 4px;
}

.nav-dropdown-toggle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    cursor: pointer;
    padding: 0 10px 0 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.nav-dropdown-toggle .chevron {
    display: inline-block;
    line-height: 1;
}

.nav-link-split:hover .nav-link,
.nav-link-split:focus-within .nav-link,
.nav-link-split:hover .nav-dropdown-toggle,
.nav-link-split:focus-within .nav-dropdown-toggle {
    background: #245590;
    color: #eaf5ff;
}

/* Public mobile navigation: keep the page link and submenu toggle separate. */
@media (max-width: 760px) {
    .nav-link-split {
        display: flex;
        align-items: stretch;
        width: 100%;
        border-top: 1px solid rgba(255,255,255,.10);
    }

    /* Keep the label only as wide as its text so the chevron sits naturally beside it. */
    .nav-link-split .nav-link {
        flex: 0 0 auto;
        border-top: 0;
        padding: 13px 0 13px 18px;
    }

    /* The whole area to the right of the label is the submenu button. */
    .nav-dropdown-toggle {
        flex: 1 1 auto;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        border: 0;
        background: transparent;
        color: #fff;
        font: inherit;
        cursor: pointer;
        padding: 0 18px 0 7px;
        text-align: left;
    }

    .nav-dropdown-toggle .chevron {
        display: inline-block;
        margin-left: 0;
        line-height: 1;
    }

    .nav-dropdown-toggle:focus-visible,
    .nav-dropdown-toggle:hover {
        background: #245590;
        color: #eaf5ff;
    }

    .nav-group:hover .dropdown,
    .nav-group:focus-within .dropdown {
        display: none;
    }

    .nav-group.is-open .dropdown {
        display: block;
    }
}

/* 2026-09-22 header update: mobile shell follows the same blue top bar. */
@media (max-width: 760px) {
    .site-header {
        background: #2b63aa;
        border-bottom: 0;
    }

    .header-inner {
        width: calc(100% - 20px);
        min-height: 74px;
        padding: 8px 0;
    }

    .brand img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 48px;
    }

    .menu-toggle {
        position: relative;
        display: inline-flex;
        align-items: center;
        border: 1px solid rgba(255,255,255,.55);
        border-radius: 8px;
        padding: 8px 11px;
        background: transparent;
        color: #fff;
    }

    .site-nav {
        background: #2b63aa;
    }
}
