<?php $__env->startSection('title', 'Partner Directory - Our Collaborative Network'); ?>
<?php $__env->startSection('meta-description', 'Explore our network of verified organizational partners committed to health advocacy and community development.'); ?>

<?php $__env->startSection('content'); ?>
<!-- Hero Section -->
<div class="bg-gradient-to-r from-blue-600 to-blue-700 shadow-lg">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <div class="text-center">
            <h1 class="text-4xl md:text-5xl font-serif font-bold text-white mb-4">
                <i class="fas fa-handshake mr-3"></i>
                Partner Directory
            </h1>
            <p class="text-xl text-blue-100 max-w-3xl mx-auto">
                Discover our network of trusted organizations collaborating to advance health advocacy, research, and community development.
            </p>
        </div>

        <!-- Statistics -->
        <div class="grid grid-cols-2 md:grid-cols-4 gap-4 mt-10">
            <div class="bg-white bg-opacity-20 backdrop-blur-sm rounded-lg p-4 text-center">
                <p class="text-3xl font-bold text-white"><?php echo e($partners->total()); ?></p>
                <p class="text-blue-100 text-sm">Total Partners</p>
            </div>
            <div class="bg-white bg-opacity-20 backdrop-blur-sm rounded-lg p-4 text-center">
                <p class="text-3xl font-bold text-white"><?php echo e($partners->where('is_verified', true)->count()); ?></p>
                <p class="text-blue-100 text-sm">Verified</p>
            </div>
            <div class="bg-white bg-opacity-20 backdrop-blur-sm rounded-lg p-4 text-center">
                <p class="text-3xl font-bold text-white"><?php echo e($partners->where('is_featured', true)->count()); ?></p>
                <p class="text-blue-100 text-sm">Featured</p>
            </div>
            <div class="bg-white bg-opacity-20 backdrop-blur-sm rounded-lg p-4 text-center">
                <p class="text-3xl font-bold text-white"><?php echo e(count($types)); ?></p>
                <p class="text-blue-100 text-sm">Categories</p>
            </div>
        </div>
    </div>
</div>

<!-- Breadcrumb -->
<div class="bg-gray-50 border-b border-gray-200">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3">
        <nav class="flex items-center space-x-2 text-sm text-gray-600" aria-label="Breadcrumb">
            <a href="<?php echo e(url('/')); ?>" class="hover:text-blue-600 transition flex items-center">
                <i class="fas fa-home mr-1"></i>Home
            </a>
            <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
            <span class="text-gray-900 font-medium">Partners Directory</span>
        </nav>
    </div>
</div>

