    <!-- Footer -->
    <?php
    // Footer ayarlarını al
    $stmt = $pdo->query("SELECT setting_key, setting_value FROM settings WHERE setting_key LIKE 'footer_%'");
    $footerSettings = [];
    while ($row = $stmt->fetch()) {
        $footerSettings[$row['setting_key']] = $row['setting_value'];
    }
    
    // Varsayılan değerler
    $footer_logo = $footerSettings['footer_logo'] ?? '';
    $footer_description = $footerSettings['footer_description'] ?? 'Kayak ve snowboard firmalarını, eğitimcilerini bulun.';
    $footer_links = json_decode($footerSettings['footer_links'] ?? '[]', true);
    $footer_facebook = $footerSettings['footer_facebook'] ?? '';
    $footer_twitter = $footerSettings['footer_twitter'] ?? '';
    $footer_instagram = $footerSettings['footer_instagram'] ?? '';
    $footer_youtube = $footerSettings['footer_youtube'] ?? '';
    $footer_linkedin = $footerSettings['footer_linkedin'] ?? '';
    ?>
    <footer class="bg-dark text-white mt-5 py-5">
        <div class="container">
            <div class="row">
                <!-- Birinci Bölüm: Logo ve Site Tanıtım Metni -->
                <div class="col-lg-4 col-md-4 mb-4 mb-md-0">
                    <?php if ($footer_logo): ?>
                        <img src="<?= e($footer_logo) ?>" alt="<?= SITE_NAME ?>" class="mb-3" style="max-height: 60px; width: auto;">
                    <?php else: ?>
                        <h5 class="mb-3"><?= SITE_NAME ?></h5>
                    <?php endif; ?>
                    <p class="text-muted"><?= nl2br(e($footer_description)) ?></p>
                </div>
                
                <!-- İkinci Bölüm: Menü Linkleri -->
                <div class="col-lg-4 col-md-4 mb-4 mb-md-0">
                    <h5 class="mb-3">Hızlı Linkler</h5>
                    <ul class="list-unstyled">
                        <li class="mb-2"><a href="<?= SITE_URL ?>" class="text-white-50 text-decoration-none">Ana Sayfa</a></li>
                        <li class="mb-2"><a href="<?= SITE_URL ?>/companies.php" class="text-white-50 text-decoration-none">Firmalar</a></li>
                        <li class="mb-2"><a href="<?= SITE_URL ?>/blog.php" class="text-white-50 text-decoration-none">Blog</a></li>
                        <li class="mb-2"><a href="<?= SITE_URL ?>/company-register.php" class="text-white-50 text-decoration-none">Firma Üye Ol</a></li>
                        <?php if (!empty($footer_links)): ?>
                            <?php foreach ($footer_links as $link): ?>
                                <?php if (!empty($link['title']) && !empty($link['url'])): ?>
                                    <li class="mb-2"><a href="<?= e($link['url']) ?>" class="text-white-50 text-decoration-none" <?= isset($link['target']) && $link['target'] === '_blank' ? 'target="_blank"' : '' ?>><?= e($link['title']) ?></a></li>
                                <?php endif; ?>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </ul>
                </div>
                
                <!-- Üçüncü Bölüm: Sosyal Medya İkonları -->
                <div class="col-lg-4 col-md-4">
                    <h5 class="mb-3">Bizi Takip Edin</h5>
                    <div class="social-links">
                        <?php if ($footer_facebook): ?>
                            <a href="<?= e($footer_facebook) ?>" target="_blank" class="social-link me-3" title="Facebook">
                                <i class="fab fa-facebook-f fa-lg"></i>
                            </a>
                        <?php endif; ?>
                        <?php if ($footer_twitter): ?>
                            <a href="<?= e($footer_twitter) ?>" target="_blank" class="social-link me-3" title="Twitter">
                                <i class="fab fa-twitter fa-lg"></i>
                            </a>
                        <?php endif; ?>
                        <?php if ($footer_instagram): ?>
                            <a href="<?= e($footer_instagram) ?>" target="_blank" class="social-link me-3" title="Instagram">
                                <i class="fab fa-instagram fa-lg"></i>
                            </a>
                        <?php endif; ?>
                        <?php if ($footer_youtube): ?>
                            <a href="<?= e($footer_youtube) ?>" target="_blank" class="social-link me-3" title="YouTube">
                                <i class="fab fa-youtube fa-lg"></i>
                            </a>
                        <?php endif; ?>
                        <?php if ($footer_linkedin): ?>
                            <a href="<?= e($footer_linkedin) ?>" target="_blank" class="social-link me-3" title="LinkedIn">
                                <i class="fab fa-linkedin-in fa-lg"></i>
                            </a>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
            <hr class="my-4 bg-secondary">
            <div class="row">
                <div class="col-12 text-center">
                    <p class="text-muted mb-0">&copy; <?= date('Y') ?> <?= SITE_NAME ?>. Tüm hakları saklıdır.</p>
                </div>
            </div>
        </div>
    </footer>
    
    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <!-- jQuery -->
    <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
    <!-- Custom JS -->
    <script src="<?= ASSETS_URL ?>/js/main.js"></script>
</body>
</html>



