<?php 
    $footer_ctas = get_field('footer_ctas', 'option'); 
    $footer_right = get_field('footer_content', 'option'); 
    $social_facebook = get_field('social_facebook', 'option'); 
    $social_facebook_label = get_field('social_facebook_label', 'option'); 
    $social_twitter = get_field('social_twitter', 'option'); 
    $social_twitter_label = get_field('social_twitter_label', 'option'); 
    $social_instagram = get_field('social_instagram', 'option'); 
    $social_instagram_label = get_field('social_instagram_label', 'option'); 
    $social_youtube = get_field('social_youtube', 'option'); 
    $social_youtube_label = get_field('social_youtube_label', 'option'); 
    $at_pubid = get_field('at_pubid', 'option'); 

?>

<footer id="colophon" class="site-footer" role="contentinfo" data-panel>
    <?php if ($footer_ctas): ?>
        <section class="footer-cta style-dark">

            <?php
            while( have_rows('footer_ctas', 'option') ) : the_row();

                 // Load sub field value.
                 $cta_title = get_sub_field('cta_title');
                 $cta_content = get_sub_field('cta_content');
                 $cta_button_label = get_sub_field('cta_button_label');
                 $cta_button_link = get_sub_field('cta_button_link');
                  ?>


                 <div class="panel-content">
                     <div class="entry-header">
                     </div><!-- .entry-header -->
                     <div class="entry-content">
                         <h3 class="entry-title"><?php echo $cta_title; ?></h3>
                         <p class="lead-para"><?php echo $cta_content; ?></p>
                         <a href="<?php if ($cta_button_link){ echo $cta_button_link;} else {echo '#';} ?>" <?php if (!$cta_button_link): ?>data-toggle="modal" data-target="#subscribe" <?php endif; ?> class="btn btn-dark"><?php echo $cta_button_label; ?></a>
                     </div><!-- .entry-content -->
                 </div><!-- .panel-content -->

             <?php endwhile;            ?>

        
        </section>
    <?php endif; ?>
    <div class="container footer-container">
        <div id="" class="footer-main">
            <section id="quick-links" class="hide-on-small-only">

                <h4>Quick links</h4>
                <nav>
                    <?php if ( has_nav_menu( 'footer_menu' ) ): ?>
                        <?php wp_nav_menu( array( 'theme_location' => 'footer_menu' ) ); ?>
                    <?php endif; ?>
                </nav>
            </section>


            <section id="general-enquiries">
                <?php echo $footer_right; ?>

                <ul class="control-group-social-media">
                    <?php if ($social_facebook): ?>
                        <li>
                            <a target="_none" href="<?php echo $social_facebook; ?>" class="footer-icon-social"><i class="icon-facebook"></i> <?php echo $social_facebook_label; ?></a>
                        </li>
                    <?php endif; ?>
                    <?php if ($social_twitter): ?>
                        <li>
                            <a target="_none" href="<?php echo $social_twitter; ?>" class="footer-icon-social"><i class="icon-twitter"></i> @<?php echo $social_twitter_label; ?></a>
                        </li>
                    <?php endif; ?>
                    <?php if ($social_instagram): ?>
                        <li>
                            <a target="_none" href="<?php echo $social_instagram; ?>" class="footer-icon-social"><i class="icon-instagram"></i> @<?php echo $social_instagram_label; ?></a>
                        </li>
                    <?php endif; ?>
                    <?php if ($social_youtube): ?>
                        <li>
                            <a target="_none" href="<?php echo $social_youtube; ?>" class="footer-icon-social"><i class="icon-youtube"></i> @<?php echo $social_youtube_label; ?></a>
                        </li>
                    <?php endif; ?>


                </ul>

            </section>
        </div><!-- .footer-main -->


        <div class="site-info">
                <div class="site-branding">
                    <div class="site-logo">
                        <img src="<?php bloginfo('template_directory'); ?>/assets/img/logo.png" width="308px" height="78px" />
                    </div>

                </div>
			<p class="copyright">Copyright &copy; <?php echo date('Y'); ?> Destination Brisbane Consortium.<span> All rights reserved. All images are artist's impressions, subject to planning approvals.</span> <a href="<?php bloginfo('url'); ?>/sitemap/">Sitemap.</a> <a href="<?php bloginfo('url'); ?>/privacy-policy/">Privacy Policy.</a>  <a href="https://soak.co/" target="_blank">Website by Soak.</a></p>
        </div><!-- .site-info -->
    </div>

</footer><!-- #colophon -->




<div class="hide-on-med-and-up" id="mobileindicator">
</div>

	</div><!--end wrapper -->
</div><!--end page -->


<!-- Subscription modal -->
<?php get_template_part('partials/components/subscribe'); ?>
<?php get_template_part('partials/components/download_high_quality'); ?>
<div class="modal-backdrop fade hide"></div>

<!-- mobile menu -->
<div class="mobile-menu-container">


    <div class="mobile-search-container">
        <div class="container">           
           <div class="mobile-search-header">
            <button class="header-icon-search">
                <?php echo file_get_contents(get_template_directory() . '/assets/img/icons/search-grey.svg'); ?>
            </button>
            <?php include (TEMPLATEPATH . '/searchform.php'); ?>
        </div>
    </div>
        <div class="search-results-container search-results-wrapper">
            <div class="container">
							<div class="slider-loading"></div>
    					<div class="total-results"></div>
							<div class="results-con">
								<div class="search-results-wrap"></div>
								<div class="pagination-wrap"></div>
							</div>
            </div>
        </div>
    </div>


	<div class="mobile-menu ">

        <div class="mobile-menu-header">
             <div class="container">
                <div class="mobile-menu-header-inner">

                        <div class="menu-overlay-search">
                            <button class="menu-icon-search"><img src="<?php bloginfo('template_directory'); ?>/assets/img/icons/search.svg"></button> 
                        </div>

                        <div class="brand-logo">
                            <a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/assets/img/logo.png"></a>
                        </div>

                        <div class="menu-overlay-close">
                            <button class="menu-icon-close"><img src="<?php bloginfo('template_directory'); ?>/assets/img/icons/close.svg"></button>
                        </div>
                    </div>
                </div>
            </div>



            <?php if ( has_nav_menu( 'mobile_menu' ) ): ?>
			<?php wp_nav_menu( array( 'theme_location' => 'mobile_menu', 'container_id' => 'mobile-menu','walker' => new menu_with_chevron() ) );  ?>
            <?php endif; ?>

            <div class="mobile-menu-footer center-align">
                <a href="# " data-toggle="modal" data-target="#subscribe" class="btn">Stay informed</a>
                <a href="https://m2mediadev.com/qw/contact" class="btn contact-mb">Contact</a>
            </div>
		
	</div>
</div>
<?php get_template_part('partials/components/photoswipe'); ?>

<?php wp_footer(); ?>
<script>
jQuery('#explore-map').load(function(){ 
    jQuery(this).contents().find('body').css({
        background: '#fff'
    });
});
    </script>
</body> 
</html>
