/*
 * 1zeh_v2 — Mobile Menu Module Styles
 *
 * Standalone module: partials/mobile-menu/
 * Breakpoint: 992px (shows below, hides above)
 *
 * Sections:
 *   1. Overlay shell
 *   2. Close button
 *   3. Top contacts
 *   4. City selector
 *   5. CTA button
 *   6. Main navigation
 *   7. Bottom menu
 *   8. Cities overlay
 *   9. Submenu overlay
 *  10. Responsive adjustments
 *  11. Burger button (lives in header, styled here for cohesion)
 *  12. Desktop: hide mobile menu + burger
 */


/* ═══════════════════════════════════════
   0. Hidden state utility
   ═══════════════════════════════════════ */

.xs-mobile-menu.is-hidden {
    display: none;
}

body.xs-mobile-menu-open {
    overflow: hidden;
}

#menu-mobile-menu >li:last-child > a
{
    font-weight: var(--xs-font-weight-semibold);
}

/* ═══════════════════════════════════════
   1. Overlay shell
   ═══════════════════════════════════════ */

.xs-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: #fff;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


/* ═══════════════════════════════════════
   2. Close button
   ═══════════════════════════════════════ */

.xs-mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100001;
    padding: 4px;
    line-height: 0;
}

.xs-mobile-menu__close svg {
    display: block;
}


/* ═══════════════════════════════════════
   3. Top contacts
   ═══════════════════════════════════════ */

.xs-mobile-menu__top {
    display: flex;
    padding: 20px 15px 0;
    margin-bottom: 20px;
}

.xs-mobile-menu__top-item {
    display: flex;
    flex-direction: column;
}

.xs-mobile-menu__top-item--phone {
    width: 53%;
    margin-right: 20px;
    gap: 7px;
}

.xs-mobile-menu__top-item--phone > a {
    font-size: 21px;
    line-height: 26px;
    color: #2C3137;
    font-weight: 700;
    text-decoration: none;
    font-weight: var(--xs-font-weight-semibold);
    font-family: var(--xs-font-family-primary);
}

.xs-mobile-menu__top-sub {
    color: #757575;
    font-size: 16px;
    margin-top: 5px;
    display: inline-block;
}

.xs-mobile-menu__top-item--email {
    width: 47%;
}

.xs-mobile-menu__top-item--email > a {
    font-size: 21px;
    line-height: 26px;
    color: #2C3137;
    text-decoration: none;
    margin-bottom: 7px;
}

.xs-mobile-menu__top-messengers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.xs-mobile-menu__top-messenger img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}


/* ═══════════════════════════════════════
   4. City selector
   ═══════════════════════════════════════ */

.xs-mobile-menu__city {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 15px;
    margin-bottom: 30px;
    position: relative;
    user-select: none;
}

.xs-mobile-menu__city-pin {
    margin-right: 10px;
    flex-shrink: 0;
}

.xs-mobile-menu__city-name {
    font-size: 21px;
    color: #2C3137;
    font-weight: var(--xs-font-weight-semibold);
    font-family: var(--xs-font-family-primary);
}

/* Arrow indicator */
.xs-mobile-menu__city::after {
    content: "\f107";
    font: normal normal normal 18px/1 FontAwesome;
    color: #F41818;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(270deg);
}


/* ═══════════════════════════════════════
   5. CTA button
   ═══════════════════════════════════════ */

.xs-mobile-menu__cta {
    display: block;
    padding: 0 15px;
    margin-bottom: 20px;
    font-size: 21px;
    color: #2C3137;
    text-decoration: none;
    font-weight: var(--xs-font-weight-semibold);
    font-family: var(--xs-font-family-primary);
}


/* ═══════════════════════════════════════
   6. Main navigation
   ═══════════════════════════════════════ */

.xs-mobile-menu__nav {
    padding: 0 15px;
    flex: 1 0 auto;
}

.xs-mobile-menu__list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.xs-mobile-menu__list li {
    list-style: none;
    margin-bottom: 12px;
    position: relative;
}

