/* ============================================================
   NAVBAR DROPDOWN — gaya bersama untuk SEMUA halaman
   ------------------------------------------------------------
   Panel dropdown desktop (.dropdown-menu) dan submenu mobile
   (.mobile-dropdown-content) memakai gaya yang identik, sehingga
   tampilan dropdown konsisten di desktop maupun mobile.
   File ini dimuat setelah <style> inline tiap halaman, jadi
   aturan di sini yang menang bila ada perbedaan.
   ============================================================ */

/* ---------- 1. Ikon toggle dropdown & tombol menu ---------- */
/* Chevron "Program" pada navbar desktop dan mobile */
.dropdown > span .material-symbols-outlined,
#akademik-arrow {
  font-size: 20px;
  line-height: 1;
  transform: none !important;
}

/* Tombol hamburger mobile — modern */
#menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background-color: var(--bg-light-blue, #EAF2FF);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

#menu-toggle:hover {
  background-color: var(--bg-surface-container, #e9edff);
}

#menu-toggle:active {
  transform: scale(0.92);
}

#menu-icon {
  font-size: 24px;
  color: var(--primary, #2563EB);
}

/* ---------- 2. Panel dropdown (desktop & mobile) ---------- */
.dropdown .dropdown-menu,
.mobile-dropdown-content {
  background-color: var(--bg-surface-lowest, #ffffff);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.5rem !important;
}

.dropdown .dropdown-menu {
  top: 100%;
  margin-top: 0.5rem;
}

/* ---------- 3. Item dropdown (desktop & mobile) ---------- */
.dropdown-menu .dropdown-item,
.mobile-dropdown-content a {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--on-surface, #121b2e);
  padding: 0.5rem 1.25rem !important;
  margin: 0 0 0.375rem 0 !important;
  border-radius: 8px !important;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu li:last-child .dropdown-item,
.mobile-dropdown-content a:last-child {
  margin-bottom: 0 !important;
}

/* ---------- 4. State hover / focus / aktif ---------- */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.nav-active-dropdown,
.mobile-dropdown-content a:hover,
.mobile-dropdown-content a:focus,
.mobile-dropdown-content a:active,
.mobile-dropdown-content a.nav-active-dropdown {
  background-color: var(--bg-light-blue, #EAF2FF) !important;
  color: var(--primary, #2563EB) !important;
  outline: none !important;
}

/* ---------- 5. Buka/tutup panel mobile ---------- */
.mobile-dropdown-content {
  max-height: 0;
  padding: 0 !important;
  margin: 0.25rem 0 0.5rem;
  overflow: hidden;
  box-shadow: none;
  transition: max-height 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.mobile-dropdown-content.show {
  max-height: 20rem;
  padding: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- 6. Tombol pembuka dropdown (desktop & mobile) ---------- */
/* Desktop: .dropdown > span | Mobile: #akademik-toggle */
.dropdown > span,
#akademik-toggle {
  cursor: pointer;
  border-radius: 8px !important;
  background-color: transparent;
  -webkit-tap-highlight-color: transparent;
}

/* Padding diberi margin negatif yang sama supaya posisi teks di navbar tidak bergeser */
.dropdown > span {
  padding: 0.375rem 0.5rem !important;
  margin: -0.375rem -0.5rem !important;
}

/* ---------- 7. Override warna biru pada trigger Program ---------- */
/* Batalkan class nav-active & nav-active-mobile yang ditambahkan JS */
.dropdown > span.nav-active {
  color: inherit !important;
  background-color: transparent !important;
}

#akademik-toggle.nav-active-mobile {
  color: inherit !important;
  background-color: transparent !important;
}
