.sm-main {
  background: rgba(0, 0, 0, .85);
  position: fixed;
  width: 100%;
  height: 100vh;
  right: 0;
  top: 0;
  opacity: 0;
  transition: all .3s;
  overflow: auto;
}

  /* SCROLLBAR */
  .sm-main::-webkit-scrollbar {
    width: 0;
  }

@media (min-width: 475px) {
  .sm-main {
    width: 250px;
  }
}

.sm-main.visible {
  opacity: 1;
}

.sm-main > li:first-child {
  margin-top: 50px
}

.sm-main a {
  padding: 10px 20px;
  color: #ccc;
  font-family: "Montserrat";
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid transparent;
  display: block;
  transition: color .2s
}

  .sm-main a:hover {
    color: #fff;
  }

  .sm-main a .sub-arrow {
    position: absolute;
    top: 50%;
    margin-top: -17px;
    left: auto;
    right: 4px;
    width: 34px;
    height: 34px;
    overflow: hidden;
    font: bold 16px/34px monospace !important;
    text-align: center;
    text-shadow: none;
    background: rgba(40, 40, 40, 0.8);
    border-radius: 4px;
  }

    .sm-main a .sub-arrow::before {
      content: '+';
    }

  .sm-main a.highlighted .sub-arrow::before {
    content: '-';
  }

.sm-main > li:first-child > a, .sm-main > li:first-child > :not(ul) a {
  /*border-radius: 8px 8px 0 0;*/
}

.sm-main > li:last-child > a, .sm-main > li:last-child > *:not(ul) a, .sm-main > li:last-child > ul, .sm-main > li:last-child > ul > li:last-child > a, .sm-main > li:last-child > ul > li:last-child > *:not(ul) a, .sm-main > li:last-child > ul > li:last-child > ul, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul {
  /*border-radius: 0 0 8px 8px;*/
}

  .sm-main > li:last-child > a.highlighted, .sm-main > li:last-child > *:not(ul) a.highlighted, .sm-main > li:last-child > ul > li:last-child > a.highlighted, .sm-main > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > a.highlighted, .sm-main > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > ul > li:last-child > *:not(ul) a.highlighted {
    border-radius: 0;
  }

