{% set sitemapResultsHome = craft.entries()
    .section('homepage')
%}
{% set sitemapResultsSearch = craft.entries()
    .section('search')
%}
{% set sitemapResultsSitemap = craft.entries()
    .section('sitemap')
%}
{% set sitemapResultsPages = craft.entries()
    .section('pages')
%}
{% set sitemapResultsHomes = craft.entries()
    .section('homes')
%}
{% set sitemapResultsNews = craft.entries()
    .section('news')
%}
{% set sitemapResultsResources = craft.entries()
    .section('resources')
%}

{% set buttonClasses = 'w-full bg-white-primary sm:bg-transparent text-black-primary font-body lg:text-lg rounded-md sm:rounded-none px-6 py-3 sm:p-0 flex flex-row justify-start items-center sm:col-span-6 md:col-span-4 lg:col-span-3 transition-colors duration-700 xs:hover:bg-mintyy-gray-ii sm:hover:bg-transparent sm:hover:text-brand-terracotta-aa focus:border-brand-terracotta-i active:border-brand-terracotta-i focus:ring-2 focus:ring-brand-terracotta-i active:ring-2 active:ring-brand-terracotta-i' %}

<section id="sitemapResultsPanel" class="sitemap-results-panel w-full relative">
    <div class="container-wrapper sm:max-w-7xl sm:mx-auto">
        <div class="padding-wrapper w-full px-6 sm:px-8 lg:px-10 py-6 sm:py-10 lg:py-12 xl:py-16 flex flex-col justify-start items-start gap-12 sm:gap-16 lg:gap-20 xl:gap-24">
            <div class="section-wrapper w-full flex flex-col justify-start items-start">
                <h2 class="w-full text-center sm:w-auto font-body text-brand-terracotta-aa font-bold text-3xl lg:text-4xl">
                    Pages
                </h2>
                <div class="grid-wrapper w-full flex flex-col justify-start items-start sm:grid sm:grid-cols-12 gap-2 sm:gap-4 lg:gap-6 xl:gap-8 2xl:gap-12 mt-6 lg:mt-8">
                    {% for result in sitemapResultsHome %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                    {% for result in sitemapResultsSearch %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                    {% for result in sitemapResultsSitemap %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                    {% for result in sitemapResultsPages %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                </div>
            </div>
            <div class="section-wrapper w-full flex flex-col justify-start items-start">
                <h2 class="w-full text-center sm:w-auto font-body text-brand-terracotta-aa font-bold text-3xl lg:text-4xl">
                    Homes
                </h2>
                <div class="grid-wrapper w-full flex flex-col justify-start items-start sm:grid sm:grid-cols-12 gap-2 sm:gap-4 lg:gap-6 xl:gap-8 2xl:gap-12 mt-6 lg:mt-8">
                    {% for result in sitemapResultsHomes %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                </div>
            </div>
            <div class="section-wrapper w-full flex flex-col justify-start items-start">
                <h2 class="w-full text-center sm:w-auto font-body text-brand-terracotta-aa font-bold text-3xl lg:text-4xl">
                    News
                </h2>
                <div class="grid-wrapper w-full flex flex-col justify-start items-start sm:grid sm:grid-cols-12 gap-2 sm:gap-4 lg:gap-6 xl:gap-8 2xl:gap-12 mt-6 lg:mt-8">
                    {% for result in sitemapResultsNews %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                </div>
            </div>
            <div class="section-wrapper w-full flex flex-col justify-start items-start">
                <h2 class="w-full text-center sm:w-auto font-body text-brand-terracotta-aa font-bold text-3xl lg:text-4xl">
                    Resources
                </h2>
                <div class="grid-wrapper w-full flex flex-col justify-start items-start sm:grid sm:grid-cols-12 gap-2 sm:gap-4 lg:gap-6 xl:gap-8 2xl:gap-12 mt-6 lg:mt-8">
                    {% for result in sitemapResultsResources %}
                        <a href="{{ result.url }}" class="sitemap-link {{ buttonClasses }}">
                            {{ result.title }}
                        </a>
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
</section>