<?php 
$class = isset($args['class']) ? $args['class'] : '';
$heading_class = isset($args['heading_class']) ? $args['heading_class'] : '';
$para_class = isset($args['para_class']) ? $args['para_class'] : '';
$button_class = isset($args['button_class']) ? $args['button_class'] : '';
$col_left_class = isset($args['col_left_class']) ? $args['col_left_class'] : 'col-lg-6 col-xl-5';
$col_right_class = isset($args['col_right_class']) ? $args['col_right_class'] : 'col-lg-6 col-xl-6';
$row_class = isset($args['row_class']) ? $args['row_class'] : '';
$image_box_class = isset($args['image_box_class']) ? $args['image_box_class'] : 'd-flex justify-content-center justify-content-lg-end';
$main_box = isset($args['main_box']) ? $args['main_box'] : '';
?>

<section class="section  dashboard-access-cta <?php echo $class;?>">
    <div class="container">
        <div class="box <?php echo $main_box;?>">
            <div class="row gy-3 gy-lg-0 align-items-center justify-content-between <?php echo $row_class?>">
                <div class="<?php echo $col_left_class;?>">
                    <div class="text-cont">
                        <h2 class="<?php echo $heading_class;?>"><?php echo get_field('affiliate_cta_heading');?></h2>
                        <p class="<?php echo $para_class;?>"><?php echo get_field('affiliate_cta_text');?></p>
                        <?php $button = get_field('affiliate_cta_button');
						if($button):
						?>
                        <a href="<?php echo $button['url']?>" class="animated-cta-btn <?php echo $button_class ? $button_class : 'gradient-btn'?>" ><?php echo $button['title']?></a>
						<?php endif;?>
                    </div>
                </div>
                <div class="<?php echo $col_right_class;?>">
                    <div class="img-cont <?php echo $image_box_class;?>">
                        <img src="<?php echo get_field('affiliate_cta_image');?>" alt="cta" class="img-fluid">
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>