/* ================== RESET ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f6f8fb;
  color: #333;
  overflow-x: hidden;
}

/* ================== HEADER ================== */
header {
  background: linear-gradient(135deg, #6c63ff, #8360c3);
  color: #fff;
  padding: 15px 40px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

header h1 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* ================== NAVBAR ================== */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;

}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s;
  white-space: nowrap;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ================== DROPDOWN ================== */
nav ul li .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  color: #333;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  min-width: 220px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 9999;
}

nav ul li.show-dropdown > .dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown li a {
  color: #333;
  padding: 10px 18px;
  display: block;
  transition: background 0.3s;
}

.dropdown li a:hover {
  background: #f5f5f5;
  color: #6c63ff;
}

/* ================== MENU TOGGLE ================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.menu-toggle span {
  width: 15px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ===== Dropdown wrapper ===== */
.dropdown-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

/* ===== Dropdown Toggle (ikon panah dinamis) ===== */
.dropdown-toggle {
  cursor: pointer;
  font-size: 14px;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s;
}

/* Bentuk panah default (▶ menghadap kanan) */
.dropdown-toggle::before {
  content: "▶";
  font-size: 14px;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Saat dropdown aktif → panah menghadap ke bawah (▼) */
nav ul li.show-dropdown .dropdown-toggle::before {
  transform: rotate(90deg);
}

/* Hover di desktop */
.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 900px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    display: none;
    background: #6c63ff;
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px 0;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    width: 100%;
    display: block;
    padding: 12px 20px;
  }

  /* Dropdown di mobile: tampil vertikal di dalam menu */
  nav ul li .dropdown {
    position: static;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    transform: none;
    transition: none;
    margin-left: 15px;
  }

  nav ul li.show-dropdown .dropdown {
    display: block;
  }

  .dropdown li a {
    color: #fff;
    font-weight: 400;
  }

  .dropdown-toggle {
    font-size: 18px;
    padding: 10px 14px;
    min-width: 44px;
    min-height: 44px;
  }

  .menu-toggle {
    display: flex;
    position: absolute;
    right: 25px;
    top: 22px;
  }
}

/* ================== MAIN ================== */
main {
  padding: 0px 20px;
}
/* ================== SEMBUNYIKAN PANAH DROPDOWN DI DESKTOP ================== */
@media (min-width: 901px) {
  .dropdown-toggle {
    display: none;
  }

  /* Saat di desktop, dropdown muncul otomatis saat hover */
  nav ul li:hover > .dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }
}


.login-link img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s, filter 0.3s;
}

/* Efek hover: sedikit membesar dan ubah warna */
.login-link:hover img {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%) invert(50%) sepia(100%) saturate(600%) hue-rotate(-10deg);
}

/* ================== WIDGET KUNJUNGAN ================== */
.visitor-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(108, 99, 255, 0.3);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 10px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.visitor-widget:hover {
  transform: translateY(-2px);
}

.visitor-details {
  display: none;
  position: absolute;
  bottom: 60px;
  left: 0;
  background: #fff;
  color: #333;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  width: 220px;
}

.visitor-details h4 {
  margin-bottom: 8px;
  font-size: 10px;
  color: #6c63ff;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

.visitor-widget:hover .visitor-details {
  display: block;
}

