.navbar {
  display: flex;
  align-items: center;
  background-color: var(--bg);
  position: fixed;
  margin: 0;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.navbar .logo {
  position: relative;
  display: flex;
  align-items: center;
  padding: 2.5rem;
  width: 200px;
  height: 100px;
}

.navbar .navbar-nav {
  position: relative;
  display: flex;
  flex-grow: 1;
  justify-content: center;
}

.navbar .navbar-nav a {
  color: var(--sec);
  font-size: 1.2rem;
  margin: 0 2rem;
}

.navbar .navbar-nav a::after {
  content: "";
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 0.1rem solid var(--prm);
  transform: scaleX(0);
  transition: 0.2s linear;
}

.navbar .navbar-nav a:hover::after {
  transform: scaleX(0.5);
}

.navbar .navbar-extra a:hover {
  color: var(--prm);
}

.navbar .navbar-extra {
  display: none;
}

/* ========== Responsive Navbar untuk Mobile ========== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
  }

  .navbar .logo {
    width: 100px;
    height: 50px;
  }

  /* ubah navbar-nav jadi tersembunyi, tampil saat toggle */
  .navbar .navbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--bg);
    display: none; /* default sembunyi */
    text-align: center;
    padding: 1rem 0;
  }

  .navbar .navbar-nav a {
    margin: 0.5rem 0;
    font-size: 1rem;
  }

  /* tambahkan tombol toggle (hamburger) */
  .navbar .navbar-extra {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--sec);
    padding-top: 1rem;
    padding-right: 1rem;
  }

  /* class aktif untuk menampilkan menu */
  .navbar .navbar-nav.active {
    display: flex;
  }
}
