<?php 

	$cctv_security_custom_style = '';

	// Logo Size
	$cctv_security_logo_top_margin = get_theme_mod('cctv_security_logo_top_margin');
	$cctv_security_logo_bottom_margin = get_theme_mod('cctv_security_logo_bottom_margin');
	$cctv_security_logo_left_margin = get_theme_mod('cctv_security_logo_left_margin');
	$cctv_security_logo_right_margin = get_theme_mod('cctv_security_logo_right_margin');

	if( $cctv_security_logo_top_margin != '' || $cctv_security_logo_bottom_margin != '' || $cctv_security_logo_left_margin != '' || $cctv_security_logo_right_margin != ''){
		$cctv_security_custom_style .=' .logo {';
			$cctv_security_custom_style .=' margin-top: '.esc_attr($cctv_security_logo_top_margin).'px ;
			margin-bottom: '.esc_attr($cctv_security_logo_bottom_margin).'px ;
			margin-left: '.esc_attr($cctv_security_logo_left_margin).'px ;
			margin-right: '.esc_attr($cctv_security_logo_right_margin).'px ;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_logo_size = get_theme_mod('cctv_security_logo_size');
	if( $cctv_security_logo_size != '') {
		if($cctv_security_logo_size == 100) {
			$cctv_security_custom_style .=' .custom-logo-link img {';
				$cctv_security_custom_style .=' width: 350px;';
			$cctv_security_custom_style .=' }';
		} else if($cctv_security_logo_size >= 10 && $cctv_security_logo_size < 100) {
			$cctv_security_custom_style .=' .custom-logo-link img {';
				$cctv_security_custom_style .=' width: '.esc_attr($cctv_security_logo_size).'%;';
			$cctv_security_custom_style .=' }';
		}
	}

	// Site Title Font Size
	$cctv_security_site_title_fontsize = get_theme_mod('cctv_security_site_title_fontsize');
	if( $cctv_security_site_title_fontsize != ''){
		$cctv_security_custom_style .=' .logo h1.site-title, .logo p.site-title {';
			$cctv_security_custom_style .=' font-size: '.esc_attr($cctv_security_site_title_fontsize).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_site_title_color = get_theme_mod('cctv_security_site_title_color');
	if ( $cctv_security_site_title_color != '') {
		$cctv_security_custom_style .=' h1.site-title a, p.site-title a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_site_title_color).';';
		$cctv_security_custom_style .=' }';
	}

	// Site Tagline Font Size
	$cctv_security_site_tagline_fontsize = get_theme_mod('cctv_security_site_tagline_fontsize');
	if( $cctv_security_site_tagline_fontsize != ''){
		$cctv_security_custom_style .=' .logo p.site-description {';
			$cctv_security_custom_style .=' font-size: '.esc_attr($cctv_security_site_tagline_fontsize).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_site_tagline_color = get_theme_mod('cctv_security_site_tagline_color');
	if ( $cctv_security_site_tagline_color != '') {
		$cctv_security_custom_style .=' .logo p.site-description {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_site_tagline_color).';';
		$cctv_security_custom_style .=' }';
	}

	//layout width
	$cctv_security_boxfull_width = get_theme_mod('cctv_security_boxfull_width');
	if ($cctv_security_boxfull_width !== '') {
		switch ($cctv_security_boxfull_width) {
			case 'container':
				$cctv_security_custom_style .= ' body, #header, .bottom-header {
					max-width: 1140px;
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'container-fluid':
				$cctv_security_custom_style .= ' body, #header, .bottom-header { 
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'none':
				// No specific width specified, so no additional style needed.
				break;
			default:
				// Handle unexpected values.
				break;
		}
	}

	//Menu animation
	$cctv_security_dropdown_anim = get_theme_mod('cctv_security_dropdown_anim');

	if ( $cctv_security_dropdown_anim != '') {
		$cctv_security_custom_style .=' .nav-menu ul ul {';
			$cctv_security_custom_style .=' animation:'.esc_attr($cctv_security_dropdown_anim).' 1s ease;';
		$cctv_security_custom_style .=' }';
	}

	// Footer css
	$cctv_security_copyright_padding = get_theme_mod('cctv_security_copyright_padding');

	if( $cctv_security_copyright_padding != ''){
		$cctv_security_custom_style .=' .site-info {';
			$cctv_security_custom_style .=' padding-top: '.esc_attr($cctv_security_copyright_padding).'px; padding-bottom: '.esc_attr($cctv_security_copyright_padding).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_footer_color = get_theme_mod('cctv_security_footer_color');

	if ( $cctv_security_footer_color != '') {
		$cctv_security_custom_style .=' .site-info p, .site-info a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_footer_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_footerbg_color = get_theme_mod('cctv_security_footerbg_color');

	if ( $cctv_security_footerbg_color != '') {
		$cctv_security_custom_style .=' .copyright {';
			$cctv_security_custom_style .=' background-color:'.esc_attr($cctv_security_footerbg_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_footer_widget_color = get_theme_mod('cctv_security_footer_widget_color');

	if ( $cctv_security_footer_widget_color != '') {
		$cctv_security_custom_style .=' .site-footer h2.widget-title {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_footer_widget_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_footer_widget_menu_color = get_theme_mod('cctv_security_footer_widget_menu_color');

	if ( $cctv_security_footer_widget_menu_color != '') {
		$cctv_security_custom_style .=' .widget ul li a, .site-footer .widget-area ul li a, .site-footer .widget-area ul li a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_footer_widget_menu_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_footer_overlay_color = get_theme_mod('cctv_security_footer_overlay_color');

	if ( $cctv_security_footer_overlay_color != '') {
		$cctv_security_custom_style .=' .footer-overlay {';
			$cctv_security_custom_style .=' background-color:'.esc_attr($cctv_security_footer_overlay_color).';';
		$cctv_security_custom_style .=' }';
	}

	// Header Image
	$header_image_url = cctv_security_banner_image( $image_url = '' );
	if( $header_image_url != ''){
		$cctv_security_custom_style .=' #inner-pages-header {';
			$cctv_security_custom_style .=' background-image: url('. esc_url( $header_image_url ).'); background-size: cover; background-repeat: no-repeat; background-attachment: fixed;';
		$cctv_security_custom_style .=' }';
		$cctv_security_custom_style .=' .header-overlay {';
			$cctv_security_custom_style .=' position: absolute; 	width: 100%; height: 100%; 	top: 0; left: 0; background: #000; opacity: 0.3;';
		$cctv_security_custom_style .=' }';
	} else {
		$cctv_security_custom_style .=' #inner-pages-header {';
			$cctv_security_custom_style .=' background:linear-gradient(0deg,#ccc,#0a0607 80%) no-repeat; ';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_slider_hide_show = get_theme_mod('cctv_security_slider_hide_show',false);
	if( $cctv_security_slider_hide_show == true){
		$cctv_security_custom_style .=' .page-template-custom-home-page #inner-pages-header {';
			$cctv_security_custom_style .=' display:none;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_topbartext_color = get_theme_mod('cctv_security_topbartext_color');

	if ( $cctv_security_topbartext_color != '') {
		$cctv_security_custom_style .=' .top-header p, .top-header a.login-btn {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_topbartext_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_topbaricon_color = get_theme_mod('cctv_security_topbaricon_color');

	if ( $cctv_security_topbaricon_color != '') {
		$cctv_security_custom_style .=' .top-header .social-icons i {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_topbaricon_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_menu_color = get_theme_mod('cctv_security_menu_color');
	if ( $cctv_security_menu_color != '') {
		$cctv_security_custom_style .=' .nav-menu ul li a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_menu_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_menuhvr_color = get_theme_mod('cctv_security_menuhvr_color');
	if ( $cctv_security_menuhvr_color != '') {
		$cctv_security_custom_style .=' .nav-menu ul li a:hover {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_menuhvr_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_submenu_color = get_theme_mod('cctv_security_submenu_color');
	$cctv_security_submenubg_color = get_theme_mod('cctv_security_submenubg_color');
	if ( $cctv_security_submenu_color != '') {
		$cctv_security_custom_style .=' .nav-menu ul ul a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_submenu_color).'; background-color:'.esc_attr($cctv_security_submenubg_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_hdrbtn_color = get_theme_mod('cctv_security_hdrbtn_color');
	$cctv_security_hdrbtnbg_color = get_theme_mod('cctv_security_hdrbtnbg_color');
	if ( $cctv_security_hdrbtn_color != '') {
		$cctv_security_custom_style .=' .menu-section a.demo-btn {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_hdrbtn_color).'; background-color:'.esc_attr($cctv_security_hdrbtnbg_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_hdrbg_color = get_theme_mod('cctv_security_hdrbg_color');
	if ( $cctv_security_hdrbg_color != '') {
		$cctv_security_custom_style .=' .menu-section {';
			$cctv_security_custom_style .=' background-color:'.esc_attr($cctv_security_hdrbg_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_topbarbg_color = get_theme_mod('cctv_security_topbarbg_color');
	if ( $cctv_security_topbarbg_color != '') {
		$cctv_security_custom_style .=' #header {';
			$cctv_security_custom_style .=' background-color:'.esc_attr($cctv_security_topbarbg_color).';';
		$cctv_security_custom_style .=' }';
	}

	//Slider color

	$cctv_security_slider_opacity = get_theme_mod('cctv_security_slider_opacity');
	if ( $cctv_security_slider_opacity != '') {
		$cctv_security_custom_style .=' #slider .slider-bg {';
			$cctv_security_custom_style .=' opacity:'.esc_attr($cctv_security_slider_opacity).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_slider_font_size = get_theme_mod('cctv_security_slider_font_size');
	if( $cctv_security_slider_font_size != ''){
		$cctv_security_custom_style .=' #slider h2 {';
			$cctv_security_custom_style .=' font-size: '.esc_attr($cctv_security_slider_font_size).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_slider_text_font_size = get_theme_mod('cctv_security_slider_text_font_size');
	if( $cctv_security_slider_text_font_size != ''){
		$cctv_security_custom_style .=' #slider p {';
			$cctv_security_custom_style .=' font-size: '.esc_attr($cctv_security_slider_text_font_size).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_slider_color = get_theme_mod('cctv_security_slider_color');

	if ( $cctv_security_slider_color != '') {
		$cctv_security_custom_style .=' #slider h2 a, #slider p {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_slider_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_sliderbtn_color = get_theme_mod('cctv_security_sliderbtn_color');
	$cctv_security_sliderbtnbg_color = get_theme_mod('cctv_security_sliderbtnbg_color');

	if ( $cctv_security_sliderbtn_color != '') {
		$cctv_security_custom_style .=' #slider a.read-btn {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_sliderbtn_color).'; background-color:'.esc_attr($cctv_security_sliderbtnbg_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_sliderbtnbghvr_color = get_theme_mod('cctv_security_sliderbtnbghvr_color');
	if ( $cctv_security_sliderbtnbghvr_color != '') {
		$cctv_security_custom_style .=' #slider a.read-btn:after {';
			$cctv_security_custom_style .=' background-color:'.esc_attr($cctv_security_sliderbtnbghvr_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_slidernp_color = get_theme_mod('cctv_security_slidernp_color');
	$cctv_security_slidernpbg_color = get_theme_mod('cctv_security_slidernpbg_color');
	if ( $cctv_security_slidernp_color != '') {
		$cctv_security_custom_style .=' #slider .carousel-control-prev-icon i, #slider .carousel-control-next-icon i {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_slidernp_color).';background-color:'.esc_attr($cctv_security_slidernpbg_color).';';
		$cctv_security_custom_style .=' }';
	}

	//Feature color
	$cctv_security_feature_small_title_font_size = get_theme_mod('cctv_security_feature_small_title_font_size');
	if( $cctv_security_feature_small_title_font_size != ''){
		$cctv_security_custom_style .=' #features-section p.small-title {';
			$cctv_security_custom_style .=' font-size: '.esc_attr($cctv_security_feature_small_title_font_size).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_feature_section_title_font_size = get_theme_mod('cctv_security_feature_section_title_font_size');
	if( $cctv_security_feature_section_title_font_size != ''){
		$cctv_security_custom_style .=' #features-section h3 {';
			$cctv_security_custom_style .=' font-size: '.esc_attr($cctv_security_feature_section_title_font_size).'px;';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_featureboxtitle_color = get_theme_mod('cctv_security_featureboxtitle_color');

	if ( $cctv_security_featureboxtitle_color != '') {
		$cctv_security_custom_style .=' #features-section .features-box h4 a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_featureboxtitle_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_featureboxtext_color = get_theme_mod('cctv_security_featureboxtext_color');

	if ( $cctv_security_featureboxtext_color != '') {
		$cctv_security_custom_style .=' #features-section .features-box p {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_featureboxtext_color).';';
		$cctv_security_custom_style .=' }';
	}

	$cctv_security_featurebtn_color = get_theme_mod('cctv_security_featurebtn_color');
	$cctv_security_featurebtnbg_color = get_theme_mod('cctv_security_featurebtnbg_color');

	if ( $cctv_security_featurebtn_color != '') {
		$cctv_security_custom_style .=' #features-section .features-box .feature-btn a {';
			$cctv_security_custom_style .=' color:'.esc_attr($cctv_security_featurebtn_color).'; background-color:'.esc_attr($cctv_security_featurebtnbg_color).';';
		$cctv_security_custom_style .=' }';
	}