/* SmartCalcs - Hamburger Menu Fix for All Devices */

/* DESKTOP - HIDE HAMBURGER MENU */
@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
    }
    
    .nav-links {
        display: flex !important;
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent !important;
        box-shadow: none !important;
        flex-direction: row !important;
        gap: 2rem !important;
    }
}

/* MOBILE - SHOW AND STYLE HAMBURGER MENU */
@media (max-width: 768px) {
    /* Hamburger Button Styling */
    .nav-toggle {
        display: flex !important;
        position: relative !important;
        z-index: 1002 !important;
        background: transparent !important;
        border: 2px solid transparent !important;
        border-radius: 8px !important;
        padding: 12px !important;
        cursor: pointer !important;
        width: 50px !important;
        height: 50px !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
        margin-left: auto !important;
    }
    
    .nav-toggle:hover {
        background: rgba(255, 107, 53, 0.1) !important;
        border-color: rgba(255, 107, 53, 0.3) !important;
        transform: scale(1.05) !important;
    }
    
    /* Hamburger Icon Styling */
    .hamburger-icon {
        font-size: 24px !important;
        font-weight: 300 !important;
        color: #1a202c !important;
        line-height: 1 !important;
        display: block !important;
        transition: all 0.3s ease !important;
        text-align: center !important;
    }
    
    /* Active state hamburger */
    .nav-toggle.active .hamburger-icon {
        color: #ff6b35 !important;
        transform: rotate(90deg) !important;
    }
    
    /* Mobile Navigation Links */
    .nav-links {
        position: fixed !important;
        top: 80px !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        flex-direction: column !important;
        padding: 0 !important;
        border-radius: 0 0 16px 16px !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        border-top: 3px solid #ff6b35 !important;
    }
    
    /* Active mobile navigation */
    .nav-links.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Mobile Navigation Links Styling */
    .nav-link {
        display: block !important;
        padding: 18px 24px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #1a202c !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f1f1f1 !important;
        transition: all 0.3s ease !important;
        position: relative !important;
    }
    
    .nav-link:hover {
        background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0.05) 100%) !important;
        color: #ff6b35 !important;
        padding-left: 32px !important;
    }
    
    .nav-link:active {
        background: rgba(255, 107, 53, 0.2) !important;
    }
    
    /* Mobile Dropdown */
    .dropdown {
        position: relative !important;
    }
    
    .dropdown-toggle::after {
        content: ' ▼' !important;
        font-size: 12px !important;
        color: #666 !important;
        transition: transform 0.3s ease !important;
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg) !important;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        background: #f8f9fa !important;
        padding: 0 !important;
        border-radius: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 300px !important;
    }
    
    .dropdown-menu a {
        display: block !important;
        padding: 14px 24px 14px 48px !important;
        font-size: 14px !important;
        color: #555 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #e9ecef !important;
        background: #f8f9fa !important;
        transition: all 0.3s ease !important;
    }
    
    .dropdown-menu a:hover {
        background: rgba(255, 107, 53, 0.1) !important;
        color: #ff6b35 !important;
        padding-left: 56px !important;
    }
    
    /* Last nav item */
    .nav-links li:last-child .nav-link {
        border-bottom: none !important;
    }
}

/* ENSURE NAVBAR POSITIONING */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
}

.nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    position: relative !important;
}

/* BRAND LOGO STYLING */
.nav-logo, .brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    color: #1a202c !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    z-index: 1001 !important;
}

.logo-icon {
    width: 32px !important;
    height: 32px !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)) !important;
}

.brand-text {
    color: #ff6b35 !important;
    font-weight: 800 !important;
}

/* ACCESSIBILITY IMPROVEMENTS */
.nav-toggle:focus {
    outline: 2px solid #ff6b35 !important;
    outline-offset: 2px !important;
}

.nav-link:focus {
    outline: 2px solid #ff6b35 !important;
    outline-offset: -2px !important;
}

/* OVERLAY FOR MOBILE MENU */
@media (max-width: 768px) {
    .nav-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* SMOOTH ANIMATIONS */
* {
    -webkit-tap-highlight-color: rgba(255, 107, 53, 0.2) !important;
}

/* PREVENT BODY SCROLL WHEN MENU IS OPEN */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden !important;
    }
}