/**
 * Mobile layout fixes for Hingham Nursery theme.
 */

@media only screen and (max-width: 959px) {
    html,
    body {
        overflow-x: clip;
    }

    #logo_section {
        box-sizing: border-box;
        max-width: 100% !important;
        padding: 0 10px;
        position: relative;
        width: 100% !important;
    }

    #logo_section .header-nav-row {
        flex-wrap: wrap;
    }

    #logo_section #nav > .DefaultNavigationMenu > ul.level1 {
        display: none;
    }

    #logo_section .slicknav_menu {
        background: #d0d724 !important;
        display: block !important;
        margin-top: 8px;
        width: 100%;
    }

    #logo_section .SocialIcons {
        justify-content: center;
        margin-top: 8px;
        width: 100%;
    }

    .logo img.year-logo {
        max-width: 100px !important;
    }

    #box_holder1,
    #box_holder2,
    #holder,
    #content_holder {
        display: block;
        float: none;
    }

    #left_side,
    #right_side,
    #content_main_img,
    #right_blocks,
    #new_row1,
    #new_row2 {
        float: none !important;
    }

    /* Keep green sidebar tiles intact; do not stretch nested columns to full width. */
    body.hingham-page #snapshot,
    body.hingham-page #find_us,
    body.hingham-page #services {
        float: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: calc(100% - 20px);
        overflow: hidden;
        width: 220px !important;
    }

    body.hingham-page #snapshot #snapshot_content,
    body.hingham-page #find_us #findus_content,
    body.hingham-page #services #services_content {
        float: none !important;
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 220px !important;
    }

    body.hingham-page #snapshot a,
    body.hingham-page #find_us a,
    body.hingham-page #services a {
        color: #fff !important;
    }

    body.hingham-page #pic {
        margin-bottom: 15px;
        text-align: center;
    }

    body.hingham-page #content_holder {
        padding-left: 15px;
        padding-right: 15px;
    }

    body.hingham-page .ContentPageHeader {
        font-size: 32px;
        line-height: 1.2;
    }

    body.hingham-page .ContentPageContent div,
    body.hingham-page .ContentPageContent p,
    body.hingham-page #content .content-control,
    body.hingham-page #content .content-control div,
    body.hingham-page #content .content-control p {
        line-height: 1.5 !important;
    }

    body.hingham-page .ContentPageContent img[style*="float"] {
        display: block !important;
        float: none !important;
        height: auto !important;
        margin: 0 auto 15px !important;
        max-width: 100% !important;
        width: auto !important;
    }

    #out-of-the-box-demo img,
    .ContentPageContent img,
    #content img {
        height: auto !important;
        max-width: 100% !important;
    }

    .ContentPageContent table {
        max-width: 100%;
        width: 100% !important;
    }

    .ContentPageContent iframe {
        max-width: 100%;
    }
}
