<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title><?= $this->renderSection('title'); ?> </title>
    <meta name="description" content="">
    <meta name="keywords" content="">

    <!-- Favicons -->
    <link href="<?= base_url() ?>assets/favicon.png" rel="icon">
    <link href="<?= base_url() ?>assets/apple-touch-icon.png" rel="apple-touch-icon">

    <!-- Fonts -->
    <link href="https://fonts.googleapis.com" rel="preconnect">
    <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">

    <!-- Vendor CSS Files -->
    <link href="<?= base_url() ?>assets/frontend/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?= base_url() ?>assets/frontend/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
    <link href="<?= base_url() ?>assets/frontend/vendor/aos/aos.css" rel="stylesheet">

    <?= $this->renderSection('css'); ?>
    <?= $this->renderSection('styles'); ?>

    <!-- Main CSS File -->
    <link href="<?= base_url() ?>assets/frontend/css/main.css" rel="stylesheet">

</head>

<body class="index-page">

    <header id="header" class="header d-flex align-items-center fixed-top">
        <div class="container-fluid position-relative d-flex align-items-center justify-content-between">

            <a href="<?= url_to('home') ?>" class="logo d-flex align-items-center me-auto me-xl-0">
                <!-- Uncomment the line below if you also wish to use an image logo -->
                <img src="assets/logo.png" alt="BetPawa Logo">
                <!-- <h1 class="sitename">BetPawa</h1> -->
            </a>

            <nav id="navmenu" class="navmenu">
                <ul>
                    <li><a href="<?= url_to('home') ?>" class="<?php if (current_route() == 'home') : ?> active <?php endif; ?>">Home</a></li>
                    <li><a href="<?= url_to('signin') ?>" class="<?php if (current_route() == 'signin') : ?> active <?php endif; ?>">Sign In</a></li>
                    <li><a href="<?= url_to('signout') ?>" class="<?php if (current_route() == 'signout') : ?> active <?php endif; ?>">Sign Out</a></li>
                </ul>
                <i class="mobile-nav-toggle d-xl-none bi bi-list"></i>
            </nav>

            <div class="header-social-links">
                <a class="btn btn-outline-light btn-sm" href="<?= url_to('admin_home') ?>">Admin Panel</a>
            </div>

        </div>
    </header>

    <main class="main">
        <?= $this->renderSection('content'); ?>
    </main>

    <footer id="footer" class="footer dark-background">

        <div class="container">
            <div class="row gy-3">
                <div class="col-lg-3 col-md-6 d-flex">
                    <i class="bi bi-geo-alt icon"></i>
                    <div class="address">
                        <h4>Address</h4>
                        <p><?= get_address()->street ?></p>
                        <p><?= join(', ', [get_address()->district, get_address()->region]) ?></p>
                        <p></p>
                    </div>

                </div>

                <div class="col-lg-3 col-md-6 d-flex">
                    <i class="bi bi-telephone icon"></i>
                    <div>
                        <h4>Contact</h4>
                        <p>
                            <strong>Phone:</strong> <span><?= get_address()->phone ?></span><br>
                            <strong>Email:</strong> <span><?= get_address()->email ?></span><br>
                        </p>
                    </div>
                </div>

                <div class="col-lg-3 col-md-6 d-flex">
                    <i class="bi bi-clock icon"></i>
                    <div>
                        <h4>Opening Hours</h4>
                        <p>
                            <strong>Mon-Sat:</strong> <span><?= get_address()->opening_hrs_mon_sat ?></span><br>
                            <strong>Sunday</strong>: <span><?= get_address()->opening_hrs_sun ?></span>
                        </p>
                    </div>
                </div>

                <div class="col-lg-3 col-md-6">
                    <h4>Follow Us</h4>
                    <div class="social-links d-flex">
                        <a target="_blank" href="<?= get_address()->twitter ?>" class="twitter"><i class="bi bi-twitter-x"></i></a>
                        <a target="_blank" href="<?= get_address()->facebook ?>" class="facebook"><i class="bi bi-facebook"></i></a>
                        <a target="_blank" href="<?= get_address()->instagram ?>" class="instagram"><i class="bi bi-instagram"></i></a>
                    </div>
                </div>

            </div>
        </div>



    </footer>

    <!-- Scroll Top -->
    <a href="#" id="scroll-top" class="scroll-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>

    <!-- Preloader -->
    <div id="preloader"></div>

    <!-- Vendor JS Files -->
    <script src="<?= base_url() ?>assets/common/js/jquery.min.js"></script>
    <script src="<?= base_url() ?>assets/frontend/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="<?= base_url() ?>assets/frontend/vendor/aos/aos.js"></script>
    <script src="<?= base_url() ?>assets/frontend/vendor/isotope-layout/isotope.pkgd.min.js"></script>

    <!-- Main JS File -->
    <script src="assets/frontend/js/main.js"></script>
    <?= $this->renderSection('js'); ?>
    <script>
        $("#alert")
            .delay(1000)
            .fadeTo(2000, 500)
            .slideUp(500, function() {
                $(this).slideUp(500);
            });
    </script>


    <?= $this->renderSection('scripts'); ?>

</body>

</html>