{% for park in parks %}
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden transform transition-transform hover:-translate-y-1">
    {% if park.photos.first %}
        <img src="{{ park.photos.first.image.url }}" 
             alt="{{ park.name }}"
             class="w-full h-48 object-cover">
    {% else %}
        <div class="w-full h-48 bg-gray-200 dark:bg-gray-700 flex items-center justify-center">
            <span class="text-gray-400">No image available</span>
        </div>
    {% endif %}
    
    <div class="p-4">
        <h3 class="text-xl font-semibold mb-2">
            <a href="{% url 'parks:park_detail' slug=park.slug %}" 
               class="text-blue-600 dark:text-blue-400 hover:underline">{{ park.name }}</a>
        </h3>
        <p class="text-gray-600 dark:text-gray-400 mb-2">{{ park.location }}</p>
        <div class="flex justify-between items-center">
            <span class="text-sm text-gray-500 dark:text-gray-400">
                {{ park.rides.count }} attractions
            </span>
            {% if park.average_rating %}
                <div class="flex items-center">
                    <span class="text-yellow-400 mr-1">★</span>
                    <span class="text-gray-600 dark:text-gray-400">{{ park.average_rating|floatformat:1 }}/10</span>
                </div>
            {% endif %}
        </div>
        {% if park.status != 'OPERATING' %}
            <div class="mt-2">
                <span class="px-2 py-1 text-xs rounded-full
                    {% if park.status == 'CLOSED_TEMP' %}bg-yellow-100 text-yellow-800
                    {% elif park.status == 'CLOSED_PERM' %}bg-red-100 text-red-800
                    {% elif park.status == 'UNDER_CONSTRUCTION' %}bg-blue-100 text-blue-800
                    {% elif park.status == 'DEMOLISHED' %}bg-gray-100 text-gray-800
                    {% endif %}">
                    {{ park.get_status_display }}
                </span>
            </div>
        {% endif %}
    </div>
</div>
{% empty %}
<div class="col-span-full text-center py-8">
    <p class="text-gray-500 dark:text-gray-400">No parks found matching your criteria.</p>
</div>
{% endfor %}
