body {
  background-image: url('../img/pattern-bg.jpg');
  background-repeat: repeat;
}

.navBar {
  display: flex;
  justify-content: space-between;
  background-color: black;
  padding: 0 1rem;
}

.navBar ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .2rem;
}
.navBar ul li a{
  position: relative;
  display: block;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  padding: 1rem;
  transition: 0.2s ease-out;
}
.navBar ul li a:hover {
  background-color: #575799;
}

.navBar ul li .navDrop {
  display: none;
  position: absolute;
  flex-direction: column;
  border: 1px solid #fff;
  gap: 0;
  background-color: #fff;  
}
.navBar ul li:hover .navDrop {
  display: block;
}
.navBar ul li .navDrop li a{
  color: #000;
  border: 1px solid #ddd;
  padding: 0.7rem;
  transition: 0.3s ease-in-out;
}

.navBar ul li .navDrop li a:hover{
  color: #fff;
}

.menu-icon {
  display: none;
  align-items: center;
}
.menu-icon a {
  color: #fff;
  font-size: 1.3rem;
}

.search {
  position: relative;
}
.search input::placeholder{
  font-style: italic;
  color: #bbb;
}
.search input {
  background-color: #666;
  border: 1px solid #666;
  color: #bbb;
}
.search input:focus {
  color: #bbb;
  border: 2px solid #fff;
  background-color: #777;

}


/* === NAVBAR RESPONSIVE === */

/* ============================== */
/* Untuk layar kecil (mobile)     */
/* ============================== */
@media (max-width: 768px) {
  .navBar {
    position: relative;
    padding: 0.5rem 1rem;
    z-index: 1000;
  }

  /* menu toggle muncul */
  .menu-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
  }

  /* ul jadi panel samping kiri */
  .navBar ul {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 250px;
    flex-direction: column;
    background-color: #000;
    border-right: 1px solid #333;
    padding-top: 3.5rem;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  /* saat aktif */
  .navBar.active ul {
    left: 0;
  }

  /* backdrop (area gelap di luar navbar) */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 999;
  }

  .navBar.active + .nav-overlay {
    display: block;
  }

  .navBar ul li a {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #222;
  }

  .navBar ul li .navDrop {
    position: static;
    border: none;
    background-color: #111;
  }

  .navBar ul li .navDrop li a {
    padding-left: 2rem;
  }

  .search {
    width: 100%;
    margin: 0.5rem 1rem;
  }

  .search input {
    width: 100%;
  }
}

