<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>@yield('title', $siteTitle ?? 'Accessway Express Courier Services')</title>
    <meta name="description" content="@yield('meta', 'Accessway Express Courier Services is an independent shipping and multi-modal freight forwarder with a global agent network.')">
    @if(!empty($faviconUrl))<link rel="icon" href="{{ $faviconUrl }}">@endif
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="{{ asset('css/app.css') }}">
</head>
<body>
    <header class="header-area">
        <div class="top-header">
            <div class="container">
                <a class="brand" href="{{ route('home') }}">
                    <img src="{{ $logoUrl }}" alt="{{ $siteName }}">
                    <span class="brand-text">{{ $siteName }}</span>
                </a>
                <div class="top-contact">
                    <span>
                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 21s7-7.2 7-12a7 7 0 10-14 0c0 4.8 7 12 7 12z"/><circle cx="12" cy="9" r="2.5"/></svg>
                        United Kingdom
                    </span>
                    <a href="mailto:{{ $contactEmail ?? 'info@accesswaysexpresscourier.com' }}">
                        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 7 9-7"/></svg>
                        {{ $contactEmail ?? 'info@accesswaysexpresscourier.com' }}
                    </a>
                </div>
            </div>
        </div>

        <div class="main-nav">
            <div class="container nav-row">
                <button class="menu-toggle" type="button" aria-label="Open menu">Menu</button>
                <div class="nav-main">
                <nav class="nav">
                    <a href="{{ route('home') }}" class="{{ request()->routeIs('home') ? 'active' : '' }}">Home</a>
                    <a href="{{ route('about') }}" class="{{ request()->routeIs('about') ? 'active' : '' }}">About Us</a>
                    <div class="drop">
                        <span>Pages ▾</span>
                        <div class="drop-menu">
                            <a href="{{ route('home') }}">Home</a>
                            <a href="{{ route('about') }}">About Us</a>
                            <a href="{{ route('services') }}">Services</a>
                            <a href="{{ route('tracking') }}">Tracking</a>
                            <a href="{{ route('contact') }}">Contact us</a>
                        </div>
                    </div>
                    <div class="drop">
                        <span>Services ▾</span>
                        <div class="drop-menu">
                            @foreach($navServices as $navService)
                                <a href="{{ route('services.show', $navService->slug) }}">{{ $navService->name }}</a>
                            @endforeach
                        </div>
                    </div>
                    <a href="{{ route('tracking') }}" class="{{ request()->routeIs('tracking') ? 'active' : '' }}">Tracking</a>
                    <a href="{{ route('contact') }}" class="{{ request()->routeIs('contact') ? 'active' : '' }}">Contact us</a>
                </nav>
                <div class="lang-wrap">
                    <select aria-label="Select language" onchange="if(this.value){ window.open('https://translate.google.com/translate?sl=en&tl='+this.value+'&u='+encodeURIComponent(window.location.href), '_blank'); }">
                        <option value="">Select Language</option>
                        <option value="en">English</option>
                        <option value="fr">French</option>
                        <option value="de">German</option>
                        <option value="es">Spanish</option>
                        <option value="ar">Arabic</option>
                        <option value="zh-CN">Chinese</option>
                        <option value="hi">Hindi</option>
                        <option value="pt">Portuguese</option>
                    </select>
                </div>
                </div>
                <a class="safebox" href="{{ route('tracking') }}">Check Security<br>Safebox</a>
            </div>
        </div>
    </header>

    <main>
        @yield('content')
    </main>

    @hasSection('cta')
        @yield('cta')
    @else
        <section class="cta-2">
            <div class="container">
                <div>
                    <h4>We provide international freight &amp; courier service worldwide</h4>
                </div>
                <a class="btn" href="{{ route('contact') }}">Get our service</a>
            </div>
        </section>
    @endif

    <button class="to-top" type="button" aria-label="Back to top">▲<small>TOP</small></button>

    <footer class="site-footer">
        <div class="container footer-grid">
            <div>
                <a class="brand" href="{{ route('home') }}">
                    <img src="{{ $logoUrl }}" alt="{{ $siteName }}">
                    <span class="brand-text">{{ $siteName }}</span>
                </a>
                <p>One-stop freight and courier solution for companies of all sizes, from a small delivery across town to an industrial shipment across the globe.</p>
            </div>
            <div>
                <h4>Pages</h4>
                <a href="{{ route('home') }}">Homepage</a>
                <a href="{{ route('about') }}">About Us</a>
                <a href="{{ route('services') }}">Services</a>
                <a href="{{ route('tracking') }}">Tracking</a>
                <a href="{{ route('contact') }}">Contact us</a>
            </div>
            <div>
                <h4>Services</h4>
                @foreach($navServices as $navService)
                    <a href="{{ route('services.show', $navService->slug) }}">{{ $navService->name }}</a>
                @endforeach
            </div>
            <div>
                <h4>Get in touch</h4>
                <p>{{ $site['office_address'] ?? '26 Upper Brook St, London W1K 7QE, United Kingdom.' }}</p>
                <p>{{ $contactEmail ?? 'info@accesswaysexpresscourier.com' }}</p>
                <p>We reply in 24 hrs</p>
            </div>
        </div>
        <div class="container copy">Copyright © {{ date('Y') }} All rights reserved | {{ $siteName }}</div>
    </footer>
    <div class="float-chats">
        @if(!empty($site['whatsapp']))
            <a class="float-btn whatsapp" href="https://wa.me/{{ preg_replace('/\D+/', '', $site['whatsapp']) }}" target="_blank" rel="noopener" aria-label="WhatsApp">WhatsApp</a>
        @endif
        @if(!empty($site['telegram']))
            <a class="float-btn telegram" href="https://t.me/{{ ltrim($site['telegram'], '@') }}" target="_blank" rel="noopener" aria-label="Telegram">Telegram</a>
        @endif
    </div>
    @if(!empty($site['smartsupp_code']))
        {!! $site['smartsupp_code'] !!}
    @endif
    <script src="{{ asset('js/app.js') }}"></script>
</body>
</html>
