@import "./common-var.css";
@import "./mobile-offcanvas.css";

body {
  font-family: var(--font-type1);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-default-color);
  background-color: var(--white);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/**************
Header css
**************/
.topbar-header {
  background: #ffffff;
  position: static;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;

  /* Scrolled state */
  &.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(168, 168, 170, 0.3);
  }
  .main-logo{
    img{
      max-width: 122px;
    }
  }
  .main-nav {
    background-color: transparent;
    height: 100px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.2); */
    .inner-page & {
      background-color: #ffffff;
    }
    .container-fluid.topNav{
      padding-left: 0;
    }
    .nav-content {
      /* height: 100%; */
      display: flex;
      gap: 5%;
      align-items: center;
      /* justify-content: space-between; */

      .logo-wrapper {
        display: flex;
        align-items: center;
        gap: 30px;
        .mobile-menu-btn {
          border: 0;
          padding: 40px 35px;
          display: flex;
          align-items: center;
          justify-content: center;
          background-color: var(--secondary-color);

          @media (max-width: 768px) {
            padding: 26px 20px;
          }
        }
      }
      @media(max-width:1561px){
        gap: 2%;
      }
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 20px;
      .btn-type2{
        text-transform: uppercase;
        @media (max-width:1440px) {
          padding-left: 12px;
          padding-right: 12px;
        }
      }
      .registration-btn {
        text-transform: uppercase;
        padding: 23px 30px;
        border: 1px solid var(--white);
        background-color: transparent;
        color: var(--white);
        .inner-page & {
          border: 1px solid var(--primary-color);
          color: var(--primary-color);
        }
        &:hover {
          background-color: var(--white);
          color: var(--primary-color);
          .inner-page & {
            background-color: var(--primary-color);
            color: var(--white);
          }
        }
      }
    }
  }

  .top-section {
    .language-change-btn-link{
      font-family: var(--font-type2);
    }
    .language-dropdown-outer {
      position: relative;
      display: flex;
      align-items: center;
      .btn-link{
        margin: 0;
        color: var(--primary-dark);
        font-size: 15px;
        line-height: 20px;
        font-weight: 400;
        text-decoration: none;
        min-height: 37px;
        padding-top: 0;
        &:hover{
          color: var(--secondary-color);
        }
      }
    }
  }

  .nav-links-wrapper {
    border-top: 1px solid #A8A8AA;
    display: flex;
    align-items: center;
    @media (max-width: 1399.98px) {
      position: fixed;
      top: 0;
      left: 0;
      width: 320px;
      height: 100vh;
      background-color: var(--primary-color);
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      z-index: 2000;
      overflow-y: auto;
      flex-direction: column;
      align-items: stretch;
    }

    &.active {
      @media (max-width: 1399.98px) {
        transform: translateX(0);
      }
    }

    .mobile-nav-header {
      height: 125px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
      margin: 0 -20px 20px;
      padding: 0 25px;

      @media (max-width: 1399.98px) {
        padding: 20px;
        margin: 0;
      }

      .mobile-logo {
        img {
          height: 60px;
          width: auto;
          @media (max-width: 375px) {
            height: 50px;
          }
        }
      }

      .mobile-menu-close {
        background: none;
        border: none;
        cursor: pointer;
        background-color: var(--secondary-color);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;

        &:hover {
          transform: scale(1.05);
        }
      }
    }

    .menu-bar {
      display: flex;
      gap: 1%;
      justify-content: space-between;
      margin-inline-end: 50px;
      margin-bottom: 0;
      flex-grow: 1;

      li {
        position: relative;
        a {
          font-size: 15px;
          font-weight: 400;
          line-height: 16px;
          text-transform: uppercase;
          color: var(--primary-dark);
          position: relative;
          display: inline-block;
          padding: 22px 0 24px;
          transition: all 0.3s ease-in-out;
          @media(max-width: 1860px) {
            font-size: 14px;
          }
          @media(max-width: 1560px) {
            font-size: 13px;
          }
          &:hover {
            color: var(--secondary-color);
          }
          
        }
        &:hover {
          .sub-menu {
            display: block;
            box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px,
              rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
          }
        }

        .sub-menu {
          position: absolute;
          z-index: 9;
          width: 250px;
          background: rgba(255, 255, 255, 0.8);
          padding: 0px 12px;
          top: 100%;
          left: 0;
          display: none;

          > a {
            display: block;
            color: var(--primary-color);
            font-size: 15px;
            font-weight: 400;
            text-transform: capitalize;
            line-height: 1.2;
            padding: 25px 0 12px;
            transition: all 0.3s ease;
            &:hover {
              color: var(--secondary-color);
              transition: all 0.3s ease-in-out;
            }

            &:not(:last-child) {
              border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
            }
          }
        }

        &.has-sub-menu .sub-menu-handle-icon {
          display: none;
          position: absolute;
          top: 20px;
          right: 0;
          width: 20px;
          height: 20px;
          cursor: pointer;
          background: url(../images/menu-chevron-arrow.svg) no-repeat center
            center;
          z-index: 2;
          transition: transform 0.3s ease-in-out;
        }
      }
      /* @media (max-width: 1860px) {
        gap: 40px;
        margin-inline-end: 40px;
      }
      @media (max-width: 1800px) {
        gap: 35px;
        margin-inline-end: 35px;
      }
      @media (max-width: 1700px) {
        gap: 30px;
        margin-inline-end: 30px;
      }
      @media (max-width: 1600px) {
        gap: 20px;
        margin-inline-end: 20px;
      }
      @media (max-width: 1500px) {
        gap: 15px;
        margin-inline-end: 15px;
      } */
    }
    @media (max-width: 1561px) {
      .menu-bar {
        margin-inline-end: 20px;
      }
    }
    @media (max-width: 1399.98px) {
      .menu-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 0 20px;
        margin: 0;
        gap: 0;
      }

      .nav-actions {
        padding: 20px 20px;
      }
      .menu-bar > li.has-sub-menu .sub-menu-handle-icon {
        display: block;
      }

      .menu-bar > li > a {
        display: block;
        font-size: 17px;
        border-bottom: 1px solid #dadada;
        padding: 17px 0;
        line-height: 1.5;
      }

      .menu-bar > li .sub-menu {
        position: relative;
        top: unset;
        left: unset;
        display: block;
        transform: unset;
        width: auto;
        border-radius: 0;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-in-out;
        background-color: transparent;
      }

      .menu-bar > li.sub-menu-open > a {
        color: var(--white);
        border-bottom: none;
      }

      .menu-bar > li.sub-menu-open > .sub-menu-handle-icon {
        transform: rotate(180deg);
        transition: transform 0.3s ease-in-out;
      }

      .menu-bar > li.sub-menu-open .sub-menu {
        border-bottom: 1px solid #dadada;
        height: auto;
        padding-bottom: 10px;
        transition: height 0.3s ease-in-out;
      }

      .menu-bar > li .sub-menu a {
        padding: 8px 0;
        color: var(--white);
      }

      .menu-bar > li .sub-menu a:not(:last-child) {
        border: none;
      }
    }
  }
  @media (max-width: 1200px) {
    .main-nav {
      height: auto;
    }
    .main-logo {
      max-width: 110px;
    }
    .main-logo img {
      max-width: 100%;
    }
  }

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1500;

    &.active {
      opacity: 1;
      visibility: visible;
    }
  }

  /* Search Overlay */
  .search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.40);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;

    &.active {
      opacity: 1;
      visibility: visible;
    }

    .search-overlay-content {
      width: 100%;
      max-width: 800px;
      background-color: var(--white);
      border-radius: 16px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      overflow: hidden;
      transform: translateY(-30px);
      transition: transform 0.3s ease;

      @media (max-width: 768px) {
        margin: 0 20px;
        max-width: calc(100% - 40px);
        border-radius: 12px;
      }
    }

    &.active .search-overlay-content {
      transform: translateY(0);
    }

    .search-overlay-header {
      background-color: var(--primary-color);
      padding: 20px 0;

      .search-overlay-title {
        font-family: var(--font-type1);
        font-size: 24px;
        font-weight: 500;
        color: var(--white);
        margin: 0;

        @media (max-width: 576px) {
          font-size: 20px;
        }
      }

      .search-overlay-close {
        background: none;
        border: none;
        color: var(--white);
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
          transform: scale(1.1);
        }

        svg {
          width: 20px;
          height: 20px;
        }
      }
    }

    .search-overlay-body {
      padding: 40px 0;

      @media (max-width: 576px) {
        padding: 30px 0;
      }
    }

    .search-form-wrapper {
      .search-form {
        margin-bottom: 40px;

        @media (max-width: 576px) {
          margin-bottom: 30px;
        }
      }

      .search-input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        background-color: var(--light-gray);
        border-radius: 50px;
        padding: 4px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);

        .search-input {
          flex: 1;
          border: none;
          background: none;
          padding: 20px 24px;
          font-family: var(--font-type1);
          font-size: 16px;
          color: var(--text-default-color);
          outline: none;

          @media (max-width: 576px) {
            padding: 16px 20px;
            font-size: 15px;
          }

          &::placeholder {
            color: var(--text-default-color);
            opacity: 0.7;
          }

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

        .search-submit-btn {
          background-color: var(--secondary-color);
          border: none;
          border-radius: 50%;
          width: 52px;
          height: 52px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: var(--white);
          cursor: pointer;
          transition: all 0.3s ease;
          flex-shrink: 0;

          @media (max-width: 576px) {
            width: 48px;
            height: 48px;
          }

          &:hover {
            background-color: var(--secondary-dark);
            transform: scale(1.05);
          }

          svg {
            width: 20px;
            height: 20px;

            @media (max-width: 576px) {
              width: 18px;
              height: 18px;
            }
          }
        }
      }
    }

    .search-suggestions {
      .suggestions-section {
        .suggestions-title {
          font-family: var(--font-type1);
          font-size: 18px;
          font-weight: 600;
          color: var(--primary-color);
          margin-bottom: 16px;

          @media (max-width: 576px) {
            font-size: 16px;
            margin-bottom: 12px;
          }
        }

        .suggestion-tags {
          display: flex;
          flex-wrap: wrap;
          gap: 12px;

          .suggestion-tag {
            background-color: var(--light-gray);
            color: var(--text-default-color);
            padding: 8px 16px;
            border-radius: 25px;
            text-decoration: none;
            font-family: var(--font-type1);
            font-size: 14px;
            font-weight: 400;
            transition: all 0.3s ease;
            border: 1px solid transparent;

            @media (max-width: 576px) {
              padding: 6px 12px;
              font-size: 13px;
            }

            &:hover {
              background-color: var(--secondary-color);
              color: var(--white);
              transform: translateY(-2px);
              box-shadow: 0 4px 12px rgba(255, 104, 29, 0.3);
            }
          }
        }
      }
    }
  }
}
.menu-open {
  .nav-link {
    color: var(--white) !important;
    &:hover {
      color: var(--secondary-color) !important;
    }
  }
}

