nav ul li a.active {
  color: var(--color-main-primary);
}

nav ul li a {
  position: relative;
  padding: 0 2px;
}

nav ul li a.active::before {
  transform: scale(1);
  
}

nav ul li a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -5px;
  background-color: var(--color-main-primary);
  height: 2px;
  border-radius: 1rem;
  transform-origin: center center;
  width: 100%;
  transform: scale(0);
  transition: transform 0.3s ease-out;
}

nav ul li a:hover::before {
  transform: scale(1);
}

/**
 * Mobile drawer: physical `right` + `translate-x-full` matches LTR only.
 * In RTL the hamburger sits on the left; anchor the panel to the left and
 * slide it off-screen with a negative X translate when closed.
 */
@media (max-width: 767px) {
  #navMobile {
    align-items: stretch;
  }

  #navList {
    width: 100%;
    align-items: stretch;
  }

  #navList li {
    width: 100%;
    align-self: stretch;
  }

  #navList a {
    display: block;
    width: 100%;
    padding-block: 0.25rem;
  }

  #navMobile .nav-mobile-actions {
    width: 100%;
    align-items: stretch;
  }

  #navMobile .nav-mobile-actions .btn {
    width: 100%;
    justify-content: center;
  }

  [dir="rtl"] #navMobile {
    right: auto;
    left: 0;
  }

  [dir="rtl"] #navMobile.translate-x-full {
    translate: -100% 0;
  }

  [dir="rtl"] #navMobile .btn-icon {
    transform: scaleX(-1);
  }
}

@media (min-width: 768px) {
  [dir="rtl"] #navMobile {
    left: auto;
    right: auto;
  }
}
