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

    #top {
        justify-content: space-between;
    }

    #mobile-ico {
        display: block;
    }

    #menu {
        display: none;
        position: absolute;
        left: 0;
        top: 70px;
        width: 100%;
        flex-direction: column;
        padding: 85px 25px 30px 25px;
        background: #fff;
        max-height: 100vh;
        flex-wrap: nowrap;
        overflow: auto;
        border-top: 1px solid #507299;
        text-align: center;
        box-shadow: 0 10px 20px -4px rgba(0,0,0,.4);
    }

    #menu.show {
        display: flex;
    }

    #menu a {
        font-size: 24px;
        line-height: 1.3;
    }

    #social {
        /*display: none;*/
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        justify-content: center;
    }

    #teachers .data {
        flex-direction: column;
    }
    #teachers .info {
        margin: 15px 0 0;
    }
    #teachers .photo {
        background-size: contain;
    }

    #contacts {
        flex-direction: column;
    }

    #contacts > div {
        width: 100%;
    }

    #requisites {
        padding: 0 0 20px;
        text-align: center;
    }

    #contacts-form {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    #b1 {
        height: 400px;
        background: url("../images/main.jpg") center no-repeat;
        background-size: cover;
    }

    #b1 img {
        display: none;
    }

    #b3 .custom {
        flex-wrap: wrap;
    }

    #b3 h2 {
        padding: 0 20px;
    }

    #b3 .custom .text {
        width: 100%;
        padding: 0 0 20px;
    }
}

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

    #gallery .list {
        flex-direction: column;
        height: auto;
    }

    #gallery .col1, #gallery .col2, #gallery .col3 {
        width: 100%;
    }

    #gallery a {
        max-height: 240px;
        min-height: 240px;
    }

}

@media screen and (max-width: 500px) {
    #phones {
        display: none;
    }
}