<?php if ('layout_four' == $settings['layout_type']) : ?>
    <section class="gallery-one gallery-one--page">
        <div class="container">
            <?php if ('yes' == $settings['layout_four_enable_filter']) : ?>
                <div class="text-center">
                    <ul class="list-unstyled post-filter gallery-one__filter__list ml-0">
                        <li class="active" data-filter=".filter-item"><span class="ostech-btn"><?php esc_html_e('All', 'ostech-addon'); ?></span></li>
                        <?php foreach ($settings['layout_four_projects_filter'] as $item) : ?>
                            <li data-filter=".<?php echo esc_attr($item['slug']); ?>"><span class="ostech-btn"><?php echo esc_html($item['name']); ?></span></li>
                        <?php endforeach; ?>
                    </ul><!-- /.list-unstyledf -->
                </div><!-- /.text-center -->
            <?php endif; ?>
            <div class="row filter-layout">
                <?php foreach ($settings['gallery_list_four'] as $index => $item) :
                    $image_name = $item['image']['url'];
                    list($width, $height) = getimagesize($image_name);
                ?>
                    <div class="col-md-6 col-lg-<?php if ($width >= '750') : echo esc_attr("8");
                                                else : echo ("4");
                                                endif; ?> filter-item <?php echo esc_attr($item['slug']); ?>">
                        <div class=" gallery-one__card">
                            <?php ostech_elementor_rendered_image($item, 'image'); ?>
                            <div class="gallery-one__card__hover">
                                <a href="<?php echo esc_url($item['image']['url']); ?>" class="img-popup">
                                    <div class="gallery-one__card__icon">
                                        <span class="gallery-one__card__icon__item"></span>
                                    </div>
                                </a>
                            </div><!-- /.gallery-one__card__hover -->
                        </div><!-- /.gallery-one__card -->
                    </div><!-- /.col-md-6 col-lg-4 -->
                <?php endforeach; ?>
            </div><!-- /.row -->
        </div><!-- /.container-fluid -->
    </section><!-- /.gallery-one -->

<?php endif; ?>