<?php
$architectonic_structure_custom_css = "";
$architectonic_structure_primary_color = get_theme_mod('architectonic_structure_primary_color');
$architectonic_structure_secondary_color = get_theme_mod('architectonic_structure_secondary_color');

/*------------------ Primary Global Color -----------*/

if ($architectonic_structure_primary_color) {
  $architectonic_structure_custom_css .= ':root {';
  $architectonic_structure_custom_css .= '--primary-color: ' . esc_attr($architectonic_structure_primary_color) . ' !important;';
  $architectonic_structure_custom_css .= '} ';
}

/*------------------ Secondary Global Color -----------*/

if ($architectonic_structure_secondary_color) {
  $architectonic_structure_custom_css .= ':root {';
  $architectonic_structure_custom_css .= '--secondary-color: ' . esc_attr($architectonic_structure_secondary_color) . ' !important;';
  $architectonic_structure_custom_css .= '} ';
}

/*-------------------- Scroll Top Alignment-------------------*/

$architectonic_structure_scroll_top_alignment = get_theme_mod( 'architectonic_structure_scroll_top_alignment','right-align');

if($architectonic_structure_scroll_top_alignment == 'right-align'){
$architectonic_structure_custom_css .='#button{';
	$architectonic_structure_custom_css .='right: 3%;';
$architectonic_structure_custom_css .='}';
}else if($architectonic_structure_scroll_top_alignment == 'center-align'){
$architectonic_structure_custom_css .='#button{';
	$architectonic_structure_custom_css .='right:0; left:0; margin: 0 auto;';
$architectonic_structure_custom_css .='}';
}else if($architectonic_structure_scroll_top_alignment == 'left-align'){
$architectonic_structure_custom_css .='#button{';
	$architectonic_structure_custom_css .='left: 3%;';
$architectonic_structure_custom_css .='}';
}

/*-------------------- Archive Page Pagination Alignment-------------------*/

$architectonic_structure_archive_pagination_alignment = get_theme_mod( 'architectonic_structure_archive_pagination_alignment','left-align');

if($architectonic_structure_archive_pagination_alignment == 'right-align'){
$architectonic_structure_custom_css .='.pagination{';
	$architectonic_structure_custom_css .='justify-content: end;';
$architectonic_structure_custom_css .='}';
}else if($architectonic_structure_archive_pagination_alignment == 'center-align'){
$architectonic_structure_custom_css .='.pagination{';
	$architectonic_structure_custom_css .='justify-content: center;';
$architectonic_structure_custom_css .='}';
}else if($architectonic_structure_archive_pagination_alignment == 'left-align'){
$architectonic_structure_custom_css .='.pagination{';
	$architectonic_structure_custom_css .='justify-content: start;';
$architectonic_structure_custom_css .='}';
}

/*-------------------- Scroll Top Responsive-------------------*/

$architectonic_structure_resp_scroll_top = get_theme_mod( 'architectonic_structure_resp_scroll_top',true);
if($architectonic_structure_resp_scroll_top == true && get_theme_mod( 'architectonic_structure_scroll_to_top',true) != true){
	$architectonic_structure_custom_css .='#button.show{';
		$architectonic_structure_custom_css .='visibility:hidden !important;';
	$architectonic_structure_custom_css .='} ';
}
if($architectonic_structure_resp_scroll_top == true){
	$architectonic_structure_custom_css .='@media screen and (max-width:575px) {';
	$architectonic_structure_custom_css .='#button.show{';
		$architectonic_structure_custom_css .='visibility:visible !important;';
	$architectonic_structure_custom_css .='} }';
}else if($architectonic_structure_resp_scroll_top == false){
	$architectonic_structure_custom_css .='@media screen and (max-width:575px){';
	$architectonic_structure_custom_css .='#button.show{';
		$architectonic_structure_custom_css .='visibility:hidden !important;';
	$architectonic_structure_custom_css .='} }';
}

/*-------------------- Preloader Responsive-------------------*/

