<?php
/** Expects $d (district row) in scope. */
$propCount = count_properties_in_district((int)$d['id']);
?>
<a href="/district/<?= e($d['slug']) ?>" class="district-card">
  <img src="/<?= e($d['hero_image']) ?>" alt="<?= e($d['name']) ?> — investment location in Kigali" loading="lazy" width="400" height="533">
  <div class="info">
    <div class="tag"><?= (int)$propCount ?> Listings · <?= e($d['avg_price_indicator']) ?></div>
    <h3><?= e($d['name']) ?></h3>
    <p style="color:rgba(255,255,255,0.8);font-size:var(--fs-sm);margin:0;"><?= e($d['summary']) ?></p>
  </div>
</a>
