    

    @media only screen and (max-width: 767px)
{
    #top_picture
    {
        height: 50px;

        -webkit-background-size: 40px;
                background-size: 40px;
    }

    header a
    {
        width: 50px;
        height: 50px;
    }

    .main-nav
    {
        font-size: .6rem;

        top: 10px;
        right: 10px;
    }

    #form_search_bills,
    #form_search_price,
    #form_search
    {
                flex-direction: column;

        min-height: 35px;
        padding: 10px;

        -webkit-flex-direction: column;
           -moz-flex-direction: column;
            -ms-flex-direction: column;
             -o-flex-direction: column;
        -ms-align-items: stretch;
            align-items: stretch;
    }

    .main_form label
    {
        display: none;
    }

    .main_form input
    {
        font-size: calc(.7rem + .6vw);
        line-height: 27px;

        margin: 2px 0;
        padding: 0 10px;

        text-align: left;
    }


    #form_search_price input[name^=SI_name]
    {
        font-size: calc(.7rem + .6vw);
        line-height: 27px;
    }

    #top_references
    {
        max-width: 100%;
    }

    .btn_main
    {
        font-size: calc(.6rem + .2vw);
        font-weight: 500;
        line-height: .95rem;

        margin: 0;
    }

    .btn_container
    {
        display: -webkit-flex;
        display:    -moz-flex;
        display:     -ms-flex;
        display:      -o-flex;
        display:         flex;

        margin: 2px 0;

        -ms-align-items: baseline;
            align-items: baseline;
    }

    #top_footer
    {
        font-size: .8rem;

        display: block;

        padding: 10px;

        letter-spacing: .1rem;
    }

    #phones a,
    #mail a,
    #addres span
    {
        line-height: 1.2rem;
    }

    #footer_navigation
    {
        display: none;
    }

    #footer_contacts
    {
        width: 100%;
    }
    #footer_feedback
    {
        width: 100%;
        margin-top: 5px;
    }

    #top_references ul li
    {
        max-width: 20%;
        ;
    }
    #top_references ul li a
    {
        font-size: calc(.3rem + 1.2vw);
    }

    #top_references ul li a div
    {
    }
    #top_references ul li a h1
    {
        font-size: calc(.3rem + 1.2vw);
    }
    th
    {
        font-size: .7rem;

        padding: 1px;
    }
    td
    {
        font-size: .7rem;

        padding: 1px;
    }
    h2,
    #customer_name
    {
        font-size: calc(.65rem + 1.0vw);

        margin: 0;
        padding-bottom: 15px;
    }
    #company_name
    {
        font-size: 1.5rem;

        margin-top: -6px;
    }

    #warning
    {
        font-size: .75rem;

        padding: 10px;
    }
    #title_info
    {
        font-size: .7rem;

        padding: 10px;
    }
    caption
    {
        font-size: .9rem;
        line-height: 20px;

        padding: 5px;
    }
    th
    {
        font-size: calc(.6rem + .6vw);
    }
    #main_section
    {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .asides
    {
        margin-right: 2px;
        margin-left: 10px;
    }
    .asides,
    #aside_references
    {
        font-size: .8rem;
        line-height: calc(1.0rem + 1.0vw);
    }

    #aside_references ul
    {
        padding: 3px;
    }
    .asides h3
    {
        font-size: .8rem;
        line-height: 1.0rem;

        padding: 7px;
    }
    h4
    {
        font-size: .8rem;
    }
    .sly
    {
        margin: 4px 2px 10px 20px;
    }

    .asides ol li
    {
        margin-bottom: 5px;
        padding-left: 2px;
    }

    .asides ol
    {
        padding: 0 10px;
    }
    #form_feedback textarea
    {
        height: 76px;
    }
    #form_feedback input
    {
        height: 25px;
    }
    #form_feedback div
    {
        min-height: 140px;
    }

    #greeting
    {
        margin: 10px;
    }

    #greeting h3
    {
        margin: 10px 0;
    }

    #greeting p
    {
        margin: 5px 0;
    }

    .asides ol li
    {
        text-align: left;
    }

    #aside_references ul li
    {
        margin-bottom: 3px;
    }
}


/* iPad 3**********/
@media only screen and (min-width: 768px) and (max-width: 1310px)
{
    #top_picture
    {
        height: 9vw;

        -webkit-background-size: 6vw;
                background-size: 6vw;
    }

    header a
    {
        height: 9vw;
    }

    .main-nav
    {
        font-size: calc(.5rem + .5vw);

        top: 20px;
        right: 2vw;
    }

    #form_search_bills,
    #form_search_price,
    #form_search
    {
        min-height: 35px;
        padding: 10px;
    }

    .main_form label
    {
        display: none;
    }

    .main_form input
    {
        font-size: calc(.6rem + .6vw);
        line-height: 27px;

        margin: 0;
        margin-right: 1.4vw;
        padding: 0 10px;

        text-align: center;
    }


    #form_search_price input[name^=SI_name]
    {
        font-size: calc(.6rem + .6vw);
        line-height: 27px;

        min-width: 100px;
        max-width: 190px;
    }

    #form_search_price input[name^=SI_type]
    {
        min-width: 80px;
        max-width: 90px;
    }

    #form_search_price input[name^=SI_reestr]
    {
        min-width: 140px;
    }

    #form_search_bills input[name^=inn]
    {
        min-width: 150px;
    }

    .main_form input[name^=card]
    {
        min-width: 150px;
    }

    #form_search input[name^=bill]
    {
        min-width: 150px;
    }

    .btn_main
    {
        font-size: calc(.6rem + .2vw);
        font-weight: 500;
        line-height: .95rem;

        margin: 0;
        margin-left: 10px;
    }

    .btn_container
    {
        display: -webkit-flex;
        display:    -moz-flex;
        display:     -ms-flex;
        display:      -o-flex;
        display:         flex;

        margin-left: 10px;

        -ms-align-items: baseline;
            align-items: baseline;
        justify-content: center;
    }

    #top_footer
    {
        font-size: 1.2vw;

        padding-top: 15px;
        padding-bottom: 15px;
    }

    #phones a,
    #mail a,
    #addres span
    {
        line-height: 2.3vw;
    }

    #bottom_references li
    {
        padding: .7vw 0;
    }
    #top_references ul li a
    {
        font-size: calc(.6rem + .6vw);
    }

    #top_references ul li a div
    {
        margin: 0 30px;
    }
    #top_references ul li a h1
    {
        font-size: calc(.6rem + .6vw);

        margin: 0 30px;
    }
    th
    {
        font-size: 1.0rem;

        padding: 5px;
    }
    td
    {
        font-size: calc(.6rem + .6vw);

        padding: 5px;
    }
    h2,
    #customer_name
    {
        font-size: calc(.65rem + 1.0vw);

        margin: 0;
        padding-bottom: 15px;
    }
    #company_name
    {
        font-size: calc(.9rem + 1.0vw);

        margin-top: -10px;
    }

    #warning
    {
        font-size: .75rem;

        padding: 10px;
    }
    #title_info
    {
        font-size: calc(.5rem + .8vw);

        padding: 15px 20px;
    }
    caption
    {
        font-size: calc(.6rem + .9vw);
    }
    th
    {
        font-size: calc(.6rem + .6vw);
    }
    #main_section
    {
        margin-top: 20px;
    }
    .asides
    {
        margin-right: 20px;
    }
    .asides,
    #aside_references
    {
        font-size: 1.9vw;
    }
    h3
    {
        font-size: 2.2vw;
        line-height: 2.1vw;
    }
    h4
    {
        font-size: 2.2vw;
    }
    .sly
    {
        margin: .2vw 2vw 30px 4vw;
    }

    #form_feedback
    {
        max-width: 29vw;
    }

    #form_feedback textarea
    {
        height: 50px;
    }
    #form_feedback input
    {
        height: 25px;
    }
    #form_feedback div
    {
        min-height: 115px;
    }

    #greeting
    {
        margin: 15px;
    }

    #greeting h3
    {
        margin: 1.1rem 0;
    }

    #greeting p
    {
        margin: 8px 0;
    }

    #aside_references ul li
    {
        margin-bottom: 7px;
    }
}
/* Настольные компьютеры и ноутбуки ----------- */
@media only screen and (min-width: 1311px)
{
    header,
    footer,
    #top_references,
    #footer_bottom_line,
    #top_footer,
    .content
    {
        -webkit-box-shadow: inset 42px 0 92px -30px rgba(0, 0, 0, 1);
           -moz-box-shadow: inset 42px 0 92px -30px rgba(0, 0, 0, 1);
                box-shadow: inset 74px 0 50px -67px rgba(0, 0, 0, 1), inset -74px 0 50px -67px rgba(0, 0, 0, 1);
    }


    header,
    #top_footer,
    #main,
    #top_references ul,
    #customer_name,
    #main_section
    {
        padding: 0 7vw;
    }
    .main-nav
    {
        font-size: calc(.5rem + .5vw);

        top: 20px;
        right: 7vw;
    }

    #form_search_bills,
    #form_search_price,
    #form_search
    {
        min-height: 40px;
        padding: 20px 0;
    }

    #greeting h3
    {
        font-size: calc(1.0rem + .5vw);
    }

    .main_form label
    {
        font-size: calc(.57rem + .6vw);

        margin: 0;
        margin-right: 10px;
        padding: 0;

        flex: 0 0 auto;
    }
    .main_form input
    {
        font-size: calc(.6rem + .6vw);
        line-height: 33px;

        min-width: 55px;
        max-width: 130px;
        margin: 0;
        margin-right: 1.4vw;
        padding: 0 10px;

        text-align: center;

        flex: .5 5 75px;
    }


    input[name="climat_date"] {
        min-width: 170px;
        max-width: 200px;
    }

    .main_form label:first-child
    {
        margin-left: 0;
    }

    #form_mailing_list
    {
        padding: 0;
    }

    #form_mailing_list input
    {
        font-size: calc(.7rem + .2vw);
    }

    #form_search_price input[name^=SI_name]
    {
        font-size: calc(.6rem + .6vw);
        line-height: 33px;

        min-width: 150px;
        max-width: 250px;

        flex: .5 5 75px;
    }

    #form_search_bills input[name^=inn]
    {
        min-width: 80px;
        max-width: 210px;

        text-align: center;

        flex: .17 5 75px;
    }

    .main_form input[name^=card]
    {
        min-width: 75px;
        max-width: 90px;

        text-align: center;

        flex: .1 5 35px;
    }

    #form_search input
    {
        /*width: 45%;
        margin-left: 5px;*/
    }

    #form_search label:first-child
    {
        /*flex: 1 5 45%;*/
    }

    #form_search label
    {
        /*flex: 1 5 40%;*/
    }

    #form_search input[name^=bill]
    {
        min-width: 100px;
        max-width: 135px;

        text-align: center;

        flex: .15 5 30px;
    }

    #form_search_price input[name^=SI_reestr]
    {
        min-width: 83px;
    }

    .btn_main
    {
        font-size: calc(.6rem + .4vw);
        font-weight: 500;
        line-height: 1.3rem;

        margin: 0;
        margin-left: 10px;
    }
    .btn_container
    {
        display: -webkit-flex;
        display:    -moz-flex;
        display:     -ms-flex;
        display:      -o-flex;
        display:         flex;

        margin-left: 10px;

        -ms-align-items: baseline;
            align-items: baseline;
        /*justify-content: center;*/
        /*flex: 3 0 auto;*/
    }

    #top_footer
    {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    #top_references ul li a
    {
        font-size: calc(.5rem + .6vw);

        letter-spacing: .06rem;
    }

    #top_references ul li a div
    {
        margin: 0 10px;
    }
    #top_references ul li a h1
    {
        font-size: calc(.5rem + .6vw);

        margin: 0 10px;
    }
    /*th
    {
        font: 1.0rem Europe;

        padding: 5px;
    }
    td
    {
        /*font: 1.0rem Courier;
    }*/
    h2,
    #customer_name
    {
        font-size: calc(.66rem + 1.0vw);

        margin: 0;
        padding-bottom: 25px;
    }
    #company_name
    {
        font-size: calc(1.2rem + .8vw);

        margin-top: -5px;
    }

    #warning
    {
        padding: 15px 7vw;
    }
    #title_info
    {
        font-size: calc(.5rem + .8vw);

        padding: 15px 20px;
    }
    caption
    {
        font-size: calc(.8rem + .4vw);
    }
    th
    {
        font-size: calc(.6rem + .6vw);
    }
    .asides
    {
        margin-right: 0;
    }
    .asides,
    #aside_references
    {
        font-size: calc(.8rem + .3vw);
    }
    .asides h3
    {
        font-size: 1.5vw;
        line-height: 1.9vw;

        padding: 1.2vw 5.0vw;
        /*padding-bottom: .6vw;*/
    }
    h4
    {
        font-size: 1.7vw;
    }
    .sly
    {
        margin: .0vw 4vw 30px 5vw;
    }

    #form_feedback
    {
        max-width: 26vw;
    }
}

@media only screen and (max-width: 530px)
{
    .main-nav {
        font-size: 0.5rem;
    }
    .main-nav ul li:last-child {
        display: inline;
    }
}

@media only screen and (max-width: 442px)
{
    .main-nav {
        font-size: 0.4rem;
    }
}

@media only screen and (max-width: 370px)
{
   .main-nav ul li:last-child {
        display: -webkit-flex;
        -webkit-justify-content: flex-end;
        display: flex;
        justify-content: flex-end;
        margin-top: 0.1rem;
    }
}

@media only screen and (max-width: 262px)
{
    .main-nav ul li:nth-child(2) {
        display: -webkit-flex;
        -webkit-justify-content: flex-start;
        display: flex;
        justify-content: flex-start;
        margin-top: 0.1rem;
    }
    .main-nav ul li:nth-child(2) a {
        margin: 0;
    }
}
