<?php 

$construction_firm_custom_style= "";

// sticky-header

	if (false === get_option('construction_firm_sticky_header')) {
	    add_option('construction_firm_sticky_header', 'off');
	}

	// Define the custom CSS based on the 'construction_firm_sticky_header' option

	if (get_option('construction_firm_sticky_header', 'off') !== 'on') {
	    $construction_firm_custom_style .= '.fixed_header.fixed {';
	    $construction_firm_custom_style .= 'position: static;';
	    $construction_firm_custom_style .= '}';
	}

	if (get_option('construction_firm_sticky_header', 'off') !== 'off') {
	    $construction_firm_custom_style .= '.fixed_header.fixed {';
	    $construction_firm_custom_style .= 'position: fixed; background: #fff; box-shadow: 0px 3px 10px 2px #eee;';
	    $construction_firm_custom_style .= '}';

	    $construction_firm_custom_style .= '.admin-bar .fixed {';
	    $construction_firm_custom_style .= ' margin-top: 32px;';
	    $construction_firm_custom_style .= '}';
	}

// max-height
$construction_firm_logo_max_height = get_theme_mod('construction_firm_logo_max_height','100');

if($construction_firm_logo_max_height != false){

$construction_firm_custom_style .='.custom-logo-link img{';

	$construction_firm_custom_style .='max-height: '.esc_html($construction_firm_logo_max_height).'px;';
	
$construction_firm_custom_style .='}';
}

// Width

$construction_firm_theme_width = get_theme_mod( 'construction_firm_width_options','full_width');

if($construction_firm_theme_width == 'full_width'){

$construction_firm_custom_style .='body{';

	$construction_firm_custom_style .='max-width: 100%;';

$construction_firm_custom_style .='}';

}else if($construction_firm_theme_width == 'Container'){

$construction_firm_custom_style .='body{';

	$construction_firm_custom_style .='width: 100%; padding-right: 15px; padding-left: 15px;  margin-right: auto !important; margin-left: auto !important;';

$construction_firm_custom_style .='}';

$construction_firm_custom_style .='@media screen and (min-width: 601px){';

$construction_firm_custom_style .='body{';

    $construction_firm_custom_style .='max-width: 720px;';
    
$construction_firm_custom_style .='} }';

$construction_firm_custom_style .='@media screen and (min-width: 992px){';

$construction_firm_custom_style .='body{';

    $construction_firm_custom_style .='max-width: 960px;';
    
$construction_firm_custom_style .='} }';

$construction_firm_custom_style .='@media screen and (min-width: 1200px){';

$construction_firm_custom_style .='body{';

    $construction_firm_custom_style .='max-width: 1140px;';
    
$construction_firm_custom_style .='} }';

$construction_firm_custom_style .='@media screen and (min-width: 1400px){';

$construction_firm_custom_style .='body{';

    $construction_firm_custom_style .='max-width: 1320px;';
    
$construction_firm_custom_style .='} }';

$construction_firm_custom_style .='@media screen and (max-width:600px){';

$construction_firm_custom_style .='body{';

    $construction_firm_custom_style .='max-width: 100%; padding-right:0px; padding-left: 0px';
    
$construction_firm_custom_style .='} }';

}else if($construction_firm_theme_width == 'container_fluid'){

$construction_firm_custom_style .='body{';

	$construction_firm_custom_style .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';

$construction_firm_custom_style .='}';

$construction_firm_custom_style .='@media screen and (max-width:600px){';

$construction_firm_custom_style .='body{';

    $construction_firm_custom_style .='max-width: 100%; padding-right:0px; padding-left: 0px';
    
$construction_firm_custom_style .='} }';
}

// Scroll-top-position

$construction_firm_scroll_options = get_theme_mod( 'construction_firm_scroll_options','right_align');

if($construction_firm_scroll_options == 'right_align'){

$construction_firm_custom_style .='.scrollup{';

	$construction_firm_custom_style .='';

$construction_firm_custom_style .='}';

}else if($construction_firm_scroll_options == 'center_align'){

$construction_firm_custom_style .='.scrollup{';

	$construction_firm_custom_style .='right: 0; left:0; margin: 0 auto; top:85% !important';

$construction_firm_custom_style .='}';

}else if($construction_firm_scroll_options == 'left_align'){

$construction_firm_custom_style .='.scrollup{';

	$construction_firm_custom_style .='right: auto; left:5%; margin: 0 auto';

$construction_firm_custom_style .='}';
}
	
