<?php
/**
 * Home why choose section.
 *
 * @package ALFASMART
 */
$growth_image = alfasmart_get_image_url(alfasmart_get_home_field('home_growth_image'), 'why-choose.webp');
$growth_items = (array) alfasmart_get_home_field('home_growth_items', array());
?>
<section class="as-growth-section" aria-labelledby="as-growth-title">
    <div class="container as-section-container">
        <div class="as-growth-head as-reveal">
            <p class="as-section-kicker"><?php echo esc_html(alfasmart_get_home_field('home_growth_kicker', 'Why Choose Us')); ?></p>
            <h2 class="as-section-heading" id="as-growth-title"><?php echo esc_html(alfasmart_get_home_field('home_growth_title', 'Built for Growth. Driven by Value.')); ?></h2>
        </div>
        <div class="row as-layout-row as-growth-row">
            <div class="col-12 col-lg-6">
                <img class="as-growth-image as-reveal" src="<?php echo esc_url($growth_image); ?>" alt="<?php echo esc_attr(alfasmart_get_home_field('home_growth_image_alt', 'Construction team reviewing project plans')); ?>">
            </div>
            <div class="col-12 col-lg-6 as-growth-list">
                <?php foreach ($growth_items as $item) : ?>
                    <article class="as-growth-item as-reveal">
                        <h3><span><?php echo esc_html($item['number'] ?? ''); ?></span> <?php echo esc_html($item['title'] ?? ''); ?></h3>
                        <p><?php echo esc_html($item['description'] ?? ''); ?></p>
                    </article>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="as-experience-flow">
            <strong class="as-experience-word" aria-hidden="true"><?php echo esc_html(alfasmart_get_home_field('home_experience_word', 'EXPERIENCE')); ?></strong>
        </div>
    </div>
</section>
