.sticky-container-wrapper {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 24px;
  padding: 64px 80px;
}

.sticky-container-wrapper .flex-right-column-70:nth-child(3) {
  margin-left: 324px;
  margin-right: 0;
}

.sticky-left-panel-container-div {
  position: relative;
  width: 246px;
  max-height: 100vh;
  height: auto;
  background-color: #fff;
  z-index: 6;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 56px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: transform, opacity;
}

.sticky-left-panel-container .overview-title-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  border-bottom: 2px solid #002c5f;
  width: 246px;
}

.sticky-left-panel-container .overview-title-wrapper .side-nav-parent {
  display: flex;
  padding: 16px 8px;
  align-items: center;
  gap: 8px;
  align-self: stretch;
}

.sticky-left-panel-container .overview-title-wrapper.active-category {
  color: #707070;
  border-bottom: none;
}

.sticky-left-panel-container-div.fixed {
  position: fixed;
  top: 80px;
  transform: translateY(0);
  max-height: calc(100vh - 140px); /* Account for header and some bottom spacing */
  overflow-y: auto;
}

.sticky-left-panel-container-div .overview-title-wrapper.active-category .overview-title {
  color: #707070;
  font-family: "HyundaiSansHead-Regular";
  font-weight: 400;
}

.sticky-left-panel-wrapper .overview-title {
  color: #002c5f;
  font-family: "HyundaiSansHead-Medium";
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 28px;
  flex: 1 0 0;
}

.sticky-left-panel-wrapper .sticky-left-panel-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 246px;
  scroll-snap-type: x mandatory;
  scroll-padding: 16px;
}

.sticky-left-panel-wrapper .list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  scroll-snap-align: center;
}

.sticky-left-panel-wrapper .category-link {
  flex: 1 0 0;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
  text-decoration: none;
  color: #707070;
  display: flex;
  justify-content: space-between;
  font-family: "HyundaiSansHead-Regular";
}

.sticky-left-panel-wrapper .category-link-wrapper {
  display: flex;
  padding: 16px 8px;
  align-items: center;
  gap: 8px;
  align-self: stretch;
}

.sticky-left-panel-wrapper .category-link-wrapper + .sub-list .sub-list-item a.link {
  flex: 1 0 0;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
  color: #707070;
  font-family: "HyundaiSansText-Regular";
  line-height: 24px;
  transform: translateY(0);
  transition: all 0.3s ease-in-out;
}

.sticky-left-panel-wrapper .category-link-wrapper + .sub-list .sub-list-item:hover,
.sticky-left-panel-wrapper .category-link-wrapper + .sub-list .sub-list-item:active {
  color: #002C5F;
  font-family: "HyundaiSansText-Medium";
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 24px;
  background: #F2FBFD;
}

.sticky-left-panel-wrapper .category-link-wrapper + .sub-list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  transition: all 0.3s ease-in-out;
}

.sticky-left-panel-wrapper .category-link-wrapper + .sub-list li {
  display: flex;
  padding: 12px 16px;
  align-items: center;
  align-self: stretch;
}

.sticky-left-panel-wrapper .list-item:hover .category-link-wrapper {
  background: #F2FBFD;
  color: #002c5f;
  border-bottom: 1px solid #002C5F;
}

.sticky-left-panel-wrapper .list-item.active .category-link {
  color: #002C5F;
  font-family: "HyundaiSansHead-Medium";
  font-weight: 500;
  background: none;
  transition: all 0.3s ease-in-out;
}

.sticky-left-panel-wrapper .list-item.active .category-link-wrapper {
  border-bottom: 2px solid #002C5F;
}

.sticky-left-panel-wrapper .list-item.active .category-link .icon-chevron-up,
.sticky-left-panel-wrapper .list-item:hover .category-link .icon-chevron-down {
  color: #707070;
}

