<?php include 'includes/header.php'; ?>
<?php include 'includes/db.php'; ?>

<?php
$quality = $conn->query("SELECT * FROM quality_accreditation LIMIT 1")->fetch_assoc();
?>

<section class="quality-section">
    <div class="quality-container">
        <div class="quality-text">
            <?= $quality ? $quality['body_text'] : '<p>No content available.</p>'; ?>
        </div>
        <div class="quality-image">
            <?php if($quality && !empty($quality['image'])): ?>
            <img src="<?= $quality['image'] ?>" alt="Quality & Accreditation">
            <?php else: ?>
            <img src="assets/images/default.jpg" alt="Placeholder">
            <?php endif; ?>
        </div>
    </div>
</section>

<style>
.quality-section { padding:60px 20px; background:#f9f9f9; }
.quality-container { display:flex; flex-wrap:nowrap; align-items:center; max-width:1200px; margin:auto; }
.quality-text { width:55%; padding-right:20px; font-size:1rem; color:#333; }
.quality-image { width:35%; }
.quality-image img { width:100%; height:auto; display:block; border-radius:8px; }
@media(max-width:900px){
    .quality-container { flex-wrap:wrap; text-align:center; }
    .quality-text, .quality-image { width:100%; padding:10px 0; }
    .quality-text { padding-right:0; }
}
</style>

<?php include 'includes/footer.php'; ?>
