<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
        </main>
        <?php $this->need('sidebar.php'); ?>
    </div>
</div>

<footer class="nini-footer">
    <div class="container">
        <div class="footer-content">
            <div class="footer-logo">
                <span>🍼</span>
                <span><?php $this->options->title(); ?></span>
            </div>
            <p class="footer-text"><?php $this->options->description(); ?></p>
            
            <div class="footer-social">
                <?php if ($this->options->telegram): ?>
                    <a href="<?php $this->options->telegram(); ?>" target="_blank"><i class="fa-brands fa-telegram"></i></a>
                <?php endif; ?>
                <?php if ($this->options->instagram): ?>
                    <a href="<?php $this->options->instagram(); ?>" target="_blank"><i class="fa-brands fa-instagram"></i></a>
                <?php endif; ?>
                <?php if ($this->options->whatsapp): ?>
                    <a href="<?php $this->options->whatsapp(); ?>" target="_blank"><i class="fa-brands fa-whatsapp"></i></a>
                <?php endif; ?>
                <?php if ($this->options->twitter): ?>
                    <a href="<?php $this->options->twitter(); ?>" target="_blank"><i class="fa-brands fa-twitter"></i></a>
                <?php endif; ?>
            </div>
            
            <?php
            $footerPages = $this->options->footerPages;
            if (!empty($footerPages) && is_array($footerPages)):
            ?>
                <div class="footer-pages">
                    <?php
                    $this->widget('Widget_Contents_Page_List')->to($pages);
                    while($pages->next()):
                        if (in_array($pages->permalink, (array)$footerPages)):
                    ?>
                        <a href="<?php $pages->permalink(); ?>"><?php $pages->title(); ?></a>
                    <?php endif; endwhile; ?>
                </div>
            <?php endif; ?>
            
            <div class="footer-bottom">
                <p>© <?php echo toPersianNumbers(date('Y') - 622); ?> <?php $this->options->title(); ?> - قدرت گرفته از <a href="https://typecho.org" target="_blank" style="color: #FFFFFF;">تایپچو</a></p>
            </div>
        </div>
    </div>
</footer>

<?php $this->footer(); ?>

<!-- لایت‌باکس برای گالری -->
<div id="simpleLightboxModal" class="slb-modal">
    <span id="simpleLightboxClose" class="slb-close">&times;</span>
    <button id="simpleLightboxPrev" class="slb-prev">&#10095;</button>
    <img id="simpleLightboxImg" class="slb-content">
    <button id="simpleLightboxNext" class="slb-next">&#10094;</button>
</div>

<!-- دکمه بازگشت به بالا -->
<a href="#" id="backToTopBtn" class="back-to-top"><i class="fa-solid fa-arrow-up"></i></a>

<!-- اسکریپت‌های پوسته (بدون Bootstrap) -->
<script src="<?php $this->options->themeUrl('js/main.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('js/gallery.js'); ?>"></script>

<!-- متغیر سراسری برای پاسخ به کامنت -->
<?php if ($this->is('post') || $this->is('page')): ?>
<script>
    window.respondId = '<?php $this->respondId(); ?>';
</script>
<script src="<?php $this->options->themeUrl('js/comments.js'); ?>"></script>
<?php endif; ?>

</body>
</html>