@use "../utilities" as *;

/**----------------------------------------
START: Theme Header CSS
----------------------------------------*/
.header-area {
  background-color: var(--tj-color-common-white);
  border-end-start-radius: 12px;
  border-end-end-radius: 12px;
  position: relative;
  z-index: 99;
  &.header-1 {
    &.header-absolute {
      top: 0;
      position: absolute;
      inset-inline-start: 0;
      width: calc(100% - 30px);
      @media #{
			$sm,$xs
			} {
        width: calc(100% - 24px);
      }
    }
    .header-wrapper {
      padding: 0 18px;
      background-color: var(--tj-color-common-white);
    }
  }
  &.header-2 {
    &.header-absolute {
      position: absolute;
      top: 30px;
      inset-inline-start: 15px;
      width: calc(100% - 60px);
      z-index: 999;
      background-color: transparent;
      border-radius: 0;
      > .container-fluid {
        --bs-gutter-x: 0;
        > .row {
          --bs-gutter-x: 0;
        }
      }
      .header-wrapper {
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 0 20px;
        border-radius: 14px;
      }
      .search_popup {
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        .search-box {
          input:not([type="submit"]):not([type="radio"]):not(
              [type="checkbox"]
            ):not([type="search"]),
          input[type="text"] {
            background-color: var(--tj-color-common-white);
          }
        }
      }
      @media #{$sm, $xs} {
        top: 24px;
        inset-inline-start: 12px;
        width: calc(100% - 48px);
      }
    }
    &.header-sticky {
      .header-wrapper {
        padding: 0 8px;
      }
    }
  }
  &.header-3 {
    &.header-absolute {
      background-color: transparent;
      position: absolute;
      top: 0;
      inset-inline-start: 0;
      width: calc(100% - 30px);
      z-index: 999;
      @media #{$sm, $xs} {
        width: calc(100% - 24px);
      }
    }
    .header-wrapper {
      padding: 0 12px;
      border-start-start-radius: 12px;
      border-start-end-radius: 12px;
    }
  }
  &.header-duplicate {
    display: none;
    opacity: 0;
    visibility: hidden;
  }
  &.sticky {
    position: fixed;
    width: calc(100% - 30px);
    top: 0;
    inset-inline-start: 0;
    -webkit-animation: sticky 0.9s;
    animation: sticky 0.9s;
    border-bottom: none;
    z-index: 1002;
    -webkit-box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
    opacity: 1;
    visibility: visible;
    background-color: var(--tj-color-common-white);
    display: block;
    @media #{$sm, $xs} {
      width: 100%;
      &.section-gap-x {
        margin-inline-start: 0;
        margin-inline-end: 0;
      }
    }
  }

  @media #{$xl} {
    &.header-3,
    &.header-1 {
      .header-wrapper {
        padding: 0 8px;
      }
    }
  }
  @media #{$lg} {
    &.header-3,
    &.header-1 {
      .header-wrapper {
        padding: 0 4px;
      }
    }
    &.header-2 {
      &.header-absolute {
        .header-wrapper {
          padding: 0 16px;
        }
      }
      &.header-sticky {
        .header-wrapper {
          padding: 0 4px;
        }
      }
    }
  }
  @media #{$md, $sm, $xs} {
    &.header-3,
    &.header-1 {
      .header-wrapper {
        padding: 15px 0px;
      }
    }
    &.header-2 {
      &.header-absolute {
        .header-wrapper {
          padding: 15px 12px;
        }
      }
      &.header-sticky {
        .header-wrapper {
          padding: 15px 0;
        }
      }
    }
  }
}
.header-top {
  background-color: var(--tj-color-theme-primary);
  border-end-start-radius: 12px;
  border-end-end-radius: 12px;
  padding: 0 12px;
  margin-bottom: 15px;
  &-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    .topbar-text {
      color: var(--tj-color-common-white);
      padding: 13px 0;
      margin: 0;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      i {
        color: var(--tj-color-common-white);
        font-size: 20px;
      }
      a {
        color: var(--tj-color-common-white);
        font-weight: var(--tj-fw-sbold);
        display: inline-flex;
        &::after {
          content: "\e913";
          font-size: 21px;
          line-height: 1.2;
          font-family: "Bexon-icons" !important;
          font-weight: normal;
          display: inline-flex;
          color: var(--tj-color-common-white);
        }
        &:hover {
          opacity: 0.7;
        }
      }
      @media #{$md} {
        font-size: 15px;
        i {
          font-size: 18px;
        }
      }
      @media #{$sm, $xs} {
        font-size: 15px;
        padding: 10px 0;
        width: 100%;
        justify-content: center;
        i {
          font-size: 18px;
        }
      }
    }
    .header-info {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      .info-item {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        position: relative;
        padding: 0 15px;
        border-inline-start: 1px dashed rgba(255, 255, 255, 0.15);
        &:last-child {
          padding-inline-end: 0;
          @media #{$md, $sm, $xs} {
            display: none;
          }
        }
        span {
          display: inline-flex;
          line-height: 1;
          color: var(--tj-color-common-white);
        }
        a {
          color: var(--tj-color-common-white);
        }
        @media #{$sm, $xs} {
          border: 0;
          padding: 0 10px 10px 10px;
        }
      }
      .social-links {
        ul {
          li {
            a {
              width: 22px;
              height: 22px;
              font-size: 14px;
            }
          }
        }
      }
    }
    @media #{$sm, $xs} {
      justify-content: center;
    }
  }
  @media #{$xl, $lg} {
    padding: 0 8px;
  }
  @media #{$md, $sm, $xs} {
    padding: 0px;
  }
}
.header-bottom {
  border-bottom: 1px dashed #c9d1d1;
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  z-index: 99;
  position: relative;

  @media #{$md, $sm, $xs} {
    padding: 15px 0;
  }
}

