<?php
    $backgroundImage = $shortcode->background_image ? RvMedia::getImageUrl($shortcode->background_image) : null;
    $titleColor = $shortcode->title_color ?: '#ffffff';
    $descriptionColor = $shortcode->description_color ?: '#ffffff';

    // Collect multiple slider images (up to 4)
    $sliderImages = [];
    for ($i = 1; $i <= 4; $i++) {
        $imageKey = "slider_image_{$i}";
        if ($shortcode->$imageKey) {
            $sliderImages[] = RvMedia::getImageUrl($shortcode->$imageKey);
        }
    }

    // Include the main background image if it exists
    if ($backgroundImage) {
        array_unshift($sliderImages, $backgroundImage);
    }

    // Filter out empty values
    $sliderImages = array_filter($sliderImages);

    // Set rotation interval (default 5 seconds)
    $rotationInterval = (int) ($shortcode->rotation_interval ?: 5);

    // Enable/disable automatic rotation
    $enableRotation = $shortcode->enable_rotation ?: 'yes';
?>

<section class="flat-slider home-1 hero-banner-slider"
         style="<?php echo \Illuminate\Support\Arr::toCssStyles(["background-image: url('$backgroundImage') !important" => $backgroundImage]) ?>"
         data-slider-images="<?php echo e(json_encode($sliderImages)); ?>"
         data-rotation-interval="<?php echo e($rotationInterval); ?>"
         data-enable-rotation="<?php echo e($enableRotation); ?>"
         style="transition: background-image 1s ease-in-out;">
    <div class="container relative">
        <div class="row">
            <div class="col-lg-12">
                <div class="slider-content">
                    <div class="text-center">
                        <div class="heading">
                            <h1 class="animationtext slide" style="color: <?php echo e($titleColor); ?> !important;">
                                <?php echo BaseHelper::clean($shortcode->title); ?>

                                <?php echo Theme::partial('shortcodes.hero-banner.partials.animation-text', compact('shortcode')); ?>

                            </h1>
                            <?php if($shortcode->description): ?>
                                <p class="subtitle body-1 wow fadeIn" style="color: <?php echo e($descriptionColor); ?> !important;" data-wow-delay=".8s" data-wow-duration="2000ms">
                                    <?php echo BaseHelper::clean($shortcode->description); ?>

                                </p>
                            <?php endif; ?>
                        </div>
                        <?php echo Theme::partial('shortcodes.hero-banner.partials.action-button', ['shortcode' => $shortcode, 'class' => 'mb-4']); ?>

                    </div>
                    <?php if(is_plugin_active('real-estate') && $shortcode->search_box_enabled): ?>
                        <?php echo $__env->make(Theme::getThemeNamespace('views.real-estate.partials.search-box'), ['style' => 1, 'centeredTabs' => true], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
    <div class="overlay"></div>
</section>
<?php /**PATH /home/agriwurd/capitalpropertiesandresidence.com/platform/themes/homzen/partials/shortcodes/hero-banner/styles/style-1.blade.php ENDPATH**/ ?>