/* 
 * mobile-menu.css
 * Dedicated styles for mobile menu functionality 
 */

/* اطمینان از عدم نمایش منوی همبرگری در دسکتاپ */
@media (min-width: 901px) {
    .hamburger {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* حذف منوی همبرگری در تمام دستگاه‌های موبایل - استفاده از ناوبری فوتر */
@media (max-width: 900px) {
    .hamburger {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

@media (max-width: 900px) {
    /* Ensure hamburger is visible and clickable */
    .hamburger {
        display: block;
        -webkit-tap-highlight-color: transparent;
        padding: 15px;  /* Larger touch target */
        margin: 0;      /* حذف margin منفی */
        position: absolute; /* تغییر به absolute */
        z-index: 2000;  /* Ensure it's above everything */
    }
    
    /* Improve visibility of the bars */
    .hamburger .bar {
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    }
    
    /* Ensure nav menu is properly hidden when inactive */
    .nav-menu {
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        visibility: hidden;
        opacity: 0;
    }
    
    /* Styling for active nav menu */
    .nav-menu.active {
        visibility: visible;
        opacity: 1;
    }
    
    /* Fix for navigation items */
    #main-nav a {
        padding: 20px;  /* Larger touch targets */
        display: block; /* Full width clickable */
    }
}

/* Fix z-index and positioning conflicts */
#main-nav.menu-active {
    background: rgba(18, 18, 18, 0.98); /* Ensure background is visible when menu is open */
}

/* Add extra touch event support for mobile devices */
@media (hover: none) and (pointer: coarse) {
    .hamburger {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    #main-nav a {
        touch-action: manipulation;
    }
    
    /* Make sure menu items have pointer cursor */
    #main-nav li a {
        cursor: pointer;
    }
}
