/* ===========================
   🌙 Elegant InJourney Navbar - Full Final Version
   by Krisna & GPT-5 😎
=========================== */

/* --- Reset & Base --- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* --- Navbar Utama Full Kiri --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 🔹 Semua item ke kiri */
  background: rgba(29, 78, 216, 0.9);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 10px; /* jarak kecil antar elemen biar nggak nempel */
}

/* --- Grup Kiri: Hamburger, Logo, Brand --- */
.navbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
}

/* --- Hamburger di kiri logo --- */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 6px; /* jarak kecil dengan logo */
  z-index: 1600;
  transition: transform 0.3s ease;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* --- Animasi ke bentuk X --- */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Logo & Brand --- */
.logo {
  height: 34px;
  margin: 0;
}
.brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-left: 4px;
}

/* --- Navbar Right (Sidebar) tetap seperti sebelumnya --- */
.navbar-right {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 70px;
  padding-left: 20px;
  padding-right: 20px;
  transition: all 0.35s ease-in-out;
  opacity: 0;
  z-index: 1500;
  overflow-y: auto;
}

.navbar-right.active {
  left: 0;
  opacity: 1;
}

.navbar-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 58, 138, 0.88);
  backdrop-filter: blur(8px);
  z-index: -1;
}

.navbar-right a {
  color: white;
  text-decoration: none;
  width: 100%;
  padding: 12px 0;
  margin: 8px 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.navbar-right a:hover {
  color: #ffd54f;
  transform: translateX(6px);
}

/* --- Overlay Gelap Saat Sidebar Terbuka --- */
body.sidebar-open {
  overflow: hidden;
}
body.sidebar-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1400;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ===========================
   ⚙️ Responsif
=========================== */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 14px;
  }

  .navbar-left {
    gap: 8px;
  }

  .logo {
    height: 30px;
  }

  .brand {
    font-size: 1rem;
  }

  .navbar-right {
    width: 210px;
    padding: 70px 18px 18px 18px;
  }

  .navbar-right a {
    font-size: 0.95rem;
  }
}
