<?php

if(get_theme_mod('newsletter_area_disable') != 'on' ){ ?>	
	<div class="newsletter-area" id="newsletter" >
		<?php
		// width 
			$c_width = get_theme_mod('news_c_width', 'container');

		    if ($c_width === 'container') {
			    $c_alignment = 'container';
			} elseif ($c_width === 'container-fluid') {
			    $c_alignment = 'container-fluid';
			} else {
			    $text_alignment = 'container'; // Default to 'container' if the setting is invalid
			}
		?>
		<div class="<?php echo esc_attr($c_width); ?>">
			<?php
				$newsletter_page_id = get_theme_mod('newsletter_page');
				$newsletter_page_maintitle = get_theme_mod('newsletter_page_maintitle', 'FOR MORE UPDATES AND TIPS');	
				$newsletter_shortcode = get_theme_mod('newsletter_shortcode', '[Add Form shortcode]');
			?>

			<?php if($newsletter_page_maintitle || $newsletter_shortcode){ ?>
			<div class="newsbx">		
				<div class="row mr-0">
					<div class="titlebx">
						<div class="newstitle">
					    	<h3><?php echo ($newsletter_page_maintitle);  ?></h3>   	
						</div>	
					</div>
					<div class="newslettersign-box ">							
						<div class="ht-newsletter-member-wrap">									
							<?php echo do_shortcode($newsletter_shortcode);?>
						</div>						
						<div class="clearfix"></div> 			
					</div>			
				</div>
				<div class="clearfix"></div>
			</div> 
			<?php }?>	
		</div>
	</div>
<?php } 