@extends('layouts.app')

@section('title', 'Frantyapp - Luxury Real Estate, Villas and Verified Lands in Abuja')
@section('meta_description', 'Discover verified FCDA land titles, diplomatic villas, duplexes, and prime investments across Maitama, Asokoro, Guzape, Katampe Extension, and Lagos.')

@section('content')
<!-- Hero Section (Above the Fold with Local Market Focus & Glassmorphic IDX Search) -->
<section class="relative bg-black text-white min-h-[660px] flex items-center justify-center overflow-hidden">
    <div class="absolute inset-0 z-0">
        <img src="{{ asset('assets/hero-bg.jpg') }}" alt="Frantyapp Abuja Real Estate" class="w-full h-full object-cover object-center opacity-50 scale-105 transition-transform duration-1000">
        <div class="absolute inset-0 bg-gradient-to-t from-black via-black/50 to-black/30"></div>
    </div>

    <div class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 text-center py-24 sm:py-28" data-aos="fade-up" data-aos-duration="1000">
        
        <h1 class="font-serif-heading font-extrabold text-4xl sm:text-6xl tracking-tight text-white leading-tight">
            Find your place in <span class="text-white">Abuja.</span>
        </h1>
        <div class="w-16 h-[2px] bg-brand-blue mx-auto mt-4 mb-4"></div>
        
        <p class="text-gray-300 text-base sm:text-xl font-light max-w-2xl mx-auto leading-relaxed" data-aos="fade-up" data-aos-delay="150">
            Discover diplomatic villas, hillside estate plots, duplexes, and prime commercial investments in Maitama, Guzape, Katampe, and Jabi.
        </p>

        <!-- Option C: Floating Ultra-Luxury Glassmorphic Search Bar -->
        <div class="mt-10 max-w-4xl mx-auto bg-white/95 backdrop-blur-md rounded-none p-6 sm:p-8 text-black shadow-2xl text-left border border-white/50" data-aos="fade-up" data-aos-delay="250">
            <form action="{{ route('properties.index') }}" method="GET" x-data="{ status: 'Buy' }">
                
                <div class="flex space-x-8 border-b border-gray-200 pb-3 mb-5 text-xs font-bold uppercase tracking-widest">
                    <button type="button" @click="status = 'Buy'" :class="status === 'Buy' ? 'text-brand-blue border-b-2 border-brand-blue -mb-[13px] pb-3 font-extrabold' : 'text-gray-400 hover:text-black'">
                        Buy Properties
                    </button>
                    <button type="button" @click="status = 'Rent'" :class="status === 'Rent' ? 'text-brand-blue border-b-2 border-brand-blue -mb-[13px] pb-3 font-extrabold' : 'text-gray-400 hover:text-black'">
                        Rent Properties
                    </button>
                    <input type="hidden" name="status" :value="status">
                </div>

                <div class="grid grid-cols-1 md:grid-cols-12 gap-3 items-center">
                    
                    <div class="md:col-span-5 relative">
                        <i class="fa-solid fa-magnifying-glass absolute left-4 top-3.5 text-gray-400 text-sm"></i>
                        <input type="text" name="keyword" placeholder="Maitama, Guzape, Katampe, Lekki..." class="w-full pl-11 pr-4 py-3.5 bg-gray-50/80 border border-gray-200 text-xs text-black placeholder-gray-400 focus:outline-none focus:bg-white focus:border-black font-medium rounded-none transition-all">
                    </div>

                    <div class="md:col-span-4">
                        <select name="property_type" class="w-full px-4 py-3.5 bg-gray-50/80 border border-gray-200 text-xs text-black focus:outline-none focus:bg-white focus:border-black font-medium rounded-none transition-all">
                            <option value="">All Property Categories</option>
                            <option value="Villa">Luxury Villa</option>
                            <option value="Land">FCDA Verified Land Plot</option>
                            <option value="House">Duplex / House</option>
                            <option value="Apartment">Serviced Apartment</option>
                        </select>
                    </div>

                    <div class="md:col-span-3">
                        <button type="submit" class="w-full py-4 bg-brand-blue text-white text-xs font-bold uppercase tracking-[0.2em] hover:bg-brand-darkblue transition-all flex items-center justify-center space-x-2 shadow-lg rounded-none">
                            <span>Search</span>
                            <i class="fa-solid fa-arrow-right text-xs"></i>
                        </button>
                    </div>

                </div>

            </form>
        </div>

    </div>
</section>