<!-- Main Content -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
    <!-- Filters -->
    <div class="bg-white rounded-lg shadow-md p-6 mb-8">
        <form method="GET" action="<?php echo e(route('partners.public.index')); ?>" class="flex flex-col md:flex-row gap-4">
            <!-- Search -->
            <div class="flex-1">
                <label for="search" class="sr-only">Search partners</label>
                <div class="relative">
                    <input type="text" 
                           name="search" 
                           id="search"
                           value="<?php echo e($filters['search'] ?? ''); ?>"
                           placeholder="Search organizations..."
                           class="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                    <i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
                </div>
            </div>

            <!-- Type Filter -->
            <div class="md:w-64">
                <label for="type" class="sr-only">Filter by type</label>
                <select name="type" 
                        id="type"
                        class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                    <option value="">All Organization Types</option>
                    <?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($value); ?>" <?php echo e(($filters['type'] ?? '') == $value ? 'selected' : ''); ?>>
                            <?php echo e($label); ?>

                        </option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>

            <!-- Filter Button -->
            <button type="submit" class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
                <i class="fas fa-filter mr-2"></i>
                Filter
            </button>

            <?php if(!empty($filters['search']) || !empty($filters['type'])): ?>
                <a href="<?php echo e(route('partners.public.index')); ?>" 
                   class="px-6 py-3 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition text-center">
                    <i class="fas fa-times mr-2"></i>
                    Clear
                </a>
            <?php endif; ?>
        </form>
    </div>

    <?php if(session('success')): ?>
        <div class="mb-6 p-4 bg-green-100 border border-green-400 text-green-700 rounded-lg">
            <i class="fas fa-check-circle mr-2"></i>
            <?php echo e(session('success')); ?>

        </div>
    <?php endif; ?>

    <!-- Featured Partners -->
    <?php ($featuredPartners = $partners->where('is_featured', true)->take(3)); ?>
    <?php if($featuredPartners->count() > 0): ?>
        <div class="mb-12">
            <h2 class="text-2xl font-serif font-bold text-gray-900 mb-6">
                <i class="fas fa-star text-yellow-500 mr-2"></i>
                Featured Partners
            </h2>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                <?php $__currentLoopData = $featuredPartners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $partner): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="bg-gradient-to-br from-yellow-50 to-orange-50 rounded-lg shadow-lg overflow-hidden border-2 border-yellow-400">
                        <?php if($partner->logo): ?>
                            <div class="h-32 bg-white flex items-center justify-center p-4">
                                <img src="<?php echo e(asset('storage/' . $partner->logo)); ?>" 
                                     alt="<?php echo e($partner->organization_name); ?>"
                                     class="max-h-full max-w-full object-contain">
                            </div>
                        <?php else: ?>
                            <div class="h-32 bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center">
                                <i class="fas fa-building text-white text-4xl"></i>
                            </div>
                        <?php endif; ?>
                        <div class="p-5">
                            <div class="flex items-start justify-between mb-2">
                                <h3 class="font-serif font-bold text-lg text-gray-900 line-clamp-1">
                                    <?php echo e($partner->organization_name); ?>

                                </h3>
                                <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded-full">
                                    <i class="fas fa-star"></i>
                                </span>
                            </div>
                            <p class="text-sm text-gray-600 mb-3">
                                <i class="fas fa-tag mr-1"></i>
                                <?php echo e($partner->type_label); ?>

                            </p>
                            <p class="text-gray-700 text-sm line-clamp-2 mb-4">
                                <?php echo e(Str::limit($partner->description, 100)); ?>

                            </p>
                            <a href="<?php echo e(route('partners.public.show', $partner)); ?>" 
                               class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
                                View Profile
                                <i class="fas fa-arrow-right ml-2"></i>
                            </a>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    <?php endif; ?>

    <!-- All Partners Grid -->
    <?php if($partners->count() > 0): ?>
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
            <?php $__currentLoopData = $partners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $partner): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow">
                    <?php if($partner->logo): ?>
                        <div class="h-32 bg-gray-50 flex items-center justify-center p-4">
                            <img src="<?php echo e(asset('storage/' . $partner->logo)); ?>" 
                                 alt="<?php echo e($partner->organization_name); ?>"
                                 class="max-h-full max-w-full object-contain">
                        </div>
                    <?php else: ?>
                        <div class="h-32 bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center">
                            <i class="fas fa-building text-white text-4xl"></i>
                        </div>
                    <?php endif; ?>
                    <div class="p-5">
                        <div class="flex items-start justify-between mb-2">
                            <h3 class="font-serif font-bold text-lg text-gray-900 line-clamp-1">
                                <?php echo e($partner->organization_name); ?>

                            </h3>
                            <?php if($partner->is_verified): ?>
                                <span class="text-green-500" title="Verified Partner">
                                    <i class="fas fa-check-circle"></i>
                                </span>
                            <?php endif; ?>
                        </div>
                        <p class="text-sm text-gray-600 mb-3">
                            <i class="fas fa-tag mr-1"></i>
                            <?php echo e($partner->type_label); ?>

                        </p>
                        <?php if($partner->description): ?>
                            <p class="text-gray-700 text-sm line-clamp-2 mb-4">
                                <?php echo e(Str::limit($partner->description, 100)); ?>

                            </p>
                        <?php endif; ?>
                        <div class="flex items-center justify-between">
                            <a href="<?php echo e(route('partners.public.show', $partner)); ?>" 
                               class="inline-flex items-center text-blue-600 hover:text-blue-800 font-medium">
                                View Profile
                                <i class="fas fa-arrow-right ml-2"></i>
                            </a>
                            <?php if($partner->website): ?>
                                <a href="<?php echo e($partner->website); ?>" 
                                   target="_blank"
                                   rel="noopener noreferrer"
                                   class="text-gray-400 hover:text-gray-600">
                                    <i class="fas fa-external-link-alt"></i>
                                </a>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        <!-- Pagination -->
        <div class="mt-10">
            <?php echo e($partners->withQueryString()->links()); ?>

        </div>
    <?php else: ?>
        <div class="text-center py-16">
            <i class="fas fa-search text-6xl text-gray-300 mb-4"></i>
            <h3 class="text-xl font-semibold text-gray-700 mb-2">No Partners Found</h3>
            <p class="text-gray-500 mb-6">Try adjusting your search or filter criteria.</p>
            <a href="<?php echo e(route('partners.public.index')); ?>" 
               class="inline-flex items-center px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
                <i class="fas fa-redo mr-2"></i>
                View All Partners
            </a>
        </div>
    <?php endif; ?>

    <!-- Become a Partner CTA -->
    <div class="mt-16 bg-gradient-to-r from-green-600 to-green-700 rounded-2xl shadow-xl p-8 md:p-12 text-center">
        <h2 class="text-3xl font-serif font-bold text-white mb-4">
            Become Our Partner
        </h2>
        <p class="text-green-100 max-w-5xl mx-auto mb-8">
            Join our growing network of organizations committed to making a difference in health advocacy and community development. Partner with us to create lasting impact.
        </p>
        <a href="<?php echo e(route('register.role.partner')); ?>" 
           class="inline-flex items-center px-8 py-4 bg-white text-green-700 rounded-lg font-semibold hover:bg-green-50 transition shadow-lg">
            <i class="fas fa-handshake mr-2"></i>
            Apply for Partnership
        </a>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.site', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/www/sshia.org/sshia/resources/views/partners/index.blade.php ENDPATH**/ ?>