<?php

$adventure_trekking_camp_custom_style= "";

//----------------sticky header-------------------//

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

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

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

    $adventure_trekking_camp_custom_style .= '.page-template-custom-home-page .fixed_header.fixed{';
    $adventure_trekking_camp_custom_style .= 'position: absolute;';
    $adventure_trekking_camp_custom_style .= '}';
}

if (get_option('adventure_trekking_camp_sticky_header', 'off') !== 'off') {
    $adventure_trekking_camp_custom_style .= '.fixed_header.fixed{';
    $adventure_trekking_camp_custom_style .= 'position: fixed; background: var(--theme-footer-color);';
    $adventure_trekking_camp_custom_style .= '}';

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

    $adventure_trekking_camp_custom_style .= '.page-template-custom-home-page .fixed_header.fixed{';
    $adventure_trekking_camp_custom_style .= 'position: fixed;';
    $adventure_trekking_camp_custom_style .= '}';
}
/*-------------------Scroll-top-position ----------------*/

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

if($adventure_trekking_camp_scroll_options == 'right_align'){

$adventure_trekking_camp_custom_style .='.scroll-top button{';

	$adventure_trekking_camp_custom_style .='';

$adventure_trekking_camp_custom_style .='}';

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

$adventure_trekking_camp_custom_style .='.scroll-top button{';

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

$adventure_trekking_camp_custom_style .='}';

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

$adventure_trekking_camp_custom_style .='.scroll-top button{';

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

$adventure_trekking_camp_custom_style .='}';
}

/*-------------------text-transform--------------*/

$adventure_trekking_camp_text_transform = get_theme_mod( 'adventure_trekking_camp_menu_text_transform','CAPITALISE');
if($adventure_trekking_camp_text_transform == 'CAPITALISE'){

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

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

$adventure_trekking_camp_custom_style .='}';

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

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

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

$adventure_trekking_camp_custom_style .='}';

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

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

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

$adventure_trekking_camp_custom_style .='}';
}

//-------------------Logo-Max-height----//	
$adventure_trekking_camp_logo_max_height = get_theme_mod('adventure_trekking_camp_logo_max_height','100');

if($adventure_trekking_camp_logo_max_height != false){

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

	$adventure_trekking_camp_custom_style .='max-height: '.esc_html($adventure_trekking_camp_logo_max_height).'px;';

$adventure_trekking_camp_custom_style .='}';
}

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

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

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

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

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

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

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

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

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

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

$adventure_trekking_camp_custom_style .='}';

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

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

$adventure_trekking_camp_custom_style .='}';


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

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

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

$adventure_trekking_camp_custom_style .='}';


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

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

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

$adventure_trekking_camp_custom_style .='}';

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

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

$adventure_trekking_camp_custom_style .='}';

}

// scroll button
$mobile_scroll_setting = get_option('adventure_trekking_camp_scroll_enable_mobile', '1');
$main_scroll_setting = get_option('adventure_trekking_camp_scroll_enable', '1');

$adventure_trekking_camp_custom_style .= '.scrollup {';

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

$adventure_trekking_camp_custom_style .= '}';

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

// theme breadcrumb
$mobile_breadcrumb_setting = get_option('adventure_trekking_camp_enable_breadcrumb_mobile', '1');
$main_breadcrumb_setting = get_option('adventure_trekking_camp_enable_breadcrumb', '1');

$adventure_trekking_camp_custom_style .= '.archieve_breadcrumb {';

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

$adventure_trekking_camp_custom_style .= '}';

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

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

$adventure_trekking_camp_custom_style .= '.single_breadcrumb {';

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

$adventure_trekking_camp_custom_style .= '}';

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

// woocommerce breadcrumb
$mobile_woo_breadcrumb_setting = get_option('adventure_trekking_camp_woocommerce_enable_breadcrumb_mobile', '1');
$main_woo_breadcrumb_setting = get_option('adventure_trekking_camp_woocommerce_enable_breadcrumb', '1');

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

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

$adventure_trekking_camp_custom_style .= '}';

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

//colors
$color = get_theme_mod('adventure_trekking_camp_primary_color', '#ffa700');
$color_heading = get_theme_mod('adventure_trekking_camp_heading_color', '#222222');
$color_text = get_theme_mod('adventure_trekking_camp_text_color', '#748494');
$color_fade = get_theme_mod('adventure_trekking_camp_primary_fade', '#fff6e7');
$color_footer_bg = get_theme_mod('adventure_trekking_camp_footer_bg', '#222222');
$color_post_bg = get_theme_mod('adventure_trekking_camp_post_bg', '#ffffff');
$slider_overlay = get_theme_mod( 'adventure_trekking_camp_slider_overlay','#ffffff');
$inner_page_overlay = get_theme_mod( 'adventure_trekking_camp_innerpage_overlay','#000000');


