{# Level-3-Template: /startups — SP Public Spring 26 #}
{# Card-Pattern: Brutalist 2b (Programm-Farb-Header) #}
{# Shared Pattern: doc/modernisation/b-130-sp-public-spring-26/shared-pattern-startup-card.md #}
{% extends "@StartPlatzStyleBundle/base.sp-public-spring-26.html.twig" %}
{% block topicColor %}blue{% endblock %}
{% block title %}Startups — STARTPLATZ{% endblock %}
{% block metaData %}
<meta name="description" content="{{ parentPage.metaDescription|default('Startups im STARTPLATZ Ökosystem — Köln und Düsseldorf') }}">
<link rel="canonical" href="{{ url('homepage_startups_home') }}">
<link rel="alternate" hreflang="de" href="{{ url('homepage_startups_home') }}">
<link rel="alternate" hreflang="en" href="{{ url('homepage_startups_home_english') }}">
{% endblock %}
{% block content %}
{# ===== HERO (kompakt, Blau→Gruen Gradient) ===== #}
<section class="diagonal-bottom stripe-decoration pt-28 pb-24 sm:pt-32 sm:pb-28"
style="background: linear-gradient(135deg, #0080bb 0%, #7ab800 100%);">
<div class="relative z-10 max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<h1 class="font-display text-4xl sm:text-5xl lg:text-6xl text-white mb-4">
{{ parentPage.title|default('Unsere Startups') }}
</h1>
<p class="text-lg text-white/90 max-w-2xl mx-auto">
{{ parentPage.teaser|default('Innovative Startups aus dem STARTPLATZ Ökosystem in Köln und Düsseldorf') }}
</p>
</div>
</section>
{# ===== FILTER + BANDED GRID ===== #}
<div x-data="startupFilter()">
{# --- Filter-Bar --- #}
<section class="py-8 sm:py-10">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<p class="text-sm text-sp-gray/60 mb-4">
<span x-text="visibleCount"></span> von {{ total }} Startups
</p>
<div class="flex flex-wrap gap-2">
<button @click="filter = 'alle'"
class="px-4 py-2 rounded-lg text-sm font-semibold transition-colors"
:class="filter === 'alle' ? 'bg-sp-blue text-white' : 'bg-sp-gray-light text-sp-gray hover:bg-sp-gray-mid'">
Alle ({{ total }})
</button>
{% for item in industries %}
{% if item.industry is not empty %}
<button @click="filter = '{{ item.industry|e('js') }}'"
class="px-4 py-2 rounded-lg text-sm font-semibold transition-colors"
:class="filter === '{{ item.industry|e('js') }}' ? 'bg-sp-blue text-white' : 'bg-sp-gray-light text-sp-gray hover:bg-sp-gray-mid'">
{{ item.industry }} ({{ item.number }})
</button>
{% endif %}
{% endfor %}
</div>
</div>
</section>
{# --- Startup-Grid mit Hintergrund-Baendern --- #}
{% set cardsPerBand = 6 %}
{% set totalCards = startups|length %}
{% set bands = ((totalCards / cardsPerBand)|round(0, 'ceil'))|default(1) %}
{% for band in 0..(bands - 1) %}
{% set bandStartups = startups|slice(band * cardsPerBand, cardsPerBand) %}
{% set isGray = (band % 2 == 1) %}
<section class="{{ isGray ? 'bg-sp-gray-light diagonal-both py-12 sm:py-14' : 'py-8 sm:py-10' }}">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
{% for startup in bandStartups %}
{# --- Programm-Farbe bestimmen (Prioritaet: Acc > GS > RP > SP > Neutral) --- #}
{% set teamTags = (startup.teamId and teams[startup.teamId] is defined) ? teams[startup.teamId].tags|default('') : '' %}
{% if '#badge-accelerator' in teamTags %}
{% set headerStyle = 'background: linear-gradient(135deg, #004a99 0%, #0088dd 100%)' %}
{% set progDot = 'bg-acc-blue' %}
{% set progText = 'text-acc-blue' %}
{% set progName = 'Accelerator' %}
{% elseif '#badge-gruenderstipendium' in teamTags %}
{% set headerStyle = 'background: linear-gradient(135deg, #a8614a 0%, #d9967a 100%)' %}
{% set progDot = 'bg-gs-terracotta' %}
{% set progText = 'text-gs-terracotta' %}
{% set progName = 'Gründerstipendium' %}
{% elseif '#badge-rheinland-pitch' in teamTags %}
{% set headerStyle = 'background: linear-gradient(135deg, #c42535 0%, #ef7480 100%)' %}
{% set progDot = 'bg-rp-red' %}
{% set progText = 'text-rp-red' %}
{% set progName = 'Rheinland Pitch' %}
{% elseif '#badge-startplatz' in teamTags %}
{% set headerStyle = 'background: linear-gradient(135deg, #5a8a00 0%, #8fd414 100%)' %}
{% set progDot = 'bg-sp-green' %}
{% set progText = 'text-sp-green-dark' %}
{% set progName = 'STARTPLATZ' %}
{% else %}
{% set headerStyle = 'background: linear-gradient(135deg, #5c5f64 0%, #8a8d92 100%)' %}
{% set progDot = '' %}
{% set progText = 'text-sp-gray' %}
{% set progName = '' %}
{% endif %}
<a href="{{ path('homepage_startup_single', {slug: startup.id ~ '-' ~ startup.slug|default('')}) }}"
class="card-brut block rounded-xl overflow-hidden group"
x-show="filter === 'alle' || filter === '{{ startup.industry|default('')|e('js') }}'">
{# === Farbiger Header (Gradient) === #}
<div class="px-6 py-5" style="{{ headerStyle }}">
<div class="flex items-center justify-between mb-1.5">
<span class="text-[11px] font-bold uppercase tracking-[0.15em] text-white/90">
{{ startup.industry|default('') }}
</span>
{% if startup.city|default(false) or startup.location|default(false) %}
<span class="text-[11px] font-semibold text-white/75">
{{ startup.city|default(startup.location) }}
</span>
{% endif %}
</div>
<h3 class="text-xl font-bold text-white leading-tight">{{ startup.name }}</h3>
</div>
{# === Weisser Body === #}
<div class="px-6 py-5 bg-white">
{% if startup.oneSentencePitch %}
{% set pitchClean = startup.oneSentencePitch|striptags|trim %}
<p class="text-sm text-sp-gray/70 leading-relaxed mb-4">
{{ (pitchClean|length > 140 ? pitchClean|slice(0, 140) ~ '…' : pitchClean)|raw }}
</p>
{% endif %}
{# Programm-Indikator #}
{% if progName %}
<div class="flex items-center gap-2 mb-3">
<span class="w-2 h-2 rounded-full {{ progDot }}"></span>
<span class="text-[10px] font-bold {{ progText }} uppercase tracking-wider">{{ progName }}</span>
</div>
{% endif %}
<span class="text-sm font-bold {{ progName ? progText : 'text-sp-gray' }}">Mehr erfahren →</span>
</div>
</a>
{% endfor %}
</div>
</div>
</section>
{% endfor %}
{# --- Keine Ergebnisse --- #}
<div x-show="visibleCount === 0" x-cloak class="text-center py-16">
<p class="text-sp-gray/60">Keine Startups in dieser Kategorie gefunden.</p>
</div>
{# --- Pagination --- #}
{% if maxPages > 1 %}
<nav class="flex items-center justify-center gap-2 py-12">
{% if thisPage > 1 %}
<a href="{{ path('homepage_startups_home', templateVars|merge({page: thisPage - 1})) }}"
class="px-4 py-2 rounded-lg text-sm font-semibold bg-sp-gray-light text-sp-gray hover:bg-sp-gray-mid transition-colors">
← Zurück
</a>
{% endif %}
<span class="px-4 py-2 text-sm text-sp-gray/60">
Seite {{ thisPage }} von {{ maxPages }}
</span>
{% if thisPage < maxPages %}
<a href="{{ path('homepage_startups_home', templateVars|merge({page: thisPage + 1})) }}"
class="px-4 py-2 rounded-lg text-sm font-semibold bg-sp-blue text-white hover:bg-sp-blue-dark transition-colors">
Weiter →
</a>
{% endif %}
</nav>
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
<script>
function startupFilter() {
const counts = {
'alle': {{ startups|length }},
{% for item in industries %}{% if item.industry is not empty %}'{{ item.industry|e('js') }}': {{ item.number }},{% endif %}
{% endfor %}
};
return {
filter: 'alle',
get visibleCount() {
return counts[this.filter] || 0;
}
}
}
</script>
{% endblock %}