<!-- Dual-Approach Seller CTA & Buyer Alert Bar -->
<section class="bg-black text-white py-6 border-b border-neutral-800" data-aos="fade-up" data-aos-duration="800">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row items-center justify-between gap-4">
        <div class="flex items-center space-x-3 text-sm">
            <span class="text-xs font-bold uppercase tracking-widest text-brand-red">Seller Tool</span>
            <span class="text-gray-500">|</span>
            <span class="font-medium text-gray-200">Want to know what your property or land plot is worth in Abuja?</span>
        </div>
        <a href="{{ route('valuation') }}" class="px-6 py-2.5 bg-brand-blue text-white font-bold text-xs uppercase tracking-widest hover:bg-brand-darkblue shadow-md transition-colors rounded-none">
            Get Instant Home Valuation &rarr;
        </a>
    </div>
</section>

<!-- Major Homepage Promotions Carousel Section (Manageable from Admin) -->
@if(isset($promotions) && $promotions->count() > 0)
<section class="py-20 bg-neutral-900 text-white overflow-hidden border-b border-neutral-800" x-data="{
    activeSlide: 0,
    totalSlides: {{ $promotions->count() }},
    next() { this.activeSlide = (this.activeSlide + 1) % this.totalSlides; },
    prev() { this.activeSlide = (this.activeSlide - 1 + this.totalSlides) % this.totalSlides; }
}" x-init="setInterval(() => next(), 7000)">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <div class="flex flex-col md:flex-row md:items-end justify-between mb-10" data-aos="fade-up">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Exclusive Development Offers</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-white">Featured Real Estate and Land Promotions</h2>
            </div>
            
            <div class="flex items-center space-x-3 mt-4 md:mt-0">
                <button @click="prev()" class="w-11 h-11 border border-neutral-700 text-white hover:bg-white hover:text-black transition-all flex items-center justify-center">
                    <i class="fa-solid fa-chevron-left text-sm"></i>
                </button>
                <button @click="next()" class="w-11 h-11 border border-neutral-700 text-white hover:bg-white hover:text-black transition-all flex items-center justify-center">
                    <i class="fa-solid fa-chevron-right text-sm"></i>
                </button>
            </div>
        </div>

        <div class="relative overflow-hidden shadow-2xl border border-neutral-800 bg-black min-h-[480px]">
            @foreach($promotions as $index => $promo)
                <div x-show="activeSlide === {{ $index }}" x-transition:enter="transition ease-out duration-700" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" class="grid grid-cols-1 lg:grid-cols-12 items-center">
                    <div class="lg:col-span-7 h-72 lg:h-[480px] relative overflow-hidden bg-black">
                        <img src="{{ asset($promo->image) }}" alt="{{ $promo->title }}" class="w-full h-full object-cover">
                        <div class="absolute inset-0 bg-gradient-to-t from-black via-transparent to-black/30 lg:hidden"></div>
                        @if($promo->badge)
                            <span class="absolute top-6 left-6 px-4 py-1.5 bg-brand-blue text-white text-xs font-bold uppercase tracking-widest shadow-lg">
                                {{ $promo->badge }}
                            </span>
                        @endif
                    </div>
                    
                    <div class="lg:col-span-5 p-8 sm:p-12 space-y-6 bg-black/90 lg:bg-black">
                        @if($promo->location)
                            <span class="text-xs font-bold uppercase tracking-widest text-brand-blue flex items-center">
                                <i class="fa-solid fa-location-dot mr-2"></i> {{ $promo->location }}
                            </span>
                        @endif

                        <h3 class="font-serif-heading font-extrabold text-2xl sm:text-3xl text-white leading-tight">
                            {{ $promo->title }}
                        </h3>

                        @if($promo->subtitle)
                            <p class="text-gray-300 text-sm font-light leading-relaxed">
                                {{ $promo->subtitle }}
                            </p>
                        @endif

                        @if($promo->features)
                            <div class="space-y-2 pt-2 border-t border-neutral-800">
                                @foreach($promo->features as $feature)
                                    <div class="flex items-center space-x-2 text-xs text-gray-300">
                                        <i class="fa-solid fa-check-circle text-brand-blue"></i>
                                        <span>{{ $feature }}</span>
                                    </div>
                                @endforeach
                            </div>
                        @endif

                        @if($promo->price_tag)
                            <div class="pt-2">
                                <span class="text-[10px] uppercase font-bold text-gray-400 block tracking-widest">Investment Price</span>
                                <span class="font-serif-heading font-extrabold text-3xl text-white block mt-1">{{ $promo->price_tag }}</span>
                            </div>
                        @endif

                        <div class="pt-4">
                            <a href="{{ $promo->cta_link ?? route('contact') }}" class="inline-block px-8 py-4 bg-brand-blue text-white text-xs font-bold uppercase tracking-[0.2em] hover:bg-brand-darkblue transition-all shadow-lg">
                                {{ $promo->cta_text ?? 'Inquire About Promotion' }} &rarr;
                            </a>
                        </div>
                    </div>
                </div>
            @endforeach
        </div>

        <div class="flex justify-center space-x-2 mt-6">
            @foreach($promotions as $index => $promo)
                <button @click="activeSlide = {{ $index }}" :class="activeSlide === {{ $index }} ? 'w-8 bg-brand-blue' : 'w-2 bg-neutral-700'" class="h-2 transition-all duration-300"></button>
            @endforeach
        </div>

    </div>
