header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;

  .header-top {
    height: 40px;
    transition: 0.2s;
    padding: 2px 0;

    .container-contact,
    .container-networks {
      a:not(:first-child) {
        /* border-left: 1px solid white; */
      }

      a {
        padding: 10px;
      }
    }

    .container-networks {
      @media (width<768px) {
        a {
        }
      }
    }

    .dropdown-menu {
      margin-top: 10px !important;
      box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
      border: none;

      a {
        color: var(--color-text);
        padding-top: 10px;
        padding-bottom: 10px;
        font-family: var(--ff-poppins);
        line-height: 110%;

        &:hover {
          background: var(--color-mustard) !important;
          color: #fff;
        }
      }
    }

    /* Ensure sub-menu is hidden by default for JavaScript control */
    header #menu-primary .sub-menu {
      display: none;
    }

    /* Style for the chevron icon rotation */
    header #menu-primary > li.menu-item-has-children > a .fa-chevron-down {
      transition: transform 0.3s ease;
    }

    header
      #menu-primary
      > li.menu-item-has-children.show-submenu
      > a
      .fa-chevron-down {
      transform: rotate(180deg);
    }

    #menu-primary li.menu-item-has-children > a {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    #menu-primary .chevron-toggle {
      display: inline-flex;
      align-items: center;
      padding-left: 8px;
      cursor: pointer;
    }

    @media (min-width: 992px) {
      #menu-primary .chevron-toggle {
        display: none;
      }
    }

    .btn-group {
      position: relative;
    }

    .btn-group:hover {
      &::after {
        content: "";
        display: flex;
        z-index: 3;
        position: absolute;
        width: 100%;
        height: 50%;
        top: 100%;
        left: 0;
      }

      .dropdown-menu {
        display: block !important;
        top: 100% !important;
      }
    }

    .btn-icon-header {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 4px;
      background: transparent;
      color: white;
      border: none;
      outline: none;
      transition: 0.4s;
      border-radius: 100%;
      overflow: hidden;
      aspect-ratio: 1;
      margin: 0 3px;
      width: 24px;

      /* @media (width>=768px) {
        width: 48px;
      } */

      &:hover {
        @media (width>=768px) {
          color: var(--color-primary);
        }
      }
    }

    .container-header {
      background: var(--color-secondary);
      width: 100%;
      display: flex;
      justify-content: space-between;
      border-radius: 0 0 22px 22px;
      padding: 0 3vw;
    }

    .page-width {
      .container-text {
        font-family: var(--ff-poppins);
        font-weight: 500;
        font-size: var(--fs-content);
        text-align: center;
        text-transform: capitalize;
        color: white;
        align-items: center;
      }

      @media (width<520px) {
        padding-inline: 0;

        .btn-icon-header {
          padding-inline: 0;
          width: 22px;
          aspect-ratio: 1;
        }
      }
    }
  }

  .content-nav {
    transition: 0.4s;
    margin-top: 20px;

    @media (width<=768px) {
      & a {
        & h3 {
          font-size: 17px !important;
          color: var(--color-text) !important;
        }
      }
    }

    nav {
      border-radius: 35px;
      padding: 20px 50px;
      border-width: 1.5px;

      @media (width<992px) {
        display: none;
      }
    }

    .btn-menu-offcanvas {
      z-index: 222;
    }
  }

  &.shadow-sm {
    background: white;
    & .header-top {
      background: var(--color-secondary);
    }
    & .header-body {
      backdrop-filter: none !important;
      background: white !important;
      box-shadow: none;

      & .content-nav {
        @media (width<=768px) {
          padding: 1rem 1.5rem !important;
        }
      }

      .content-nav {
        padding-inline: 0px !important;
        margin-top: 0px;
        & a {
          z-index: 222;
          & h3 {
            color: var(--color-text) !important;
          }
        }

        & div {
          z-index: 222;
        }
      }
    }
  }

  .header-body-container {
    transition: 0.4s;
    z-index: 111;
    position: relative;
    background-color: transparent;
    /* max-width: 1400px !important; */
    /* margin-top: 1rem; */

    @media (width>=768px) {
      /* margin-top: 1.5rem; */
      padding-top: 1rem;
    }
  }

  .header-body.open-sub-menu {
    border-radius: 10px 10px 0 0 !important;
  }

  .header-body {
    transition: 0.2s;
    .logo-header {
      width: 58px;
      height: 58px;
      max-width: 300px;
      filter: drop-shadow(1px 1px 0 #fff) drop-shadow(-1px -1px 0 #fff)
        drop-shadow(-1px 1px 0 #fff) drop-shadow(1px -1px 0 #fff);
      transition: all 0.3s;

      @media (width<1200px) {
        max-width: 130px;
      }

      @media (width<768px) {
        max-width: 120px;
        width: 50px;
        height: 50px;
      }
    }

    #menu-primary {
      display: flex;
      align-items: center;
      padding: 0;
      margin: 0;
      gap: 4rem;

      li.remove-position-relative {
        position: initial !important;
      }

      li {
        list-style: none;
        position: relative;

        a {
          color: #363636;
          transition: 0.4s;
          font-family: var(--ff-poppins);
          font-size: var(--fs-content);

          &:hover {
            color: var(--color-secondary);
            text-decoration: underline;
          }
        }

        &.current-menu-item {
          position: relative;

          a {
            font-weight: bold;
          }

          &::after {
            content: "";
            position: absolute;
            bottom: -38px;
            left: -25%;
            width: 150%;
            height: 2px;
            background-color: var(--color-secondary);
          }
        }

        &.current-menu-item .sub-menu li::after {
          display: none;
        }
      }

      .sub-menu {
        display: none;
        z-index: 1;
        top: 30px;
        position: absolute;
        border-radius: 6px;
        background: white;
        box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
        width: fit-content;
        /* left: 0;
        border-top: 1px solid; */
        padding: 1rem 3rem !important;

        .current-menu-item a {
          font-weight: 500 !important;
        }

        li {
          list-style: disc;
          padding: 3px 20px 3px 0;

          a {
            color: var(--color-text);

            &:hover {
              color: var(--color-secondary);
            }
          }
        }
      }

      li.menu-item-has-children {
        &:hover {
          .sub-menu {
            display: block;
          }

          /* &::after {
            content: "";
            height: 1px;
            position: absolute;
            width: 200%;
            left: 0;
            top: auto;
          } */
        }
      }

      & > li > a {
        display: flex;
        align-items: center;
        gap: 5px;

        i {
          font-size: 12px;
        }
      }

      /* li:nth-child(3)::after {
        content: "" !important;
        height: 50% !important;
        top: auto !important;
      } */
    }

    .container-sub-menu {
      width: 100%;
      padding: 3rem 2rem;
      border-top: 1px solid;
      display: grid;
      grid-template-columns: 33.3% 1fr;
      gap: 1.5rem;

      .container-list {
        border-right: 1px solid var(--color-primary);
      }

      ul {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 0;

        li {
          list-style: disc !important;

          a {
            font-family: var(--ff-poppins);
            font-size: var(--fs-content);
            color: #404040;
            transition: 0.4s;

            &:hover {
              color: var(--color-primary);
              font-weight: 700;
            }
          }
        }
      }
    }

    .header-body-scroll {
      max-width: 1600px !important;
      margin-top: 0;
      padding-top: 0;

      & nav {
        background: unset;
        backdrop-filter: none;
        box-shadow: none;

        & li.menu-item-has-children {
          &:hover {
            &::after {
              height: 18%;
              width: 13%;
              left: unset;
              top: unset;
            }
          }
        }

        .sub-menu {
          top: 63% !important;
        }
      }
    }
  }

  /* .header-body-scroll .logo-header {
    max-width: 100px;
  } */
}

@media (min-width: 1000px) {
  .container-children li {
    display: flex;
    position: relative;
    padding-left: 15px;
  }

  .container-children li:before {
    position: absolute;
    content: "";
    width: 7px;
    height: 7px;
    background: #404040;
    border-radius: 50%;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
  }
}

.navigation ul li a {
  color: rgba(0, 0, 0, 0.7) !important;
}

.navigation ul li a:hover {
  color: var(--color-secondary) !important;
}

.navigation {
  background: #fff !important;
}

.navigation {
  backdrop-filter: blur(0px) !important;
  box-shadow: none !important;
}