.sticky-left-panel-wrapper .icon-chevron-up, 
.sticky-left-panel-wrapper .icon-chevron-down {
  width: 20px;
  height: 20px;
  font-size: 20px;
  margin-left: 8px;
  color: #707070;
  transition: transform 0.3s ease-in-out;
}

.sticky-left-panel-wrapper .category-link-wrapper + .sub-list .sub-list-item.active-sub-item a.link {
  color: #002C5F;
  font-family: "HyundaiSansText-Medium";
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 24px;
}

/* CHANGE: Replaced 'display: none' with opacity and visibility to enable smooth transitions. */
.sticky-left-panel-container-div.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sticky-left-panel-container-div::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.sticky-left-panel-wrapper .list-item.active {
  scroll-margin: 16px;
}

/* When parent is active, show sub-list with animation */
.sticky-left-panel-wrapper .list-item.active .category-link-wrapper + .sub-list {
  transition: all 0.3s ease-in-out;
}

/* .sticky-left-panel-wrapper .list-item.active .category-link-wrapper + .sub-list .sub-list-item {
  animation: fade-in-up 0.3s ease-in-out forwards;
} */

@keyframes fade-in-up {
  from {
    transform: translateY(10px);
  }

  to {
    transform: translateY(0);
  }
}

/* Mobile and Tablet styles */
@media (max-width: 1199px) and (min-width: 768px) {
  .sticky-left-panel-container-div.fixed {
    top: -2px;
    border-bottom: 1px solid #707070;
    padding: 0 40px;
    left: 0;
    width: 100vw;
    margin-left: 0;
    max-width: 100%;
    z-index: 16 !important;
  }

  .sticky-left-panel-container .sticky-left-panel.block {
    width: 100vw;
    border-bottom: 1px solid #DAD9D8;
  }

  .sticky-left-panel-container-div {
    width: 100vw;
    height: auto;
    top: 0;
    border-bottom: none;
    overflow: auto;
    display: flex;
    padding: 0 40px;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    align-self: stretch;
    left: 0;
    flex-direction: row;
    margin-right: 0;
  }

  .sticky-left-panel-container .sticky-left-panel-wrapper {
    border-bottom: none;
    width: 100%;
  }

  .sticky-left-panel-container .overview-title-wrapper {
      display: none;
  }

  .sticky-left-panel-wrapper .sticky-left-panel-list {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 24px;
    align-self: stretch;
    width: auto;
    overflow: visible;
  }

  .sticky-left-panel-wrapper .list-item {
    margin: 0;
    cursor: pointer;
    display: flex;
    padding: 16px 4px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
  }


  .sticky-left-panel-wrapper .category-link {
    font-family: "HyundaiSansText-Regular";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    padding: 0;
    text-wrap-mode: nowrap;
    color: #5D5D5C;
  }

  .sticky-left-panel-wrapper .list-item.active .category-link {
    color: #002c5f;
    border-bottom: none;
    font-weight: 500;
    font-family: "HyundaiSansText-Medium";
  }

  .sticky-left-panel-wrapper .category-link-wrapper + .sub-list,
  .sticky-left-panel-wrapper .category-link span {
    display: none;
  }

  .sticky-left-panel-wrapper .list-item:hover .category-link{
    border-bottom: none;
  }
  
  .sticky-left-panel-wrapper .list-item:hover,
  .sticky-left-panel-wrapper .list-item:hover .category-link-wrapper {
    background: none;
  }

  .sticky-left-panel-wrapper .list-item.active {
    color: #002c5f;
    border-bottom: 2px solid #002C5F;
  }

  .flex-right-column-70 h2.category-title {
    font-family: "HyundaiSansHead-Medium";
    line-height: 40px;
    white-space: nowrap;
  }

  .flex-right-column-70 .category-container-wrapper:first-child h2.category-title:nth-child(1) {
    padding-top: 0;
  }

  .sticky-left-panel-wrapper .list-item.active .category-link-wrapper,
  .sticky-left-panel-container .sticky-left-panel.block:has(.fixed),
  .sticky-left-panel-wrapper .list-item:hover .category-link-wrapper {
    border-bottom: none;
  }

  .sticky-left-panel-wrapper .category-link-wrapper {
    padding: 0;
    gap: 0;
  }

  .sticky-container-wrapper {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
  }

  .faq-page .sticky-container-wrapper {
    padding: 0;
  }

  .sticky-container-wrapper .flex-right-column-70:nth-child(3) {
    margin-left: 0;
    margin-right: 0;
  }

  .sticky-left-panel-wrapper .category-link-wrapper,
  .sticky-left-panel-wrapper .list-item,
  .sticky-left-panel-wrapper .category-link {
    transition: all 0.3s ease-in-out;
  }
}

