/* ============================================================
   Budget Moving Services – Mobile Nav CSS
   Flash Moving-style two-tier header
   ============================================================ */

/* ── CSS Variables (inherits from main style.css) ── */
:root {
    --nav-bg:          #1a3c8f;   /* your --color-primary */
    --nav-accent:      #f7941d;   /* your --color-secondary / orange CTA */
    --nav-white:       #ffffff;
    --nav-utility-bg:  #0d2460;   /* slightly darker navy for top bar */
    --nav-text-light:  rgba(255,255,255,0.85);
    --nav-border:      rgba(255,255,255,0.12);
    --nav-drawer-bg:   #ffffff;
    --nav-drawer-text: #1a1a2e;
    --nav-transition:  0.25s ease;
    --header-height-utility: 36px;
    --header-height-main:    64px;
}

/* ── Reset old single-bar header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
    border-bottom: none;
    height: auto;               /* override old fixed height */
    display: block;
    box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

/* ============================================================
   TOP UTILITY BAR
   ============================================================ */
.header-utility-bar {
    background: var(--nav-utility-bg);
    height: var(--header-height-utility);
    display: flex;
    align-items: center;
}

.utility-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.utility-phone,
.utility-email {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nav-text-light);
    text-decoration: none;
    transition: color var(--nav-transition);
}

.utility-phone:hover,
.utility-email:hover {
    color: var(--nav-white);
}

.utility-email {
    margin-left: auto;    /* push email to the right */
}

/* ============================================================
   MAIN NAV BAR
   ============================================================ */
.header-main-bar {
    background: var(--nav-bg);
    height: var(--header-height-main);
    display: flex;
    align-items: center;
}

.main-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

/* ── Logo ── */
.site-logo { flex-shrink: 0; }
.site-logo img,
.site-logo .custom-logo { height: 46px; width: auto; }
.site-logo a { display: flex; align-items: center; text-decoration: none; }
.site-logo .logo-text {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--nav-white);
    line-height: 1.1;
}
.site-logo .logo-text span { color: var(--nav-accent); }
.site-logo .logo-text small {
    display: block;
    font-size: 0.55em;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--nav-text-light);
}

/* ── Desktop Nav ── */
.desktop-nav { flex: 1; display: flex; justify-content: center; }

.desktop-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.desktop-menu > li { position: relative; }

.desktop-menu > li > a {
    display: block;
    padding: 8px 13px;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--nav-text-light);
    border-radius: 4px;
    transition: all var(--nav-transition);
    text-decoration: none;
    white-space: nowrap;
}

.desktop-menu > li > a:hover,
.desktop-menu > li.current-menu-item > a,
.desktop-menu > li.current-menu-parent > a {
    color: var(--nav-white);
    background: rgba(255,255,255,0.12);
}

/* Desktop Dropdowns */
.desktop-menu .sub-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--nav-white);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--nav-transition);
    list-style: none;
    padding: 8px;
    z-index: 200;
}

.desktop-menu li:hover > .sub-menu,
.desktop-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-menu .sub-menu li a {
    display: block;
    padding: 9px 14px;
    font-size: 0.87rem;
    font-weight: 500;
    color: #333;
    border-radius: 4px;
    transition: all var(--nav-transition);
    text-decoration: none;
}

.desktop-menu .sub-menu li a:hover {
    color: var(--nav-bg);
    background: #f0f4ff;
}

/* ── Desktop CTAs ── */
.desktop-ctas {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.desktop-ctas .header-phone {
    color: var(--nav-white) !important;
    font-size: 0.95rem;
}

.desktop-ctas .header-phone:hover { color: var(--nav-accent) !important; }

.desktop-book-btn {
    background: var(--nav-accent) !important;
    color: var(--nav-white) !important;
    padding: 9px 18px !important;
    font-size: 0.88rem !important;
    border-radius: 4px !important;
    white-space: nowrap;
}

.desktop-book-btn:hover {
    background: #e07f0a !important;
    transform: translateY(-1px);
}

/* ── Mobile Controls (hidden on desktop) ── */
.mobile-controls {
    display: none;
    align-items: center;
    gap: 8px;
}

/* Mobile call icon button */
.mobile-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: var(--nav-white);
    text-decoration: none;
    transition: background var(--nav-transition);
    flex-shrink: 0;
}
.mobile-call-btn:hover { background: rgba(255,255,255,0.22); }