.xs-mobile-menu__list li a {
    font-size: 21px;
    color: #2C3137;
    text-decoration: none;
}

/* Hide desktop pseudo-elements */
.xs-mobile-menu__list .header-menu-link::before,
.xs-mobile-menu__list .header-menu-link::after {
    display: none !important;
}

/* Hide nested submenus by default */
.xs-mobile-menu__list li .sub-menu {
    display: none;
}

/* Has-children arrow */
.xs-mobile-menu__list li.menu-item-has-children::after {
    content: "\f107";
    font: normal normal normal 18px/1 FontAwesome;
    color: #F41818;
    position: absolute;
    right: 3px;
    top: 2px;
    transform: rotate(270deg);
}


/* ═══════════════════════════════════════
   7. Bottom menu
   ═══════════════════════════════════════ */

.xs-mobile-menu__bottom {
    background: #EFEFEF;
    padding: 20px 15px 10px;
    margin-top: auto;
}

.xs-mobile-menu__bottom-list {
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
}

.xs-mobile-menu__bottom-list li {
    list-style: none !important;
    list-style-type: none !important;
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    margin-bottom: 3px !important;
    margin-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
}

.xs-mobile-menu__bottom-list li:nth-child(odd) {
    padding-right: 10px !important;
    padding-left: 0 !important;
}

.xs-mobile-menu__bottom-list li:nth-child(even) {
    padding-left: 40px !important;
    padding-right: 0 !important;
}