// text-transform

$construction_firm_text_transform = get_theme_mod( 'construction_firm_menu_text_transform','CAPITALISE');
if($construction_firm_text_transform == 'CAPITALISE'){

$construction_firm_custom_style .='nav#top_gb_menu ul li a{';

	$construction_firm_custom_style .='text-transform: capitalize ;';

$construction_firm_custom_style .='}';

}else if($construction_firm_text_transform == 'UPPERCASE'){

$construction_firm_custom_style .='nav#top_gb_menu ul li a{';

	$construction_firm_custom_style .='text-transform: uppercase ;';

$construction_firm_custom_style .='}';

}else if($construction_firm_text_transform == 'LOWERCASE'){

$construction_firm_custom_style .='nav#top_gb_menu ul li a{';

	$construction_firm_custom_style .='text-transform: lowercase ;';

$construction_firm_custom_style .='}';
}

// Slider-content-alignment

$construction_firm_slider_content_alignment = get_theme_mod( 'construction_firm_slider_content_alignment','LEFT-ALIGN');

if($construction_firm_slider_content_alignment == 'LEFT-ALIGN'){

$construction_firm_custom_style .='#slider .carousel-caption{';

	$construction_firm_custom_style .='text-align:left; right: 49%; left: 15%;';

$construction_firm_custom_style .='}';

$construction_firm_custom_style .='@media screen and (max-width:1199px){';

$construction_firm_custom_style .='#slider .carousel-caption{';

    $construction_firm_custom_style .='right: 20%; left: 15%';
    
$construction_firm_custom_style .='} }';

$construction_firm_custom_style .='@media screen and (max-width:991px){';

$construction_firm_custom_style .='#slider .carousel-caption{';

    $construction_firm_custom_style .='right: 20%; left: 15%';
    
$construction_firm_custom_style .='} }';


}else if($construction_firm_slider_content_alignment == 'CENTER-ALIGN'){

$construction_firm_custom_style .='#slider .carousel-caption{';

	$construction_firm_custom_style .='text-align:center; right: 15%; left: 15%;';

$construction_firm_custom_style .='}';


}else if($construction_firm_slider_content_alignment == 'RIGHT-ALIGN'){

$construction_firm_custom_style .='#slider .carousel-caption{';

	$construction_firm_custom_style .='text-align:right; right: 15%; left: 49%;';

$construction_firm_custom_style .='}';

$construction_firm_custom_style .='@media screen and (max-width:1199px){';

$construction_firm_custom_style .='#slider .carousel-caption{';

    $construction_firm_custom_style .='right: 15%; left: 20%';
    
$construction_firm_custom_style .='} }';

$construction_firm_custom_style .='@media screen and (max-width:991px){';

$construction_firm_custom_style .='#slider .carousel-caption{';

    $construction_firm_custom_style .='right: 15%; left: 20%';
    
$construction_firm_custom_style .='} }';

}

//related products
if( get_option( 'construction_firm_related_product',true) != 'on') {

$construction_firm_custom_style .='.related.products{';

	$construction_firm_custom_style .='display: none;';
	
$construction_firm_custom_style .='}';
}

if( get_option( 'construction_firm_related_product',true) != 'off') {

$construction_firm_custom_style .='.related.products{';

	$construction_firm_custom_style .='display: block;';
	
$construction_firm_custom_style .='}';
}

// footer text alignment
$construction_firm_footer_content_alignment = get_theme_mod( 'construction_firm_footer_content_alignment','CENTER-ALIGN');