$adventure_trekking_camp_custom_style .= ":root {";
    $adventure_trekking_camp_custom_style .= "--theme-primary-color: {$color};";
    $adventure_trekking_camp_custom_style .= "--theme-heading-color: {$color_heading};";
    $adventure_trekking_camp_custom_style .= "--theme-text-color: {$color_text};";
    $adventure_trekking_camp_custom_style .= "--theme-primary-fade: {$color_fade};";
    $adventure_trekking_camp_custom_style .= "--theme-footer-color: {$color_footer_bg};";
    $adventure_trekking_camp_custom_style .= "--post-bg-color: {$color_post_bg};";
    $adventure_trekking_camp_custom_style .= "--slider-overlay: {$slider_overlay};";
     $adventure_trekking_camp_custom_style .= "--inner-page-overlay: {$inner_page_overlay};";
$adventure_trekking_camp_custom_style .= "}";


$adventure_trekking_camp_slider_opacity = get_theme_mod( 'adventure_trekking_camp_slider_opacity','0.5');

if($adventure_trekking_camp_slider_opacity == '0'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.1'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.1';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.2'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.2';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.3'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.3';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.4'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.4';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.5'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.5';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.6'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.6';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.7'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.7';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_slider_opacity == '0.8'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.8';
$adventure_trekking_camp_custom_style .='}';

}
else if($adventure_trekking_camp_slider_opacity == '0.9'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 0.9';
$adventure_trekking_camp_custom_style .='}';

}
else if($adventure_trekking_camp_slider_opacity == '1'){
$adventure_trekking_camp_custom_style .='#slider img.slide-image {';
    $adventure_trekking_camp_custom_style .='opacity: 1';
$adventure_trekking_camp_custom_style .='}';

}

$adventure_trekking_camp_slider_content_color = get_theme_mod( 'adventure_trekking_camp_slider_content_color','#222222');
$adventure_trekking_camp_custom_style .='#slider h2, #slider h1, .phone-call h6, .search-box h6 {';
$adventure_trekking_camp_custom_style .='color: '.esc_attr($adventure_trekking_camp_slider_content_color).';';
$adventure_trekking_camp_custom_style .='}';


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

if($adventure_trekking_camp_site_title_fontsize != false){

$adventure_trekking_camp_custom_style .='.adventure-trekking-camp-logo h1,.site-title,.site-title a,.adventure-trekking-camp-logo h1 a{';

    $adventure_trekking_camp_custom_style .='font-size: '.esc_html($adventure_trekking_camp_site_title_fontsize).'px;';

$adventure_trekking_camp_custom_style .='}';
}

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

if($adventure_trekking_camp_site_tagline_fontsize != false){

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

    $adventure_trekking_camp_custom_style .='font-size: '.esc_html($adventure_trekking_camp_site_tagline_fontsize).'px;';

$adventure_trekking_camp_custom_style .='}';
}

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

if($adventure_trekking_camp_menu_fontsize != false){

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

    $adventure_trekking_camp_custom_style .='font-size: '.esc_html($adventure_trekking_camp_menu_fontsize).'px;';

$adventure_trekking_camp_custom_style .='}';
}

//innerpage heaader image opacity
$adventure_trekking_camp_innerpage_hdrimage_opacity = get_theme_mod( 'adventure_trekking_camp_innerpage_hdrimage_opacity','0.5');

if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.1'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.1';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.2'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.2';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.3'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.3';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.4'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.4';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.5'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.5';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.6'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.6';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.7'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.7';
$adventure_trekking_camp_custom_style .='}';

}else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.8'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.8';
$adventure_trekking_camp_custom_style .='}';

}
else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '0.9'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 0.9';
$adventure_trekking_camp_custom_style .='}';

}
else if($adventure_trekking_camp_innerpage_hdrimage_opacity == '1'){
$adventure_trekking_camp_custom_style .='.header-image,.woocommerce-page .single-post-image,.single-post-image img {';
    $adventure_trekking_camp_custom_style .='opacity: 1';
$adventure_trekking_camp_custom_style .='}';

}

//-------------------first-letter-capital----//
if (false === get_option('adventure_trekking_camp_first_letter_capital_enable')) {
    add_option('adventure_trekking_camp_first_letter_capital_enable', 'on');
}
if (get_option('adventure_trekking_camp_first_letter_capital_enable') === 'off') {
    $adventure_trekking_camp_custom_style .= '.entry-content > p:first-of-type:first-letter {';
    $adventure_trekking_camp_custom_style .= 'font-size: 16px; float: none; line-height: unset; padding: 0;';
    $adventure_trekking_camp_custom_style .= '}';
}

// ------------------Sticky-Sidebar-----//
if (false === get_option('adventure_trekking_camp_sticky_sidebar')) {
    add_option('adventure_trekking_camp_sticky_sidebar', 'off');
}
if ( get_option('adventure_trekking_camp_sticky_sidebar', 0 ) == 1 ) {
    $adventure_trekking_camp_custom_style .= '.sidebar{';
    $adventure_trekking_camp_custom_style .= 'position: sticky;';
    $adventure_trekking_camp_custom_style .= 'top: 15%;';
    $adventure_trekking_camp_custom_style .= '}';
}
