<?php
/**
 * Footer Layout — Gmind Institute
 *
 * Site-wide footer included by all pages.
 * Contains 4-column grid (About, Quick Links, Courses, Contact)
 * and a copyright bar.
 *
 * Expected PHP variables:
 *   $settings (optional) — key-value pairs from the settings table
 */

// Extract settings with sensible defaults
$phone    = $settings['contact_phone']    ?? '9305640290';
$email    = $settings['contact_email']    ?? 'info@gmind.in';
$address  = $settings['address']          ?? '123 Education Street, New Delhi, India';
$facebook = $settings['social_facebook']  ?? 'https://facebook.com/gmindinstitute';
$twitter  = $settings['social_twitter']   ?? 'https://twitter.com/gmindinstitute';
$youtube  = $settings['social_youtube']   ?? 'https://youtube.com/@gmindinstitute';
$instagram= $settings['social_instagram'] ?? 'https://instagram.com/gmindinstitute';
?>

    <!-- ============================================================
         Site Footer
         ============================================================ -->
    <footer class="site-footer" role="contentinfo" aria-label="Site footer">
        <div class="container">
            <div class="footer-grid">

                <!-- About Column -->
                <div class="footer-about">
                    <div class="footer-logo">
                        <span class="logo-text">GMIND</span>
                        <span class="logo-subtext">INSTITUTE</span>
                    </div>
                    <p class="footer-desc">
                        Gmind Institute is a leading computer education centre offering government-recognised diploma and certificate courses. We provide industry-oriented training with 100% job placement assistance to help you build a successful career in IT.
                    </p>
                    <div class="footer-social" aria-label="Follow us on social media">
                        <!-- Facebook -->
                        <a href="<?= htmlspecialchars($facebook, ENT_QUOTES, 'UTF-8') ?>" target="_blank" rel="noopener noreferrer" aria-label="Follow us on Facebook">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"/></svg>
                        </a>
                        <!-- Twitter / X -->
                        <a href="<?= htmlspecialchars($twitter, ENT_QUOTES, 'UTF-8') ?>" target="_blank" rel="noopener noreferrer" aria-label="Follow us on Twitter">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
                        </a>
                        <!-- YouTube -->
                        <a href="<?= htmlspecialchars($youtube, ENT_QUOTES, 'UTF-8') ?>" target="_blank" rel="noopener noreferrer" aria-label="Subscribe on YouTube">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>
                        </a>
                        <!-- Instagram -->
                        <a href="<?= htmlspecialchars($instagram, ENT_QUOTES, 'UTF-8') ?>" target="_blank" rel="noopener noreferrer" aria-label="Follow us on Instagram">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>
                        </a>
                    </div>
                </div>

                <!-- Quick Links Column -->
                <div class="footer-col">
                    <h4>Quick Links</h4>
                    <ul class="footer-links">
                        <li><a href="<?= url('/') ?>">Home</a></li>
                        <li><a href="<?= url('/about') ?>">About Us</a></li>
                        <li><a href="<?= url('/courses') ?>">Courses</a></li>
                        <li><a href="<?= url('/admission') ?>">Admission</a></li>
                        <li><a href="<?= url('/exam') ?>">Online Exam</a></li>
                        <li><a href="<?= url('/blog') ?>">Blog</a></li>
                        <li><a href="<?= url('/news') ?>">News</a></li>
                        <li><a href="<?= url('/contact') ?>">Contact</a></li>
                    </ul>
                </div>

                <!-- Courses Column -->
                <div class="footer-col">
                    <h4>Courses</h4>
                    <ul class="footer-links">
                        <li><a href="<?= url('/courses/adca') ?>">ADCA</a></li>
                        <li><a href="<?= url('/courses/dca') ?>">DCA</a></li>
                        <li><a href="<?= url('/courses/tally-prime') ?>">Tally Prime</a></li>
                        <li><a href="<?= url('/courses/python') ?>">Python Programming</a></li>
                        <li><a href="<?= url('/courses/web-design') ?>">Web Design</a></li>
                        <li><a href="<?= url('/courses/graphic-design') ?>">Graphic Design</a></li>
                        <li><a href="<?= url('/courses/ccc') ?>">CCC</a></li>
                    </ul>
                </div>

                <!-- Contact Info Column -->
                <div class="footer-col">
                    <h4>Contact Info</h4>
                    <div class="footer-contact-item">
                        <span class="icon" aria-hidden="true">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/><circle cx="12" cy="10" r="3"/></svg>
                        </span>
                        <span><?= htmlspecialchars($address, ENT_QUOTES, 'UTF-8') ?></span>
                    </div>
                    <div class="footer-contact-item">
                        <span class="icon" aria-hidden="true">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-6-6 19.79 19.79 0 01-3.07-8.67A2 2 0 014.11 2h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z"/></svg>
                        </span>
                        <a href="tel:<?= htmlspecialchars($phone, ENT_QUOTES, 'UTF-8') ?>"><?= htmlspecialchars($phone, ENT_QUOTES, 'UTF-8') ?></a>
                    </div>
                    <div class="footer-contact-item">
                        <span class="icon" aria-hidden="true">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg>
                        </span>
                        <a href="mailto:<?= htmlspecialchars($email, ENT_QUOTES, 'UTF-8') ?>"><?= htmlspecialchars($email, ENT_QUOTES, 'UTF-8') ?></a>
                    </div>
                    <div class="footer-contact-item">
                        <span class="icon" aria-hidden="true">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
                        </span>
                        <span>Mon-Sat: 9:00 AM - 7:00 PM</span>
                    </div>
                </div>

            </div><!-- /.footer-grid -->
        </div><!-- /.container -->

        <!-- Copyright Bar -->
        <div class="footer-copyright">
            <div class="container">
                <p>&copy; 2026 Gmind Institute. All Rights Reserved. | Designed with excellence</p>
            </div>
        </div>
    </footer>