</section>
@endif

<!-- Abuja Prime Districts Showcase (Option A & B) -->
<section class="py-24 sm:py-28 bg-white border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <!-- Option A: Architectural Editorial Header -->
        <div class="flex flex-col md:flex-row md:items-end justify-between mb-14" data-aos="fade-up">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Abuja Community Showcase</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-black">Abuja Prime Real Estate Districts</h2>
            </div>
            <a href="{{ route('neighborhoods.index') }}" class="mt-4 md:mt-0 text-xs font-bold uppercase tracking-widest text-brand-blue border-b-2 border-brand-blue pb-1 hover:text-brand-darkblue transition-colors">
                Explore All Districts &rarr;
            </a>
        </div>

        <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
            
            <a href="{{ route('neighborhoods.show', 'maitama-district') }}" data-aos="fade-up" data-aos-delay="100" class="relative h-84 overflow-hidden group border border-gray-200 rounded-none shadow-sm hover:shadow-2xl hover:-translate-y-1.5 transition-all duration-500">
                <img src="{{ asset('assets/properties/villa.jpg') }}" alt="Maitama District" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700 ease-out">
                <div class="absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent"></div>
                <div class="absolute bottom-6 left-6 text-white">
                    <span class="text-[10px] font-bold uppercase tracking-widest text-gray-300 block">FCT Diplomatic Precinct</span>
                    <h3 class="font-serif-heading font-bold text-2xl text-white mt-1">Maitama District</h3>
                    <span class="text-xs text-gray-300 font-light mt-1 block">Ambassadorial Villas</span>
                </div>
            </a>

            <a href="{{ route('neighborhoods.show', 'guzape-hillside') }}" data-aos="fade-up" data-aos-delay="200" class="relative h-84 overflow-hidden group border border-gray-200 rounded-none shadow-sm hover:shadow-2xl hover:-translate-y-1.5 transition-all duration-500">
                <img src="{{ asset('assets/properties/duplex.jpg') }}" alt="Guzape Hillside" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700 ease-out">
                <div class="absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent"></div>
                <div class="absolute bottom-6 left-6 text-white">
                    <span class="text-[10px] font-bold uppercase tracking-widest text-gray-300 block">High ROI Hillside</span>
                    <h3 class="font-serif-heading font-bold text-2xl text-white mt-1">Guzape Hillside</h3>
                    <span class="text-xs text-gray-300 font-light mt-1 block">Smart Estates and Plots</span>
                </div>
            </a>

            <a href="{{ route('neighborhoods.show', 'katampe-extension') }}" data-aos="fade-up" data-aos-delay="300" class="relative h-84 overflow-hidden group border border-gray-200 rounded-none shadow-sm hover:shadow-2xl hover:-translate-y-1.5 transition-all duration-500">
                <img src="{{ asset('assets/properties/inspection/IMG-20260506-WA0006.jpg') }}" alt="Katampe Extension" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700 ease-out">
                <div class="absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent"></div>
                <div class="absolute bottom-6 left-6 text-white">
                    <span class="text-[10px] font-bold uppercase tracking-widest text-gray-300 block">Master-Planned</span>
                    <h3 class="font-serif-heading font-bold text-2xl text-white mt-1">Katampe Extension</h3>
                    <span class="text-xs text-gray-300 font-light mt-1 block">FCDA Allocated Layouts</span>
                </div>
            </a>

            <a href="{{ route('neighborhoods.show', 'jabi-waterfront') }}" data-aos="fade-up" data-aos-delay="400" class="relative h-84 overflow-hidden group border border-gray-200 rounded-none shadow-sm hover:shadow-2xl hover:-translate-y-1.5 transition-all duration-500">
                <img src="{{ asset('assets/properties/penthouse.jpg') }}" alt="Jabi Waterfront" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700 ease-out">
                <div class="absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent"></div>
                <div class="absolute bottom-6 left-6 text-white">
                    <span class="text-[10px] font-bold uppercase tracking-widest text-gray-300 block">Lake View</span>
                    <h3 class="font-serif-heading font-bold text-2xl text-white mt-1">Jabi Waterfront</h3>
                    <span class="text-xs text-gray-300 font-light mt-1 block">Serviced Penthouses</span>
                </div>
            </a>

        </div>
    </div>
