<?php
if (!defined('ABSPATH')) exit;

/**
 * Enqueue CSS
 */
$css_path = get_stylesheet_directory() . '/assets/css/homepage/home_indicator.css';
if (file_exists($css_path)) {
  gc_enqueue_module_asset(
    'ul-home-indicator',
    get_stylesheet_directory_uri() . '/assets/css/homepage/home_indicator.css',
    'style',
    ['gc-global'],
    filemtime($css_path)
  );
}

/**
 * Enqueue JS (optional)
 */
$js_path = get_stylesheet_directory() . '/assets/js/homepage/home_indicator.js';
if (file_exists($js_path)) {
  gc_enqueue_module_asset(
    'ul-home-indicator-js',
    get_stylesheet_directory_uri() . '/assets/js/homepage/home_indicator.js',
    'script',
    [],
    filemtime($js_path),
    true
  );
}

/**
 * Content (edit these freely)
 * You can later replace these with ACF fields if you want.
 */
$indicators = [
  [
    'title' => '30+ Years of Excellence',
    'sub'   => 'Trusted automotive glass expertise since 1990s',
  ],
  [
    'title' => '4,000+ Monthly Installations',
    'sub'   => 'Proven capacity to handle high volume partnerships',
  ],
  [
    'title' => 'Multi State Coverage',
    'sub'   => 'Serving dealerships in AZ, FL, SC, CO',
  ],
  [
    'title' => 'A+ BBB Rating',
    'sub'   => 'AGSC Certified, AGRSS Registered',
  ],
];

?>

<section class="home-indicator" aria-label="Company indicators">
  <div class="container">
    <div class="home-indicator__bar" role="list">
      <?php foreach ($indicators as $item): ?>
        <div class="home-indicator__item" role="listitem">
          <div class="home-indicator__title"><?php echo esc_html($item['title']); ?></div>
          <div class="home-indicator__sub"><?php echo esc_html($item['sub']); ?></div>
        </div>
      <?php endforeach; ?>
    </div>
  </div>
</section>
