/* NAVIGATION */
nav {
  position: fixed;
  top: 24px;
  left: 24px;
  width: calc(100% - 48px);
  z-index: 10;
  display: flex;
  justify-content: center;
  background: transparent;
  z-index: 999;
}

.nav-header {
  width: 100%;
  max-width: 1872px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-color: #ffffff;
  border-radius: 24px;
  z-index: 1001;
  box-shadow: var(--XXSoftXSsoft) var(--YYSoftXSsoft) var(--BlurBlurSoftXSsoft)
      var(--SpreadSpreadSoftXSsoft) var(--GreyscaleShadowgrayShadowalphaXS),
    var(--XXHardXShard) var(--YYHardXShard) var(--BlurBlurHardXShard)
      var(--SpreadSpreadHardXShard) var(--GreyscaleShadowgrayShadowalphaXS);
  /* overflow-x: hidden; */
}

.nav-logo {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  background-color: transparent;
}

/* The link wrapper */
.nav-logo a {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.fi-rr-bars-sort {
  font-size: 24px;
  color: #333; /* Icon color */
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Warranty logo should be on top */
.logo-warranty {
  position: relative;
  z-index: 10;
  height: 100%;
  margin-right: -4px;
  margin-left: -5px;
}

/* Extension logo behind */
.logo-extension {
  position: relative;
  z-index: 0;
  height: 100%;
  max-width: 100%;
  margin-left: 0;
}

.nav-links-btn {
  display: flex;
  align-items: start;
  padding-right: 40px;
  margin-left: auto; /* Push to right */
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 64px;
  white-space: nowrap; /* Prevent links from wrapping to next line */
  padding-top: 10px;
  margin: 0;
}

.nav-links li {
  position: relative;
}

.nav-links li a {
  display: flex;
  font-family: "Inter", sans-serif;
  align-items: center;
  height: 36px;
  color: #242424;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  line-height: 22px;
  transition: color 0.2s ease-in-out;
  letter-spacing: 0;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background-color: var(--primary-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-btns {
  display: flex;
  align-items: center;
  padding-right: 40px;
}

/* hamburger icon */
.hamburger-wrapper {
  display: none; /* default hidden */
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 1001;
}

.hamburger-icon {
  width: 24px;
  height: 20px;
  fill: #333;
  transition: transform 0.3s ease, fill 0.3s ease;
}

.hamburger-wrapper:hover .hamburger-icon {
  fill: #1ccc5b;
  transform: scale(1.05);
}

.hamburger-icon path {
  fill: #84a0ad;
  transition: fill 0.3s ease;
}

/* Change icon fill only when .prev-btn is hovered */
.hamburger-icon:hover path {
  fill: var(--primary-green);
}

/* Mobile header */
.sidebar-nav-container {
  display: none;
  position: fixed;
  left: 24px;
  width: calc(100% - 48px);
  max-width: 1872px;
  margin-top: 90px;
  z-index: 999;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000a3;
  z-index: 998;
  display: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 30px 42px;
  margin: 0;
  gap: 24px;
  background-color: white;
  border-radius: 12px;
}

.sidebar-nav-container.show {
  display: block;
}

.sidebar-nav a {
  font-family: "Roboto", sans-serif;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 12px;
}

.sidebar-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background-color: var(--primary-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.sidebar-nav a:hover::after {
  width: 100%;
  height: 3px;
  border-radius: 2px;
}

/* Responsive Stlyes */
@media (max-width: 1420px) {
  .nav-header {
    display: flex;
    z-index: 1001;
  }

  .nav-links {
    display: none;
  }

  .hamburger-wrapper {
    display: block;
  }

  .sidebar-nav-container {
    width: calc(100% - 48px);
    max-width: 1872px;
    margin-top: 130px;
    left: 24px;
    right: auto;
  }

  .sidebar-nav {
    width: 100%;
  }

  nav span {
    display: block;
  }
}

@media (max-width: 1024px) {
  .sidebar-nav-container {
    width: calc(100% - 48px);
    max-width: 1872px;
    left: 24px;
    margin-top: 75px;
    right: auto;
  }

  .sidebar-nav {
    width: 100%;
  }
  .nav-header {
    display: flex;
    border-radius: 24px;
    height: 56px;
    border-radius: 12px;
    justify-content: space-between;
    padding-right: 16px;
    margin-top: -15px;
    z-index: 1001;
  }

  .hamburger-wrapper {
    display: block;
    /* margin-top: 1%; */
  }

  .nav-logo a {
    flex-direction: row;
  }

  .logo-warranty,
  .logo-extension {
    height: 56px;
    width: 230px;
  }

  .nav-links li a {
    display: flex;
    flex-direction: row;
  }

  .nav-logo {
    width: 100%;
    padding-left: 0;
    justify-content: center;
    margin-left: 0;
  }

  .nav-links-btn {
    width: 100%;
    padding-right: 0;
  }

  .nav-links {
    display: none !important;
  }

  nav span {
    display: block;
  }

  .nav-links-btn.show {
    display: block;
  }

  .nav-links li a {
    width: 100%;
    justify-content: flex-start;
    color: var(--text-dark);
  }
}

@media (max-width: 450px) {
  .logo-warranty,
  .logo-extension {
    width: 160px;
  }
}
