/* Phone menu (.mobile-menu) sections, opened by js/mobile-menu.js.
   Scoped to .mobile-menu throughout, so the desktop navbar is untouched. */

/* the category row's edge fades (see .pm-types); registered so they can transition.
   Without @property support the fade just switches instead of gliding. */
@property --pm-fl { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --pm-fr { syntax: "<length>"; inherits: false; initial-value: 28px; }

/* ── a section: closed = 0 height; .m-open = natural height (the script animates between) ── */
.mobile-menu .navigation > li.dropdown > ul,
.mobile-menu .navigation > li.dropdown > .pm-panel {
    display: block;
    height: 0;
    overflow: hidden;
}
.mobile-menu .navigation > li.dropdown.m-open > ul,
.mobile-menu .navigation > li.dropdown.m-open > .pm-panel {
    height: auto;
}

/* ── the logo: plain on the white panel (owner, 2026-10-25); it sat on a white tile while the panel was dark ── */
.mobile-menu .nav-logo { width: auto; }
.mobile-menu .nav-logo a { display: inline-flex; align-items: center; }
.mobile-menu .nav-logo img { display: block; max-height: 42px; width: auto; }
/* the theme nudged the close button 10px up; level it with the logo */
.mobile-menu .close-btn { top: 0; }

/* the arrow turns instead of swapping its icon */
.mobile-menu .navigation li.dropdown .dropdown-btn i { transition: transform .3s ease; }
.mobile-menu .navigation li.dropdown .dropdown-btn.active i { transform: rotate(180deg); }
.mobile-menu .navigation li.dropdown .dropdown-btn.active i:before { content: "\f107"; }
.mobile-menu .navigation > li.dropdown.m-open > a { color: var(--theme-color1); }

/* the label must not run under the arrow */
.mobile-menu .navigation > li.dropdown > a { padding-right: 52px; }

/* The you-are-here tag ("Our Company [Reviews]"). Its -2px top/bottom margins exist to keep
   the DESKTOP pill from growing; on a plain phone row they lifted the tag above the text.
   Here the row is a centred flex line and the tag carries no vertical margin. */
.mobile-menu .navigation > li.dropdown > a {
    display: flex;
    align-items: center;
}
/* .menu-box adds specificity: header.cshtml's rule for the same tag sits in an inline <style>
   that loads AFTER this file, so an equal selector would lose to it */
.mobile-menu .menu-box .navigation > li.dropdown > a .nav-here {
    margin: 0 0 0 10px;
    font-size: 10px;
    padding: 3px 8px;
    line-height: 1.2;
}
/* the desktop carets: the phone menu has its own arrow */
.mobile-menu .pm-caret,
.mobile-menu .nav-caret { display: none; }

/* ── a plain submenu (Our Company) ── */
.mobile-menu .navigation > li.dropdown > ul { background: #f6faf8; }
.mobile-menu .navigation > li.dropdown > ul > li > a {
    font-size: 15px;
    color: #3d4b43;
}
.mobile-menu .navigation > li.dropdown > ul > li.current > a {
    color: var(--theme-color1);
    font-weight: 600;
}

/* ── Our Projects: category pills that swipe sideways, projects listed below ──
   The desktop mega menu's panel is absolute, hidden until hover, and has pointer-events
   off, so inside the phone menu every one of those is reset. */
.mobile-menu .proj-mega .pm-panel {
    position: static;
    display: block;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #f6faf8;
}
.mobile-menu .proj-mega .pm-types {
    display: flex;
    flex: none;
    flex-wrap: nowrap;   /* the mega menu's own <=991px rule wraps them; here they swipe */
    gap: 8px;
    position: relative;   /* offsetLeft in mobile-menu.js is measured against this */
    padding: 12px 20px;
    overflow-x: auto;
    background: transparent;
    border: 0;
    scrollbar-width: none;
    /* a pill always comes to rest inside the 20px padding, never sliced at the edge */
    scroll-snap-type: x proximity;
    scroll-padding-inline: 20px;
    /* Each edge fades only while there are pills hidden past it: mobile-menu.js sets
       --pm-fl / --pm-fr to 28px or 0 as the row scrolls, and @property lets them glide. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--pm-fl), #000 calc(100% - var(--pm-fr)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--pm-fl), #000 calc(100% - var(--pm-fr)), transparent 100%);
    transition: --pm-fl .25s ease-out, --pm-fr .25s ease-out;
}
    .mobile-menu .proj-mega .pm-types::-webkit-scrollbar { display: none; }
.mobile-menu .proj-mega .pm-type {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: auto;
    padding: 7px 14px;
    border: 1px solid #dfe9e3;
    border-radius: 30px;
    background: transparent;
    color: #3d4b43;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
    .mobile-menu .proj-mega .pm-type i { display: none; }
    /* touch leaves :hover stuck on the last tapped pill, so only .on may look selected */
    .mobile-menu .proj-mega .pm-type:hover { background: transparent; color: #3d4b43; }
    .mobile-menu .proj-mega .pm-type.on {
        background: var(--theme-color1);
        border-color: var(--theme-color1);
        color: #fff;
    }

.mobile-menu .proj-mega .pm-lists {
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 8px;
}
.mobile-menu .proj-mega .pm-proj {
    gap: 10px;
    padding: 11px 20px 11px 34px;
    border-radius: 0;
    color: #2b3a31;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;
}
    .mobile-menu .proj-mega .pm-proj i { color: var(--theme-color1); }
    .mobile-menu .proj-mega .pm-proj:hover {
        padding-left: 34px;
        background: #eefaf3;
        color: var(--theme-color1);
    }
.mobile-menu .proj-mega .pm-empty {
    padding: 10px 20px 14px 34px;
    color: #8a978f;
    font-size: 13.5px;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu .navigation li.dropdown .dropdown-btn i { transition: none; }
}

/* ══ The white phone menu (owner, 2026-10-25) ══
   A white panel: the logo and a close cross on top, the menu as plain rows with hairlines,
   then a filled main button and an outlined Login button, and the hotline at the very foot.
   It replaced the theme's dark panel; `.menu-box` in every selector outranks style.css. */
.mobile-menu { width: min(360px, 88vw); }
.mobile-menu .menu-box { background: #ffffff; box-shadow: -10px 0 30px rgba(10, 31, 20, 0.18); }
.mobile-menu .menu-box .upper-box { padding: 18px 20px; border-bottom: 1px solid #eef3f0; }
.mobile-menu .menu-box .close-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #0f2a1c; font-size: 18px; transition: background .2s ease, color .2s ease;
}
    .mobile-menu .menu-box .close-btn:hover { opacity: 1; background: #eefaf3; color: var(--theme-color1); }

.mobile-menu .menu-box .navigation { border-top: 0; padding: 6px 0; }
.mobile-menu .menu-box .navigation li { border-bottom: 1px solid #f0f4f1; }
.mobile-menu .menu-box .navigation > li:last-child { border-bottom: 0; }
.mobile-menu .menu-box .navigation li > ul > li:first-child { border-top: 1px solid #f0f4f1; }
.mobile-menu .menu-box .navigation li > a {
    padding: 13px 22px;
    color: #0f2a1c;
    font-size: 15.5px;
    font-weight: 600;
    text-transform: none;
}
.mobile-menu .menu-box .navigation li:hover > a,
.mobile-menu .menu-box .navigation li.current > a { color: var(--theme-color1); }
.mobile-menu .menu-box .navigation li.dropdown .dropdown-btn { color: #0f2a1c; height: 50px; line-height: 50px; }
    .mobile-menu .menu-box .navigation li.dropdown .dropdown-btn:after { display: none; }

/* ── the foot: buttons, then the hotline ── */
.mobile-menu .mm-foot { margin-top: auto; padding: 18px 20px 0; }
.mobile-menu .mm-actions { display: grid; gap: 10px; }
.mobile-menu .mm-btn {
    display: flex; align-items: center; justify-content: center;
    height: 46px; border-radius: 12px;
    font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.mobile-menu .mm-btn-main { background: linear-gradient(135deg, #1e9e57, #157a42); color: #fff; box-shadow: 0 6px 14px rgba(21, 122, 66, 0.25); }
    .mobile-menu .mm-btn-main:hover { color: #fff; box-shadow: 0 8px 18px rgba(21, 122, 66, 0.35); }
.mobile-menu .mm-btn-line { border: 1.5px solid #157a42; color: #157a42; background: #fff; }
    .mobile-menu .mm-btn-line:hover { background: #eefaf3; color: #157a42; }
.mobile-menu .mm-btn:focus-visible { outline: 2px solid #157a42; outline-offset: 3px; }

.mobile-menu .mm-hotline {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 18px; padding: 16px 2px 20px;
    border-top: 1px solid #eef3f0;
    color: #6a776f; font-size: 13px;
}
    .mobile-menu .mm-hotline strong { color: #157a42; font-size: 14.5px; font-weight: 800; white-space: nowrap; }
        .mobile-menu .mm-hotline strong i { margin-right: 6px; font-size: 12px; }
    .mobile-menu .mm-hotline:hover strong { color: #0f2a1c; }
