/* ===================================
   Custom Mobile Menu Overlay
   =================================== */

/* Hamburger toggle button - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #251112;
    border-radius: 2px;
    transition: 0.3s;
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.is-open {
    transform: translateX(0);
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 28px 24px;
}

/* Header: logo + close */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mobile-menu-logo a {
    display: block;
}

.mobile-menu-logo img {
    height: 45px;
    width: auto;
    display: block;
    padding-right: 60px;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.mobile-menu-close:hover {
    background: #f5f5f5;
}

/* Navigation */
.mobile-menu-nav {
    flex: 1;
}

.mobile-menu-nav .mobile-nav-list,
.mobile-menu-nav ul.mega-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-nav .mobile-nav-list > li,
.mobile-menu-nav ul.mega-menu > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-nav .mobile-nav-list > li > a,
.mobile-menu-nav ul.mega-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.3;
}

.mobile-menu-nav .mobile-nav-list > li > a:hover,
.mobile-menu-nav ul.mega-menu > li > a:hover {
    color: #00b8e7;
}

/* Active/current menu item */
.mobile-menu-nav li.current-menu-item > a,
.mobile-menu-nav li.current_page_item > a,
.mobile-menu-nav li.mega-current-menu-item > a {
    color: #00b8e7;
    font-weight: 600;
}

/* Chevron arrow for items with sub-menus */
.mobile-menu-nav li.menu-item-has-children > a::after,
.mobile-menu-nav li.mega-menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(-45deg);
    transition: transform 0.3s, border-color 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.mobile-menu-nav li.menu-item-has-children > a:hover::after,
.mobile-menu-nav li.mega-menu-item-has-children > a:hover::after {
    border-color: #00b8e7;
}

.mobile-menu-nav li.menu-item-has-children.submenu-open > a::after,
.mobile-menu-nav li.mega-menu-item-has-children.submenu-open > a::after {
    transform: rotate(45deg);
}

/* Sub-menu */
.mobile-menu-nav ul.sub-menu,
.mobile-menu-nav ul.mega-sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 10px 0;
    display: none;
}

.mobile-menu-nav li.submenu-open > ul.sub-menu,
.mobile-menu-nav li.submenu-open > ul.mega-sub-menu {
    display: block;
}

.mobile-menu-nav ul.sub-menu li a,
.mobile-menu-nav ul.mega-sub-menu li a {
    display: block;
    padding: 12px 0 12px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
    border-left: 2px solid #eee;
}

.mobile-menu-nav ul.sub-menu li a:hover,
.mobile-menu-nav ul.mega-sub-menu li a:hover {
    color: #00b8e7;
    border-left-color: #00b8e7;
}

/* Footer area: CTA + contact */
.mobile-menu-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}

.mobile-menu-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    background: #00b8e7;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.3s;
    margin-bottom: 18px;
}

.mobile-menu-cta:hover {
    background: #251112;
    color: #fff;
}

.mobile-menu-contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mobile-menu-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-menu-contact a:hover {
    color: #00b8e7;
}

.mobile-menu-contact a svg {
    flex-shrink: 0;
}

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

/* Override mega menu styles inside mobile overlay */
.mobile-menu-overlay #mega-menu-wrap-menu-1 {
    background: transparent !important;
}

.mobile-menu-overlay .mega-menu-toggle {
    display: none !important;
}

.mobile-menu-overlay #mega-menu-menu-1 {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.mobile-menu-overlay #mega-menu-menu-1 > li.mega-menu-item {
    display: block !important;
    float: none !important;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-overlay #mega-menu-menu-1 > li.mega-menu-item > a.mega-menu-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    background: transparent !important;
    line-height: 1.3 !important;
    height: auto !important;
}

.mobile-menu-overlay #mega-menu-menu-1 > li.mega-menu-item > a.mega-menu-link:hover {
    color: #00b8e7 !important;
}

.mobile-menu-overlay #mega-menu-menu-1 > li.mega-current-menu-item > a.mega-menu-link {
    color: #00b8e7 !important;
    font-weight: 600 !important;
}

/* Hide the mega menu indicator span, we use CSS ::after chevron */
.mobile-menu-overlay .mega-indicator {
    display: none !important;
}

/* Chevron for mega menu items with children (Rentals dropdown arrow) */
.mobile-menu-overlay #mega-menu-menu-1 > li.mega-menu-item-has-children > a.mega-menu-link::after {
    content: '' !important;
    display: inline-block !important;
    width: 10px !important;
    height: 10px !important;
    border-right: 2px solid #999 !important;
    border-bottom: 2px solid #999 !important;
    border-left: none !important;
    border-top: none !important;
    transform: rotate(-45deg) !important;
    transition: transform 0.3s !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    background: none !important;
    position: static !important;
    font-family: inherit !important;
    line-height: inherit !important;
    vertical-align: middle !important;
    -webkit-font-smoothing: auto !important;
}

.mobile-menu-overlay #mega-menu-menu-1 > li.mega-menu-item-has-children.submenu-open > a.mega-menu-link::after {
    transform: rotate(45deg) !important;
}

/* Sub menu in mega menu overlay */
.mobile-menu-overlay ul.mega-sub-menu {
    display: none !important;
    padding: 0 0 10px 0 !important;
    background: transparent !important;
    position: static !important;
    box-shadow: none !important;
    width: 100% !important;
}

.mobile-menu-overlay li.submenu-open > ul.mega-sub-menu {
    display: block !important;
}

.mobile-menu-overlay ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
    display: block !important;
    padding: 12px 0 12px 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #555 !important;
    background: transparent !important;
    border-left: 2px solid #eee !important;
    border-radius: 0 !important;
}

.mobile-menu-overlay ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:hover {
    color: #00b8e7 !important;
    border-left-color: #00b8e7 !important;
    background: transparent !important;
}

/* ===================================
   Responsive: Show mobile menu at 991px
   =================================== */
@media screen and (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    header .menu-bg-white {
        position: relative;
        justify-content: flex-start;
    }

    /* Hide desktop nav and CTA on mobile */
    header .spord,
    header .contain-btn {
        display: none;
    }
}