/* Prevent body scroll when search overlay is open */
body.search-overlay-open {
  overflow: hidden;
}

/**************
Social Sidebar CSS
**************/
.social-sidebar {
  position: fixed;
  top: 156px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.45));
  display: none;
  @media (max-width: 1399.98px) {
    display: none;
  }

  li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .social-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background-color: transparent;
    transition: all 0.3s ease;
    text-decoration: none;

    svg {
      width: 14px;
      height: 14px;
      transition: all 0.3s ease;

      path {
        fill: var(--white);
        transition: all 0.3s ease;
      }
    }

    &:hover {
      background-color: var(--secondary-color);
      transform: scale(1.1);

      svg path {
        fill: var(--white);
      }
    }
  }
}

/* RTL Support for Social Sidebar */
[dir="rtl"] .social-sidebar {
  right: auto;
  left: 20px;
}
/* RTL Support */
[dir="rtl"] .topbar-header {
  .main-nav {
    .container-fluid.topNav{
      padding-left: 20px;
      padding-right: 0;
    }
    .nav-content {
      flex-direction: row-reverse;
      .logo-wrapper {
        order: 3;
      }

      .nav-links-wrapper {
        order: 2;

        @media (max-width: 991px) {
          right: 0;
          left: auto;
          transform: translateX(100%);

          &.active {
            transform: translateX(0);
          }
          .mobile-registration {
            text-align: right;
          }
        }
      }

      .nav-actions {
        order: 1;
      }
    }
    .sub-menu {
      left: auto;
      right: 0;
    }
  }

  /* RTL Search Overlay Support */
  .search-overlay {

    .search-overlay-content {
      .search-form-wrapper {
        .search-input-wrapper {
          
          .search-input {
            text-align: right;
            padding: 20px 24px 20px 60px;

            @media (max-width: 576px) {
              padding: 16px 20px 16px 56px;
            }

            &::placeholder {
              text-align: right;
            }
          }

          .search-submit-btn {

            margin-left: 0;
            margin-right: 4px;
          }
        }
      }

      .search-suggestions {
        .suggestions-section {
          .suggestions-title {
            text-align: right;
            font-family: var(--font-type1);
          }

          .suggestion-tags {

            .suggestion-tag {
              font-family: var(--font-type1);
            }
          }
        }
      }
    }
  }
}