</section>

<!-- Dynamic Featured Properties Grid (Options A, B & D) -->
<section class="py-24 sm:py-28 bg-brand-light border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <div class="flex flex-col md:flex-row md:items-end justify-between mb-14" data-aos="fade-up">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Active Inventory</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-black">Featured Properties in Abuja</h2>
            </div>
            <a href="{{ route('properties.index') }}" class="mt-4 md:mt-0 text-xs font-bold uppercase tracking-widest text-brand-blue border-b-2 border-brand-blue pb-1 hover:text-brand-darkblue transition-colors">
                Browse Full Catalog &rarr;
            </a>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
            @foreach($featuredProperties as $index => $property)
                <div data-aos="fade-up" data-aos-delay="{{ ($index % 3 + 1) * 100 }}" class="bg-white border border-gray-200 overflow-hidden hover:border-black hover:shadow-2xl hover:-translate-y-2 transition-all duration-500 group flex flex-col rounded-none">
                    
                    <div class="relative h-68 overflow-hidden bg-gray-100">
                        <img src="{{ $property->main_image }}" alt="{{ $property->title }}" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700 ease-out">
                        
                        <div class="absolute top-4 left-4 flex space-x-2">
                            <span class="px-3 py-1 bg-brand-blue text-white text-[10px] font-bold uppercase tracking-widest shadow rounded-none">
                                For {{ $property->status }}
                            </span>
                            <span class="px-3 py-1 bg-neutral-900 text-white text-[10px] font-bold uppercase tracking-widest border border-gray-700 shadow rounded-none">
                                {{ $property->property_type }}
                            </span>
                        </div>

                        <!-- Option D: AGIS Verified Stamp Seal -->
                        <div class="absolute top-4 right-4">
                            <span class="px-2.5 py-1 bg-black/90 text-white text-[9px] font-extrabold uppercase tracking-widest border border-white/20 shadow flex items-center space-x-1.5 backdrop-blur-sm">
                                <i class="fa-solid fa-shield-halved text-brand-blue text-[10px]"></i>
                                <span>AGIS VERIFIED</span>
                            </span>
                        </div>
                    </div>

                    <div class="p-6 flex-grow flex flex-col justify-between space-y-4">
                        <div>
                            <span class="font-serif-heading font-bold text-2xl text-black block">
                                ₦{{ number_format($property->price, 0) }}
                            </span>
                            
                            <h3 class="font-serif-heading font-bold text-lg text-black mt-2 group-hover:text-brand-blue transition-colors line-clamp-1">
                                <a href="{{ route('properties.show', $property->slug) }}">{{ $property->title }}</a>
                            </h3>
                            
                            <p class="text-gray-500 text-xs mt-1.5 font-normal flex items-center">
                                <i class="fa-solid fa-location-dot text-brand-blue mr-1.5"></i>
                                <span>{{ $property->address }}, {{ $property->city }}</span>
                            </p>
                        </div>

                        <div class="pt-4 border-t border-gray-100 flex items-center justify-between text-xs text-gray-600 font-medium">
                            @if($property->bedrooms > 0)
                                <span><strong>{{ $property->bedrooms }}</strong> Beds</span>
                            @endif
                            @if($property->bathrooms > 0)
                                <span><strong>{{ $property->bathrooms }}</strong> Baths</span>
                            @endif
                            <span class="text-[10px] text-brand-blue font-extrabold uppercase tracking-wider flex items-center space-x-1 truncate max-w-[140px]" title="{{ $property->title_document ?? 'FCDA C of O' }}">
                                <i class="fa-solid fa-circle-check text-[9px] shrink-0"></i>
                                <span class="truncate">{{ Str::limit($property->title_document ?? 'FCDA C of O', 16) }}</span>
                            </span>
                        </div>

                        <div class="pt-2">
                            <a href="{{ route('properties.show', $property->slug) }}" class="block w-full py-3.5 text-center bg-brand-blue text-white text-xs font-bold uppercase tracking-widest hover:bg-brand-darkblue transition-all shadow-md rounded-none">
                                View Details and Schedule Visit
                            </a>
                        </div>
                    </div>

                </div>
            @endforeach
        </div>

    </div>
