<?php
/**
 * Home companies section.
 *
 * @package ALFASMART
 */

$companies = alfasmart_query_posts_or_fallback('companies', alfasmart_company_items());
?>
<section class="as-companies-section" id="companies" aria-labelledby="as-companies-title">
    <div class="container as-section-container">
        <div class="as-companies-head as-reveal">
            <p class="as-section-kicker"><?php echo esc_html(alfasmart_get_home_field('home_companies_kicker', 'Our Group')); ?></p>
            <h2 class="as-section-heading" id="as-companies-title"><?php echo esc_html(alfasmart_get_home_field('home_companies_title', 'Four focused companies. One unified vision.')); ?></h2>
        </div>
        <div class="swiper as-company-swiper">
            <div class="swiper-wrapper row as-card-row as-company-grid">
                <?php foreach ($companies as $company) : ?>
                    <div class="swiper-slide col-12 col-sm-6 col-lg-3">
                        <?php get_template_part('template-parts/components/company-card', null, array('company' => $company, 'heading' => 'h3')); ?>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
    </div>
</section>
