<!DOCTYPE html>
<html lang="id">
<head>
    {{-- (Bagian head tetap sama seperti sebelumnya) --}}
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Beranda</title>
    <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=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"/>
    <link rel="stylesheet" href="{{ asset('css/style.css') }}">
</head>
<body>

    {{-- NAVIGASI UNTUK TAMPILAN DESKTOP --}}
    <nav class="desktop-nav">
        <div class="nav-container">
            <a href="#" class="brand">PAMSIMAS</a>
            <div class="nav-links">
                <a href="{{ route('home') }}" class="nav-item {{ request()->routeIs('home') ? 'active' : '' }}"><span>Beranda</span></a>
                <a href="{{ route('invoices.index') }}" class="nav-item {{ request()->routeIs('invoices.*') ? 'active' : '' }}"><span>Tagihan</span></a>
                <a href="{{ route('news.index') }}" class="nav-item {{ request()->routeIs('news.index') ? 'active' : '' }}"><span>Berita</span></a>
                <a href="{{ route('profile.index') }}" class="nav-item {{ request()->routeIs('profile.index') ? 'active' : '' }}"><span>Profil</span></a>
            </div>
        </div>
    </nav>

    {{-- KONTEN UTAMA (Tampilan Mobile atau Desktop) --}}
    <div class="mobile-container">
        @yield('content')
    </div>

    {{-- NAVIGASI UNTUK TAMPILAN MOBILE --}}
    @if(!View::hasSection('hide_nav_bar'))
    <nav class="bottom-nav">
        <a href="{{ route('home') }}" class="nav-item {{ request()->routeIs('home') ? 'active' : '' }}"><i class="fas fa-home"></i><span>Beranda</span></a>
        <a href="{{ route('invoices.index') }}" class="nav-item {{ request()->routeIs('invoices.*') ? 'active' : '' }}"> <i class="fas fa-file-invoice-dollar"></i><span>Tagihan</span></a>
        <a href="{{ route('news.index') }}" class="nav-item {{ request()->routeIs('news.index') ? 'active' : '' }}"><i class="fas fa-newspaper"></i><span>Berita</span></a>
        <a href="{{ route('profile.index') }}" class="nav-item {{ request()->routeIs('profile.index') ? 'active' : '' }}"><i class="fas fa-user"></i><span>Profil</span></a>
    </nav>
    @endif

    @stack('scripts')

</body>
</html>