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

  .btn-menu-offcanvas {
    & svg {
      height: 1.3rem;
      width: 1.3rem;
      fill: none;
      vertical-align: middle;
    }
  }

  .header-top {
    background: black;
    height: 38px;

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

      a {
        padding: 10px;
      }
    }

    .container-networks {
      @media (width<768px) {
        a {
          border-left: 1px solid white !important;
        }
      }
    }

    .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: "Spinnaker";
        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;
      margin-right: 10px;
      width: 24px;

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

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

    .page-width {
      .container-text {
        font-family: "Spinnaker";
        font-weight: 500;
        font-size: var(--font-size-content);
        text-align: center;
        text-transform: capitalize;
        color: white;

        a {
          color: #79fcdb;
          text-shadow: 0 -40px 100px, 0 0 2px, 0 0 1em #79fcdb,
            0 0 0.5em #79fcdb, 0 0 0.1em #79fcdb, 0 10px 3px #000;
          font-size: 12px;
          transition: 0.7s;
          align-items: center;

          & span i {
            color: #fff;
            text-shadow: none;
            font-size: 15px;
          }
        }
      }

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

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

  .content-nav {
    transition: 0.4s;
    padding: 8px 0px;

    i.fa-magnifying-glass {
      cursor: pointer;
      transition: 0.7s;

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

    nav {
      border-radius: 35px;
      border-width: 1.5px;
      padding: 20px 10px;
      display: flex;
      gap: 90px;
      align-items: center;

      @media (width<=768px) {
        padding: 20px 50px;
        gap: 44px;
      }

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

  &.shadow-sm {
    background: white;

    & .header-body {
      backdrop-filter: none !important;
      background: transparent !important;
      box-shadow: none;
    }

    & .logo-header {
      max-width: 115px !important;

      @media (width<768px) {
        max-width: 75px !important;
      }
    }
  }

  .logo-group {
    row-gap: 7px;

    @media (width<=768px) {
      row-gap: 0px;
    }
  }

  .header-body-container {
    transition: 0.4s;
    background-color: white;
    /* max-width: 1400px !important; */
    /* margin-top: 1rem; */
    padding-top: 0px !important;

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

  .header_icon {
    cursor: pointer;

    & #icon-search {
      height: 1.3rem;
      width: 1.3rem;
      fill: none;
      vertical-align: middle;
      transition: 0.05s;
    }

    &:hover #icon-search {
      scale: 1.05;
    }
  }

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

  .header-body {
    padding-top: 4px;

    .logo-header {
      width: 100%;
      max-width: 130px;
      transition: all 0.3s;

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

      @media (width<768px) {
        max-width: 85px;
      }

      &+p {
        min-width: fit-content;
        font-size: 15px;

        @media (width<=768px) {
          font-size: 12px;
          margin: 15px 0px 10px 0px !important;
        }
      }
    }

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

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

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

        a {
          color: var(--color-primary);
          transition: 0.4s;
          font-family: "Spinnaker";
          font-size: 17px;

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

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

          &>a {
            font-weight: bold;
            color: #000;
          }

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

        &.current-menu-ancestor {
          &>a {
            font-weight: bold;
            color: #000;
          }

          & .current-menu-item {
            &>a {
              font-weight: bold;
              color: #74f4d4;
            }
          }

        }

        /* &.menu-item-118 .sub-menu .current-menu-item a {
          color: #000 !important;
        }

        &.menu-item-120 .sub-menu .current-menu-item a {
          color: #000 !important;
        } */

        & .sub-menu li a:hover {
          color: var(--color-primary) !important;
        }

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

      .sub-menu {
        display: none;
        z-index: 1;
        top: 27px;
        position: absolute;
        background: white;
        box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
        width: 14rem;
        /* left: 0;
		border-top: 1px solid; */
        padding: 0.5rem 1rem !important;
        border: 1px solid rgba(18, 18, 18, 0.2);

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

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

          a {
            color: rgba(18, 18, 18, 0.75);
            font-size: 16px;

            &:hover {
              color: var(--color-primary-1);
            }
          }
        }
      }

      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: "Spinnaker";
            font-size: var(--font-size-content);
            color: #404040;
            transition: 0.4s;

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

    .header-body-scroll {
      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;
  } */

  #search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  #search-overlay.active {
    display: flex;
  }

  .search-overlay-content {
    position: relative;
    width: 90%;
    max-width: 600px;
  }

  .search-overlay-content form {
    display: flex;
    border: 2px solid #fff;
    border-radius: 50px;
    overflow: hidden;

    label {
      width: 85%;
    }
  }

  .search-overlay-content input[type="search"] {
    flex: 1;
    padding: 12px 18px;
    border: none;
    outline: none;
    font-size: 1.2rem;
    width: 100%;
  }

  .search-overlay-content input[type="submit"] {
    background: var(--color-primary, #000);
    color: #fff;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    width: 15%;
    min-width: 93px;
  }

  .search-overlay-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;

    @media (width > 768px) {
      top: 4px;
      right: -35px;
    }
  }
}

@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-primary-1) !important;
}

.navigation {
  background: #fff !important;
}

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

#menu-primary {
  & .sub-menu {
    @media (width<=768px) {
      display: none;
    }
  }

  & .arrow-down {
    transition: 0.3s all !important;

    & svg {
      position: absolute;
      height: 0.4rem;
      right: -10px;
      top: calc(50% - 0.2rem);

      & path {
        fill: rgba(18, 18, 18, 0.75);
      }
    }
  }

  .menu-item a:hover .arrow-down svg {
    transform: rotate(180deg);
  }

  & .activo {
    display: block !important;
  }

  & .voltear {
    transform: rotate(180deg);
  }
}