<?php

$aviation_industry_custom_css = "";

	$aviation_industry_theme_pagination_options_alignment = get_theme_mod('aviation_industry_theme_pagination_options_alignment', 'Center');
	if ($aviation_industry_theme_pagination_options_alignment == 'Center') {
		$aviation_industry_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$aviation_industry_custom_css .= 'justify-content: center;margin: 0 auto;';
		$aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_theme_pagination_options_alignment == 'Right') {
		$aviation_industry_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$aviation_industry_custom_css .= 'justify-content: right;margin: 0 0 0 auto;';
		$aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_theme_pagination_options_alignment == 'Left') {
		$aviation_industry_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$aviation_industry_custom_css .= 'justify-content: left;margin: 0 auto 0 0;';
		$aviation_industry_custom_css .= '}';
	}

	$aviation_industry_theme_breadcrumb_enable = get_theme_mod('aviation_industry_theme_breadcrumb_enable',true);
    if($aviation_industry_theme_breadcrumb_enable != true){
        $aviation_industry_custom_css .='nav.breadcrumb-trail.breadcrumbs,nav.woocommerce-breadcrumb{';
            $aviation_industry_custom_css .='display: none;';
        $aviation_industry_custom_css .='}';
    }

	$aviation_industry_theme_breadcrumb_options_alignment = get_theme_mod('aviation_industry_theme_breadcrumb_options_alignment', 'Left');
	if ($aviation_industry_theme_breadcrumb_options_alignment == 'Center') {
	    $aviation_industry_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $aviation_industry_custom_css .= 'text-align: center !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_theme_breadcrumb_options_alignment == 'Right') {
	    $aviation_industry_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $aviation_industry_custom_css .= 'text-align: Right !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_theme_breadcrumb_options_alignment == 'Left') {
	    $aviation_industry_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $aviation_industry_custom_css .= 'text-align: Left !important;';
	    $aviation_industry_custom_css .= '}';
	}

	$aviation_industry_single_page_content_alignment = get_theme_mod('aviation_industry_single_page_content_alignment', 'left');
	if ($aviation_industry_single_page_content_alignment == 'left') {
	    $aviation_industry_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $aviation_industry_custom_css .= 'text-align: left !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_single_page_content_alignment == 'center') {
	    $aviation_industry_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $aviation_industry_custom_css .= 'text-align: center !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_single_page_content_alignment == 'right') {
	    $aviation_industry_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $aviation_industry_custom_css .= 'text-align: right !important;';
	    $aviation_industry_custom_css .= '}';
	}

	$aviation_industry_single_post_content_alignment = get_theme_mod('aviation_industry_single_post_content_alignment', 'left');
	if ($aviation_industry_single_post_content_alignment == 'left') {
	    $aviation_industry_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $aviation_industry_custom_css .= 'text-align: left !important;justify-content: left;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_single_post_content_alignment == 'center') {
	    $aviation_industry_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $aviation_industry_custom_css .= 'text-align: center !important;justify-content: center;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_single_post_content_alignment == 'right') {
	    $aviation_industry_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $aviation_industry_custom_css .= 'text-align: right !important;justify-content: right;';
	    $aviation_industry_custom_css .= '}';
	}

	$aviation_industry_menu_text_transform = get_theme_mod('aviation_industry_menu_text_transform', 'uppercase');
	if ($aviation_industry_menu_text_transform == 'Capitalize') {
	    $aviation_industry_custom_css .= '.site-navigation .primary-menu > li a{';
	    $aviation_industry_custom_css .= 'text-transform: Capitalize !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_menu_text_transform == 'uppercase') {
	    $aviation_industry_custom_css .= '.site-navigation .primary-menu > li a{';
	    $aviation_industry_custom_css .= 'text-transform: uppercase !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_menu_text_transform == 'lowercase') {
	    $aviation_industry_custom_css .= '.site-navigation .primary-menu > li a{';
	    $aviation_industry_custom_css .= 'text-transform: lowercase !important;';
	    $aviation_industry_custom_css .= '}';
	}

	$aviation_industry_footer_widget_title_alignment = get_theme_mod('aviation_industry_footer_widget_title_alignment', 'left');
	if ($aviation_industry_footer_widget_title_alignment == 'left') {
	    $aviation_industry_custom_css .= 'h2.widget-title{';
	    $aviation_industry_custom_css .= 'text-align: left !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_footer_widget_title_alignment == 'center') {
	    $aviation_industry_custom_css .= 'h2.widget-title{';
	    $aviation_industry_custom_css .= 'text-align: center !important;';
	    $aviation_industry_custom_css .= '}';
	} else if ($aviation_industry_footer_widget_title_alignment == 'right') {
	    $aviation_industry_custom_css .= 'h2.widget-title{';
	    $aviation_industry_custom_css .= 'text-align: right !important;';
	    $aviation_industry_custom_css .= '}';
	}

    $aviation_industry_show_hide_related_product = get_theme_mod('aviation_industry_show_hide_related_product',true);
    if($aviation_industry_show_hide_related_product != true){
        $aviation_industry_custom_css .='.related.products{';
            $aviation_industry_custom_css .='display: none;';
        $aviation_industry_custom_css .='}';
    }

	/*-------------------- Global First Color -------------------*/

	$aviation_industry_global_color = get_theme_mod('aviation_industry_global_color', '#FF204E'); // Add a fallback if the color isn't set

	if ($aviation_industry_global_color) {
		$aviation_industry_custom_css .= ':root {';
		$aviation_industry_custom_css .= '--global-color: ' . esc_attr($aviation_industry_global_color) . ';';
		$aviation_industry_custom_css .= '}';
	}

	/*-------------------- Second First Color -------------------*/

	$aviation_industry_global_colorr = get_theme_mod('aviation_industry_global_colorr', '#00224D'); // Add a fallback if the color isn't set

	if ($aviation_industry_global_colorr) {
		$aviation_industry_custom_css .= ':root {';
		$aviation_industry_custom_css .= '--global-colorr: ' . esc_attr($aviation_industry_global_colorr) . ';';
		$aviation_industry_custom_css .= '}';
	}

	/*-------------------- Content Font -------------------*/

	$aviation_industry_content_typography_font = get_theme_mod('aviation_industry_content_typography_font', 'Poppins, sans-serif'); // Add a fallback if the color isn't set

	if ($aviation_industry_content_typography_font) {
		$aviation_industry_custom_css .= ':root {';
		$aviation_industry_custom_css .= '--font-main: ' . esc_attr($aviation_industry_content_typography_font) . ';';
		$aviation_industry_custom_css .= '}';
	}

	/*-------------------- Heading Font -------------------*/

	$aviation_industry_heading_typography_font = get_theme_mod('aviation_industry_heading_typography_font', 'playfair-display'); // Add a fallback if the color isn't set

	if ($aviation_industry_heading_typography_font) {
		$aviation_industry_custom_css .= ':root {';
		$aviation_industry_custom_css .= '--font-head: ' . esc_attr($aviation_industry_heading_typography_font) . ';';
		$aviation_industry_custom_css .= '}';
	}

	$aviation_industry_columns = get_theme_mod('aviation_industry_posts_per_columns', 3);
	$aviation_industry_columns = absint($aviation_industry_columns);
	if ( $aviation_industry_columns < 1 || $aviation_industry_columns > 6 ) {
		$aviation_industry_columns = 3;
	}
	$aviation_industry_custom_css .= "
		.site-content .article-wraper-archive {
			grid-template-columns: repeat({$aviation_industry_columns}, 1fr);
		}
	";

	$aviation_industry_copyright_alignment = get_theme_mod( 'aviation_industry_copyright_alignment', 'Default' );
	if ( $aviation_industry_copyright_alignment === 'Reverse' ) {
		$aviation_industry_custom_css .= '.site-info .column-row { flex-direction: row-reverse; }';
		$aviation_industry_custom_css .= '.footer-credits { justify-content: flex-end; }';
		$aviation_industry_custom_css .= '.footer-copyright { text-align: right; }';
		$aviation_industry_custom_css .= '.site-info .column.column-3 { text-align: left; }';
	} elseif ( $aviation_industry_copyright_alignment === 'Center' ) {
		$aviation_industry_custom_css .= '.site-info .column-row { flex-direction: column; align-items: center; gap: 15px; }';
		$aviation_industry_custom_css .= '.footer-credits { justify-content: center; }';
		$aviation_industry_custom_css .= '.footer-copyright { text-align: center; }';
		$aviation_industry_custom_css .= '.site-info .column.column-3 { text-align: center; }';
	}

	$aviation_industry_footer_widget_background_color = get_theme_mod('aviation_industry_footer_widget_background_color');
	if ($aviation_industry_footer_widget_background_color) {

		$aviation_industry_custom_css .= "
			.footer-widgetarea {
				background-color: ". esc_attr($aviation_industry_footer_widget_background_color) .";
			}
		";
	}

	$aviation_industry_footer_widget_background_image = get_theme_mod('aviation_industry_footer_widget_background_image');
	if ($aviation_industry_footer_widget_background_image) {
		$aviation_industry_custom_css .= "
			.footer-widgetarea {
				background-image: url(" . esc_url($aviation_industry_footer_widget_background_image) . ");
			}
		";
	}

	$aviation_industry_copyright_font_size = get_theme_mod('aviation_industry_copyright_font_size');
	if ($aviation_industry_copyright_font_size) {

		$aviation_industry_custom_css .= "
			.footer-copyright {
				font-size: ". esc_attr($aviation_industry_copyright_font_size) ."px;
			}
		";
	}

	/*-------------------- Menu Color CSS -------------------*/

	$aviation_industry_header_menus_color = get_theme_mod('aviation_industry_header_menus_color');
	if($aviation_industry_header_menus_color != false){
		$aviation_industry_custom_css .='.site-navigation .primary-menu a{';
			$aviation_industry_custom_css .='color: '.esc_attr($aviation_industry_header_menus_color).'!important;';
		$aviation_industry_custom_css .='}';
	}

	$aviation_industry_header_menus_hover_color = get_theme_mod('aviation_industry_header_menus_hover_color');
	if($aviation_industry_header_menus_hover_color != false){
		$aviation_industry_custom_css .='.site-navigation .primary-menu a:hover{';
			$aviation_industry_custom_css .='color: '.esc_attr($aviation_industry_header_menus_hover_color).'!important;';
		$aviation_industry_custom_css .='}';
	}

	$aviation_industry_header_submenus_color = get_theme_mod('aviation_industry_header_submenus_color');
	if($aviation_industry_header_submenus_color != false){
		$aviation_industry_custom_css .='.site-navigation .primary-menu ul.sub-menu li a,.site-navigation .primary-menu li ul li a{';
			$aviation_industry_custom_css .='color: '.esc_attr($aviation_industry_header_submenus_color).'!important;';
		$aviation_industry_custom_css .='}';
	}

	$aviation_industry_header_submenus_hover_color = get_theme_mod('aviation_industry_header_submenus_hover_color');
	if($aviation_industry_header_submenus_hover_color != false){
		$aviation_industry_custom_css .='.site-navigation .primary-menu > li ul.sub-menu a:hover,.site-navigation .primary-menu li ul li a:hover{';
			$aviation_industry_custom_css .='color: '.esc_attr($aviation_industry_header_submenus_hover_color).'!important;';
		$aviation_industry_custom_css .='}';
	}