<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <!-- Dynamic SEO Titles & Description -->
    <title>@yield('title', 'Frantyap Homes - Luxury Real Estate, Villas and Verified Lands in Abuja')</title>
    <meta name="description" content="@yield('meta_description', 'Discover verified land titles (FCDA C of O), diplomatic villas, duplexes, and prime real estate across Maitama, Asokoro, Guzape, Katampe Extension, and Kubwa with Frantyap Homes.')">
    <meta name="keywords" content="Abuja Real Estate, Frantyap Homes, Buy Land in Guzape, Maitama Villas, AGIS Title Search, Katampe Extension Properties, FCDA C of O, Real Estate Nigeria">
    <meta name="author" content="Frantyap Homes 633">
    
    <!-- OpenGraph Social Tags -->
    <meta property="og:title" content="@yield('title', 'Frantyap Homes Real Estate - Verified Lands and Luxury Properties')">
    <meta property="og:description" content="@yield('meta_description', 'Verified land titles, diplomatic villas, and executive penthouses across Abuja.')">
    <meta property="og:image" content="@yield('og_image', asset('assets/hero-bg.jpg'))">
    <meta property="og:type" content="website">
    <meta property="og:url" content="{{ url()->current() }}">
    
    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="@yield('title', 'Frantyap Homes Real Estate')">
    <meta name="twitter:description" content="@yield('meta_description', 'Verified land titles and luxury real estate in Nigeria.')">
    <meta name="twitter:image" content="@yield('og_image', asset('assets/hero-bg.jpg'))">

    <!-- Schema.org JSON-LD Structured Data for Local Business -->
    <script type="application/ld+json">
    {
      "{{ '@context' }}": "https://schema.org",
      "@type": "RealEstateAgent",
      "name": "Frantyap Homes 633",
      "image": "{{ asset('assets/logo.jpeg') }}",
      "url": "{{ url('/') }}",
      "telephone": "09126262525",
      "email": "frantyaphomes633@gmail.com",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "Suite 11, First Floor Eastley Park Plaza, No 5 Bathurst Street off Aminu Kano Crescent, Wuse 2",
        "addressLocality": "Abuja",
        "addressRegion": "FCT",
        "addressCountry": "NG"
      },
      "areaServed": ["Abuja", "Nigeria"]
    }
    </script>
    
    <!-- Google Fonts: Playfair Display & Inter -->
    <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=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap" rel="stylesheet">
    
    <!-- Core Design System & Styling -->
    <script src="https://cdn.tailwindcss.com"></script>
    
    <!-- Icons Library -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <!-- Scroll Animations -->
    <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
    
    <!-- Interactive Map Engine -->
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>

    <!-- UI Interaction Scripts -->
    <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>

    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        brand: {
                            gold: '#FDE104',
                            blue: '#0538B5',
                            darkblue: '#03267E',
                            red: '#ED0101',
                            light: '#F8FAFC',
                            dark: '#0A0A0A'
                        }
                    },
                    fontFamily: {
                        sans: ['Inter', 'sans-serif'],
                        serif: ['Playfair Display', 'serif']
                    }
                }
            }
        }
    </script>
    
    <style>
        body {
            font-family: 'Inter', sans-serif;
            background-color: #FFFFFF;
            color: #111827;
            -webkit-font-smoothing: antialiased;
        }
        .font-serif-heading {
            font-family: 'Playfair Display', serif;
        }
        .badge-brand-gold {
            background-color: #FDE104;
            color: #000000;
            font-weight: 800;
        }
        .badge-brand-blue {
            background-color: #0538B5;
            color: #FFFFFF;
            font-weight: 800;
        }
        .badge-brand-red {
            background-color: #ED0101;
            color: #FFFFFF;
            font-weight: 800;
        }
    </style>
    
    @yield('styles')
</head>
<body class="antialiased flex flex-col min-h-screen overflow-x-hidden">

    @include('partials.header')

    <!-- Flash Notifications -->
    @if(session('success'))
        <div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 6000)" class="fixed top-24 right-6 z-50 bg-neutral-900 text-white px-6 py-4 border-l-4 border-brand-blue shadow-2xl flex items-center space-x-4 transition-all duration-300">
            <i class="fa-solid fa-circle-check text-xl text-brand-blue"></i>
            <div>
                <p class="font-bold text-xs uppercase tracking-widest text-white">Notification</p>
                <p class="text-sm font-medium text-gray-200">{{ session('success') }}</p>
            </div>
            <button @click="show = false" class="ml-4 text-gray-400 hover:text-white"><i class="fa-solid fa-xmark"></i></button>
        </div>
    @endif

    <main class="flex-grow">
        @yield('content')
    </main>

    @include('partials.footer')

    @include('partials.whatsapp-widget')

    <!-- Mobile-First Sticky Bottom CTA Bar -->
    <div class="md:hidden fixed bottom-0 left-0 right-0 z-40 bg-white border-t border-gray-200 p-3 flex space-x-2 shadow-2xl">
        <a href="https://wa.me/2348031234567?text=Hello%20Frantyapp,%20I%20am%20interested%20in%20Abuja%20properties." target="_blank" class="flex-1 py-3 bg-emerald-600 text-white text-xs font-bold uppercase tracking-widest text-center flex items-center justify-center space-x-1.5">
            <i class="fa-brands fa-whatsapp text-base"></i>
            <span>WhatsApp Advisor</span>
        </a>
        <a href="{{ route('properties.index') }}" class="flex-1 py-3 bg-brand-blue text-white text-xs font-bold uppercase tracking-widest text-center flex items-center justify-center space-x-1.5">
            <i class="fa-solid fa-house-chimney text-white"></i>
            <span>Browse Properties</span>
        </a>
    </div>

    <!-- AOS Scroll Animations JS -->
    <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
    <!-- Leaflet JS -->
    <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            AOS.init({
                duration: 900,
                once: false,
                offset: 80,
                easing: 'ease-out-cubic'
            });
        });
    </script>

    @yield('scripts')
</body>
</html>