@media (max-width: 767px) {
  .sticky-left-panel-container-div.fixed {
    top: 0;
    border-bottom: 1px solid #707070;
    gap: 24px;
    padding: 0;
    left: 0;
    width: 100vw;
    overflow-x: auto;
    margin-left: 0;
    max-width: 100%;
    z-index: 16 !important;
  }

  .sticky-left-panel-container-div {
    width: 100vw;
    height: auto;
    overflow: auto;
    top: 0;
    left: 0;
    display: flex;
    border-bottom: 1px solid #5D5D5C;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    align-self: stretch;
    flex-direction: row;
    margin-right: 0;
  }

  .sticky-left-panel-container .overview-title-wrapper,
  .sticky-left-panel-wrapper .category-link-wrapper + .sub-list,
  .sticky-left-panel-wrapper .category-link span {
    display: none;
  }

  .sticky-left-panel-container-div .sticky-left-panel-wrapper {
    margin: 0;
  }

  .sticky-left-panel-wrapper .sticky-left-panel-list {
    display: flex;
    align-items: center;
    gap: 24px;
    align-self: stretch;
    margin: 0;
    width: auto;
    padding: 0 16px;
  }

  .sticky-left-panel-wrapper .category-link {
    display: flex;
    min-width: 44px;
    padding: 16px 2px;
    justify-content: center;
    align-items: center;
    font-family: "HyundaiSansText-Regular";
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    text-wrap-mode: nowrap;
    color: #5D5D5C;
  }

  .sticky-left-panel-wrapper .list-item.active .category-link {
    color: #002c5f;
    border-bottom: none;
    font-weight: 500;
    font-size: 16px;
    font-style: normal;
    line-height: 20px;
    font-family: "HyundaiSansText-Medium";
  }

  .sticky-left-panel-wrapper .list-item:hover .category-link,
  .sticky-left-panel-wrapper .list-item:hover .category-link-wrapper,
  .sticky-left-panel-wrapper .list-item.active .category-link-wrapper {
    border-bottom: none;
    background: none;
  }
  
  .sticky-left-panel-wrapper .list-item.active {
    background: none;
    color: #002c5f;
    border-bottom: 2px solid #002C5F;
  }

  .flex-right-column-70 h2.category-title {
    font-family: "HyundaiSansHead-Medium";
    line-height: 40px;
    white-space: nowrap;
    font-size: 32px;
  }

  .flex-right-column-70 .category-container-wrapper:first-child h2.category-title:nth-child(1) {
    padding-top: 0;
  }

  .sticky-left-panel-wrapper .category-link-wrapper {
    padding: 0;
    gap: 0;
  }

  .sticky-container-wrapper {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
  }

  .faq-page .sticky-container-wrapper {
    padding: 0;
  }

  .sticky-container-wrapper .flex-right-column-70:nth-child(3) {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 1199px) {
  .sticky-left-panel-container-div {
    z-index: 9;
  }

  .hamburger-menu--active ~ .sticky-left-panel-container-div,
  body.hamburger-menu-open .sticky-left-panel-container-div {
    z-index: 8;
  }
}