<nav class="site-navigation">
    <div class="row  justify-content-center mx-0 py-3">
        <div class="col-lg-11 px-lg-0">
            <div class="row align-items-center">
                <div class="col-lg-4 col-md-4 col-2 pr-md-3 px-0">
                    <button type="button" aria-label="Menu Close" class="menu-close">
                        <span class="top"></span>
                        <span class="middle"></span>
                        <span class="bottom"></span>
                    </button>
                    <span class="close-text">Close</span>
                </div>
                <div class="col-lg-4 col-md-4 col-9 text-center">
                    <a href="{{url('/')}}" class="nav-logo">
                        <div class="logo-image"><img src="{{ asset('/front/images/logo.svg') }}" width="250" height="47" class="img-fluid" alt=""></div>
                        <span class="main-text text-uppercase display-4 text-primary m-0">Menu</span>
                    </a>
                </div>
                <div class="col-lg-4 col-md-4  text-md-right text-center mt-md-0 mt-2">
                    <a href="https://portal.joblogic.com/" target="_blank" class="btn btn-secondary d-md-none d-inline-block mr-2"><i class="fas fa-calendar d-md-none d-inline-block"></i><span class="d-md-inline-block d-none">Book Your Repair</span></a>
                    <?php if (!empty(auth('customers')->user())) { ?>
                        <a href=" <?php if (!empty(auth('customers')->user())) { echo url('account'); } else {echo url('login');}?>" class="btn btn-primary mx-1 d-md-none d-inline-block"><i class="far fa-user"></i></a>
                    <?php }else{ ?>
                        <a href=" <?php echo url('login'); ?>" class="btn btn-primary d-md-none d-inline-block"><i class="fas fa-user-lock"></i></a>
                    <?php } ?>
                    @if(isset($cell))
                    <a href="tel:{{$cell->content}}" class="btn btn-secondary btn-phone"><i
                            class="fas fa-phone fa-flip-horizontal mx-md-1">
                        </i> 
                        <span>{{$cell->content}}</span></a>
                    @endif
                    

                    <a href="{{url('get_covered')}}" class="btn btn-primary btn-get-covered mx-1"><i class="far fa-hand-point-right mr-md-1 d-md-inline-block d-none"></i><span class="d-inline-block">Get Covered</span></a>

                </div>
            </div>
        </div>
    </div>
    <div class="row mx-0 inner-nav justify-content-center">
        <div class="col-lg-11">
            <div class="row">
                @foreach($categories as $category )

                <div class="col-lg">

                    <a href="#"><h3>{{$category["buttonTitle"]}}</h3></a>
                    <ul>
                        @foreach($category["packages"] as $cat )

                        <li><a href="{{url('/').'/'.$cat["url"]}}">{{$cat["title"]}}</a></li>

                        @endforeach
                    </ul>                        
                </div>
                @endforeach

            @foreach($navigations as $navigation)
                    @if(count($navigation["parents"])>0)

                    @foreach($navigation["parents"] as $parent)
                <div class="col-lg">
                    <a href="{{url($parent["url"])}}"><h3>{{$parent["name"]}}</h3></a>
                    
                    @if(count($parent["children"])>0)

                    <ul>
                            @foreach($parent["children"] as $child)

                                <li><a href="{{url($child["url"])}}">{{$child["name"]}}</a></li>

                        @endforeach
                    </ul>
                    @endif
                </div>
                    
                    @endforeach
                    @endif
                    @endforeach
            

            </div>
        </div>
    </div>
    <div class="container nav-bottom">
        <div class="row align-items-center">
            <div class="col-lg-4 text-lg-left text-center socials">
                <h4 class="d-inline-block mr-3">Join Us On </h4>
                @if(isset($facebook))
                <a href="{{url($facebook->content)}}" aria-label="Join us on Facebook" title="Facebook"><i class="fab fa-facebook-f white"></i></a>

                @endif
                @if(isset($twitter))
                <a href="{{url($twitter->content)}}" aria-label="Follow us on Twitter" title="Twitter" class="mx-2"><i class="fab fa-twitter white"></i></a>
                @endif
                @if(isset($youtube))
                <a href="{{url($youtube->content)}}"  aria-label="Subscribe our Youtube channel" title="Youtube"><i class="fab fa-youtube white"></i></a>
                @endif

            </div>
            <div class="col-lg-4 text-center my-lg-0 my-3">
                @if(isset($email))
                <a href="mailto:{{$email->content}} ">{{$email->content}}</a>
                @endif
            </div>
            <div class="col-lg-4 text-lg-right text-center">
                @if(isset($cell))
                <a href="tel:{{$cell->content}}">Call Us: {{$cell->content}}</a>

                @endif
            </div>
        </div>
    </div>
</nav>


<!--<nav class="site-navigation">
    <div class="container inner-nav">
        <div class="row justify-content-between align-items-center">
            <div class="col-md-5">
                <ul class="site-menu">

                    @foreach($categories as $category )

                    <li>
                        <a href="{{url('/').'/'.$category["code"]}}" class="has-menu">{{$category["buttonTitle"]}}</a>
                        <ul class="sub-menu">
                            @foreach($category["packages"] as $cat )
                            <li><a href="{{url('/').'/'.$cat["url"]}}">{{$cat["title"]}}</a></li>
                            @endforeach

                        </ul>
                    </li>

                    @endforeach

                    @foreach($navigations as $navigation)
                    @if(count($navigation["parents"])>0)

                    @foreach($navigation["parents"] as $parent)

                    <li><a href="{{url($parent["url"])}}" 
                           class="<?php if (count($parent["children"]) > 0) { ?> has-menu <?php } ?>" 
                           >{{$parent["name"]}}</a>

                        @if(count($parent["children"])>0)
                        <ul class="sub-menu">

                            @foreach($parent["children"] as $child)
                            <li><a href="{{url($child["url"])}}">{{$child["name"]}}</a></li>

                            @endforeach
                        </ul>

                        @endif   
                    </li>
                    @endforeach
                    @endif
                    @endforeach

                </ul>
                <div class="mt-5">
                    <p>Call Us:  @if(isset($cell))
                        <a href="tel:{{$cell->content}}">{{$cell->content}}</a>
                        @endif
                    </p>
                    <p>Join Us:
                        @if(isset($facebook))
                        <a href="{{url($facebook->content)}}" class="mr-3">Facebook</a>
                        @endif
                        @if(isset($instagram))
                        <a href="{{url($instagram->content)}}">Instagram</a>
                        @endif
                    </p>
                </div>

            </div>
            <div class="col-md-5">
                <div class="right-menu-box">
                    <ul id="RightMenu" class="right-menu">

                    </ul>
                </div>
            </div>
        </div>
    </div>
</nav> -->