<!-- Extended Footer Style -->
<footer class="mt-auto py-5 bg-dark text-light">
    <div class="container">
        <div class="row g-4">
            <!-- Company Info -->
            <div class="col-lg-3 col-md-6">
                <?php if (defined('USE_LOGO') && USE_LOGO && defined('LOGO_URL') && !empty(LOGO_URL)): ?>
                    <img src="<?php echo LOGO_URL; ?>" alt="<?php echo SITE_NAME; ?>" 
                        <?php echo (defined('FOOTER_LOGO_WIDTH') && FOOTER_LOGO_WIDTH) ? 'width="' . FOOTER_LOGO_WIDTH . '"' : ''; ?> 
                        class="mb-3">
                    <h5 class="visually-hidden"><?php echo SITE_NAME; ?></h5>
                <?php else: ?>
                    <h5 class="text-white fw-bold"><?php echo SITE_NAME; ?></h5>
                <?php endif; ?>
                <p class="text-light"><?php echo defined('SITE_TAGLINE') ? SITE_TAGLINE : ($lang_navigation['FOOTER_DEFAULT_TAGLINE'] ?? 'Your support portal for tickets and projects'); ?></p>
            </div>
            
            <!-- Quick Links -->
            <div class="col-lg-2 col-md-6">
                <h6 class="text-white fw-bold mb-3"><?php echo $lang_navigation['FOOTER_QUICK_LINKS'] ?? 'Quick Links'; ?></h6>
                <ul class="list-unstyled">
                    <li class="mb-2"><a href="<?php echo getCleanUrl('tickets'); ?>" class="text-light text-decoration-none"><?php echo $lang_navigation['FOOTER_LINK_SUPPORT_TICKETS'] ?? 'Support Tickets'; ?></a></li>
                    <?php if (isLoggedIn() && defined('ENABLE_PROJECTS') && ENABLE_PROJECTS): ?>
                    <li class="mb-2"><a href="<?php echo getCleanUrl('projects'); ?>" class="text-light text-decoration-none"><?php echo $lang_navigation['FOOTER_LINK_PROJECTS'] ?? 'Projects'; ?></a></li>
                    <?php endif; ?>
                    <?php if (defined('ENABLE_FAQS') && ENABLE_FAQS): ?>
                    <li class="mb-2"><a href="<?php echo getCleanUrl('faq'); ?>" class="text-light text-decoration-none"><?php echo $lang_navigation['FOOTER_LINK_FAQS'] ?? 'FAQs'; ?></a></li>
                    <?php endif; ?>
                    <?php if (defined('ENABLE_NEWS') && ENABLE_NEWS): ?>
                    <li class="mb-2"><a href="<?php echo getCleanUrl('news'); ?>" class="text-light text-decoration-none"><?php echo $lang_navigation['FOOTER_LINK_NEWS'] ?? 'News'; ?></a></li>
                    <?php endif; ?>
                    <?php if (defined('ENABLE_CONTACT') && ENABLE_CONTACT): ?>
                    <li class="mb-2"><a href="<?php echo getCleanUrl('contact'); ?>" class="text-light text-decoration-none"><?php echo $lang_navigation['FOOTER_LINK_CONTACT_US'] ?? 'Contact Us'; ?></a></li>
                    <?php endif; ?>
                    <?php if (defined('ENABLE_STORE') && ENABLE_STORE): ?>
                    <li class="mb-2"><a href="<?php echo getCleanUrl('store'); ?>" class="text-light text-decoration-none"><?php echo $lang_navigation['NAV_STORE'] ?? 'Store'; ?></a></li>
                    <?php endif; ?>
                </ul>
            </div>
            
            <!-- Services -->
            <div class="col-lg-2 col-md-6">
                <h6 class="text-white fw-bold mb-3"><?php echo $lang_navigation['FOOTER_SOCIAL_HEADING'] ?? 'Social'; ?></h6>
                <ul class="list-unstyled">
                <?php if (defined('SOCIAL_X') && SOCIAL_X !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_X); ?>" target="_blank"><i class="bi bi-twitter-x"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_X'] ?? 'X'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_FACEBOOK') && SOCIAL_FACEBOOK !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_FACEBOOK); ?>" target="_blank"><i class="bi bi-facebook"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_FACEBOOK'] ?? 'Facebook'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_INSTAGRAM') && SOCIAL_INSTAGRAM !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_INSTAGRAM); ?>" target="_blank"><i class="bi bi-instagram"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_INSTAGRAM'] ?? 'Instagram'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_LINKEDIN') && SOCIAL_LINKEDIN !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_LINKEDIN); ?>" target="_blank"><i class="bi bi-linkedin"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_LINKEDIN'] ?? 'LinkedIn'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_BLUESKY') && SOCIAL_BLUESKY !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_BLUESKY); ?>" target="_blank"><i class="bi bi-bluesky"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_BLUESKY'] ?? 'Bluesky'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_THREADS') && SOCIAL_THREADS !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_THREADS); ?>" target="_blank"><i class="bi bi-threads"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_THREADS'] ?? 'Threads'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_MASTODON') && SOCIAL_MASTODON !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_MASTODON); ?>" target="_blank"><i class="bi bi-mastodon"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_MASTODON'] ?? 'Mastodon'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>
    			<?php if (defined('SOCIAL_YOUTUBE') && SOCIAL_YOUTUBE !== ''): ?>
    			<li class="mb-2">
        			<span class="text-light">
			<a href="<?php echo htmlspecialchars(SOCIAL_YOUTUBE); ?>" target="_blank"><i class="bi bi-youtube"></i> <?php echo $lang_navigation['FOOTER_SOCIAL_YOUTUBE'] ?? 'Youtube'; ?></a>
        			</span>
    			</li>
    			<?php endif; ?>

            
                </ul>
            </div>
            
            <!-- Contact Info -->
            <div class="col-lg-3 col-md-6">
                <h6 class="text-white fw-bold mb-3"><?php echo $lang_navigation['FOOTER_CONTACT_INFO_HEADING'] ?? 'Contact Info'; ?></h6>
                <div class="text-light">
                    <?php if (defined('CONTACT_EMAIL') && CONTACT_EMAIL): ?>
                    <p class="mb-2">
                        <i class="bi bi-envelope me-2"></i>
                        <a href="mailto:<?php echo CONTACT_EMAIL; ?>" class="text-light text-decoration-none"><?php echo CONTACT_EMAIL; ?></a>
                    </p>
                    <?php endif; ?>
                    
                    <?php if (defined('CONTACT_PHONE_PRIMARY') && CONTACT_PHONE_PRIMARY): ?>
                    <p class="mb-2">
                        <i class="bi bi-telephone me-2"></i>
                        <a href="tel:<?php echo CONTACT_PHONE_PRIMARY; ?>" class="text-light text-decoration-none"><?php echo CONTACT_PHONE_PRIMARY; ?></a>
                    </p>
                    <?php endif; ?>
                    
                    <?php if (defined('CONTACT_ADDRESS_LINE1') && CONTACT_ADDRESS_LINE1): ?>
                    <p class="mb-2">
                        <i class="bi bi-geo-alt me-2"></i>
                        <?php echo CONTACT_ADDRESS_LINE1; ?>
                        <?php if (defined('CONTACT_ADDRESS_LINE2') && CONTACT_ADDRESS_LINE2): ?>
                        <br><span class="ms-3"><?php echo CONTACT_ADDRESS_LINE2; ?></span>
                        <?php endif; ?>
                        <?php if (defined('CONTACT_ADDRESS_CITY') && CONTACT_ADDRESS_CITY): ?>
                        <br><span class="ms-3">
                            <?php echo CONTACT_ADDRESS_CITY; ?>
                            <?php if (defined('CONTACT_ADDRESS_STATE') && CONTACT_ADDRESS_STATE): ?>
                            , <?php echo CONTACT_ADDRESS_STATE; ?>
                            <?php endif; ?>
                            <?php if (defined('CONTACT_ADDRESS_ZIP') && CONTACT_ADDRESS_ZIP): ?>
                            <?php echo CONTACT_ADDRESS_ZIP; ?>
                            <?php endif; ?>
                        </span>
                        <?php endif; ?>
                    </p>
                    <?php endif; ?>
                </div>
            </div>
            
            <!-- Business Hours -->
            <div class="col-lg-2 col-md-6">
                <h6 class="text-white fw-bold mb-3"><?php echo $lang_navigation['FOOTER_BUSINESS_HOURS_HEADING'] ?? 'Business Hours'; ?></h6>
                <div class="text-light small">
                    <?php if (defined('CONTACT_HOURS_WEEKDAY') && CONTACT_HOURS_WEEKDAY): ?>
                    <p class="mb-1"><strong><?php echo $lang_navigation['FOOTER_HOURS_MON_FRI'] ?? 'Mon - Fri:'; ?></strong><br><?php echo CONTACT_HOURS_WEEKDAY; ?></p>
                    <?php endif; ?>
                    <?php if (defined('CONTACT_HOURS_SATURDAY') && CONTACT_HOURS_SATURDAY): ?>
                    <p class="mb-1"><strong><?php echo $lang_navigation['FOOTER_HOURS_SATURDAY'] ?? 'Saturday:'; ?></strong><br><?php echo CONTACT_HOURS_SATURDAY; ?></p>
                    <?php endif; ?>
                    <?php if (defined('CONTACT_HOURS_SUNDAY') && CONTACT_HOURS_SUNDAY): ?>
                    <p class="mb-1"><strong><?php echo $lang_navigation['FOOTER_HOURS_SUNDAY'] ?? 'Sunday:'; ?></strong><br><?php echo CONTACT_HOURS_SUNDAY; ?></p>
                    <?php endif; ?>
                </div>
            </div>
        </div>
        
        <hr class="my-4 border-secondary">
        
        <!-- Bottom Row -->
        <div class="row align-items-center">
            <div class="col-md-6">
                <p class="mb-0 text-muted">&copy; <?php echo date('Y'); ?> <?php echo SITE_NAME; ?>. <?php echo $lang_navigation['FOOTER_ALL_RIGHTS_RESERVED'] ?? 'All rights reserved.'; ?></p>
            </div>
            <div class="col-md-6 text-md-end">
                <span class="text-muted"><?php if (defined('PAGE_PRIVACY') && PAGE_PRIVACY): ?> <a href="<?php echo getCleanUrl('privacy'); ?>"><?php echo $lang_navigation['FOOTER_PRIVACY'] ?? 'Privacy'; ?></a> - <?php endif; ?> <?php if (defined('PAGE_TERMS') && PAGE_TERMS): ?> <a href="<?php echo getCleanUrl('terms'); ?>"><?php echo $lang_navigation['FOOTER_TERMS'] ?? 'Terms'; ?></a> - <?php endif; ?> <?php echo $lang_navigation['FOOTER_POWERED_BY'] ?? 'Powered by'; ?> <a href="https://supportengine.cloud" target="_blank" class="text-light text-decoration-none"><?php echo $lang_navigation['FOOTER_SUPPORTENGINE_LINK_TEXT'] ?? 'SupportEngine'; ?></a></span>
                <?php // Custom Header Link
                if (defined('CUSTOM_HEADER') && CUSTOM_HEADER && defined('CUSTOM_HEADER_URL') && !empty(CUSTOM_HEADER_URL) && defined('CUSTOM_HEADER_NAME') && !empty(CUSTOM_HEADER_NAME)): ?>
                | <a href="<?php echo htmlspecialchars(CUSTOM_HEADER_URL); ?>" target="_blank" class="text-light text-decoration-none"><?php echo htmlspecialchars(CUSTOM_HEADER_NAME); ?></a>
                <?php endif; ?>
            </div>
        </div>
    </div>
</footer> 