</section>

<!-- AGIS Title Verification Guarantee Banner -->
<section class="py-24 sm:py-28 bg-black text-white" data-aos="fade-up" data-aos-duration="1000">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="grid grid-cols-1 lg:grid-cols-12 gap-12 items-center">
            
            <div class="lg:col-span-7 space-y-6" data-aos="fade-right" data-aos-delay="100">
                <span class="text-xs font-bold uppercase tracking-[0.3em] text-gray-400 block">
                    FCDA and AGIS Guarantee
                </span>
                <div class="w-12 h-[2px] bg-brand-blue my-2"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-5xl text-white leading-tight">
                    100% Title Verification Guarantee in Abuja
                </h2>
                <p class="text-gray-300 text-base leading-relaxed font-light">
                    Every land plot and residential villa listed by Frantyapp undergoes direct legal title search at <strong>Abuja Geographic Information Systems (AGIS)</strong> to guarantee zero double-allocation or unapproved layout risks.
                </p>
                <div class="pt-2 flex flex-wrap gap-4">
                    <a href="https://wa.me/2348031234567?text=Hello%20Frantyapp,%20I%20want%20to%20verify%20a%20land%20title%20in%20Abuja." target="_blank" class="px-8 py-4 bg-brand-blue text-white text-xs font-bold uppercase tracking-[0.2em] hover:bg-brand-darkblue transition-colors shadow-lg rounded-none">
                        Request AGIS Search Advisory
                    </a>
                </div>
            </div>

            <div class="lg:col-span-5 border border-neutral-800 bg-neutral-900 p-8 sm:p-10 space-y-6 rounded-none shadow-2xl" data-aos="fade-left" data-aos-delay="200">
                <h3 class="font-serif-heading font-bold text-xl text-white">Title Verification Steps</h3>
                <div class="space-y-4 text-xs text-gray-300 font-light leading-relaxed">
                    <div class="flex items-start space-x-3">
                        <i class="fa-solid fa-check text-brand-blue mt-1"></i>
                        <span>Direct survey beacon check against FCDA cadastre maps.</span>
                    </div>
                    <div class="flex items-start space-x-3">
                        <i class="fa-solid fa-check text-brand-blue mt-1"></i>
                        <span>AGIS file status search (C of O and R-of-O verification).</span>
                    </div>
                    <div class="flex items-start space-x-3">
                        <i class="fa-solid fa-check text-brand-blue mt-1"></i>
                        <span>Zero dual-allocation guarantee.</span>
                    </div>
                </div>
            </div>

        </div>
    </div>
</section>

<!-- Physical Site Inspection & Advisory Team Section -->
<section class="py-24 sm:py-28 bg-brand-light border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <div class="flex flex-col md:flex-row md:items-end justify-between mb-14" data-aos="fade-up">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Physical Verification and Field Inspections</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-black">On-Site Inspections and AGIS Title Advisory</h2>
            </div>
            <a href="{{ route('gallery.index') }}" class="mt-4 md:mt-0 text-xs font-bold uppercase tracking-widest text-brand-blue border-b-2 border-brand-blue pb-1 hover:text-brand-darkblue transition-colors">
                View All Inspection Records &rarr;
            </a>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
            @forelse($inspectionGalleries as $index => $item)
                <div data-aos="fade-up" data-aos-delay="{{ ($index + 1) * 100 }}" class="bg-white border border-gray-200 overflow-hidden group hover:border-black hover:shadow-2xl transition-all duration-500 rounded-none">
                    <div class="h-60 overflow-hidden bg-gray-100 relative">
                        <img src="{{ asset($item->image) }}" alt="{{ $item->title }}" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700">
                        <span class="absolute top-4 left-4 bg-brand-blue text-white text-[10px] font-bold uppercase tracking-widest px-3 py-1">
                            {{ $item->category }}
                        </span>
                    </div>
                    <div class="p-6 space-y-3">
                        <h3 class="font-serif-heading font-bold text-xl text-black">{{ $item->title }}</h3>
                        <p class="text-gray-600 text-xs leading-relaxed font-light">
                            {{ $item->description }}
                        </p>
                        <div class="pt-2 border-t border-gray-100 flex items-center justify-between text-[11px] font-bold text-brand-blue">
                            <span>AGIS Verified Search</span>
                            <i class="fa-solid fa-circle-check"></i>
                        </div>
                    </div>
                </div>
            @empty
                <div class="col-span-3 text-center py-8 text-gray-500 text-xs">No inspection records uploaded yet.</div>
            @endforelse
        </div>

    </div>
