  <!-- logo and  Navbar row start -->
    <nav class="navbar navbar-expand-md navbar-light bg-light" role="navigation" aria-label="<?php 
    //for accesbility *
    esc_attr_e('Primary menu', 'howcan'); ?>">
      
  <div class="container">
    <!-- Logo start with link  -->
    <div class="navbar-brand">
      <?php
      if (has_custom_logo()) {
          the_custom_logo();
      } else {
          echo '<span class="site-title h1 mb-0" style="font-size:30px;" >' . esc_html(get_bloginfo('name')) . '</span>';
      }
      ?>
    </div>
    <!-- Logo start end link  -->

    <!-- Toggler start  -->
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainMenu" aria-controls="mainMenu" aria-expanded="false" aria-label="<?php esc_attr_e('Toggle navigation', 'howcan'); ?>">
      <span style="colo:<?php echo esc_html(get_theme_mod('howcan_navbar_text_color'),'howcan'); ?>;" class="navbar-toggler-icon"></span>
    </button>
    <!-- Toggler end   -->

    <!-- Menu from menu setting  -->
    <div class="collapse navbar-collapse justify-content-end" id="mainMenu">
    <?php
// howcan Custom fallback function (repository safe)
function howcan_menu_fallback() {
    // if user is admin  → menu setup link will showing . .
    if ( current_user_can( 'edit_theme_options' ) ) {
        echo '<ul class="navbar-nav ms-auto mb-2 mb-lg-0">';
        echo '<li class="nav-item">';
        echo '<a class="nav-link" href="' . esc_url( admin_url( 'nav-menus.php' ) ) . '">';
        echo esc_html__( 'Click here to set up your menu', 'howcan' );
        echo '</a>';
        echo '</li>';
        echo '</ul>';
    } else {
      
       echo '<ul class="navbar-nav ms-auto mb-2 mb-lg-0">';
        echo '<li class="nav-item">';
        echo '<a class="nav-link" href="' . esc_url( home_url( '/' ) ) . '">';
        echo esc_html__( 'Home', 'howcan' );
        echo '</a>';
        echo '</li>';
        echo '</ul>';
      
        // সাধারণ visitor এর জন্য fallback → wp_page_menu
        /*  wp_page_menu( array(
            'menu_class' => 'navbar-nav ms-auto mb-2 mb-lg-0',
            'show_home'  => true,
        ) );
        */
        
        
    }
}

// Call menu
wp_nav_menu( array(
    'theme_location' => 'primary',
    'menu_class'     => 'navbar-nav ms-auto mb-2 mb-lg-0',
    'container'      => false,
    'fallback_cb'    => 'howcan_menu_fallback',
    'depth'          => 3,
) );
?>
    </div>
  </div>
</nav>
  <!-- end nav  -->