/**
 * Header
 */

.header {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  opacity: 0;
  z-index: 100;
  transition: all 0.3s ease-in-out;

  @include resp-min($breakpoint-xlarge) {
    padding: #{$base-spacing-unit*1.5} #{$base-spacing-unit*6}; 
  }

  &.show {
    opacity: 1;
  }

  .grid-x { align-items: center; }

  .nav-right, .nav-left {
    display: none;

    @include resp-min($breakpoint-xlarge) {
      display: block;
    }
  }

  .nav {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    list-style: none;

    @include resp-min($breakpoint-xlarge) {
      flex-direction: row;
    }
    
    .menu-item {
      padding: #{$base-spacing-unit/2} 0;

      @include resp-min($breakpoint-xlarge) {
        display: inline-block;
        padding: 0;
      }

      > a {
        font-size: 16px;
        color: $white-color;
        transition: all 0.3s ease-in-out;

        @include resp-min($breakpoint-large) {
          font-size: 24px;
        }

        @include resp-min($breakpoint-xlarge) {
          font-size: 16px;
        }
      }
    }
  }

  .header-logo {
    width: 100%;
    display: block;
    padding: 0;
    opacity: 0;
    transition: all 0.3s ease-in-out;

    svg {
      width: 100%;
      padding: 0 #{$base-spacing-unit*2};
      box-sizing: border-box;

      path { fill: $black-color; }
    }
  }

  @include resp-min($breakpoint-xlarge) {
    &.fixed {
      position: fixed;
      background: rgba($white-color, 0.7);
      backdrop-filter: blur(8px);
      padding: #{$base-spacing-unit/2} #{$base-spacing-unit*6};

      .menu-item a { color: $black-color; }

      .header-logo { opacity: 1; }
    }

    &.hide {
      transform: translateY(-100%);
    }
  }
}


.nav-mobile {
  display: block;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  background: $black-color;
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.3s ease-in-out;

  &.visible {
    transform: translateY(0);
    opacity: 1;
  }

  @include resp-min($breakpoint-xlarge) {
    display: none;
  }

  nav { margin: auto; }

  .header-social {
    font-size: 14px;
    color: $white-color;
    font-weight: 500;
    text-transform: none;
    position: absolute;
    bottom: #{$base-spacing-unit*2};
    left: 50%;
    transform: translateX(-50%);

    @include resp-min($breakpoint-large) {
      font-size: 16px;
    }

    svg {
      margin-left: #{$base-spacing-unit/3};
      path { fill: $white-color };
    }
  }
}

/**
 * Hamburger menu
 */

.nav-burger {
  width: #{$base-spacing-unit*2};
  height: #{$base-spacing-unit*2};
  position: fixed;
  top: #{$base-spacing-unit*1.5};
  left: $base-spacing-unit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba($white-color, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  z-index: 550;
  transition: all 0.3s ease-in-out;

  @include resp-min($breakpoint-xlarge) {
    display: none;
  }
}
.nav-burger__line {
  width: 30px;
  height: 2px;
  background-color: $brand-color;
  display: block;
  margin: 3px auto;
  transition: all 0.3s ease-in-out;

  @include resp-min($breakpoint-xlarge) {
    display: none;
  }
}

.nav-burger.open {
  background: none;
  border: 2px solid rgba($white-color, 0.2);
  
  .nav-burger__line:first-child {
    transform: translateY(4px) rotate(45deg);
    background: $white-color;
  }

  .nav-burger__line:last-child {
    transform: translateY(-4px) rotate(-45deg);
    background: $white-color;
  }
}