<?php
/** 
* Hi Envato Review Team !
* We need use dirname for this file and please not check this file.
**/
$root =dirname(dirname(dirname(dirname(dirname(__FILE__)))));

if ( file_exists( $root.'/wp-load.php' ) ) {

    require_once( $root.'/wp-load.php' );

} elseif ( file_exists( $root.'/wp-config.php' ) ) {

    require_once( $root.'/wp-config.php' );

}

header("Content-type: text/css; charset=utf-8");

function hex2rgb($hex) {
   $hex = str_replace("#", "", $hex);
   if(strlen($hex) == 3) {
      $r = hexdec(substr($hex,0,1).substr($hex,0,1));
      $g = hexdec(substr($hex,1,1).substr($hex,1,1));
      $b = hexdec(substr($hex,2,1).substr($hex,2,1));
   } else {
      $r = hexdec(substr($hex,0,2));
      $g = hexdec(substr($hex,2,2));
      $b = hexdec(substr($hex,4,2));
   }
   $rgb = array($r, $g, $b);
   //return implode(",", $rgb); // returns the rgb values separated by commas
   return $rgb; // returns an array with the rgb values
}
global $startos_option; 
$b=$startos_option['main-color'];
$rgba = hex2rgb($b); 

?>

/**** Custom logo ****/
.person .img:before {
	background-color: rgba(<?php echo esc_attr( $rgba[0] ); ?>, <?php echo esc_attr( $rgba[1] ); ?>, <?php echo esc_attr( $rgba[2] ); ?>, 0.8);
}

.rich-header{
	background-image:url(<?php echo esc_url($startos_option['bg_allpage']['url']); ?>);
}
ul.clearfix li a.mPS2id-highlight.mPS2id-highlight-first,ul.clearfix li.active.menu-item-object-page > a,
.progress-bar .line,
.person .title:after,
.pricing-table > .column > .title,
.menu ul li a:hover,
.menu ul li a.current,
i.circle,i.square,
.i-separator i,
#top:hover,
.slider:hover .slider-nav:hover,
.owl-theme .owl-controls .owl-page.active span,
.owl-theme .owl-controls.clickable .owl-page:hover span,
.ui-tabs ul li.ui-state-default.ui-tabs-active.ui-state-active,
.vc_toggle.vc_toggle_active .vc_toggle_title{
	background-color:<?php echo esc_attr($startos_option['main-color']); ?>;
}
.accordion .toggle-title.ui-accordion-header-active{
	background-color:<?php echo esc_attr($startos_option['main-color']); ?>!important;
}
.title,
.tab.active,
.content-box > .box .box-icon,
.content-box > .boxes .box-icon,
.counter .count,
.counter .counts,
.person .name,
.text-separator,
.blog-list a,
i[class*=" icon-"],
i[class^=icon-],
.t-separator,
.person .social-links a,
.rich-header h1,
.pattern h1,
body[data-skin='dark'] .blog-list h3.blog-title a:hover,.blog-list h3.blog-title a:hover,
.sidebar .widget li a:hover, .tagcloud a:hover, .sidebar .widget li.recentcomments a,body[data-skin='dark'] .sidebar .widget li.recentcomments a,
.box .box-title,
.boxes .box-title,
body[data-skin='dark'] .sidebar .widget li a:hover{
	color:<?php echo esc_attr($startos_option['main-color']); ?>;
}
::-moz-selection,
::selection {
	color:<?php echo esc_attr($startos_option['main-color']); ?>;
}
.button,.vc_button,
button,
input[type="reset"],
input[type="submit"],
input[type="button"],
.tabset .tab.active,
.accordion .toggle-title.active{
	border-color: <?php echo esc_attr($startos_option['main-color']); ?>;
	background-color: <?php echo esc_attr($startos_option['main-color']); ?>;
}
.button2,
.button2.large,.button2.small,.button2.medium,
.pagination ul li span, .pagination ul li a:hover{
	border-color: <?php echo esc_attr($startos_option['main-color']); ?>;
	color:<?php echo esc_attr($startos_option['main-color']); ?>!important;
}
.tagcloud a:hover,
body[data-skin='dark'] .tagcloud a:hover,
.blog-link a{
	color: <?php echo esc_attr($startos_option['main-color']); ?>!important;
	border: 1px solid<?php echo esc_attr($startos_option['main-color']); ?>;
}
.i-separator:after,
.i-separator:before,
.t-separator:after,
.t-separator:before {
	background: -moz-linear-gradient(right,  <?php echo esc_attr($startos_option['main-color']); ?> 0%, rgba(240,162,83,0) 90%, rgba(255,255,255,0) 100%);
	background: -webkit-linear-gradient(right,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
	background: -o-linear-gradient(right,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
	background: -ms-linear-gradient(right,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
	background: linear-gradient(to left,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
}

.i-separator:after,
.t-separator:after {
	background: -moz-linear-gradient(left,  <?php echo esc_attr($startos_option['main-color']); ?> 0%, rgba(240,162,83,0) 90%, rgba(255,255,255,0) 100%);
	background: -webkit-linear-gradient(left,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
	background: -o-linear-gradient(left,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
	background: -ms-linear-gradient(left,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
	background: linear-gradient(to right,  <?php echo esc_attr($startos_option['main-color']); ?> 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);
}
.header{
	background-color:<?php echo esc_attr($startos_option['background_header']); ?>;	
}
.header.active.fixed{
	background-color:<?php echo esc_attr($startos_option['background_header_scroll']); ?>;
}
.header ul li a{
	
}
footer#footer{
	background-color:<?php echo esc_attr($startos_option['background_footer']); ?>;
	color:<?php echo esc_attr($startos_option['color_footer']); ?>;
}