if($construction_firm_footer_content_alignment == 'LEFT-ALIGN'){

$construction_firm_custom_style .='.site-info{';

	$construction_firm_custom_style .='text-align:left; padding-left: 30px;';

$construction_firm_custom_style .='}';

$construction_firm_custom_style .='.site-info a{';

	$construction_firm_custom_style .='padding-left: 30px;';

$construction_firm_custom_style .='}';


}else if($construction_firm_footer_content_alignment == 'CENTER-ALIGN'){

$construction_firm_custom_style .='.site-info{';

	$construction_firm_custom_style .='text-align:center;';

$construction_firm_custom_style .='}';


}else if($construction_firm_footer_content_alignment == 'RIGHT-ALIGN'){

$construction_firm_custom_style .='.site-info{';

	$construction_firm_custom_style .='text-align:right; padding-right: 30px;';

$construction_firm_custom_style .='}';

$construction_firm_custom_style .='.site-info a{';

	$construction_firm_custom_style .='padding-right: 30px;';

$construction_firm_custom_style .='}';

}

// slider button
$mobile_button_setting = get_option('construction_firm_slider_button_mobile_show_hide', '1');
$main_button_setting = get_option('construction_firm_slider_button_show_hide', '1');

$construction_firm_custom_style .= '#slider .home-btn {';

if ($main_button_setting == 'off') {
    $construction_firm_custom_style .= 'display: none;';
}

$construction_firm_custom_style .= '}';

// Add media query for mobile devices
$construction_firm_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_button_setting == 'off' || $mobile_button_setting == 'off') {
    $construction_firm_custom_style .= '#slider .home-btn { display: none; }';
}
$construction_firm_custom_style .= '}';


// scroll button
$mobile_scroll_setting = get_option('construction_firm_scroll_enable_mobile', '1');
$main_scroll_setting = get_option('construction_firm_scroll_enable', '1');

$construction_firm_custom_style .= '.scrollup {';

if ($main_scroll_setting == 'off') {
    $construction_firm_custom_style .= 'display: none;';
}

$construction_firm_custom_style .= '}';

// Add media query for mobile devices
$construction_firm_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_scroll_setting == 'off' || $mobile_scroll_setting == 'off') {
    $construction_firm_custom_style .= '.scrollup { display: none; }';
}
$construction_firm_custom_style .= '}';

// theme breadcrumb
$mobile_breadcrumb_setting = get_option('construction_firm_enable_breadcrumb_mobile', '1');
$main_breadcrumb_setting = get_option('construction_firm_enable_breadcrumb', '1');

$construction_firm_custom_style .= '.archieve_breadcrumb {';

if ($main_breadcrumb_setting == 'off') {
    $construction_firm_custom_style .= 'display: none;';
}

$construction_firm_custom_style .= '}';

// Add media query for mobile devices
$construction_firm_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_breadcrumb_setting == 'off' || $mobile_breadcrumb_setting == 'off') {
    $construction_firm_custom_style .= '.archieve_breadcrumb { display: none; }';
}
$construction_firm_custom_style .= '}';

// single post and page breadcrumb
$mobile_single_breadcrumb_setting = get_option('construction_firm_single_enable_breadcrumb_mobile', '1');
$main_single_breadcrumb_setting = get_option('construction_firm_single_enable_breadcrumb', '1');

$construction_firm_custom_style .= '.single_breadcrumb {';

if ($main_single_breadcrumb_setting == 'off') {
    $construction_firm_custom_style .= 'display: none;';
}

$construction_firm_custom_style .= '}';

// Add media query for mobile devices
$construction_firm_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_single_breadcrumb_setting == 'off' || $mobile_single_breadcrumb_setting == 'off') {
    $construction_firm_custom_style .= '.single_breadcrumb { display: none; }';
}
$construction_firm_custom_style .= '}';

// woocommerce breadcrumb
$mobile_woo_breadcrumb_setting = get_option('construction_firm_woocommerce_enable_breadcrumb_mobile', '1');
$main_woo_breadcrumb_setting = get_option('construction_firm_woocommerce_enable_breadcrumb', '1');

$construction_firm_custom_style .= '.woocommerce-breadcrumb {';

if ($main_woo_breadcrumb_setting == 'off') {
    $construction_firm_custom_style .= 'display: none;';
}

$construction_firm_custom_style .= '}';

// Add media query for mobile devices
$construction_firm_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_woo_breadcrumb_setting == 'off' || $mobile_woo_breadcrumb_setting == 'off') {
    $construction_firm_custom_style .= '.woocommerce-breadcrumb { display: none; }';
}
$construction_firm_custom_style .= '}';


