/* .tab-item {
  display: inline-block;
  cursor: pointer;
  background: transparent;
  padding: 0 20px;
  text-transform: uppercase;
}

.tab-item > h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: white;
  display: inline-block;
  position: relative;  
  text-decoration: none;
  line-height: 1;      
}


.tab-item.active > h2 {
  color: #5ac8b4;
  font-weight: 900;
}

.tab-item > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;           
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.tab-item.active > h2::after {
  transform: scaleX(1);
}

@media (width >= 48rem) {
  .tab-item > h2 {
    font-size: 26px;
  }
} */

#tabsBar {
  position: relative;
}

/* Giữ nguyên phần tab-item và h2 của bạn */
.tab-item {
  cursor: pointer;
  background: transparent;
  padding: 0 20px;
  text-transform: uppercase;
}

.tab-item>h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: white;
  display: inline-block;
  position: relative;
  line-height: 1;
}

.tab-item.active>h2 {
  color: #5ac8b4;
  font-weight: 900;
}

/* Underline DI ĐỘNG (trượt ngang) */
.tab-underline {
  position: absolute;
  z-index: 0;
  /* nằm dưới chữ */
  left: 0;
  bottom: -4px;
  /* chỉnh khoảng cách dưới chữ */
  height: 2px;
  width: var(--w, 0px);
  /* cập nhật bằng JS */
  transform: translateX(var(--x, 0px));
  /* cập nhật bằng JS */
  background: #5ac8b4;
  border-radius: 2px;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(.22, .61, .36, 1),
    width 0.35s cubic-bezier(.22, .61, .36, 1);
  will-change: transform, width;
}

/* (Tuỳ chọn) nếu từng dùng ::after để vẽ gạch dưới, nên bỏ đi để tránh chồng hiệu ứng */
/* .tab-item > h2::after { display:none !important; } */

@media (width >=48rem) {
  .tab-item>h2 {
    font-size: 26px;
  }
}

/* Tôn trọng reduce motion */
@media (prefers-reduced-motion: reduce) {
  .tab-underline {
    transition: none;
  }
}

.tab-item > h2::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;            
  width: 100%;
  height: 2px;
  background: #5ac8b4;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.tab-item.active > h2::after{
  transform: scaleX(1);
}

.tab-underline{ display: none; }

@media (width >= 48rem){
  .tab-underline{
    display: block;          
  }
  .tab-item > h2::after{
    content: none;       
  }
}