/* Mobile "Book A Move" pill button */
.mobile-book-btn {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--nav-accent);
    color: var(--nav-white);
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--nav-transition);
}
.mobile-book-btn:hover { background: #e07f0a; }

/* Hamburger button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background var(--nav-transition);
    flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.12); }

.ham-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--nav-white);
    border-radius: 2px;
    transition: all var(--nav-transition);
}

/* Hamburger → X animation */
.hamburger-btn.is-active .ham-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-active .ham-bar:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active .ham-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   DRAWER OVERLAY
   ============================================================ */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1099;
    opacity: 0;
    transition: opacity var(--nav-transition);
}
.drawer-overlay.is-visible {
    display: block;
    opacity: 1;
}


/* ============================================================
   MOBILE SLIDE-IN DRAWER
   ============================================================ */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--nav-drawer-bg);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -4px 0 32px rgba(0,0,0,0.18);
}
.mobile-drawer.is-open { right: 0; }

/* Body lock when drawer is open */
body.drawer-is-open { overflow: hidden; }

/* Drawer Header */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--nav-bg);
    flex-shrink: 0;
}

.drawer-logo img,
.drawer-logo .custom-logo { height: 40px; width: auto; }
.drawer-logo .logo-text {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--nav-white);
}
.drawer-logo .logo-text span { color: var(--nav-accent); }

.drawer-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--nav-white);
    transition: background var(--nav-transition);
    flex-shrink: 0;
}
.drawer-close-btn:hover { background: rgba(255,255,255,0.22); }

/* Drawer Nav */
.drawer-nav-wrap { flex: 1; padding: 8px 0; overflow-y: auto; }

.drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-menu-item { border-bottom: 1px solid #f0f0f0; }
.drawer-menu-item:last-child { border-bottom: none; }

.drawer-item-wrap {
    display: flex;
    align-items: center;
}

.drawer-link {
    flex: 1;
    display: block;
    padding: 14px 20px;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nav-drawer-text);
    text-decoration: none;
    transition: color var(--nav-transition), background var(--nav-transition);
}

.drawer-link:hover { color: var(--nav-bg); background: #f0f4ff; }

/* Accordion toggle button */
.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    transition: transform var(--nav-transition), color var(--nav-transition);
    flex-shrink: 0;
}
.dropdown-toggle:hover { color: var(--nav-bg); }
.dropdown-toggle[aria-expanded="true"] { transform: rotate(180deg); color: var(--nav-bg); }

/* Submenu */
.drawer-submenu {
    list-style: none;
    padding: 4px 0 4px 20px;
    margin: 0;
    background: #f8f9ff;
    border-top: 1px solid #edf0f8;
}

.drawer-submenu .drawer-menu-item { border-bottom: 1px solid #edf0f8; }
.drawer-submenu .drawer-link {
    font-size: 0.87rem;
    font-weight: 500;
    padding: 11px 16px;
    color: #444;
}
.drawer-submenu .drawer-link:hover { color: var(--nav-bg); }

/* Nested submenus */
.drawer-submenu .drawer-submenu { padding-left: 16px; background: #f0f2fc; }

/* Drawer Footer */
.drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.drawer-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f0f4ff;
    color: var(--nav-bg);
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--nav-transition);
}
.drawer-call-btn:hover { background: #dde4ff; }

.drawer-book-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px;
    background: var(--nav-accent);
    color: var(--nav-white);
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--nav-transition);
}
.drawer-book-btn:hover { background: #e07f0a; }


/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: hide desktop CTAs, show mobile controls */
@media (max-width: 1024px) {
    .desktop-ctas { display: none; }
    .desktop-nav  { display: none; }
    .mobile-controls { display: flex; }
    .header-utility-bar { display: none; } /* hide on tablet/mobile */
}

/* Mobile: tighten main bar padding */
@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .header-main-bar { height: 58px; }
    .site-logo img,
    .site-logo .custom-logo { height: 38px; }
    .site-logo .logo-text { font-size: 1rem; }
    .mobile-book-btn { padding: 7px 10px; font-size: 0.78rem; }
}

@media (max-width: 380px) {
    .mobile-book-btn { display: none; } /* very small screens: just phone icon + hamburger */
}
