//
// HEADER
//


.header {
  padding: 0;

  a {
    text-decoration: none !important;
  }

  .site-logo {
    vertical-align: middle;
  }
}

.header__branding {
  float: left;
}

// Hide title if the site logo link is not hidden
.site-logo-link:not( [style*="none"] ) + .header__title {
  display: none;
}

.header__title {
  .h4;
  line-height: inherit;

  a {
    color: @co-text;
  }
}

.header__toggle-menu {
  float: right;
  width: 30px;
  height: 30px;
  margin: 15px 0;
  text-align: center;
  cursor: pointer;
  user-select: none;

  .fa {
    margin-top: 7px;
  }
}

@media @mq-md-max {
  .header {
    .site-logo {
      max-height: 30px;
    }
  }

  .header__branding {
    height: 60px;
    line-height: 60px;
  }

  .header__menu {
    display: none;
    clear: both;

    &.is-open {
      display: block;
    }

    ul:not( .sub-menu ):not( .children ) {
      font-size: 14px;

      a {
        color: @co-text;

        &:hover {
          color: @co-text-strong;
        }
      }
    }

    .menu-item,
    .page_item {
      border-top: solid 1px @co-border;

      a {
        display: block;
        padding: .75em 0;
      }
    }

    .sub-menu,
    .children {
      font-size: 12px;
      text-transform: uppercase;

      .menu-item,
      .page_item {
        a:before {
          content: '»';
          margin: 0 .5em;
        }
      }
    }
  }
}

@media @mq-lg-min {
  .header {
    .site-logo {
      max-height: 42px;
    }
  }

  .header__branding {
    height: 90px;
    line-height: 90px;
  }

  .header__access {
    float: right;
    line-height: 30px;
    text-align: right;
  }

  .header__toggle-menu {
    display: none;
  }

  .header__menu {
    ul:not( .sub-menu ):not( .children ) {
      > .menu-item,
      > .page_item {
        position: relative;
        display: inline-block;
        vertical-align: top;
        padding: 30px 0;

        &:hover .sub-menu,
        &:hover .children {
          visibility: visible;
          opacity: 1;
        }

        &.featured a {
          display: inline;
          padding: .5em 1em;
          border: solid 2px @co-text-strong;

          &:hover {
            color: @co-text;
            border-color: @co-text;
          }
        }

        > a {
          display: block;
          color: @co-text-strong;

          &:hover {
            color: @co-text;
          }
        }

        + .menu-item,
        + .page_item {
          margin-left: 1em;
        }
      }
    }

    .sub-menu,
    .children {
      opacity: 0;
      visibility: hidden;
      position: absolute;
      top: 90px;
      left: 50%;
      margin-left: -105px;
      transition: @tr-medium;
      text-align: center;
      background: @co-text;
      text-transform: uppercase;
      font-size: 12px;
      line-height: 1.25;
      letter-spacing: .1em;
      border-top: none;
      z-index: 60;

      > .menu-item,
      > .page_item {
        border-top: solid 1px shade( @co-text, 25% );
      }

      a {
        display: block;
        padding: 1em;
        width: 210px;
        color: @co-background;

        &:hover {
          background: shade( @co-text, 25% );
        }
      }
    }
  }
}
