<?php
/**
 * Vision slider.
 *
 * @package ALFASMART
 */
if (empty($args['slides']) || ! is_array($args['slides'])) {
    $args['slides'] = array(
        array('title' => '01 // The Vision', 'copy' => 'To become a leading regional trading group recognized for reliability, diversification, and strategic impact.', 'image' => ''),
        array('title' => '02 // Our Mission', 'copy' => 'To connect markets with intelligent trading solutions, transparent partnerships, and disciplined execution across every business sector.', 'image' => ''),
        array('title' => '03 // Our Values', 'copy' => 'To build long-term commercial value through trust, reliability, strategic diversification, and responsible business growth.', 'image' => ''),
    );
}

$first_slide = reset($args['slides']);
?>
<div class="as-vision-graphic swiper as-about-swiper">
    <div class="swiper-wrapper">
        <?php foreach ($args['slides'] as $slide) : ?>
            <?php
            $slide_title = $slide['title'] ?? '';
            $slide_copy  = $slide['copy'] ?? '';
            $slide_image = alfasmart_get_image_url($slide['image'] ?? null, 'about.webp');
            ?>
            <article class="swiper-slide as-vision-slide" data-vision-title="<?php echo esc_attr($slide_title); ?>" data-vision-copy="<?php echo esc_attr($slide_copy); ?>">
                <img class="as-vision-line-art" src="<?php echo esc_url($slide_image); ?>" alt="" aria-hidden="true">
            </article>
        <?php endforeach; ?>
    </div>
    <div class="as-vision-card">
        <span class="as-vision-card-title"><?php echo esc_html($first_slide['title'] ?? ''); ?></span>
        <p class="as-vision-card-copy"><?php echo esc_html($first_slide['copy'] ?? ''); ?></p>
        <div class="as-about-swiper-pagination"></div>
    </div>
</div>
