nav {
  padding: 10px 0;
}

nav > div.container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

nav ul {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  list-style: none;
}

nav li > :not(ul) {
  display: block;
  padding: 15px 0;
  cursor: pointer;
}

nav li > ul {
  display: none;
  padding-left: 1rem;
}

nav a.left-link {
  display: inline-block;
}

nav div.menu-container {
  display: none;
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

nav li.submenu > :not(ul):after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f107";
  display: block;
  float: right;
}

/* mobile only (width < 992px) */
@media (max-width: 991.98px) {
  nav > div.container {
    width: 100%;
    max-width: 100%;
  }

  nav div.menu-container.show {
    display: block;
    max-height: 70vh;
    overflow-y: auto;
    margin-top: 10px;
  }

  nav button.mobile-toggle {
    background-color: #fff;
    border: 0;
    padding: 10px;
  }

  nav li > ul.show {
    display: flex;
  }
}

/* desktop only (width >= 992px) */
@media (min-width: 992px) {
  nav.fixed-top.smooth {
    transition: padding 0.3s ease;
  }

  nav {
    padding: 20px 0;
  }
  nav.fixed-top.scrolled {
    padding: 10px 0;
  }

  nav > div.container {
    flex-flow: row nowrap;
    justify-content: flex-start;
  }

  nav button.mobile-toggle {
    display: none;
  }

  nav div.menu-container {
    display: flex;
    flex-basis: auto;
  }

  nav div.menu-container > ul {
    flex-direction: row;
    margin-left: auto;
  }

  nav li > :not(ul) {
    padding: 10px 20px;
  }

  nav li {
    position: relative;
  }
  nav li > ul {
    display: flex;
    position: absolute;
    min-width: 250px;
    padding-left: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  nav li > ul > li > ul {
    left: 100%;
    top: 0;
  }

  nav li:hover > ul {
    opacity: 1;
    visibility: visible;
  }

  nav li.submenu > :not(ul):after {
    display: inline-block;
    padding-left: 10px;
  }
  nav li > ul > li.submenu > :not(ul):after {
    content: "\f105";
    display: block;
    float: right;
  }
}

/*
Scroll to top icon
*/

#scrollToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  z-index: 99;
  border-radius: 50%;
  transition: all 0.3s ease;
  visibility: hidden;
  opacity: 0;
}
#scrollToTop i {
  position: relative;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  vertical-align: top;
  transition: top 0.2s ease;
}
#scrollToTop:hover i {
  top: 30%;
}
#scrollToTop.visible {
  visibility: visible;
  opacity: 0.8;
}

/*
Gallery
*/

.gallery figure {
  margin: 0 !important;
  padding: 0.5rem !important;
}

.gallery figure a {
  display: block;
  border: 1px solid #dee2e6;
}

.gallery figure .img-holder {
  width: 100%;
  height: 0;
  padding-top: 80%;
  overflow: hidden;
  position: relative;
}

.gallery figure .img-holder > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery figure .img-title {
  text-align: center;
  padding: 0.75rem;
  line-height: 1.0;
}

.gallery figure a:first-child,
.gallery figure .img-holder > img {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}
.gallery figure a:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* Misc */

.anchor {
  display: block;
  position: relative;
  top: -100px;
  visibility: hidden;
}


/*
=========================
### themes
=========================
*/

/* ### Light theme ### */

nav.light {
  background-color: #fff;
  box-shadow: 0px 2px 10px 0px rgba(127,127,127,0.1);
}

nav.light li > ul {
  background-color: #fff;
}
nav.light.with-separators li > ul li:before {
  content: ' ';
  display: block;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05));
}

@media (min-width: 992px) {
  nav.light li > ul {
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  }
}
