/* ========= NAVBAR RESPONSIVE ========= */

.menu a, .dropbtn, .dropdown-content a, .menu-toggle {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.menu-toggle{
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
}

.menu-toggle span{
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-active span:nth-child(1){
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.is-active span:nth-child(2){
  opacity: 0;
}
.menu-toggle.is-active span:nth-child(3){
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1015px) {

  .menu-toggle{
    display: flex;
  }

  .navbar{
    padding: 12px 20px;
  }

  .menu{
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    background: var(--blue-main);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 20px;
    overflow-y: auto;
    z-index: 998;

    /* Sembunyikan by default */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .menu.is-open{
    transform: translateX(0);
  }

  .menu a, .dropbtn{
    display: block;
    width: 100%;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 16px;
    background: transparent;
  }

  .dropbtn:active,
  .dropbtn:focus{
    background: transparent;
  }

  .dropdown{
    width: 100%;
  }

  /* Dropdown jadi accordion, bukan hover overlay */
  .dropdown-content{
    display: block;
    position: static;
    box-shadow: none;
    border-top: none;
    background: rgba(255,255,255,0.05);
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  .dropdown.is-open .dropdown-content{
    max-height: 600px;
    opacity: 1;
  }

  .dropdown-arrow{
    display: inline-block;
    transition: transform 0.25s ease;
  }

  .dropdown.is-open .dropdown-arrow{
    transform: rotate(180deg);
  }

  .dropdown-content a{
    display: block !important;
    color: white !important;
    padding: 14px 24px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  }

  .dropdown-content a:last-child{
    border-bottom: none !important;
  }

  .dropdown-content a:hover{
    background: rgba(255,255,255,0.1);
    color: var(--gold-light);
  }

  .language-switch{
    margin-top: 10px;
    padding-left: 10px;
  }

}