        </div>
        <!--close content class tag-->
        <footer class="page-footer" role="contentinfo">
            <?php
            //Footer check templates
            $tpl_f_disable = array('tpl-services.php', 'tpl-brands.php', 'tpl-contact.php', 'tpl-careers.php');
            $tpl_f_absolute = array('tpl-cs.php', 'tpl-about.php');
            $footer_type = '';
            if (is_page_template($tpl_f_disable) || is_singular( 'case_studies' )) {
                $footer_type = 'disable';
            }?>

            <?php if($footer_type != 'disable'): ?>
            <div class="page-footer__cta <?php if(is_page_template($tpl_f_absolute)): ?>cta-absolute<?php endif; ?>">
                <div class="footer-cta">
                    <?php if( have_rows('footer_cta', 'option') ): ?>
                        <?php while( have_rows('footer_cta', 'option') ): the_row();
                            $title = get_sub_field('footer_cta_title');
                            $link = get_sub_field('footer_cta_button');
                            ?>
                            <?php if($title): ?>
                                <div class="footer-cta__title"><?php echo $title ?></div>
                            <?php endif;?>
                            <?php if( $link ):
                                $link_url = $link['url'];
                                $link_title = $link['title'];
                                $link_target = $link['target'] ? $link['target'] : '_self';
                                ?>
                                <div class="footer-cta__link">
                                    <a class="animated-button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
                                </div>
                            <?php endif; ?>
                        <?php endwhile; ?>
                    <?php endif; ?>
                </div>
            </div>
            <?php endif; ?>

            <div class="page-footer__inner">
                <div class="page-footer__inner-container <?php if($footer_type == 'disable'): ?>cta-disable<?php endif; ?>">
                    <div class="page-footer__top-line">
                        <a class="page-footer__logo" href="<?php echo esc_url(home_url('/')); ?>" rel="home">
                            <?php $logo = get_field('footer_logo', 'option');
                            if (!empty($logo)): ?>
                                <img src="<?php echo esc_url($logo['url']); ?>"
                                     alt="<?php echo esc_attr($logo['alt']); ?>"/>
                            <?php endif; ?>
                        </a>

                        <?php if( have_rows('footer_social_links', 'option') ): ?>
                            <div class="page-footer__social-links">
                                <?php while( have_rows('footer_social_links', 'option') ): the_row();
                                    $icon = get_sub_field('footer_social_icon');
                                    $link = get_sub_field('footer_social_link');
                                    if( $link ):
                                        $link_url = $link['url'];
                                        $link_title = $link['title'];
                                        $link_target = $link['target'] ? $link['target'] : '_self';
                                        ?>
                                        <a class="page-footer__social-link" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>">
                                            <?php if( !empty( $icon ) ): ?>
                                                <img src="<?php echo esc_url($icon['url']); ?>" alt="<?php echo esc_attr($icon['alt']); ?>" />
                                            <?php endif; ?>
                                        </a>
                                    <?php endif; ?>
                                <?php endwhile; ?>
                            </div>
                        <?php endif; ?>
                    </div>

                    <div class="page-footer__menu footer-menu">
                        <?php if( have_rows('footer_menu_items1', 'option') ): ?>
                            <div class="footer-menu__col">
                                <?php while( have_rows('footer_menu_items1', 'option') ): the_row();
                                    $link = get_sub_field('footer_menu_items_link1');
                                    if( $link ):
                                        $link_url = $link['url'];
                                        $link_title = $link['title'];
                                        $link_target = $link['target'] ? $link['target'] : '_self';
                                        ?>
                                        <a class="footer-menu__link" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo $link_title; ?></a>
                                    <?php endif; ?>
                                <?php endwhile; ?>
                            </div>
                        <?php endif; ?>

                        <?php if( have_rows('footer_menu_items2', 'option') ): ?>
                            <div class="footer-menu__col">
                                <?php while( have_rows('footer_menu_items2', 'option') ): the_row();
                                    $link = get_sub_field('footer_menu_items_link2');
                                    if( $link ):
                                        $link_url = $link['url'];
                                        $link_title = $link['title'];
                                        $link_target = $link['target'] ? $link['target'] : '_self';
                                        ?>
                                        <a class="footer-menu__link" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo $link_title; ?></a>
                                    <?php endif; ?>
                                <?php endwhile; ?>
                            </div>
                        <?php endif; ?>
                    </div>

                    <div class="page-footer__form footer-form">
                        <?php if( have_rows('footer_form', 'option') ): ?>
                            <?php while( have_rows('footer_form', 'option') ): the_row();
                                $title = get_sub_field('footer_form_title');
                                $desc = get_sub_field('footer_form_description');
                                $shortcode = get_sub_field('footer_form_shortcode');
                                ?>
                                <?php if($title): ?>
                                    <div class="footer-form__title"><?php echo $title ?></div>
                                <?php endif;?>

                                <?php if($desc): ?>
                                    <div class="footer-form__desc"><?php echo $desc ?></div>
                                <?php endif;?>

                                <?php if($shortcode): ?>
                                    <?php echo apply_shortcodes($shortcode); ?>
                                <?php endif;?>
                            <?php endwhile; ?>
                        <?php endif; ?>
                    </div>

                    <div class="page-footer__bottom-line">
                        <div class="page-footer__info">
                            <div class="page-footer__copyright">&copy; <?php echo date("Y");?> <?php echo get_field('footer_copyright', 'option')?> </div>
                            <div class="page-footer__site-by"><?php the_field('footer_site_creator', 'option')?></div>
                        </div>
                        <div class="page-footer__scroll-top js-scroll-top">
                            <svg width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M6.53033 0.46967C6.23744 0.176777 5.76256 0.176777 5.46967 0.46967L0.696699 5.24264C0.403805 5.53553 0.403805 6.01041 0.696699 6.3033C0.989592 6.59619 1.46447 6.59619 1.75736 6.3033L6 2.06066L10.2426 6.3033C10.5355 6.59619 11.0104 6.59619 11.3033 6.3033C11.5962 6.01041 11.5962 5.53553 11.3033 5.24264L6.53033 0.46967ZM6.75 13L6.75 1L5.25 1L5.25 13L6.75 13Z" fill="white"/>
                            </svg>
                            <span>Scroll to top</span>
                        </div>
                    </div>
                </div>
            </div>
        </footer>
    </div>
    <!--close wrapper class tag-->
<?php wp_footer(); ?>

</body>
</html>