.site_logo {
  .logo {
    display: inline-block;
    max-width: 136px;
    width: 100%;
  }
}
.menu-area {
  gap: 25px;
}
.mainmenu {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    column-gap: 30px;
    flex-wrap: wrap;
    > li {
      position: relative;
      z-index: 1;
      > a {
        position: relative;
        font-size: 16px;
        color: var(--tj-color-heading-primary);
        display: block;
        padding: 37px 0;
        font-weight: var(--tj-fw-medium);
        line-height: 1;
      }
      &.menu-item-has-children,
      &.has-dropdown {
        > a {
          padding-inline-end: 20px;
          &::after {
            content: "\e929";
            font-family: "Bexon-icons";
            color: inherit;
            font-size: 12px;
            position: absolute;
            top: 40px;
            inset-inline-end: 0;
            @include transition(all 0.3s ease-in-out 0s);
          }
        }
        &:hover {
          > a {
            &::after {
              transform: rotate(-180deg);
            }
          }
        }
      }
      &.current-menu-ancestor,
      &.current-menu-item,
      &:hover {
        > a {
          color: var(--tj-color-theme-primary);
          &::after {
            color: var(--tj-color-theme-primary);
          }
          &::before {
            opacity: 1;
            visibility: visible;
          }
        }
      }
      > .sub-menu {
        display: block;
        position: absolute;
        top: 100%;
        inset-inline-start: 0;
        width: 220px;
        top: 100%;
        inset-inline-start: 0;
        z-index: 99;
        text-align: start;
        background-color: var(--tj-color-common-white);
        box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        transform: scaleY(0);
        transform-origin: top;
        opacity: 0;
        visibility: hidden;
        gap: 0;
        padding: 10px 0;
        pointer-events: none;
        transition: 0.4s;
        > li {
          display: block;
          width: 100%;
          > a {
            position: relative;
            padding: 10px 20px;
            display: block;
            color: var(--tj-color-text-body);
            &::before {
              display: none;
            }
          }
          &:last-child {
            padding-bottom: 0;
          }
          &.menu-item-has-children,
          &.has-dropdown {
            > a {
              &::after {
                top: 13px;
                inset-inline-end: 15px;
                color: var(--tj-color-text-body);
                transform: rotate(-90deg);
              }
            }
          }
          &.current-menu-ancestor,
          &.current-menu-item,
          &:hover {
            > a {
              color: var(--tj-color-theme-primary);
              &::before {
                opacity: 1;
                visibility: visible;
                width: 14px;
              }
              &::after {
                color: var(--tj-color-theme-primary);
              }
            }
          }

          > .sub-menu {
            inset-inline-start: 100%;
            top: -10px;
          }
        }
      }
      &:hover {
        > .sub-menu {
          opacity: 1;
          visibility: visible;
          transform: scaleY(1);
          transition: all 0.5s ease;
          pointer-events: inherit;
        }
      }
    }
    @media #{$xl} {
      gap: 0 22px;
    }
    @media #{$lg} {
      gap: 0 16px;
    }
  }
}