</section>

<!-- Dedicated Agents Section -->
<section class="py-24 sm:py-28 bg-white border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="text-center max-w-2xl mx-auto mb-16" data-aos="fade-up">
            <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Dedicated Advisors</span>
            <div class="w-12 h-[2px] bg-brand-blue mx-auto mt-2 mb-3"></div>
            <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-black">Guided by Certified Real Estate Consultants</h2>
        </div>

        <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
            @foreach($agents as $index => $agent)
                <div data-aos="fade-up" data-aos-delay="{{ ($index + 1) * 100 }}" class="border border-gray-200 p-8 text-center flex flex-col items-center bg-white hover:border-black hover:shadow-2xl hover:-translate-y-1.5 transition-all duration-500 rounded-none">
                    <img src="{{ asset($agent->photo) }}" alt="{{ $agent->name }}" class="w-32 h-32 rounded-none object-cover border border-gray-300 shadow-sm mb-4">
                    <h3 class="font-serif-heading font-bold text-xl text-black">{{ $agent->name }}</h3>
                    <span class="text-[10px] font-bold uppercase tracking-wider text-brand-blue mt-1 block">{{ $agent->title }}</span>

                    <p class="text-gray-500 text-xs mt-4 line-clamp-3 leading-relaxed font-light px-2">
                        {{ $agent->bio }}
                    </p>
                    <div class="mt-6 pt-5 border-t border-gray-100 w-full flex justify-center space-x-3">
                        <a href="https://wa.me/{{ preg_replace('/[^0-9]/', '', $agent->whatsapp ?? $agent->phone) }}" target="_blank" class="px-5 py-2.5 bg-emerald-600 text-white text-[10px] font-bold uppercase tracking-widest hover:bg-emerald-700 transition-all rounded-none">
                            WhatsApp
                        </a>
                        <a href="tel:{{ $agent->phone }}" class="px-5 py-2.5 border border-black text-black text-[10px] font-bold uppercase tracking-widest hover:bg-black hover:text-white transition-all rounded-none">
                            Call
                        </a>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
</section>

<!-- Team Operations & Field Gallery Section -->
<section class="py-24 sm:py-28 bg-neutral-900 text-white border-b border-neutral-800">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <div class="flex flex-col md:flex-row md:items-end justify-between mb-14" data-aos="fade-up">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Team Operations & Field Presence</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-white">Our Team in Action</h2>
            </div>
            <a href="{{ route('gallery.index') }}" class="mt-4 md:mt-0 text-xs font-bold uppercase tracking-widest text-brand-blue border-b-2 border-brand-blue pb-1 hover:text-white transition-colors">
                View Full Team Gallery &rarr;
            </a>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
            @forelse($teamGalleries as $index => $tItem)
                <div data-aos="fade-up" data-aos-delay="{{ ($index + 1) * 100 }}" class="bg-black border border-neutral-800 overflow-hidden group hover:border-brand-blue transition-all duration-500 rounded-none">
                    <div class="h-64 overflow-hidden bg-neutral-800 relative">
                        <img src="{{ asset($tItem->image) }}" alt="{{ $tItem->title }}" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700">
                        <span class="absolute top-4 left-4 bg-brand-blue text-white text-[10px] font-bold uppercase tracking-widest px-3 py-1">
                            Team Field Ops
                        </span>
                    </div>
                    <div class="p-6 space-y-2">
                        <h3 class="font-serif-heading font-bold text-lg text-white">{{ $tItem->title }}</h3>
                        <p class="text-gray-400 text-xs leading-relaxed font-light">
                            {{ $tItem->description }}
                        </p>
                    </div>
                </div>
            @empty
                <div class="col-span-3 text-center py-8 text-gray-500 text-xs">No team operation photos uploaded yet.</div>
            @endforelse
        </div>

    </div>
</section>

