<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"  xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"  xmlns:ama="http://typo3.org/ns/AmadeusAgentur/AmadeusNext/ViewHelpers"
      data-namespace-typo3-fluid="true">

{ama:pageCategory(pid: client.uid) -> f:variable(name: 'businesses')}

<div class="px-6 lg:px-12 flex flex-wrap justify-around gap-6 2xl:max-w-[80%] mx-auto mb-20">
    <div class="basis-full lg:basis-1/3">
        <v:content.resources.fal table="tx_amadeusnext_domain_model_client" field="logo" uid="{client.uid}" as="cl_logo">
            <f:image src="{cl_logo.0.url}" alt="{cl_logo.0.name}" width="{cl_logo.0.width}" height="{cl_logo.0.height}" class="mx-auto" id="kd-logo" />
        </v:content.resources.fal>
    </div>

    <div class="basis-full lg:basis-1/2 prose dark:prose-invert">
        <h2 class="text-center lg:text-left">{client.company}</h2>

        <div id="amds-kategorien" class="not-prose pb-6">
            <ul class="list-none">
                <f:for each="{businesses}" as="business">
                    <li class="inline-block px-4 py-3">
                        <f:if condition="{settings.enableBusinessLinks} == 1">
                            <f:then>
                                <f:link.action action="detail" controller="Business" pageUid="{settings.businessTargetPid}" arguments="{businessId: business.uid}">{business.title}</f:link.action>
                            </f:then>
                            <f:else>
                                {business.title}
                            </f:else>
                        </f:if>
                    </li>
                </f:for>
            </ul>
        </div>

        <div id="kundenprofil" class="py-12 text-center lg:text-left">
            {client.description}
        </div>
    </div>
</div>

<div id="stories-container" class="px-6 lg:px-12 2xl:max-w-[80%] mx-auto">
    <p class="font-bold font-heading my-6 text-2xl">Unsere Erfolgsstories</p>

    <div class="grid md:grid-cols-2 gap-6 lg:gap-24">
        <f:render partial="Case/Overview" arguments="{cases: cases}" />
    </div>
</div>
