<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package aac
 */

    $header_social = get_field('header_social', 'option');
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<header id="masthead" class="site-header">
		<div class="container">
			<div class="row">
				<div class="site-branding">
					<?php the_custom_logo(); ?>
				</div>

				<nav id="site-navigation" class="main-navigation">
					<?php
						wp_nav_menu(
							array(
								'menu_id' => 'primary-menu',
							)
						);
					?>

					<button id="nav-menu-toggle">
						<span class="line"></span>
					</button>
				</nav>

				<ul class="main-navigation-secondary">
					<?php foreach ($header_social['lists'] as $item) : ?>
					<li>
							<div class="social-icon">
								<img src="<?php echo $item['icon']; ?>" alt="">
							</div>
							<ol class="other-icons">
								<?php foreach ($item['second_icons'] as $icon) : ?>
								<li>
						      <a href="<?php echo $icon['adres_url']; ?>" target="_blank">
									  <img src="<?php echo $icon['icon']; ?>" alt="">
						      </a>
								</li>
								<?php endforeach; ?>
							</ol>
					</li>
					<?php endforeach; ?>
				</ul>
			</div>
		</div>
	</header>
