nav {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  z-index: 100;
  vertical-align: middle;
  padding-top: 20px;
}

.scroll-pos1 {
  position: fixed;
  background-color: green;
  -webkit-box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.4);
  box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.4);
  padding-top: 0;
  z-index: 100;
  top: 0;
}

.scroll-pos2 {
  position: static;
  background-color: green;
  -webkit-box-shadow: -5px 5px 5px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: -5px 5px 5px rgba(0, 0, 0, 0.4);
  box-shadow: -5px 5px 5px rgba(0, 0, 0, 0.4);
  padding-top: 0;
}

#nav_logo {
  height: 50px;
  padding: 5px;
  vertical-align: middle;
  margin-top: 10px;
}

nav ul {
  list-style: none;
  padding: 0;
  float: right;
  z-index: 100;
}

nav ul>li {
  position: relative;
  z-index: 100;
}

nav ul li ul {
  position: absolute;
  display: none;
  margin-top: 20px;
  opacity: 0;
}

nav ul li ul li:first-child {
  border-radius: 5px 5px 0 0;
}

nav ul li ul li:last-child {
  border-radius: 0 0 5px 5px;
}

.nav__list {
  padding: 0.5rem 0;
  margin: 0;
  text-align: right;
}

.nav__item {
  box-sizing: border-box;
  display: inline-block;
  text-align: center;
  line-height: 24px;
  padding: 15px 0.5rem;
  text-transform: uppercase;
}

.nav__item .dropdown {
  display: block;
  width: 180%;
  background-color: black;
  padding: 24px;
  text-align: center;
  margin-top: -10px;
}

.nav a {
  text-decoration: none;
  color: white;
  padding: 15px;
  background-color: transparent !important;
  font-weight: 1000;
  font-size: 0.8rem;
}

.nav__list .disabled {
  cursor: not-allowed;
  opacity: 0.5;
  text-decoration: none;
}

.dropdown_main>a {
  pointer-events: none;
}

.header__menu {
  display: none;
}

.header {
  position: absolute;
  width: 100%;
  z-index: 10;
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0;
  vertical-align: middle;
  border-top: 5px solid white;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-bottom: 0 solid white;
  overflow: hidden;
  transition: 200ms ease;
}

#navbar-footer {
  padding: 12px 0;
  vertical-align: middle;
  text-align: center;
  background-color: #222;
  color: #9d9d9d;
}

#navbar-footer a {
  padding: 0 10px;
}

#navbar-footer p {
  margin: 0;
}

#glyphicon {
  position: fixed;
  bottom: 30px;
  right: 40px;
  border-radius: 5px;
  background: rgba(211, 211, 211, 0.75);
  text-align: center;
  color: rgba(255, 255, 255, 1);
  font-size: 48px;
}

.scroll-pos1+main {
  padding-top: 71px;
}

@media screen and (min-width: 771px) {


  nav ul>li:hover ul, nav ul>li:focus ul, nav ul>li:active ul {
    display: block;
    margin-top: 20px;
    animation: fadein 0.3s forwards;
  }

  nav ul>li:hover .caret, nav ul>li:focus .caret, nav ul>li:active .caret {
    transform: rotateX(180deg);
    border-width: 5px 5px 0 5px;
  }
}

@media screen and (max-width: 770px) {
  .scroll-pos1+main {
    padding-top: 0;
  }

  .touch a, .current_page>a {
    color: #white;
  }

  .dropdown_main .dropdown_touch {
    display: block;
    margin-top: 20px;
    animation: fadein 0.3s forwards;
  }

  .caret_touch {
    transform: rotateX(180deg);
    border-width: 5px 5px 0 5px;
  }
}

@media screen and (max-width: 1200px) {
  .nav__list {
    width: 60%;
  }

  .nav a {
    padding: 5px;
  }
}

@media screen and (max-width: 770px) {
  nav {
    background-color: #222;
    width: 100%;
    /* This trasform moves the drawer off canvas. */
    -webkit-transform: translate(-100%;
    , 0);
    transform: translate(-100%, 0);
    /* Optionally, we animate the drawer. */
    transition: transform 0.3s ease;
    max-height: 450px;
    overflow-y: scroll;
    overflow-x: hidden;
  }

  nav.open {
    -webkit-transform: translate(0, 0);
    transform: translate(0, 0);
  }

  .nav a {
    padding: 1.5em;
  }

  .header__menu {
    display: inline-block;
    position: fixed;
    right: 0;
    top: 0;
    margin: 50px 15px 0 0;
    z-index: 999;
    border-radius: 5px;
    width: 80px;
    height: 80px;
  }

  .header__menu svg {
    width: 32px;
    fill: #E0E0E0;
  }
  .hamburger {
    position: absolute;
    width: 50px;
    height: 6px;
    background: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-ransform: translate(-50%, -50%);
    box-shadow: 5px 5px 5px rgba(0, 0, 0, .2);
    transition: .5s;
  }

  .hamburger:before,
  .hamburger:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 6px;
    background: white;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, .2);
    transition: .5s;
  }

  .hamburger:before {
    top: -16px;
  }

  .hamburger:after {
    top: 16px;
  }

  .active .hamburger {
    background-color: rgba(0, 0, 0, 0);
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0);
  }

  .active .hamburger:before {
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    top: 0;
  }

  .active .hamburger:after {
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
    top: 0;
  }

  .nav__list {
    width: 100%;
  }

  .nav__item {
    display: list-item;
    width: 100%;
    padding: 12px 0 15px 0;
  }

  .nav__item a {
    width: 100%;
  }

  nav ul li ul {
    position: static;
    float: none;
  }

  .nav__item .dropdown {
    padding: 8px 0;
    width: 100%;
    margin-top: 0px;
  }

  .nav .container {
    padding: 0;
  }

  .scroll-pos1, .scroll-pos2 {
    background-color: #222;
    -moz-transition: transform 0.3s ease;
    ;
    -o-transition: transform 0.3s ease;
    ;
    -webkit-transition: transform 0.3s ease;
    ;
    transition: transform 0.3s ease;
    ;
    padding-top: 20px;
    -webkit-box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.4);
    -moz-box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.4);
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
  }
}

@keyframes fadein {
  0% {
    opacity: 0
  }

  100% {
    opacity: 1
  }
}

@keyframes slidein {
  0% {
    opacity: 0;
    top: -20px
  }

  100% {
    opacity: 1;
    top: 0
  }
}

@keyframes slideout {
  0% {
    opacity: 0;
    top: -200px
  }

  100 {
    opacity: 1;
    top: 0
  }
}