<!-- Latest Real Estate Insights and Market Reports (Blog Section) -->
<section class="py-24 sm:py-28 bg-brand-light border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        
        <div class="flex flex-col md:flex-row md:items-end justify-between mb-14" data-aos="fade-up">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Market Intelligence</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-black">Latest Insights and Abuja Reports</h2>
            </div>
            <a href="{{ route('blog.index') }}" class="mt-4 md:mt-0 text-xs font-bold uppercase tracking-widest text-brand-blue border-b-2 border-brand-blue pb-1 hover:text-brand-darkblue transition-colors">
                View All Articles &rarr;
            </a>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
            @foreach($blogPosts as $index => $post)
                <div data-aos="fade-up" data-aos-delay="{{ ($index + 1) * 100 }}" class="border border-gray-200 bg-white flex flex-col group hover:border-black hover:shadow-2xl hover:-translate-y-1.5 transition-all duration-500 rounded-none">
                    <div class="h-52 overflow-hidden bg-gray-100">
                        <img src="{{ asset($post->image) }}" alt="{{ $post->title }}" class="w-full h-full object-cover group-hover:scale-108 transition-transform duration-700 ease-out">
                    </div>
                    <div class="p-6 flex-grow flex flex-col justify-between space-y-4">
                        <div>
                            <span class="text-[10px] font-bold uppercase tracking-widest text-brand-blue block mb-1">{{ $post->category }}</span>
                            <h3 class="font-serif-heading font-bold text-lg text-black group-hover:text-brand-blue transition-colors line-clamp-2">
                                <a href="{{ route('blog.show', $post->slug) }}">{{ $post->title }}</a>
                            </h3>
                            <p class="text-gray-500 text-xs mt-2 line-clamp-3 leading-relaxed font-light">
                                {{ $post->excerpt }}
                            </p>
                        </div>
                        <div class="pt-4 border-t border-gray-100 flex items-center justify-between">
                            <span class="text-[10px] text-gray-400 font-semibold">{{ $post->published_at ? $post->published_at->format('M d, Y') : 'Recent' }}</span>
                            <a href="{{ route('blog.show', $post->slug) }}" class="text-xs font-bold uppercase tracking-widest text-black hover:text-brand-blue transition-colors">
                                Read Report &rarr;
                            </a>
                        </div>
                    </div>
                </div>
            @endforeach
        </div>

    </div>
</section>

<!-- Full-Width Interactive Google Maps Section (Wuse 2 Abuja Headquarters) -->
<section class="py-24 bg-white border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-10" data-aos="fade-up">
        <div class="flex flex-col md:flex-row md:items-end justify-between gap-4">
            <div>
                <span class="text-xs font-bold uppercase tracking-[0.25em] text-brand-blue block">Headquarters and Office Location</span>
                <div class="w-12 h-[2px] bg-brand-blue mt-2 mb-3"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-4xl text-black">Visit Frantyap Homes 633 in Wuse 2, Abuja</h2>
            </div>
            <div class="text-xs text-gray-700 space-y-1 font-medium bg-gray-50 p-4 border border-gray-200">
                <p class="font-bold text-black"><i class="fa-solid fa-building text-brand-blue mr-2"></i> Suite 11, First Floor Eastley Park Plaza</p>
                <p><i class="fa-solid fa-location-dot text-brand-blue mr-2"></i> No 5 Bathurst Street off Aminu Kano Crescent, Wuse 2, FCT-Abuja</p>
                <p><i class="fa-solid fa-phone text-brand-blue mr-2"></i> 09126262525 / 08065351599</p>
            </div>
        </div>
    </div>

    <div class="w-full h-96 sm:h-[500px] bg-gray-100 border-y border-gray-200 shadow-inner overflow-hidden relative" data-aos="fade-up">
        <iframe 
            src="https://maps.google.com/maps?q=Aminu%20Kano%20Crescent%2C%20Wuse%202%2C%20Abuja&t=&z=15&ie=UTF8&iwloc=&output=embed" 
            class="w-full h-full border-0 filter contrast-[1.05]" 
            allowfullscreen="" 
            loading="lazy" 
            referrerpolicy="no-referrer-when-downgrade">
        </iframe>
    </div>
</section>