//colors
$color = get_theme_mod('construction_firm_primary_color', '#fe651f');
$color_heading = get_theme_mod('construction_firm_heading_color', '#4a4f55');
$color_text = get_theme_mod('construction_firm_text_color', '#71767c');
$color_fade = get_theme_mod('construction_firm_primary_fade', '#fff0e9');
$color_home_sec_bg = get_theme_mod('construction_firm_home_sec_bg', '#efefef');
$color_footer_bg = get_theme_mod('construction_firm_footer_bg', '#383a46');
$color_post_bg = get_theme_mod('construction_firm_post_bg', '#ffffff');
$slider_overlay = get_theme_mod( 'construction_firm_slider_overlay','#383a46');



$construction_firm_custom_style .= ":root {";
    $construction_firm_custom_style .= "--theme-primary-color: {$color};";
    $construction_firm_custom_style .= "--theme-heading-color: {$color_heading};";
    $construction_firm_custom_style .= "--theme-text-color: {$color_text};";
    $construction_firm_custom_style .= "--theme-primary-fade: {$color_fade};";
    $construction_firm_custom_style .= "--home-sec-bg: {$color_home_sec_bg};";
    $construction_firm_custom_style .= "--theme-footer-color: {$color_footer_bg};";
    $construction_firm_custom_style .= "--post-bg-color: {$color_post_bg};";
    $construction_firm_custom_style .= "--slider-overlay: {$slider_overlay};";
$construction_firm_custom_style .= "}";

$construction_firm_slider_opacity = get_theme_mod( 'construction_firm_slider_opacity','0.3');

if($construction_firm_slider_opacity == '0'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.1'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.1';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.2'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.2';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.3'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.3';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.4'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.4';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.5'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.5';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.6'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.6';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.7'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.7';
$construction_firm_custom_style .='}';

}else if($construction_firm_slider_opacity == '0.8'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.8';
$construction_firm_custom_style .='}';

}
else if($construction_firm_slider_opacity == '0.9'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 0.9';
$construction_firm_custom_style .='}';

}
else if($construction_firm_slider_opacity == '1'){
$construction_firm_custom_style .='#slider img {';
    $construction_firm_custom_style .='opacity: 1';
$construction_firm_custom_style .='}';

}

$construction_firm_slider_heading_color = get_theme_mod( 'construction_firm_slider_heading_color','#ffffff');
$construction_firm_custom_style .='#slider .carousel-caption h2 {';
$construction_firm_custom_style .='color: '.esc_attr($construction_firm_slider_heading_color).';';
$construction_firm_custom_style .='}';

$construction_firm_slider_excerpt_color = get_theme_mod( 'construction_firm_slider_excerpt_color','#ffffff');
$construction_firm_custom_style .='#slider .slider-excerpt {';
$construction_firm_custom_style .='color: '.esc_attr($construction_firm_slider_excerpt_color).';';
$construction_firm_custom_style .='}';

//-------------------title-font-size----//  
$construction_firm_site_title_fontsize = get_theme_mod('construction_firm_site_title_fontsize','25');

if($construction_firm_site_title_fontsize != false){

$construction_firm_custom_style .='.construction-firm-logo h1,.site-title,.site-title a,.construction-firm-logo h1 a{';

    $construction_firm_custom_style .='font-size: '.esc_html($construction_firm_site_title_fontsize).'px;';

$construction_firm_custom_style .='}';
}

//-------------------tagline-font-size----//  
$construction_firm_site_tagline_fontsize = get_theme_mod('construction_firm_site_tagline_fontsize','15');

if($construction_firm_site_tagline_fontsize != false){

$construction_firm_custom_style .='p.site-description{';

    $construction_firm_custom_style .='font-size: '.esc_html($construction_firm_site_tagline_fontsize).'px;';

$construction_firm_custom_style .='}';
}

//-------------------menu-font-size----//  
$construction_firm_menu_fontsize = get_theme_mod('construction_firm_menu_fontsize','14');

if($construction_firm_menu_fontsize != false){

$construction_firm_custom_style .='.gb_nav_menu li a{';

    $construction_firm_custom_style .='font-size: '.esc_html($construction_firm_menu_fontsize).'px;';

$construction_firm_custom_style .='}';
}