/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-toggle:hover {
    background-color: #f8f9fa;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #0e314c;
    margin: 2px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 9999;
}

.mobile-nav.active .mobile-nav-content {
    right: 0;
}

.mobile-nav-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-header .logo img {
    max-height: 40px;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #0e314c;
    padding: 5px;
}

.mobile-nav-menu {
    padding: 20px 0;
}

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

.mobile-nav-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu li:last-child {
    border-bottom: none;
}

.mobile-nav-menu a {
    display: block;
    padding: 15px 20px;
    color: #0e314c;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Hide all feather icons in mobile menu */
.mobile-nav-menu i[data-feather],
.mobile-nav-menu .feather,
.mobile-nav-menu i,
.mobile-nav-menu .dropdown-toggle i {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Ensure dropdown toggles only show our custom + icon */
.mobile-nav-menu .dropdown-toggle {
    position: relative !important;
}

.mobile-nav-menu .dropdown-toggle::before {
    display: none !important;
}

.mobile-nav-menu a:hover {
    background-color: #f8f9fa;
    color: #44ce6f;
}

.mobile-nav-menu .dropdown-toggle {
    position: relative;
}

/* Hide feather icons in mobile menu to prevent double icons */
.mobile-nav-menu .dropdown-toggle i[data-feather],
.mobile-nav-menu .dropdown-toggle .feather {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Show dropdown arrow only on items with dropdown-toggle class */
.mobile-nav-menu li.dropdown-toggle::after {
    content: '▼' !important;
    position: absolute !important;
    right: 20px !important;
    top: 15px !important;
    font-size: 12px !important;
    color: #0e314c !important;
    transition: transform 0.3s ease !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

.mobile-nav-menu li.dropdown-toggle.active::after {
    transform: rotate(180deg) !important;
    color: #44ce6f !important;
}

/* Ensure no arrow on regular menu items */
.mobile-nav-menu li:not(.dropdown-toggle)::after {
    display: none !important;
}

.mobile-nav-submenu {
    display: none;
    background-color: #f8f9fa;
    overflow: hidden;
}

.mobile-nav-submenu.active {
    display: block;
}

.mobile-nav-submenu a {
    padding-left: 40px;
    font-size: 14px;
    pointer-events: auto !important;
    cursor: pointer !important;
    display: block;
    position: relative;
    z-index: 10;
}

/* Show mobile menu on mobile devices */
@media only screen and (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    .startp-nav {
        display: none;
    }
    
    .startp-responsive-nav {
        display: block;
    }
    
    /* Completely hide any meanmenu hamburger buttons */
    .mean-container a.meanmenu-reveal,
    a.meanmenu-reveal,
    .meanmenu-reveal,
    .mean-container .meanmenu-reveal {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Hide meanmenu container */
    .mean-container {
        display: none !important;
    }
    
    /* Ensure our custom mobile menu toggle is always on top */
    .startp-responsive-nav .mobile-menu-toggle {
        z-index: 1001 !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
}

/* Desktop - hide mobile menu */
@media only screen and (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .startp-nav {
        display: block;
    }
    
    .startp-responsive-nav {
        display: none;
    }
}

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

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Touch improvements */
.mobile-nav-menu a {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.mobile-menu-toggle {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}
