/* Mobile responsive overlay + stub badges for alzdaycare.org */
.doc-stub {
    display: inline-block;
    padding: 2px 8px;
    background: #f4ecf5;
    border: 1px dashed #c8a3cc;
    border-radius: 3px;
    color: #500d53;
    font-style: italic;
    font-weight: bold;
    cursor: help;
    font-size: 0.85em;
}
.doc-stub::after { content: " \260E"; }

/* The original site is fixed 920px width; this file makes it usable on phones/tablets */

img { max-width: 100%; height: auto; }
html, body { overflow-x: hidden; max-width: 100vw; }

@media (max-width: 980px) {
    body { background-color: #e5e3e3; -webkit-text-size-adjust: 100%; padding-top: 0; }

    #wrap, #container { width: 100% !important; max-width: 100% !important; }
    #wrap { padding-top: 4px; }
    #container { padding: 0 12px; box-sizing: border-box; }

    #header { width: 100% !important; height: auto !important; min-height: 0 !important; padding: 8px 0 !important; }
    #header_left, #headerleft { width: 100% !important; float: none !important; text-align: center; }
    #header_left img, #headerleft img { max-width: 80%; height: auto; }
    #header_right { width: 100% !important; float: none !important; text-align: center; padding-top: 8px; }

    #topbar { width: 100% !important; height: auto !important; min-height: 60px !important; padding: 0 !important; margin: 0 !important; box-sizing: border-box; background: none !important; overflow: visible !important; }
    #topbar::after { content: ''; display: table; clear: both; }
    ul#top_nav, #topbar ul#top_nav { display: flex !important; justify-content: center !important; gap: 6px !important; flex-wrap: wrap !important; padding: 8px 0 !important; margin: 0 !important; box-sizing: border-box; float: none !important; width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 0 !important; list-style: none !important; }
    #topbar ul#top_nav li {
        float: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        height: auto !important;
        width: auto !important;
        text-indent: 0 !important;
        flex: 1 1 30%;
        min-width: 0;
        list-style: none;
    }
    #topbar ul#top_nav li a {
        display: block !important;
        min-height: 44px;
        padding: 12px 6px !important;
        line-height: 20px !important;
        text-align: center;
        border: none;
        border-radius: 3px;
        font-size: 13px !important;
        text-indent: 0 !important;
        text-decoration: none !important;
        background-image: none !important;
        background-position: 0 0 !important;
        color: #fff !important;
        font-weight: bold;
        font-style: normal !important;
        height: auto !important;
        width: auto !important;
        max-width: 100% !important;
        float: none !important;
        position: static !important;
        left: auto !important;
        box-sizing: border-box;
    }
    #topbar ul#top_nav li#donate a { background: #500d53 !important; }
    #topbar ul#top_nav li#volunteer a { background: #96ab1f !important; }
    #topbar ul#top_nav li#funders a { background: #1573bd !important; }

    /* Main nav: stack as flexible buttons */
    ul#main_nav2, ul#sub_nav, ul#side_nav {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        height: auto !important;
        background: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    ul#main_nav2 li, ul#sub_nav li, ul#side_nav li {
        flex: 1 1 50%;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block;
        text-indent: 0 !important;
        height: auto !important;
        width: auto !important;
        background: none !important;
    }
    ul#main_nav2 li a, ul#sub_nav li a, ul#side_nav li a {
        display: block;
        min-height: 44px;
        padding: 14px 10px;
        text-indent: 0 !important;
        background-image: none !important;
        background-color: #500d53 !important;
        color: #fff !important;
        font-size: 14px !important;
        line-height: 20px;
        text-align: center;
        border: 1px solid #fff;
        text-decoration: none;
        height: auto !important;
        width: auto !important;
    }
    ul#main_nav2 li a:hover, ul#sub_nav li a:hover, ul#side_nav li a:hover { background-color: #756464 !important; }
    ul#main_nav2 li a#current, ul#sub_nav li a#current, ul#side_nav li a#current_side { background-color: #756464 !important; }

    #sub_nav { background: #756464 !important; }
    ul#sub_nav li a { background-color: #756464 !important; }
    ul#sub_nav li a:hover { background-color: #500d53 !important; }

    /* Slideshow */
    #slide_wrap { width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; box-sizing: border-box; overflow: hidden; position: relative; }
    #slide { width: 100% !important; max-width: 100% !important; height: auto !important; min-height: 200px !important; padding: 0 !important; margin: 0 !important; box-sizing: border-box; position: relative; }
    #slide li { width: 100% !important; max-width: 100% !important; height: auto !important; padding: 0 !important; margin: 0 !important; box-sizing: border-box; }
    #slide li img { width: 100%; max-width: 100%; height: auto; display: block; }
    #captions { width: 100% !important; max-width: 100% !important; padding: 8px 0 !important; margin: 0 !important; box-sizing: border-box; }
    #captions li { width: 100% !important; max-width: 100% !important; text-align: center; padding: 4px 8px !important; margin: 0 !important; box-sizing: border-box; word-wrap: break-word; }
    #header_left img, #headerleft img, a#logo_2 img { max-width: 100%; height: auto; }
    a#logo_2 { display: inline-block; max-width: 90%; }

    /* Content */
    #content { width: 100% !important; padding: 12px 0 !important; }
    .one_column, .two_column { width: 100% !important; float: none !important; padding: 0 !important; }
    #sidebar { width: 100% !important; float: none !important; padding-bottom: 12px; }
    #wrap_content { width: 100% !important; float: none !important; padding: 0 !important; }

    img#hero, img#hero_sub { width: 100% !important; height: auto !important; max-width: 100% !important; display: block; }

    /* Events list on home */
    ul#events { width: 100% !important; float: none !important; padding: 12px 0 !important; }
    ul#events li, ul#events ul li { width: auto !important; padding: 8px 12px !important; background: #f4f4f4 !important; margin-bottom: 8px; border-left: 3px solid #500d53; }
    ul#events li.title { background: #500d53 !important; color: #fff !important; }
    ul#events li.title a { color: #fff !important; }

    /* Footer */
    #footer { width: 100% !important; height: auto !important; padding: 16px 12px !important; box-sizing: border-box; }
    #footer p.lf, #footer p.rf { float: none !important; width: 100% !important; text-align: center !important; padding: 4px 0; font-size: 13px; }

    /* Type sizing */
    body, p, ul li, ol li { font-size: 16px !important; line-height: 1.5 !important; }
    h1 { font-size: 22px !important; line-height: 1.3 !important; padding-bottom: 12px; }
    h4 { font-size: 14px !important; }
    a { word-break: break-word; }

    /* Forms */
    input, select, textarea, button { font-size: 16px !important; min-height: 44px; box-sizing: border-box; }

    /* Text-size widget hide on tiny screens */
    #text-size { display: none; }
}

@media (max-width: 540px) {
    ul#main_nav2 li, ul#sub_nav li, ul#side_nav li { flex: 1 1 100%; }
    #header_left img, #headerleft img { max-width: 92%; }
}
