/* =====================================================================
   flexresourcing.com - phone & tablet layout
   ---------------------------------------------------------------------
   Everything here is inside a max-width media query, so screens wider
   than 960px (desktops, laptops, landscape iPads) render exactly as
   before.  Below 960px the fixed 950px layout becomes a single fluid
   column with larger text and finger-sized navigation.

   !important is used throughout because the original site builder
   put most sizing in inline style="" attributes.
   ===================================================================== */

@media screen and (max-width: 960px) {

    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

    body {
        padding: 0 !important;
        background-attachment: scroll !important;
    }

    /* ---- page frame: drop the fixed width and the "glass" edges ---- */
    div.layout              { width: auto !important; max-width: 100%; }
    div.layout div.top,
    div.layout div.bottom   { display: none !important; }
    div.layout div.middle   { background: none !important; }
    div.layout div.content  { margin: 0 !important; }

    /* ---- banner ---- */
    div.layout div#sys_banner {
        margin: 0 !important;
        background-size: cover !important;
        background-position: left center !important;
    }
    div.layout div#sys_banner div.shadow {
        width: auto !important;
        height: auto !important;
        padding: 30px 0 !important;
        background-size: 100% 100% !important;
    }
    div.layout div#sys_banner h1 {
        margin: 0 0 0 6px !important;
        font-size: 26px !important;
        line-height: 1.2 !important;
    }

    /* ---- navigation: full-width, easy-to-tap buttons ---- */
    div.sys_navigation { margin: 0 !important; }
    div.ys_nav ul,
    div.ys_secondary_nav ul {
        width: auto !important;
        padding: 0 !important;
        display: flex;
        flex-wrap: wrap;
    }
    div.ys_nav ul li,
    div.ys_secondary_nav ul li {
        display: block !important;
        flex: 1 1 auto;
        text-align: center;
    }
    div.ys_nav ul li a,
    div.ys_secondary_nav ul li a,
    div.ys_with_secondary ul li.selected a {
        display: block !important;
        padding: 14px 12px !important;
        font-size: 16px !important;
        border-radius: 0 !important;
    }
    div.ys_secondary_nav { border-radius: 0 !important; }

    /* ---- content: turn the layout table into one stacked column ---- */
    div#content {
        margin: 0 auto !important;
        padding: 14px 16px 20px 16px;
        max-width: 720px;              /* keeps lines readable on tablets */
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    table.sys_layout,
    table.sys_layout tbody,
    table.sys_layout tr,
    table.sys_layout td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
    }
    table.sys_layout td { padding: 0 !important; margin: 0 !important; }

    /* undo the negative-margin positioning tricks the site builder used */
    #content .Text_Default,
    #content .Image_Default,
    #content .HTML_Default {
        margin: 0 0 14px 0 !important;
    }
    #content div[style*="margin-left"] { margin-left: 0 !important; }

    /* images shrink to fit the screen */
    #content .Image_Default { text-align: center !important; }
    #content img {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* ---- readable type ---- */
    .content p, #content p, .HTML_Default p, .Text_Default p,
    .sys_txt, .sys_txt p, .sys_txt a, .sys_layout, .sys_layout p,
    #content li {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    .sys_layout h2, .sys_txt h2, .sys_txt h2 font {
        font-size: 23px !important;
        line-height: 1.3 !important;
    }
    .sys_layout h3, .sys_txt h3, .sys_txt h3 font, .sys_txt h3 a {
        font-size: 19px !important;
        line-height: 1.3 !important;
    }
    #content ul { padding-left: 22px; margin: 6px 0 12px 0; }
    #content li { margin: 4px 0; }

    /* the small address footer: still small, but legible */
    #content font[size="1"],
    #content font[size="1"] a {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
}
