<?php

$enable_hero_section = get_theme_mod( 'spiral-lite-one-page_ed_hero_section', true );

$btn1_text = get_theme_mod('spirallite_btn1text', esc_html__('Learn More', 'spiral-lite-one-page'));
	$btn1_url = get_theme_mod('spirallite_btn1url', '#');
	$btn2_text = get_theme_mod('spirallite_btn2text', esc_html__('Buy Theme Now >', 'spiral-lite-one-page'));
	$btn2_url = get_theme_mod('spirallite_btn2url', '#');
	
		$custom_content = get_theme_mod('spirallite_content', '');

		// Define a default message if no content is found
		// Define a default message if no content is found
		$default_content = '<h1>' . esc_html__('We Are Web Design Studio Based in Los Angeles and San Francisco', 'spiral-lite-one-page') . '</h1>
		<h3>' . esc_html__('We specialize in creative projects of all web design. Start internet marketing strategy and branding with us! and business development', 'spiral-lite-one-page') . '</h3>';


		// Use the custom content if it's available, otherwise use the default content
		$content_to_display = empty($custom_content) ? $default_content : $custom_content;
		?>

<?php $main_bg = get_theme_mod('landing-page-bg'); // Retrieve the default header image

// If the header image is not set, use a fallback
if (!$main_bg) {
	$main_bg = get_template_directory_uri() . '/images/bg.jpg';
	// Default image URL
} ?>
<?php
// Only proceed if section is enabled
if ( $enable_hero_section ) :
?>

		<!--  Parallax Background -->
		<div class="hiddenslide" data-src="<?php echo esc_url($main_bg); ?>"></div>

		<!-- Hero Section -->
		<section id="primary" class="hero">
			<div class="container">
				<div class="row">
					<div class="col-lg-7 offset-lg-5">
						<div class="block animated" data-animation="fadeInDown" data-animation-delay="200">
							<?php echo wp_kses_post($content_to_display); ?>
							<p><a class="btn btn-contour btn-large" role="button" href="<?php echo esc_html($btn1_url); ?>"> <?php echo esc_html($btn1_text); ?> </a> <a class="btn btn-outline btn-large" role="button" href="<?php echo esc_html($btn2_url); ?>"> <?php echo esc_html($btn2_text); ?></a></p>
						</div>
					</div> <!-- End Column 7 -->
				</div> <!-- End Row -->
			</div> <!-- End Container -->
		</section> <!-- End Hero Section --> 

	<?php endif; ?>