#header,
#header .header_top,
#header .header_mid,
#header .header_mid .header_mid_outer {
    background: #164194;
}

#header .header_mid .header_mid_outer {
    box-sizing: border-box;
    min-height: 170px;
    padding-top: 10px;
    padding-bottom: 10px;
}

#page.fixed_header #header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    /*z-index: 2100 !important;*/
    background: #164194;
}

#page.fixed_header .header_mid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    z-index: 1 !important;
}

@media only screen and (max-width: 1024px) {
    #page.fixed_header #header {
        position: relative !important;
    }

    #header .header_top {
        display: block !important;
    }

    #header .header_top .header_top_right {
        display: none !important;
    }

    #header .header_mid .header_mid_contacts {
        display: block !important;
        position: relative;
        clear: both;
        width: 100%;
        max-width: calc(100% - 40px);
        height: auto;
        min-height: 36px;
        margin: 0 auto 12px;
        padding: 0;
        color: #ffffff;
        font-size: 20px;
        line-height: 36px;
        text-align: center;
    }

    #header .header_mid .header_mid_search,
    #header .header_mid .header_mid_email {
        display: none !important;
    }

    #header .header_mid .header_mid_phone {
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    #header .header_mid .header_mid_phone .contact_widget_phone {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    #header .header_mid .header_mid_phone .contact_widget_phone:before {
        flex: 0 0 auto;
        margin-right: 0.45em;
    }

    #header .header_mid .header_mid_phone a {
        color: #ffffff;
    }

    #page.fixed_header .header_mid {
        position: relative !important;
        top: 0 !important;
        overflow: visible !important;
    }
}

@media only screen and (min-width: 1025px) {
    #header .header_top {
        display: none !important;
    }

    #page.fixed_header .header_mid {
        height: 170px !important;
    }

    #header .header_mid .header_mid_inner {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 52px;
        width: 1180px;
        max-width: calc(100% - 80px);
        height: 150px !important;
        background: transparent;
        padding-right: 20px;
        padding-left: 20px;
    }

    #header .header_mid .header_mid_contacts {
        position: absolute;
        top: 0;
        right: 20px;
        left: 20px;
        z-index: 3;
        display: grid;
        grid-template-columns: minmax(220px, 300px) minmax(220px, 360px) minmax(220px, 300px);
        align-items: center;
        justify-content: space-between;
        gap: 70px;
        height: 34px;
        color: #ffffff;
        font-size: 15px;
        line-height: 34px;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    }

    #header .header_mid .header_mid_contacts a {
        color: #ffffff;
    }

    #header .header_mid .header_mid_phone,
    #header .header_mid .header_mid_email {
        white-space: nowrap;
    }

    #header .header_mid .header_mid_email {
        text-align: right;
    }

    #header .header_mid .header_mid_email_icon {
        display: inline-block;
        margin-right: 0.25em;
        color: #ffffff;
        font-family: 'fontello';
    }

    #header .header_mid .header_mid_search form {
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.42);
    }

    #header .header_mid .header_mid_search input[type="search"] {
        width: 100%;
        height: 34px;
        padding: 0 10px 0 0;
        border: 0;
        background: transparent !important;
        box-shadow: none !important;
        -webkit-appearance: none;
        appearance: none;
        color: #ffffff !important;
        caret-color: #ffffff;
        font-size: 14px;
        line-height: 34px;
    }

    #header .header_mid .header_mid_search input[type="search"]::placeholder {
        color: rgba(255, 255, 255, 0.75);
    }

    #header .header_mid .header_mid_search input[type="search"]:focus,
    #header .header_mid .header_mid_search input[type="search"]:active,
    #header .header_mid .header_mid_search input[type="search"]:not(:placeholder-shown) {
        background: #164194 !important;
        box-shadow: none !important;
        color: #ffffff !important;
    }

    #header .header_mid .header_mid_search input[type="search"]:-webkit-autofill {
        -webkit-text-fill-color: #ffffff !important;
        box-shadow: 0 0 0 1000px #164194 inset !important;
        caret-color: #ffffff;
    }

    #header .header_mid .header_mid_search button {
        width: 28px;
        height: 34px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: #ffffff;
        font-family: 'fontello';
        font-size: 14px;
        line-height: 34px;
        text-align: center;
        cursor: pointer;
    }

    #header .header_mid .header_mid_search button:hover {
        background: transparent;
    }

    #header .header_mid .logo_wrap {
        flex: 0 0 282px;
        width: 282px;
        height: 115px;
        margin: 36px 0 0 !important;
        float: none;
    }

    #header .header_mid .logo_wrap:before,
    #header .header_mid .logo_wrap:after {
        content: none;
    }

    #header .header_mid .logo_wrap .logo {
        display: block;
        width: 282px;
        height: 115px;
    }

    #header .header_mid .logo_wrap .logo img {
        position: static;
        display: block;
        width: 282px;
        max-width: 100%;
        max-height: none;
        height: auto;
        margin: 0 !important;
    }

    #header .header_mid .logo_wrap .logo img.logo_retina {
        display: none;
    }

    #header .header_mid .mid_nav_wrap {
        align-self: flex-start;
        flex: 1 1 auto;
        height: auto;
        margin: 94px 0 0;
        float: none;
        text-align: right;
    }

    #header .header_mid .mid_nav_wrap nav,
    #header .header_mid .mid_nav_wrap nav > div {
        display: block;
        height: auto;
    }

    #header .header_mid .mid_nav {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 28px;
        height: auto;
        margin: 0;
        padding: 0;
    }

    #header .header_mid .mid_nav > li {
        position: relative;
        height: auto;
        margin: 0;
        float: none;
    }

    #header .header_mid .mid_nav > li:after {
        content: none;
    }

    #header .header_mid .mid_nav > li > a {
        display: block;
        height: auto;
        padding: 0;
        color: #ffffff;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    }

    #header .header_mid .mid_nav > li:hover > a,
    #header .header_mid .mid_nav > li.current-menu-item > a,
    #header .header_mid .mid_nav > li.current-menu-ancestor > a,
    #header .header_mid .mid_nav > li.current-menu-parent > a,
    #header .header_mid .mid_nav > li.menu-ancestor > a {
        box-shadow: inset 0 -3px 0 #ffffff;
    }

}
