<?php
/**
 * 
 *
 * @see ostrich_magazine_custom_header_setup().
 */
function ostrich_magazine_header_text_style() {
	// If we get this far, we have custom styles. Let's do this.
	$header_text_display = get_theme_mod( 'ostrich_magazine_header_text_display' );
	?>
	<style type="text/css">


	.site-title a{
		color: #<?php echo esc_attr( get_header_textcolor() ); ?>;
	}
	.site-description {
		color: <?php echo esc_attr( get_theme_mod( 'ostrich_magazine_header_tagline', '#2e2e2e' ) ); ?>;
	}

	<?php if ( !is_active_sidebar( 'hero-section-sidebar' ) ): ?>
		.right-widget-posts {
		    width: 100%;
		}

		@media screen and (min-width: 1024px){
			.right-widget-posts {			  
			    padding-left: 0px;
			}
		}
			
		<?php else: ?>
			#hero-posts #secondary{
				width: 25%;
			}
			@media screen and (max-width: 1024px) {
				#hero-posts #secondary{
					width: 100%;
				}
			}
	<?php endif; ?>
	<?php if ( get_theme_mod( 'ostrich_magazine_hero_enable', 0 ) == 0 ): ?>
		#hero-posts {
		    margin-bottom: 0px;
		}
	<?php endif; ?>

	<?php if ( get_theme_mod( 'ostrich_magazine_topbar_search' ) == false ): ?>
		#top-navigation .icon-wrapper span a:after {
		    display: none;
		}
	<?php endif; ?>

	<?php if ( !is_active_sidebar( 'blog-sidebar' ) ) { ?>
		.second-design.home .archive-blog-wrapper article:nth-child(2n+1) {
		    clear: none;
		}
		.second-design.home .archive-blog-wrapper article {
    		width: 33.33%;
    	}	
	<?php } ?>	

	.nav-shrink .container{
		display: none;
	}

	.nav-shrink nav .container{
		display: block;
	}

	.home.blog #masthead{
		margin-bottom: 0px;
	}

	</style>

	<?php
}
add_action( 'wp_head', 'ostrich_magazine_header_text_style' );