<!-- Homepage Direct Contact & Consultation Advisory Form Section -->
<section class="py-24 sm:py-28 bg-black text-white">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8" data-aos="fade-up">
        <div class="grid grid-cols-1 lg:grid-cols-12 gap-12 items-center">
            
            <div class="lg:col-span-5 space-y-6" data-aos="fade-right" data-aos-delay="100">
                <span class="text-xs font-bold uppercase tracking-[0.3em] text-gray-400 block">Consultation Advisory</span>
                <div class="w-12 h-[2px] bg-brand-blue my-2"></div>
                <h2 class="font-serif-heading font-extrabold text-3xl sm:text-5xl text-white leading-tight">
                    Speak With a Senior Abuja Real Estate Advisor
                </h2>
                <p class="text-gray-300 text-sm sm:text-base leading-relaxed font-light">
                    Have questions about acquiring FCDA verified land, Kubwa Phase 1 and 2 plots, ambassadorial villas in Maitama, or planning a portfolio investment? Send us a message for immediate corporate advisory.
                </p>
                <div class="space-y-4 pt-2 text-xs text-gray-300 font-light">
                    <div class="flex items-start space-x-3">
                        <i class="fa-solid fa-location-dot text-brand-blue text-base mt-1"></i>
                        <span>Suite 11, First Floor Eastley Park Plaza, No 5 Bathurst Street off Aminu Kano Crescent, Wuse 2, FCT-Abuja.</span>
                    </div>
                    <div class="flex items-center space-x-3">
                        <i class="fa-solid fa-phone text-brand-blue text-base"></i>
                        <span>09126262525 / 08065351599</span>
                    </div>
                    <div class="flex items-center space-x-3">
                        <i class="fa-solid fa-envelope text-brand-blue text-base"></i>
                        <span>frantyaphomes633@gmail.com</span>
                    </div>
                </div>
            </div>

            <div class="lg:col-span-7 bg-neutral-900 border border-neutral-800 p-8 sm:p-10 shadow-2xl rounded-none" data-aos="fade-left" data-aos-delay="200">
                <h3 class="font-serif-heading font-bold text-2xl text-white mb-6">Send Consultation Request</h3>

                <form action="{{ route('contact.store') }}" method="POST" class="space-y-4">
                    @csrf

                    <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                        <div>
                            <label class="block text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-1">Full Name</label>
                            <input type="text" name="name" required placeholder="John Doe" class="w-full px-4 py-3 bg-black border border-neutral-800 text-xs text-white placeholder-gray-500 focus:outline-none focus:border-brand-blue font-medium rounded-none">
                        </div>
                        <div>
                            <label class="block text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-1">Email Address</label>
                            <input type="email" name="email" required placeholder="john@example.com" class="w-full px-4 py-3 bg-black border border-neutral-800 text-xs text-white placeholder-gray-500 focus:outline-none focus:border-brand-blue font-medium rounded-none">
                        </div>
                    </div>

                    <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                        <div>
                            <label class="block text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-1">Phone / WhatsApp</label>
                            <input type="tel" name="phone" required placeholder="+234..." class="w-full px-4 py-3 bg-black border border-neutral-800 text-xs text-white placeholder-gray-500 focus:outline-none focus:border-brand-blue font-medium rounded-none">
                        </div>
                        <div>
                            <label class="block text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-1">Inquiry Category</label>
                            <select name="subject" class="w-full px-4 py-3 bg-black border border-neutral-800 text-xs text-white focus:outline-none focus:border-brand-blue font-medium rounded-none">
                                <option value="Kubwa Phase 1 and 2 Land / Foundation">Kubwa Phase 1 and 2 Land / Foundation</option>
                                <option value="Land Plot Acquisition">Land Plot Acquisition (FCDA/AGIS)</option>
                                <option value="Luxury Villa Purchase">Luxury Villa Purchase</option>
                                <option value="Property Listing / Sales">Sell My Property in Abuja</option>
                                <option value="General Investment Inquiry">General Investment Consultation</option>
                            </select>
                        </div>
                    </div>

                    <div>
                        <label class="block text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-1">Message / Requirements</label>
                        <textarea name="message" rows="4" required placeholder="Tell us about your target location, budget, or timeline..." class="w-full px-4 py-3 bg-black border border-neutral-800 text-xs text-white placeholder-gray-500 focus:outline-none focus:border-brand-blue font-medium rounded-none"></textarea>
                    </div>

                    <button type="submit" class="w-full py-4 bg-brand-blue text-white text-xs font-bold uppercase tracking-[0.2em] hover:bg-brand-darkblue transition-colors shadow-lg rounded-none">
                        Submit Advisory Request
                    </button>
                </form>
            </div>

        </div>
    </div>
</section>
@endsection
