/* Header main layout */

/* Placeholder for fixed header */

.header-main-wrapper {
    height: 60px;
}

/* Main header */

.header-main {
    position: fixed; /* Menu popup positioned relative to this */
    left: 0;
    top: 0;
    width: 100%;
    height: 60px;
    color: #fff;
    background: #424242;
    z-index: 100;
}

.header-main > div {
    display: table;
    table-layout: fixed;
    width: 1140px;
    height: 100%;
    margin: 0 auto;
}

.header-main-left,
.header-main-center,
.header-main-right {
    display: table-cell;
    vertical-align: top;
}

.header-main-left {
    width: 160px;
}

.header-main-right {
    width: 380px;
    text-align: right;
}

@media (max-width: 1240px) {
    .header-main-right {
        display: none;
    }
}

/* Logo */

.header-logo > a {
    display: block;
    width: 160px;
    height: 60px;
    font-size: 15px;
    background: #f44336 url('../images/logo-ver-F5243FE8D64749F4C556A6C1143C3F39.svg') center no-repeat;
    background-size: 120px 60px;
}

/* Phones */

.header-phones {
    display: inline-block;
    font-weight: bold;
    color: #e0e0e0;
    background: url('../images/phone-hang-up-ver-5AEDB4AE283D883885004646A4B1FCA2.svg') left center no-repeat;
    padding-left: 36px;
}

.header-phones > div > :first-child {
    margin-right: 20px;
}

/* Authentication */

.header-auth {
    line-height: 30px;
}

.header-auth > div {
    display: flex;
    justify-content: flex-end;
}

.header-auth-label {
    flex: 1;
    min-width: 0;
    color: #e0e0e0;
}

.header-auth-label > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-auth-link > a {
    color: #f44336;
    font-weight: bold;
    text-decoration: none;
    margin-left: 10px;
}

/* Menu links */

@media (max-width: 1240px) {
    .header-menu {
        display: none;
    }
}

.header-menu-item {
    display: inline-block;
    vertical-align: middle;
}

.header-menu-link {
    display: inline-block;
    vertical-align: middle;
}

.header-menu-link > a {
    display: block;
    text-decoration: none;
    height: 60px;
    line-height: 60px;
    padding: 0 20px;
    transition: color 0.4s ease;
}

.header-menu-item:first-child .header-menu-link > a {
    padding-left: 40px;
}

.header-menu-item--active .header-menu-link > a {
    color: #9e9e9e;
}

.header-menu-link--active > a {
    color: #9e9e9e;
}

/* Menu popups */

.header-menu-popup {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    border-top: 2px solid #f44336;
    background: #424242;
}

.header-menu-popup--visible {
    display: block;
}

.header-menu-popup--opening {
    animation: fade-in 0.4s;
}

.header-menu-popup--closing {
    animation: fade-out 0.4s;
}

.header-menu-popup > div {
    width: 1140px;
    margin: 0 auto;
    padding-left: 160px;
}

/* Popup block */

.header-menu-popup-block {
    display: inline-block;
    vertical-align: top;
    width: 25%; /* 4 blocks in one popup */
    padding: 20px 0 20px 40px;
}

.header-menu-popup-block-title {
    font-size: 17px;
    line-height: 1;
    margin-bottom: 10px;
    padding-bottom: 10px;
    color: #9e9e9e;
    border-bottom: 1px solid #9e9e9e;
}

.header-menu-popup-block-link > a {
    line-height: 1.2;
    font-size: 15px;
    display: block;
    text-decoration: none;
    padding: 5px 0;
}

/* Mobile menu */

@media (min-width: 1241px) {
    .header-mobile-menu {
        display: none;
    }
}

.header-mobile-menu-link {
    margin: 10px;
}

.header-mobile-menu-link > a {
    display: block;
    width: 40px;
    height: 40px;
    background: url('../images/menu-ver-869B8C5D804EE4181056DF16B693B51A.svg') center no-repeat;
    background-size: 32px 32px;
}

.header-mobile-menu-popup {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.header-mobile-menu-popup > div {
    width: 300px;
    height: 100%;
    padding-bottom: 60px;
    background: #424242;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.2s ease;
}

.header-mobile-menu-popup--hidden {
    display: none;
}

.header-mobile-menu-popup--hiding {
    opacity: 0;
}

.header-mobile-menu-popup--hiding > div {
    transform: translateX(-150px);
}

.header-mobile-menu-section {
    padding: 20px;
}

.header-mobile-menu-section:not(:last-child) {
    margin-bottom: 15px;
    border-bottom: 1px solid #9e9e9e;
}

.header-mobile-menu-section-title {
    font-size: 25px;
    line-height: 1;
    margin-bottom: 10px;
    color: #9e9e9e;
}

.header-mobile-menu-category:not(:last-child) {
    margin-bottom: 10px;
}

.header-mobile-menu-block-title {
    font-size: 19px;
    margin-bottom: 5px;
    color: #9e9e9e;
}

.header-mobile-menu-item > a {
    display: inline-block;
    font-size: 17px;
    padding: 8px 0;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
}

@media (min-width: 1241px) {
    .header-mobile-menu-auth {
        display: none;
    }
}

.header-mobile-menu-label {
    font-size: 17px;
    color: #e0e0e0;
}

.header-mobile-menu-label > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-mobile-menu-auth-link > a {
    color: #f44336;
    font-size: 17px;
    font-weight: bold;
    text-decoration: none;
}