.header-search {
  line-height: 1;
  position: relative;
  .search {
    color: var(--tj-color-heading-primary);
    font-size: 20px;
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--tj-color-grey-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    i {
      line-height: 1;
      display: inline-flex;
      transition: transform 0.3s;
    }
    @media #{$lg} {
      font-size: 18px;
      width: 44px;
      height: 44px;
    }
    &:hover {
      i {
        animation: gelatine 0.6s;
      }
    }
    &.search-hide {
      opacity: 0;
      visibility: hidden;
      transform: scale(0.5);
    }
  }

  .search_close_btn {
    color: var(--tj-color-heading-primary);
    font-size: 20px;
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--tj-color-grey-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    i {
      line-height: 1;
      display: inline-flex;
    }
    @media #{$lg} {
      font-size: 18px;
      width: 44px;
      height: 44px;
    }
    &.close-show {
      opacity: 1;
      visibility: visible;
    }
  }
}

.header-contact {
  font-size: 20px;
  line-height: 1;
  color: var(--tj-color-heading-primary);
  gap: 8px;
  .call-text {
    font-weight: var(--tj-fw-sbold);
    position: relative;
    &::after {
      content: "";
      position: absolute;
      bottom: -1px;
      inset-inline-end: 0;
      width: 100%;
      height: 1px;
      background-color: currentColor;
    }
  }
  &:hover {
    .call-text {
      &::after {
        animation: linehover 0.8s linear;
      }
    }
  }
  @media #{$xl} {
    font-size: 18px;
  }
}

.header-right-item {
  display: flex;
  align-items: center;
  gap: 20px;
  .tj-primary-btn {
    .btn-icon {
      width: 38px;
      height: 38px;
      @media #{$lg} {
        width: 35px;
        height: 35px;
      }
    }
  }
  @media #{$lg} {
    gap: 12px;
  }
}

.menu_bar {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 25px;
  height: 25px;
  position: relative;
  top: 0;
  inset-inline-start: 0;
  margin-inline-start: 5px;
  cursor: pointer;
  @include transition(all 0.3s ease-in-out 0s);

  span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--tj-color-common-black);
    border-radius: 10px;
    margin-inline-end: auto;
    backface-visibility: hidden;
    transition: all 0.3s;

    &:last-child,
    &:first-child {
      width: 25px;
    }
  }
  &.mobile_menu_bar {
    width: 50px;
    height: 50px;
    padding: 12px;
    background: var(--tj-color-theme-primary);
    border-radius: 7px;
    span {
      background-color: var(--tj-color-common-white);
    }
  }

  &:hover {
    span {
      width: 100%;
    }
  }
  @media #{$lg} {
    margin-inline-start: 0;
  }
}

// Header 2
.header-2 {
  &.header-absolute {
    .mainmenu {
      > ul {
        > li {
          > a {
            color: var(--tj-color-common-white);
            padding-top: 32px;
            padding-bottom: 32px;
          }
          &.menu-item-has-children,
          &.has-dropdown {
            > a {
              &::after {
                color: currentColor;
                top: 35px;
              }
            }
          }
          &:hover,
          &.current-menu-ancestor {
            > a {
              color: var(--tj-color-text-body-2);
              &::after {
                color: currentColor;
              }
            }
          }
        }
      }
    }
    .menu_bar {
      span {
        background-color: var(--tj-color-common-white);
      }
    }
  }
}

// Header 3
.header-3 {
  &.header-absolute {
    .mainmenu {
      > ul {
        > li {
          > a {
            padding-top: 32px;
            padding-bottom: 32px;
          }
          &.menu-item-has-children,
          &.has-dropdown {
            > a {
              &::after {
                color: currentColor;
                top: 35px;
              }
            }
          }
        }
      }
    }
  }
}

/* !END: Theme Header CSS */