$architectonic_structure_resp_loader = get_theme_mod('architectonic_structure_resp_loader',false);
if($architectonic_structure_resp_loader == true && get_theme_mod('architectonic_structure_header_preloader',false) == false){
	$architectonic_structure_custom_css .='@media screen and (min-width:575px){
		.preloader{';
		$architectonic_structure_custom_css .='display:none !important;';
	$architectonic_structure_custom_css .='} }';
}

if($architectonic_structure_resp_loader == false){
	$architectonic_structure_custom_css .='@media screen and (max-width:575px){
		.preloader{';
		$architectonic_structure_custom_css .='display:none !important;';
	$architectonic_structure_custom_css .='} }';
}

// Scroll to top button shape 

$architectonic_structure_scroll_border_radius = get_theme_mod( 'architectonic_structure_scroll_to_top_radius','curved-box');
if($architectonic_structure_scroll_border_radius == 'box'){
	$architectonic_structure_custom_css .='#button{';
		$architectonic_structure_custom_css .='border-radius: 0px;';
	$architectonic_structure_custom_css .='}';
}else if($architectonic_structure_scroll_border_radius == 'curved-box'){
	$architectonic_structure_custom_css .='#button{';
		$architectonic_structure_custom_css .='border-radius: 4px;';
	$architectonic_structure_custom_css .='}';
}
else if($architectonic_structure_scroll_border_radius == 'circle'){
	$architectonic_structure_custom_css .='#button{';
		$architectonic_structure_custom_css .='border-radius: 50%;';
	$architectonic_structure_custom_css .='}';
}

// Footer Background Image Attachment 

$architectonic_structure_footer_attachment = get_theme_mod( 'architectonic_structure_background_attachment','scroll');
if($architectonic_structure_footer_attachment == 'fixed'){
	$architectonic_structure_custom_css .='.site-footer{';
		$architectonic_structure_custom_css .='background-attachment: fixed;';
	$architectonic_structure_custom_css .='}';
}elseif ($architectonic_structure_footer_attachment == 'scroll'){
	$architectonic_structure_custom_css .='.site-footer{';
		$architectonic_structure_custom_css .='background-attachment: scroll;';
	$architectonic_structure_custom_css .='}';
}

// Menu Hover Style	

$architectonic_structure_menus_item = get_theme_mod( 'architectonic_structure_menus_style','None');
if($architectonic_structure_menus_item == 'None'){
	$architectonic_structure_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$architectonic_structure_custom_css .='';
	$architectonic_structure_custom_css .='}';
}else if($architectonic_structure_menus_item == 'Zoom In'){
	$architectonic_structure_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$architectonic_structure_custom_css .='transition: all 0.3s ease-in-out !important; transform: scale(1.2) !important;';
	$architectonic_structure_custom_css .='}';

	$architectonic_structure_custom_css .= '.main-navigation ul ul li a:hover {';
	$architectonic_structure_custom_css .= 'margin-left: 20px;';
	$architectonic_structure_custom_css .= '}';
}

// Banner Background Image
$architectonic_structure_banner_bg = get_theme_mod('architectonic_structure_banner_background_image');
if ( empty( $architectonic_structure_banner_bg ) ) {
	$architectonic_structure_banner_bg = get_template_directory_uri() . '/images/default.png';
}
$architectonic_structure_custom_css .= "
.banner::before {
	background-image: url('{$architectonic_structure_banner_bg}');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
    position: absolute;
    width: 100%;
    min-height: 600px;
}";

//Show Hide
$architectonic_structure_classes = get_theme_mod('architectonic_structure_classes_setting', false);
if( !$architectonic_structure_classes ){
    $architectonic_structure_custom_css .= '.site-footer {';
    $architectonic_structure_custom_css .= 'margin-top: 200px;';
    $architectonic_structure_custom_css .= '}';
	$architectonic_structure_custom_css .= '.project-section .box {';
    $architectonic_structure_custom_css .= 'border: 2px solid #00000040';
    $architectonic_structure_custom_css .= '}';
}

$architectonic_structure_project = get_theme_mod('architectonic_structure_project_setting', false);
if( !$architectonic_structure_project ){
    $architectonic_structure_custom_css .= '.site-footer {';
    $architectonic_structure_custom_css .= 'margin-top: 0px;';
    $architectonic_structure_custom_css .= '}';
}

$architectonic_structure_banner = get_theme_mod( 'architectonic_structure_banner_setting',false );
if( !$architectonic_structure_banner ){
    $architectonic_structure_custom_css .= '.services-section .side-border {';
    $architectonic_structure_custom_css .= 'padding: 40px 0';
    $architectonic_structure_custom_css .= '}';
}

