<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@yield('title', 'Pustaka Nawasena')</title>

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">

    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #fffaf5;
            overflow-x: hidden;
        }

        .navbar {
            background-color: #ff7a00 !important;
            padding: 10px 0;
        }
        .navbar-brand {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 700;
            color: #fff !important;
        }
        .navbar-brand img {
            height: 35px;
            width: 35px;
            object-fit: contain;
        }
        .navbar-brand span {
            font-weight: 700;
            color: #fff;
            letter-spacing: 0.5px;
        }
        .nav-link {
            color: #fff !important;
            font-weight: 500;
            transition: all 0.2s;
            border-radius: 6px;
            padding: 8px 14px !important;
        }
        .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }
        .navbar-toggler {
            border: none;
            filter: brightness(0) invert(1); 
        }

        .btn-login {
            border: 2px solid #fff;
            color: #fff;
            border-radius: 25px;
            padding: 5px 20px;
            font-weight: 600;
            transition: all 0.3s;
        }
        .btn-login:hover {
            background: #fff;
            color: #ff7a00;
        }

        footer {
            background: #ff7a00;
            color: white;
            padding: 30px 0;
            text-align: center;
        }
        footer a {
            color: #fff3e0;
            text-decoration: none;
        }
        footer a:hover {
            text-decoration: underline;
        }

        @media (max-width: 992px) {
            .navbar-nav {
                gap: 8px;
            }
        }
        @media (max-width: 768px) {
            .navbar {
                padding: 8px 0;
            }
            .nav-link {
                display: block;
                text-align: center;
                padding: 10px 0 !important;
            }
            .btn-login {
                width: 100%;
            }
        }
    </style>

    @stack('styles')
</head>
<body>

    <nav class="navbar navbar-expand-lg fixed-top shadow-sm">
        <div class="container">
            <a class="navbar-brand" href="{{ url('/') }}">
                <img src="{{ asset('images/kartu.png') }}" alt="Logo">
                <span>PUSTAKA NAWASENA</span>
            </a>

            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse justify-content-end mt-3 mt-lg-0" id="navbarNav">
                <ul class="navbar-nav text-center text-lg-start">
                    <li class="nav-item"><a href="{{ route('user.profile') }}" class="nav-link fw-semibold px-3">Profile</a></li>
                    <li class="nav-item"><a href="{{ route('user.koleksi') }}" class="nav-link px-3">Koleksi Buku</a></li>
                    <li class="nav-item"><a href="{{ route('user.layanan') }}" class="nav-link px-3">Layanan</a></li>
                    <li class="nav-item"><a href="{{ route('user.fasilitas') }}" class="nav-link px-3">Peralatan & Fasilitas</a></li>
                    <li class="nav-item"><a href="{{ route('user.kontak-lokasi') }}" class="nav-link px-3">Kontak & Lokasi</a></li>
                    <li class="nav-item mt-2 mt-lg-0 ms-lg-2">
                        <a href="{{ route('login') }}" class="btn btn-login">Masuk</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <main class="pt-5 mt-5">
        @yield('content')
    </main>

    <footer class="mt-5">
        <div class="container">
            <p class="mb-0">&copy; {{ date('Y') }} Pustaka Nawasena. Semua Hak Dilindungi.</p>
            <small>Dirancang dengan ❤️ oleh Tim Perpustakaan</small>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
    @stack('scripts')
</body>
</html>