/**************
Footer css
**************/
.footer-section {
  /* Main Footer */
  .main-footer {
    max-width: 1100px;
    margin: auto;
    padding: 30px 0 30px;
    @media (max-width: 1680px) {
      max-width: 100%;
    }    
    .footer-content {
      /* display: flex;
      justify-content: space-between;
      gap: 40px; */
      align-items: center;
      /*padding-bottom: 15px;
      border-bottom: 1px solid rgba(168, 168, 170, 0.3);*/
      @media (max-width: 991.98px) {
        flex-direction: column;
        gap: 20px;
      }
      @media (max-width: 576px) {
        padding: 40px 0 15px;
      }
    }

    .footer-logo {
      .logo-link {
        display: flex;
        align-items: center;
        text-decoration: none;
        @media (max-width: 767px) {
          justify-content: center;
        }
        @media (max-width: 576px) {
          display: block;
          text-align: center;
        }
      }
    }

    .footer-links {
      /* padding-inline-start: 30px;
      @media (max-width: 768px) {
        padding-inline-start: 0;
      } */
       display: flex;
      justify-content: flex-end;
      @media (max-width: 991px) {
        justify-content: center;
      }
      .footer-links-group {
        margin-bottom: 15px;
        .footer-nav {
          display: flex;
          align-items: center;
          list-style: none;
          padding: 0;
          margin: 0;
          gap: 20px;
          @media (max-width: 1280px) {
            gap: 20px;
          }
          @media (max-width: 767px) {
            justify-content: center;
          }
          @media (max-width: 576px) {
            flex-wrap: wrap;
            column-gap: 20px;
            row-gap: 6px;
            justify-content: center;
          }

          li {
            line-height: 0;
            .footer-link {
              color: var(--primary-color);
              font-size: 13px;
              font-style: normal;
              font-weight: 700;
              line-height: 18px;
              letter-spacing: 0.8px;
              text-transform: uppercase;
              text-decoration: none;
              transition: color 0.3s ease;

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

    .social-icons {
      display: flex;
      gap: 25px;
      display: none;
      @media (max-width: 991px) {
        gap: 20px;
        justify-content: center;
      }

      .social-icon {
        /* color: var(--white); */
        text-decoration: none;
        transition: background-color 0.3s ease;

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

  /* Bottom Footer */
  .bottom-footer-content {
    display: flex;
    align-items: center;
    padding-block: 10px;
    gap: 10px;

    /* @media (max-width: 576px) {
      padding-block: 10px;
      flex-direction: column;
      align-items: flex-start;
    } */

    @media (max-width: 991px) {
      padding-block: 10px;
      flex-direction: column;
      align-items: center;
    }

    .footer-copyright {
      text-align: center;
      margin-top: 2px;
      .copyright-text {
        font-size: 14px;
        font-weight: 400;
        line-height: 18px;
        margin: 0;
      }
    }

    .footer-legal {
      .legal-link {
        font-size: 15px;
        font-weight: 500;
        line-height: 21px;
        text-decoration: none;
        vertical-align: middle;
        transition: color 0.3s ease;
        color: var(--primary-color);

        &:hover {
          color: var(--secondary-color);
          text-decoration: none;
        }
        @media (max-width: 1400px) {
          font-size: 15px;
          line-height: 19px;
        }
        @media (max-width: 576px) {
          font-size: 13px;
          font-weight: 500;
          line-height: 18px;
        }
      }

      .separator {
        color: var(--primary-color);
        margin: 0;
        vertical-align: middle ;
      }
    }
  }
}
[dir="rtl"] .footer-copyright {
  margin-top: 4px;
}