<?php
/**
 * Sample implementation of the Custom Header feature
 *
 * @link https://developer.wordpress.org/themes/functionality/custom-headers/
 *
 * @package technology_software_firm
 */

function technology_software_firm_custom_header_setup() {
	add_theme_support( 'custom-header', apply_filters( 'technology_software_firm_custom_header_args', array(
		'default-text-color'     => 'fff',
		'header-text' 			 =>	false,
		'width'                  => 1360,
		'height'                 => 110,
		'flex-width'         	=> true,
        'flex-height'        	=> true,
		'wp-head-callback'       => 'technology_software_firm_header_style',
	) ) );
}

add_action( 'after_setup_theme', 'technology_software_firm_custom_header_setup' );

if ( ! function_exists( 'technology_software_firm_header_style' ) ) :

add_action( 'wp_enqueue_scripts', 'technology_software_firm_header_style' );
function technology_software_firm_header_style() {
	if ( get_header_image() ) :
	$technology_software_firm_custom_css = "
		header.site-header .header-main-wrapper .bottom-header-outer-wrapper .bottom-header-part,
		.sticky-header.is-sticky{
			background-image:url('".esc_url(get_header_image())."') !important;
			background-position: center top;
			background-size: cover !important;
		}
		header.site-header .header-main-wrapper .bottom-header-outer-wrapper .bottom-header-part .bottom-header-part-wrapper{
			box-shadow: unset !important;
			margin-top: 0px !important; 
		}
		.bottom-header-right-part button{
			background-color: transparent !important;
			border-color: transparent !important;
		}
		";
	   	wp_add_inline_style( 'technology-software-firm-style', $technology_software_firm_custom_css );
	endif;
}
endif;