
/*************************
*      SHARED STYLES     *
**************************/

/* disable text decoration  */
.menu-link {
  color: var(--text-default);
  text-decoration: none !important;
  margin-top: 0;
  margin-bottom: 0;
}

.menu-link:last-child:hover {
  color: var(--text-selected);
}

/*************************
*       HEADER BAR       *
**************************/

.global-header {
  -ms-flex-negative: 0;
      flex-shrink: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  height: 5.75rem;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  -webkit-box-shadow: 0 2px 4px var(--box-shadow);
          box-shadow: 0 2px 4px var(--box-shadow);
  padding: 0 40px;
  background: white;
  z-index: 10;
}

.scratch-logo {
  width: 100px;
}

.nav__body {
  background: white;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  overflow-y: visible;
}

.nav {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

.btn-group {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.btn-group .btn {
  margin-left: 8px;
}

/*************************
*     NAVIGATION MENU    *
**************************/
.nav__menu {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.menu__item {
  margin-left: 40px;
}


/*************************
*      MENU PANEL        *
**************************/

.menu-panel {
  padding: 32px 160px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-shadow: 0 2px 4px var(--box-shadow);
          box-shadow: 0 2px 4px var(--box-shadow);
}

.menu-summary {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  margin-right: 40px;
}

.submenu-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
}

/*************************
*         SUBMENU        *
**************************/

.submenu {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  padding-left: 24px;
  border-left: 1px solid var(--border-dark);
}

.submenu__title {
  /* H5 */
  margin: 0;
  color: var(--text-subtle);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.625rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.submenu__list__item {
  /* Paragraph medium */
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin: 1.125rem 0;
}

/*************************
*        DROPDOWN        *
**************************/

.dropdown {
  position: static;
}

.dropdown__content {
  max-height: 0;
  overflow: hidden;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  -webkit-transition: max-height 300ms ease-in-out;
  -o-transition: max-height 300ms ease-in-out;
  transition: max-height 300ms ease-in-out;
  background: white;
  -webkit-box-shadow: 0 2px 4px var(--box-shadow), 0 2px 4px var(--box-shadow) inset;
          box-shadow: 0 2px 4px var(--box-shadow), 0 2px 4px var(--box-shadow) inset;
}

.dropdown > .dropdown__toggle::after {
  content: '\f078';
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  font-weight: 300;
  text-rendering: auto;
  font-size: 1rem;
  margin-left: 8px;
  font-family: "Font Awesome 5 Pro";
  -webkit-transition: -webkit-transform 150ms ease-in;
  transition: -webkit-transform 150ms ease-in;
  -o-transition: transform 150ms ease-in;
  transition: transform 150ms ease-in;
  transition: transform 150ms ease-in, -webkit-transform 150ms ease-in;
}

.dropdown > .dropdown__toggle {
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.dropdown.dropdown--on > .dropdown__toggle::after {
  -webkit-transform: rotate(180deg);
      -ms-transform: rotate(180deg);
          transform: rotate(180deg);
}

.dropdown.dropdown--on > .dropdown__toggle {
  color: var(--text-selected);
}

/*************************
*          TABLET        *
**************************/
@media only screen and (max-width: 1080px) {
  .nav--on {
    overflow: hidden; /* disable scroll on body */
  }

  /*************************
  *         HEADER         *
  **************************/

  .global-header {
    padding: 24px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
  }

  /*************************
  *     NAVIGATION MENU    *
  **************************/
  .nav__body {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    bottom: 0;
    background: white;
    -webkit-transition: bottom 250ms ease-in-out;
    -o-transition: bottom 250ms ease-in-out;
    transition: bottom 250ms ease-in-out;
    -webkit-box-shadow: 0 2px 4px var(--box-shadow) inset;
            box-shadow: 0 2px 4px var(--box-shadow) inset;
    overflow-y: auto;
  }


  .nav {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: start;
        -ms-flex-pack: start;
            justify-content: flex-start;
  }

  .nav--on .nav__body {
    bottom: -100vh; /* take up the entire screen */
  }

  .nav__menu {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
  }

  .menu__item {
    -ms-flex-item-align: stretch;
        align-self: stretch;
    margin: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
  }

  .menu__item > .menu-link {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2.25rem;
  }

  /*************************
  *         SUBMENU        *
  **************************/

  .submenu__list__item {
    font-size: 1.25rem;
    line-height: 1.875rem;
    margin: 12px 0;
  }

  .submenu__list__item:last-child {
    margin-bottom: 0;
  }

  .submenu__list__item:first-child {
    margin-top: 16px;
  }

  /*************************
  *        DROPDOWN        *
  **************************/

  .dropdown__content {
    position: static;
    -webkit-box-shadow: none;
            box-shadow: none;
    background: transparent;
  }

  .dropdown__toggle {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
  }

  .dropdown {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }

  .dropdown > .dropdown__toggle::after {
    font-size: 2rem;
  }

  /*************************
  *         BUTTONS        *
  **************************/

  .btn-group {
    -webkit-box-orient: vertical;
    -webkit-box-direction: reverse;
        -ms-flex-direction: column-reverse;
            flex-direction: column-reverse;
    margin: 16px 24px;
    padding-bottom: 320px;
  }

  .btn-group .btn {
    font-size: 1.25rem;
    line-height: 1.25rem;
    margin-left: 0;
    margin: 8px 0;
  }

  /*************************
  *     HAMBURGER MENU     *
  **************************/

  .nav__toggle {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
  }

  .hamburger-menu-button {
    display: block;
    position: relative;
    -webkit-transform: translateY(7px);
        -ms-transform: translateY(7px);
            transform: translateY(7px);
    -webkit-transform-origin: 7px 7px;
        -ms-transform-origin: 7px 7px;
            transform-origin: 7px 7px;
    -webkit-transition: background 200ms ease-in;
    -o-transition: background 200ms ease-in;
    transition: background 200ms ease-in;
  }

  .hamburger-menu-button::before {
    bottom: 7px;
  }

  .hamburger-menu-button::after {
    top: 7px;
  }

  .hamburger-menu-button::before,
  .hamburger-menu-button::after {
    position: absolute;
    content: '';
    left: 0;
    -webkit-transition: -webkit-transform 200ms ease-in;
    transition: -webkit-transform 200ms ease-in;
    -o-transition: transform 200ms ease-in;
    transition: transform 200ms ease-in;
    transition: transform 200ms ease-in, -webkit-transform 200ms ease-in;
  }

  .hamburger-menu-button,
  .hamburger-menu-button::before,
  .hamburger-menu-button::after {
    width: 1.5rem;
    height: 2px;
    background-color: var(--text-default);
  }

  .nav--on .hamburger-menu-button {
    background: transparent;
  }

  .nav--on .hamburger-menu-button::before {
    -webkit-transform: translateY(7px) rotate(225deg);
        -ms-transform: translateY(7px) rotate(225deg);
            transform: translateY(7px) rotate(225deg);
  }

  .nav--on .hamburger-menu-button::after {
    -webkit-transform: translateY(-7px) rotate(135deg);
        -ms-transform: translateY(-7px) rotate(135deg);
            transform: translateY(-7px) rotate(135deg);
  }
}

/* Fix sticky hover effect on mobile*/
@media(hover: hover) and (pointer: fine) {
  .menu-link:hover {
    color: var(--text-default);
  }
}