/* Reset & basic */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 50px;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
  z-index: 2000;
  background: transparent;

  /* sembunyikan dulu sampai script init */
  visibility: hidden;
}

header.scrolled {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 5px 30px;
}

/* Logo */
.logo img {
  width: 80px;
  height: 60px;
  object-fit: contain;
  transition: width 0.3s, height 0.3s;
}

header.scrolled .logo img {
  width: 60px;
  height: 45px;
}

/* Nav */
nav {
  display: flex;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav ul li a {
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    transition: color 0.3s;
    text-transform: uppercase;
    display: inline-block; /* Tambahkan ini */
    position: relative;    /* pastikan posisi relative agar ::after berada di sini */
}

header.scrolled nav ul li a {
  color: #103f2f;
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;  /* ubah dari 0% menjadi 0 */
    height: 2px;
    background: #d4af37;
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;            /* sekarang 100% dari teks, bukan container */
}

/* Hamburger */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
  z-index: 1000;
}

header.scrolled .menu-toggle {
  color: #103f2f;
}

/* Responsive */
@media (max-width: 991px) {
  header {
    padding: 10px 20px;
  }

  nav {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    transition: max-height 0.3s ease;
  }

  nav ul {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  nav ul li a {
    color: #103f2f;
  }

  nav.active {
    max-height: 300px;
  }

  .menu-toggle {
    display: block;
  }
}
