<?php

/* ==========================
   ABOUT VILLAGE
========================== */

$about = mysqli_query($conn,"
SELECT *
FROM village_about
WHERE village_id='$village_id'
LIMIT 1
");

$data = mysqli_fetch_assoc($about);

/* FULL DESCRIPTION */
$description = $data['description'] ?? 'Village information will appear here.';

/* SHORT DESCRIPTION (350 chars) */
$short_text = mb_substr(strip_tags($description), 0, 350);

?>

<div class="about-section">

<h2 class="section-title">
<?php echo $data['title'] ?? 'About Village'; ?>
</h2>

<div class="about-box">

<div class="about-image">

<?php if(!empty($data['image'])){ ?>

<img src="/digital_panchayat/uploads/villages/<?php echo $data['image']; ?>" alt="Village Image">

<?php } ?>

</div>

<div class="about-text">

<p>
<?php echo nl2br($short_text); ?>...
</p>

<br>

<a class="read-more-btn" href="about_detail.php">
आगे ओर पढ़े ं→
</a>

</div>

</div>

</div>