/*** header: responsive rules shared by front.layouts.app and layouts.home_layout ***/

@media (min-width: 992px) and (max-width: 1270px) {
    .header #header .main-menu-container{
        display: flex;
        justify-content: center;
        align-items: center;
        padding-left: 0;
    }
    .header #logo{
        order: -1;
        position: static;
        float: none;
        width: 70px;
        max-width: 70px;
        max-height: none;
        margin: 8px 20px 8px 0;
    }
    .header #header .main-menu{
        float: none;
        width: auto;
        padding: 0;
        margin: 0;
    }
    .header #header .main-menu li > a{
        padding: 0 12px;
        font-size: 13px;
    }
    .header #header .main-menu li:not(.lang) a::before{
        width: calc(100% - 24px);
    }
}

@media (max-width: 991.98px) {
    .header #top-bar{
        display: none;
    }
    .header #header,
    body .header #header {
        padding: 10px 16px;
    }
    .header #header .main-menu-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .header #header .main-menu {
        display: none;
    }
    .header #logo {
        position: static;
        float: none;
        width: 60px;
        height: 60px;
        max-width: none;
        max-height: none;
        margin: 0;
    }
    .header #logo .logo-desktop {
        display: none;
    }
    .header #logo .logo-mobile {
        display: block;
        width: 100%;
        height: 100%;
    }
    .header .mobile-actions {
        display: flex;
        align-items: center;
        gap: 14px;
    }
    .header .mobile-lang img {
        display: block;
        width: 30px;
        height: 20px;
        border-radius: 2px;
    }
    .header .mobile-menu-button {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        float: none;
        width: 44px;
        height: 44px;
        padding: 13px 10px;
        background: none;
        border: 0;
        cursor: pointer;
    }
    .header .mobile-menu-button span {
        display: block;
        height: 2px;
        background: #fff;
        border-radius: 2px;
    }
    .header .mobile-menu-button:focus-visible,
    .header .mobile-menu-close:focus-visible {
        outline: 2px solid #ffb000;
        outline-offset: 2px;
    }

    /** mobile drawer **/
    html.mobile-menu-open,
    html.mobile-menu-open body {
        overflow: hidden;
    }
    .header .mobile-drawer-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 100000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .header .mobile-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        background: #000;
        color: #fff;
        text-align: left;
        z-index: 100001;
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s ease;
    }
    html.mobile-menu-open .header .mobile-drawer-overlay {
        opacity: 1;
        visibility: visible;
    }
    html.mobile-menu-open .header .mobile-drawer {
        transform: none;
        visibility: visible;
    }
    .header .mobile-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 12px 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    .header .mobile-menu-head img {
        display: block;
        width: 56px;
        height: 56px;
    }
    .header .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        background: none;
        border: 0;
        color: #fff;
        cursor: pointer;
    }
    .header .mobile-drawer .mobile-main-menu {
        margin: 0;
        padding: 8px 0;
        list-style: none;
    }
    .header .mobile-drawer .mobile-main-menu li {
        padding: 0;
    }
    .header .mobile-drawer .mobile-main-menu li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 24px;
        border-left: 3px solid transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: #fff;
        font-size: 15px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        text-decoration: none;
    }
    .header .mobile-drawer .mobile-main-menu li.active a,
    .header .mobile-drawer .mobile-main-menu li a:hover {
        color: #ffb000;
        border-left-color: #ffb000;
        background: rgba(255, 255, 255, 0.04);
    }
    .header .mobile-drawer .n-wish {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 11px;
        background: var(--primary-color);
        color: #fff;
        font-size: 12px;
    }
    .header .mobile-menu-foot {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding: 20px 20px 28px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }
    .header .mobile-menu-foot a {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: #ddd;
        font-size: 12px;
        text-decoration: none;
        overflow-wrap: anywhere;
    }
    .header .mobile-menu-foot > a img {
        filter: brightness(0) invert(1);
    }
    .header .mobile-menu-options {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 6px;
    }
    .header .mobile-menu-options a {
        padding: 6px 12px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 4px;
        color: #fff;
    }
}

@media (max-width: 767px) {
    .header .hidden-xs {
        display: none !important;
    }
}
