/*// -- Menu navigation -- //*/

header {
  .container {
    max-width: 1820px;
  }

  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transform: translateY(0);
  transition: all 0.5s ease;

  #header-topbar {
    position: relative;
    z-index: 100;
    transition: all 0.5s ease;
    color: var(--bs-white);

    .inner-container {
      transition: all 0.3s;
    }
  }

  #header-main {
    .logo-desktop {
      padding: 6px 0;
    }

    img {
      transition: all 0.3s;
    }

    .logo-mobile {
      img {
        height: 45px;
        width: auto;
      }
    }

    .inner-container {
      position: relative;
      &:before {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        border-radius: 50px;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.85);
        box-shadow: var(--bs-box-shadow-sm);
        transform-origin: bottom;
        transition: all 1s;
      }
      & > * {
        position: relative;
        z-index: 1;
      }
    }
  }

  @media (min-width: 1200px) {
    &.hide {
      transform: translateY(-100%);
    }

    &:not(.solid) {
      #header-topbar {
        .inner-container {
          padding-top: 1rem;
          padding-bottom: 1rem;
        }
      }

      #header-main {
        .inner-container {
          padding: 0.5rem 1rem 0.5rem 2rem;
        }
        img {
          height: 57px;
          width: auto;
        }
      }

      .logo-menu-container {
        align-items: center;
      }
    }

    &.solid {
      .logo-menu-container {
        align-items: center;
      }

      #header-topbar {
        background: var(--oj-blue-500);
        color: var(--bs-white);
        a {
          color: var(--bs-white) !important;
        }
        .inner-container {
          padding-top: 0.25rem;
          padding-bottom: 0.25rem;
        }
      }

      #header-main {
        .inner-container {
          padding: 0.5rem 2rem;
          &:before {
            transform: scale(2);
            background: rgba(255, 255, 255, 1);
          }
          img {
            height: 45px;
            width: auto;
          }
        }
      }
    }
  }

  @media (max-width: 1199px) {
    #header-topbar {
      background: var(--oj-blue-500);
      color: var(--bs-white);
      margin-bottom: 1rem;
      a {
        color: var(--bs-white) !important;
      }
      .inner-container {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
      }
    }

    #header-main {
      .inner-container {
        padding: 0.5rem 1.25rem;
        transition: all 0.5s;
      }
    }

    &.solid {
      #header-topbar {
        margin-bottom: 0rem;
      }
      #header-main {
        .inner-container {
          padding: 0.5rem 0rem;

          &:before {
            transform: scale(2);
            background: rgba(255, 255, 255, 1);
          }
          img {
            height: 40px;
            width: auto;
          }
        }
      }
    }
  }

  .desktop-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;

    .menu-item {
      &.current-menu-item:not(.menu-anchor) {
        & > a {
          background: var(--oj-blue-500);
          color: #ffffff;
        }
      }

      &.current-menu-ancestor {
        & > a {
          &:before {
            width: calc(100% - 2rem);
          }
        }
      }

      a {
        font-size: 14px;
        line-height: 24px;
        font-weight: 700;
        color: var(--bs-black);
        border-radius: var(--bs-border-radius-pill);
        text-transform: uppercase;
        text-decoration: none;
        display: block;
        padding: 0.5rem 1rem;
        overflow: hidden;
        position: relative;
        &:before {
          content: "";
          height: 2px;
          width: 0;
          display: block;
          background-color: var(--oj-blue-500);
          margin: 0 auto;
          position: absolute;
          left: 1rem;
          bottom: 0.25rem;
          transition: all 0.3s;
        }
        &:hover {
          &:before {
            width: calc(100% - 2rem);
          }
        }
      }
    }

    .sub-menu {
      position: absolute;
      opacity: 0;
      list-style: none;
      padding: 0;
      margin: 0;
      visibility: hidden;

      transition: all 0.3s;

      &:hover {
        opacity: 1;
        visibility: visible;
      }
    }

    a:hover + .sub-menu {
      opacity: 1;
      visibility: visible;
    }

    .sub-menu {
      background-color: var(--bs-white);
      border-radius: var(--bs-border-radius);
      padding: 1rem;
      top: 100%;
      box-shadow: 0 1rem 1rem 0px rgba(0, 0, 0, 0.075);

      li {
        position: relative;
      }

      a {
        position: relative;
        z-index: 100;
      }

      li:not(:first-child):before {
        content: "";
        display: block;
        position: absolute;
        z-index: 10;
        top: 0;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: calc(100% - 1rem);
        height: 1px;
        background-color: var(--bs-gray-300);
      }
    }
  }

  .btn-main-menu {
    background: transparent;
    color: var(--bs-black);
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;

    i {
      font-size: 36px;
      line-height: 1.2;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  .social-container {
    a {
      line-height: 30px;
      font-size: 25px;
      display: flex;
      align-items: center;
    }
  }
}

#offcanvasMenu {
  .logo {
    img {
      height: 65px;
      width: auto;
    }
  }

  .mobile-menu {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;

    li {
      border-top: 1px solid var(--gray-500);

      &:last-child {
        border-bottom: 1px solid var(--gray-500);
      }

      a {
        font-size: 14px;
        line-height: 24px;
        font-weight: 700;
        padding: 0.75rem 1.5rem;
        color: var(--bs-body-color);
        text-transform: uppercase;
        text-decoration: none;
        display: block;
      }
    }

    .sub-menu {
      padding: 0;
      list-style: none;

      li {
        padding-left: 0;

        a:before {
          content: "";
          margin-right: 1rem;
          position: relative;
          top: 0;
          display: inline-block;
          width: 10px;
          height: 10px;
          border: 2px solid var(--oj-blue-500);
          border-radius: 10px;
        }
      }

      li:last-child {
        border-bottom: 0;
      }
    }
  }

  .offcanvas-footer {
    background: var(--oj-blue-500);
    a {
      color: var(--bs-white);
    }

    .border-bottom {
      border-color: var(--bs-white) !important;
    }

    .social-container a {
      font-size: 35px;
      line-height: 35px;
      display: flex;
      align-items: center;
    }
  }
}

/*// -- Drilldown menu -- //*/

.oj-drilldown-menu {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

  .drilldown {
    width: 100%;
    height: 100%;
    position: absolute;
    background: var(--bs-white);
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    transition: all 0.5s;
  }

  .drilldown-submenu {
    left: 100%;

    &.active {
      left: 0%;
      z-index: 100;
    }
  }

  ul {
    padding: 0;
    margin: 0;
    height: 100%;
    list-style: none;
    overflow: auto;

    li {
      border-bottom: 1px solid var(--bs-gray-300);

      &.drilldown-back-wrapper {
        position: sticky;
        top: 0;
      }

      button {
        display: flex;
        border: 0;
        width: 100%;
        background: transparent;
        align-items: center;
        gap: 0.5rem;
      }

      .drilldown-back {
        background-color: #efefef;
        justify-content: flex-start;
      }

      .drilldown-open {
        justify-content: space-between;
      }

      .drilldown-back,
      & > span {
        font-weight: 700;
      }

      a {
        text-decoration: none;
      }

      a,
      & > span,
      button {
        color: var(--bs-black);
        padding: 0.75rem 1.5rem;
        background: var(--bs-white);
      }

      a,
      span {
        display: block;
      }
    }
  }
}
