/*
 * Site header
 * ----------------------------------------------
 * - Global header
 * - Top header
 * - Menu
 */

/*
 * Global header
 * ----------------------------------------------
 */
#header {
  position: fixed;
  width: 100%;
  z-index: 1000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.8rem;
  letter-spacing: .05rem;
  font-weight: bold;
  color: #FFFFFF;
  background-color: #2A62AE;
}

#content {
  margin-top: 150px; /* height from the top (90) plus nav (50) */
}

/*
 * Top header
 * ----------------------------------------------
 */
/* Layout */
.header-top {
  background-color: #0F4477;
  box-shadow: 0 3px 5px 0 rgba(2, 15, 27, 0.55);
}

.header-top__content {
  height: 90px;
  display: flex;
  align-items: center;
}

/* Site branding */
#block-jango-sub-branding a {
  display: block;
}

#block-jango-sub-branding img {
  max-height: 50px;
  width: auto;
}

#block-jango-sub-branding a:last-child {
  display: none;
}

/* Bloc shortcode */
.header-top .field--name-body {
  display: flex;
  flex-grow: 1;
  justify-content: space-between;
  align-items: center;
}

.header-top .field--name-body p {
  margin: 0;
}

.header-top .field--name-body .btn {
  font-weight: bold;
  font-size: 1.5rem;
  line-height: 1.8rem;
}

/* Description */
.site-description {
  margin-left: 15px;
  padding-left: 15px;
  border-left: 2px solid #E6322B;
}

.site-description p {
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1.6rem;
  font-weight: normal;
}

/* Logos */
.header-logos img {
  display: inline-block;
  max-height: 60px;
  width: auto;
  margin-right: 10px;
}

/* Socials */
.header-socials {
  margin-left: 20px;
  cursor: default;
}

.header-socials .link {
  display: inline-block;
}

.header-socials .link:hover {
  opacity: .8;
}

.header-socials .link::after {
  color: #E6322B;
  display: inline-block;
}

.header-socials .youtube::after {
  content: url('./../img/socials/youtube.svg');
}

.header-socials .facebook::after {
  content: url('./../img/socials/facebook.svg');
}

.header-socials .instagram::after {
  content: url('./../img/socials/instagram.svg');
}

.header-socials .linkedin::after {
  content: url('./../img/socials/linkedin.svg');
}

.header-socials .twitter::after {
  content: url('./../img/socials/twitter.svg');
}

/*
 * Menu
 * ----------------------------------------------
 */
@media (min-width: 801px) {
  .header-menu {
    height: 60px;
    display: flex;
    align-items: center;
  }

  .header-menu a {
    display: block;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-left: 30px;
    transition: color ease .3s;
  }

  /* Add space after first item by adding a pseudo-element and reordering items */
  .header-menu::after {
    content: '';
    order: -1;
    flex-grow: 1;
  }

  .header-menu .menu-item--level-0:first-child {
    order: -1;
  }

  /* Custom first item */
  .header-menu .menu-item--level-0:first-child a {
    margin-left: 0;
    padding: 6px 20px 7px;
    border: 1px solid #FFFFFF;
    border-radius: 2px;
    transition: background-color .3s ease;
  }

  .header-menu .menu-item--level-0:first-child a:hover {
    background-color: #FFFFFF;
  }

  /* Sub menu */
  .header-menu .menu-item {
    position: relative;
  }

  .header-menu .sub-menu {
    position: absolute;
    top: 100%;
    width: 260px;
    box-sizing: border-box;
    background-color: #2A62AE;
    /* Hide */
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity .3s ease;
  }

  .header-menu a:hover ~ .sub-menu,
  .header-menu .sub-menu:hover {
    height: auto;
    opacity: 1;
    padding: 30px 10px 10px;
  }

  .header-menu .sub-menu a {
    margin: 15px 10px;
  }
}

/*
 * Tablets
 * ----------------------------------------------
 */
@media (max-width: 1200px) {
  .header-socials {
    display: none;
  }
}

/*
 * Mobiles
 * ----------------------------------------------
 */
@media (max-width: 991px) {
  .site-description {
    display: none;
  }

  .header-logos {
    flex-grow: 1;
    display: flex;
    justify-content: space-around;
  }
}

@media (max-width: 800px) {
  #content {
    margin-top: 90px; /* height from the header top (90) */
  }

  /* Add space for burger icon */
  .header-top .field--name-body {
    padding-right: 10%;
  }

  /* Burger nav icon */
  .burger-icon {
    display: inline-block;
    cursor: pointer;
    position: fixed;
    top: 25px;
    right: 20px;
  }

  .bar1, .bar2, .bar3 {
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    margin: 8px 0;
    transition: 0.4s;
  }

  .burger-icon--close .bar1 {
    -webkit-transform: rotate(-45deg) translate(-7px, 6px);
    transform: rotate(-45deg) translate(-7px, 6px);
  }

  .burger-icon--close .bar2 {
    opacity: 0;
  }

  .burger-icon--close .bar3 {
    -webkit-transform: rotate(45deg) translate(-9px, -9px);
    transform: rotate(45deg) translate(-9px, -9px);
  }

  /* Menu */
  .header-menu {
    height: calc(100vh - 90px); /* Height header top */
    /* Hide */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all .3s ease;
  }

  .header-menu--show {
    max-height: 100vh;
    opacity: 1;
    padding: 30px 0;
  }

  .header-menu a {
    display: inline-block;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-top: 25px;
    transition: color ease .3s;
  }

  .header-menu .sub-menu {
    padding-left: 20px;
  }
}

@media (max-width: 600px) {
  .header-top__content {
    height: 70px;
  }

  #content {
    margin-top: 70px; /* height from the header top (70) */
  }

  #block-jango-sub-branding img {
    max-height: 40px;
  }

  .header-logos img {
    max-height: 40px;
  }

  /* Add space for burger icon */
  .header-top .field--name-body {
    padding-right: 40px;
  }

  /* Burger nav icon */
  .burger-icon {
    top: 15px;
    right: 10px;
  }

  /* Menu */
  .header-menu {
    height: calc(100vh - 70px); /* Height mobile header top */
  }
}

@media (max-width: 500px) {
  .header-logos img {
    display: none;
  }
}