.sm-main ul {
  /*background: #fff;*/
}

  .sm-main ul ul {
    background: rgba(102, 102, 102, 0.1);
  }

  .sm-main ul a, .sm-main ul a:hover, .sm-main ul a:focus, .sm-main ul a:active {
    background: transparent;
    color: #ccc;
    font-size: 14px;
    text-shadow: none;
    border-left: 8px solid transparent;
  }

    .sm-main ul a.current {
      background: #006892;
      background-image: linear-gradient(to bottom, #006188, #006f9c);
      color: #fff;
    }

    .sm-main ul a.disabled {
      color: #b3b3b3;
    }

  .sm-main ul ul a,
  .sm-main ul ul a:hover,
  .sm-main ul ul a:focus,
  .sm-main ul ul a:active {
    border-left: 16px solid transparent;
  }

  .sm-main ul ul ul a,
  .sm-main ul ul ul a:hover,
  .sm-main ul ul ul a:focus,
  .sm-main ul ul ul a:active {
    border-left: 24px solid transparent;
  }

  .sm-main ul ul ul ul a,
  .sm-main ul ul ul ul a:hover,
  .sm-main ul ul ul ul a:focus,
  .sm-main ul ul ul ul a:active {
    border-left: 32px solid transparent;
  }

  .sm-main ul ul ul ul ul a,
  .sm-main ul ul ul ul ul a:hover,
  .sm-main ul ul ul ul ul a:focus,
  .sm-main ul ul ul ul ul a:active {
    border-left: 40px solid transparent;
  }

  .sm-main ul li {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

    .sm-main ul li:first-child {
      border-top: 0;
    }

@media (min-width: 5000px) {
  /* Switch to desktop layout
  -----------------------------------------------
     These transform the menu tree from
     collapsible to desktop (navbar + dropdowns)
  -----------------------------------------------*/
  /* start... (it's not recommended editing these rules) */
  .sm-main ul {
    position: absolute;
    width: 12em;
  }

  .sm-main li {
    float: left;
  }

  .sm-main.sm-rtl li {
    float: right;
  }

  .sm-main ul li, .sm-main.sm-rtl ul li, .sm-main.sm-vertical li {
    float: none;
  }

  .sm-main a {
    white-space: nowrap;
  }

  .sm-main ul a, .sm-main.sm-vertical a {
    white-space: normal;
  }

  .sm-main .sm-nowrap > li > a, .sm-main .sm-nowrap > li > :not(ul) a {
    white-space: nowrap;
  }

  /* ...end */

  .sm-main {
    border-radius: 0;
  }

    .sm-main a, .sm-main a:hover, .sm-main a:focus, .sm-main a:active, .sm-main a.highlighted {
      padding: 8px 12px 10px;
      color: #fff;
    }

    .sm-main.fixed a {
      color: #333;
    }

    .sm-main a:hover, .sm-main a:focus, .sm-main a:active, .sm-main a.highlighted {
      border-bottom: 2px solid #FFF
    }

    .sm-main.fixed a:hover {
      border-bottom: 2px solid #333
    }

    .sm-main a.disabled {
      background: #3092c0;
      background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);
      color: #a1d1e8;
    }

    .sm-main a .sub-arrow {
      top: auto;
      margin-top: 0;
      bottom: 0;
      left: 50%;
      margin-left: -5px;
      right: auto;
      width: 0;
      height: 0;
      border-width: 5px;
      border-style: solid dashed dashed dashed;
      border-color: #FFF transparent transparent transparent;
      background: transparent;
      border-radius: 0;
    }

      .sm-main a .sub-arrow::before {
        display: none;
      }

    .sm-main > li:first-child > a, .sm-main > li:first-child > :not(ul) a {
      /*border-radius: 8px 0 0 8px;*/
    }

    .sm-main > li:last-child > a, .sm-main > li:last-child > :not(ul) a {
      /*border-radius: 0 8px 8px 0 !important;*/
    }

    .sm-main > li:not(:first-child) {
      /*border-left: 1px solid #b1cdda;*/
    }

    .sm-main ul {
      border: 1px solid #0e4967;
      padding: 7px 0;
      background: #0e4967;
      border-radius: 0 0 4px 4px !important;
      /*box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);*/
    }

      .sm-main ul ul {
        border-radius: 4px !important;
        background: #0e4967;
      }

      .sm-main ul a, .sm-main ul a:hover, .sm-main ul a:focus, .sm-main ul a:active, .sm-main ul a.highlighted {
        border: 0 !important;
        padding: 5px 15px;
        background: transparent;
        color: #FFFFFF;
        border-radius: 0 !important;
      }

        .sm-main ul a:hover, .sm-main ul a:focus, .sm-main ul a:active, .sm-main ul a.highlighted {
          background: #FFFFFF;
          /*background-image: linear-gradient(to bottom, #3298c8, #2e8cb8);*/
          color: #0e4967;
        }

        .sm-main ul a.current {
          background: #006892;
          background-image: linear-gradient(to bottom, #006188, #006f9c);
          color: #fff;
        }

        .sm-main ul a.disabled {
          background: #fff;
          color: #b3b3b3;
        }

        .sm-main ul a .sub-arrow {
          top: 50%;
          margin-top: -5px;
          bottom: auto;
          left: auto;
          margin-left: 0;
          right: 0;
          border-style: dashed dashed dashed solid;
          border-color: transparent transparent transparent silver;
        }

      .sm-main ul li {
        border: 0;
      }

    .sm-main .scroll-up,
    .sm-main .scroll-down {
      position: absolute;
      display: none;
      visibility: hidden;
      overflow: hidden;
      background: #fff;
      height: 20px;
    }

    .sm-main .scroll-up-arrow,
    .sm-main .scroll-down-arrow {
      position: absolute;
      top: -2px;
      left: 50%;
      margin-left: -8px;
      width: 0;
      height: 0;
      overflow: hidden;
      border-width: 8px;
      border-style: dashed dashed solid dashed;
      border-color: transparent transparent #2b82ac transparent;
    }

    .sm-main .scroll-down-arrow {
      top: 6px;
      border-style: solid dashed dashed dashed;
      border-color: #2b82ac transparent transparent transparent;
    }

    .sm-main.sm-rtl.sm-vertical a .sub-arrow {
      right: auto;
      left: 10px;
      border-style: dashed solid dashed dashed;
      border-color: transparent #a1d1e8 transparent transparent;
    }

    .sm-main.sm-rtl > li:first-child > a, .sm-main.sm-rtl > li:first-child > :not(ul) a {
      border-radius: 0 8px 8px 0;
    }

    .sm-main.sm-rtl > li:last-child > a, .sm-main.sm-rtl > li:last-child > :not(ul) a {
      border-radius: 8px 0 0 8px !important;
    }

    .sm-main.sm-rtl > li:first-child {
      border-left: 1px solid #2b82ac;
    }

    .sm-main.sm-rtl > li:last-child {
      border-left: 0;
    }

    .sm-main.sm-rtl ul a .sub-arrow {
      right: auto;
      left: 10px;
      border-style: dashed solid dashed dashed;
      border-color: transparent #a1d1e8 transparent transparent;
    }

    .sm-main.sm-vertical {
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

      .sm-main.sm-vertical a {
        padding: 9px 23px;
      }

        .sm-main.sm-vertical a .sub-arrow {
          top: 50%;
          margin-top: -5px;
          bottom: auto;
          left: auto;
          margin-left: 0;
          right: 10px;
          border-style: dashed dashed dashed solid;
          border-color: transparent transparent transparent #a1d1e8;
        }

      .sm-main.sm-vertical > li:first-child > a, .sm-main.sm-vertical > li:first-child > :not(ul) a {
        border-radius: 8px 8px 0 0;
      }

      .sm-main.sm-vertical > li:last-child > a, .sm-main.sm-vertical > li:last-child > :not(ul) a {
        border-radius: 0 0 8px 8px !important;
      }

      .sm-main.sm-vertical > li {
        border-left: 0 !important;
      }

      .sm-main.sm-vertical ul {
        border-radius: 4px !important;
      }

        .sm-main.sm-vertical ul a {
          padding: 9px 23px;
        }
}


/* Mobile menu toggle button */

.main-menu-btn {
  top: 10px;
  right: 20px;
  margin: 0;
  padding: 3px 6px;
  position: fixed;
  display: inline-block;
  width: 25px;
  height: 25px;
  text-indent: 25px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  z-index: 10000;
  transition: background-color 1s
}

  .main-menu-btn.shadow {
    background-color: rgba(0, 0, 0, .3)
  }

/* hamburger icon */
.main-menu-btn-icon,
.main-menu-btn-icon:before,
.main-menu-btn-icon:after {
  position: absolute;
  top: 45%;
  left: 6px;
  height: 3px;
  width: 25px;
  background: #FFF;
  -webkit-transition: all 0.25s;
  transition: all 0.25s;
}

  .main-menu-btn-icon:before {
    content: '';
    top: -7px;
    left: 0;
  }

  .main-menu-btn-icon:after {
    content: '';
    top: 7px;
    left: 0;
  }


/* x icon */

#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon {
  height: 0;
  background: transparent;
}

  #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before {
    top: 0;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
  }

  #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after {
    top: 0;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
  }


/* hide menu state checkbox (keep it visible to screen readers) */

#main-menu-state {
  position: fixed;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}


  /* hide the menu in mobile view */

  #main-menu-state:not(:checked) ~ #main-menu {
    display: none;
  }

  #main-menu-state:checked ~ #main-menu {
    display: block;
  }

/* --------------- RESPONSIVE ------------------------- */

@media (min-width: 5000px) {
  /* hide the button in desktop view */
  .main-menu-btn {
    position: absolute;
    top: -99999px;
  }
  /* always show the menu in desktop view */
  #main-menu-state:not(:checked) ~ #main-menu {
    display: block;
  }
}

@media (min-width: 500px) {
  .sm-main {
    min-width: 200px;
  }
}
