<div id="other-content">
        <h2>Explore More About Chai</h2>
        <ul>
            <?php for ($i = 1; $i <= 4; $i++): 
                $image = get_field("card_{$i}_image");
                $title = get_field("card_{$i}_title");
                $link  = get_field("card_{$i}_link");

                if ($title && $link): ?>
                    <li>
                        <a href="<?php echo esc_url($link); ?>">
                            <?php 
                            if ($image) {
                                if (is_array($image)) {
                                    $img_url = $image['url'];
                                    $img_alt = $image['alt'] ?: $title;
                                } else {
                                    $img_url = $image;
                                    $img_alt = $title;
                                }
                                echo '<img src="'.esc_url($img_url).'" alt="'.esc_attr($img_alt).'" width="502" height="656">';
                            }
                            ?>
                            <h3><?php echo esc_html($title); ?></h3>
                        </a>
                    </li>
                <?php endif; 
            endfor; ?>
        </ul>
    </div>