.xs-mobile-menu__bottom-list li a {
    font-size: 15px !important;
    color: #757575 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.xs-mobile-menu__bottom-list li a::before,
.xs-mobile-menu__bottom-list li a::after {
    display: none !important;
    content: none !important;
}


/* ═══════════════════════════════════════
   8. Cities overlay
   ═══════════════════════════════════════ */

.xs-mobile-menu__cities {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* width: 100%; */
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 100001;
    padding: 20px 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.xs-mobile-menu__cities.is-visible {
    display: block;
}

.xs-mobile-menu__cities-back {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: #2C3137;
    padding: 0;
}

.xs-mobile-menu__cities-back svg {
    margin-right: 10px;
}

.xs-mobile-menu__cities-back-label {
    font-weight: 700;
    font-family: 'MuseoBold', var(--xs-font-family-primary);
}

.xs-mobile-menu__cities-search {
    margin-bottom: 30px;
}

.xs-mobile-menu__cities-search p {
    font-size: 18px;
    margin: 0 0 10px;
    color: #2C3137;
}

.xs-mobile-menu__cities-input {
    border-radius: 16px;
    outline: none;
    border: 1px solid #E6E6E6;
    padding: 15px 20px;
    width: 100%;
    font-size: 16px;
    opacity: 0.7;
    box-sizing: border-box;
}

.xs-mobile-menu__cities-list-wrap p {
    font-size: 18px;
    margin: 0 0 10px;
    color: #2C3137;
}

.xs-mobile-menu__cities-list {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 394px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
}

.xs-mobile-menu__cities-list li {
    list-style: none;
    width: 50%;
    margin-bottom: 6px;
}

.xs-mobile-menu__cities-list li a {
    color: #757575;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.xs-mobile-menu__cities-list li a:hover,
.xs-mobile-menu__cities-list li a.active {
    color: #2C3137;
}

.xs-mobile-menu__cities-no-result {
    color: #757575;
    font-size: 16px;
    padding: 10px 0;
    display: none;
}


/* ═══════════════════════════════════════
   9. Submenu overlay
   ═══════════════════════════════════════ */

.xs-mobile-menu__submenu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 562px;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 100002;
    padding: 20px 15px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.xs-mobile-menu__submenu.is-visible {
    display: block;
}

.xs-mobile-menu__submenu-back {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #2C3137;
    font-size: 18px;
    font-weight: 700;
    padding: 0;
}

.xs-mobile-menu__submenu-back svg {
    margin-right: 10px;
}

.xs-mobile-menu__submenu-content .sub-menu {
    display: block !important;
    padding: 0;
    margin: 0;
    list-style: none;
}

.xs-mobile-menu__submenu-content .sub-menu > li > .sub-menu {
    display: none !important;
}

.xs-mobile-menu__submenu-content .sub-menu li {
    list-style: none;
    margin-bottom: 8px;
    font-size: 18px;
    position: relative;
}

.xs-mobile-menu__submenu-content .sub-menu li a {
    font-size: 18px;
    text-decoration: none;
    color: #2C3137;
}

.xs-mobile-menu__submenu-content .sub-menu li.menu-item-has-children::after {
    content: "\f107";
    font: normal normal normal 18px/1 FontAwesome;
    color: #F41818;
    position: absolute;
    right: 3px;
    top: 13px;
    transform: rotate(270deg);
}

.xs-mobile-menu__submenu-content .header-menu-link::before {
    display: none;
}

.xs-mobile-menu__top-item--email
{
    flex-direction: column-reverse;
}


/* ═══════════════════════════════════════
  10. Responsive adjustments
   ═══════════════════════════════════════ */

@media screen and (max-width: 460px) {
    .xs-mobile-menu__top {
        padding-top: 20px;
    }
}

@media screen and (max-width: 410px) {
    .xs-mobile-menu__top-item--email {
        width: 40%;
    }
}

@media screen and (max-width: 390px) {
    .xs-mobile-menu__top-item--phone {
        margin-right: 14px;
    }
    .xs-mobile-menu__top-item--phone > a,
    .xs-mobile-menu__top-item--email > a {
        font-size: 20px;
    }
}

@media screen and (max-width: 370px) {
    .xs-mobile-menu__top-item--phone {
        margin-right: 7px;
    }
}

@media screen and (max-width: 355px) {
    .xs-mobile-menu__top-item--email > a {
        font-size: 18px;
    }
    .xs-mobile-menu__top-item--phone > a {
        font-size: 19px;
        letter-spacing: -0.9px;
    }
    .xs-mobile-menu__top-item--phone .xs-mobile-menu__top-sub {
        font-size: 15px;
    }
    .xs-mobile-menu__cta {
        font-size: 18px;
    }
    .xs-mobile-menu__list li a {
        font-size: 18px;
    }
    .xs-mobile-menu__bottom-list li:nth-child(even) {
        padding-left: 6px;
    }
}


/* ═══════════════════════════════════════
  11. Burger button (placed in header.php)
   ═══════════════════════════════════════ */

.xs-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 100001;
    -webkit-tap-highlight-color: transparent;
    
}

.xs-burger > img
{
max-width: max-content !important;
}

.xs-burger__icon {
    object-fit: contain;
}

/* Fallback: CSS-only 3-line burger (when no custom image uploaded) */
.xs-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #2C3137;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hide span fallback when custom icon is present */
.xs-burger:has(.xs-burger__icon) span {
    display: none;
}

.xs-burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.xs-burger.is-active span:nth-child(2) {
    opacity: 0;
}

.xs-burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ═══════════════════════════════════════
  12. Show/hide logic by breakpoint
   ═══════════════════════════════════════ */

@media (max-width: 991px) {
    .xs-burger {
        display: flex;
    }

    /* Hide desktop navigation */
    .xs_header__bottom {
        display: none !important;
    }

    /* Adjust header top layout */
    .xs_header__top {
        flex-wrap: wrap;
    }
}

@media (min-width: 992px) {
    .xs-mobile-menu,
    .xs-mobile-menu__cities,
    .xs-mobile-menu__submenu {
        display: none !important;
    }

    .xs-burger {
        display: none !important;
    }
}



@media (max-width: 360px) {
    .xs-mobile-menu__bottom-list li a {
        font-size: 13px !important;
        color: #757575 !important;
        text-decoration: none !important;
        display: inline-block !important;
    }
}
