/* Mobile Menu Fix CSS */

/* Hide mobile menu by default */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: #fff !important;
    z-index: 99999;
    padding: 60px 20px 20px 20px;
    box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    margin: 0;
}

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

/* Mobile menu when active */
.mobile-menu.active {
    left: 0;
}

/* Mobile menu backdrop - DISABLED */
.mobile-menu-backdrop {
    display: none !important;
}

.mobile-menu-backdrop.active {
    display: none !important;
}

/* Mobile nav toggler styling */
.mobile-nav-toggler {
    display: none !important;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    position: relative;
    z-index: 1000;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

/* Show mobile nav toggler on small screens */
@media (max-width: 1199.98px) {
    .mobile-nav-toggler {
        display: flex !important;
        position: relative;
        z-index: 100000;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Hide desktop menu on mobile */
    .tgmenu__navbar-wrap.tgmenu__main-menu {
        display: none !important;
    }
    
    /* Ensure mobile menu is properly positioned */
    .mobile-menu {
        display: block !important;
    }
}

/* Mobile menu list styling */
.mobile-menu ul li {
    list-style: none !important;
    border-bottom: 1px solid #eee;
    padding: 0;
    margin: 0;
    background: transparent !important;
}

.mobile-menu ul li a {
    display: block !important;
    padding: 18px 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent !important;
    border: none !important;
    position: relative;
    z-index: 100000;
    cursor: pointer !important;
    pointer-events: auto !important;
    border-radius: 0;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
    color: #ff6b35 !important;
    background: rgba(255, 107, 53, 0.05) !important;
    padding-left: 25px !important;
}

/* Services parent menu item styling */
.mobile-menu .menu-item-has-children > a {
    position: relative;
    font-weight: 600;
}

.mobile-menu .menu-item-has-children > a::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #666;
}

.mobile-menu .menu-item-has-children.active > a::after {
    transform: translateY(-50%) rotate(180deg);
    color: #ff6b35;
}

/* Mobile submenu styling */
.mobile-menu .menu-item-has-children > .sub-menu {
    display: none;
    background: #f8f9fa !important;
    margin: 10px 0;
    border-radius: 8px;
    padding: 15px 0;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.mobile-menu .menu-item-has-children.active > .sub-menu {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu .sub-menu li {
    background: transparent !important;
    border: none !important;
    margin: 0 15px;
}

.mobile-menu .sub-menu li a {
    padding: 12px 15px !important;
    font-size: 14px !important;
    color: #555 !important;
    background: transparent !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: block;
    position: relative;
}

.mobile-menu .sub-menu li a:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #ff6b35, #ff8c42) !important;
    transform: translateX(5px);
}

.mobile-menu .sub-menu li a::before {
    content: "→";
    position: absolute;
    left: -5px;
    opacity: 0;
    transition: all 0.2s ease;
}

.mobile-menu .sub-menu li a:hover::before {
    opacity: 1;
    left: 0;
}

/* Mobile menu close button */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none !important;
    border: none !important;
    font-size: 24px;
    cursor: pointer !important;
    color: #333 !important;
    z-index: 100001;
    pointer-events: auto !important;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header contact in mobile menu */
.mobile-menu .header-contact {
    padding: 20px 0;
    border-top: 2px solid #eee;
    margin-top: 20px;
}

.mobile-menu .header-contact .content {
    text-align: center;
}

.mobile-menu .header-contact .content span {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.mobile-menu .header-contact .content a {
    color: #ff6b35;
    font-weight: bold;
    font-size: 18px;
    text-decoration: none;
}

/* Request quote button in mobile menu */
.mobile-menu .flaticon-uptrend {
    margin-right: 8px;
}

/* Fix for header layout on mobile */
@media (max-width: 1199.98px) {
    .tgmenu__wrap {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: relative;
    }
    
    .tgmenu__nav-left-side {
        flex: 1;
    }
    
    .tgmenu__action {
        display: none !important;
    }
    
    /* Ensure mobile nav toggler is visible */
    .mobile-nav-toggler {
        display: flex !important;
        margin-left: auto;
    }
}

/* Ensure logo stays visible */
.logo {
    display: block !important;
}

.logo img {
    max-height: 50px;
    width: auto;
}

/* Fix header positioning */
.tg-header__area {
    position: relative;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Sticky header adjustments */
#sticky-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
}

/* Mobile menu animation improvements */
.mobile-menu {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.active {
    transform: translateX(0);
}

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

/* Hamburger icon styling */
.mobile-nav-toggler span {
    font-size: 20px;
    color: #333 !important;
    display: block;
    line-height: 1;
    font-weight: bold;
}

.mobile-nav-toggler:hover span {
    color: #ff6b35 !important;
}

.mobile-nav-toggler:hover {
    background: rgba(255, 107, 53, 0.1);
}

/* Override any conflicting styles */
.mobile-menu * {
    pointer-events: auto !important;
}

.mobile-menu,
.mobile-menu li,
.mobile-menu li a,
.mobile-menu .sub-menu,
.mobile-menu .sub-menu li,
.mobile-menu .sub-menu li a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Remove all backdrop references */

/* Additional mobile responsive fixes */
@media (max-width: 767.98px) {
    .tgmenu__wrap {
        padding: 10px 15px;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .mobile-menu {
        width: 280px;
    }
}

@media (max-width: 575.98px) {
    .mobile-menu {
        width: 100%;
        left: -100%;
    }
    
    .mobile-menu.active {
        left: 0;
    }
}

/* Force clickable links */
.mobile-menu a:link,
.mobile-menu a:visited,
.mobile-menu a:hover,
.mobile-menu a:active {
    pointer-events: auto !important;
    cursor: pointer !important;
    color: inherit !important;
    text-decoration: none !important;
}
