/* ===== MOBILE NAVBAR CONTAINER ===== */
.navbar-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: transparent;
  z-index: 1001;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
}

.navbar-mobile:hover,
.navbar-mobile.scrolled {
  background: rgba(0, 0, 0, 0.5);
}

/* Mobile Header */
.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 100%;
}

/* ===== MOBILE LOGO STYLES - SAMA DENGAN DESKTOP ===== */
.mobile-logo {
  position: relative;
  display: inline-block;
}

.mobile-logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

/* Logo putih - SELALU TAMPIL default */
.mobile-logo img:first-child {
  display: block;
  filter: brightness(0) invert(1);
}

/* Logo merah - SEMBUNYI default */
.mobile-logo img:last-child {
  display: none;
}

/* SAAT HOVER NAVBAR MOBILE - tampilkan logo merah */
.navbar-mobile:hover .mobile-logo img:first-child {
  display: none;
}

.navbar-mobile:hover .mobile-logo img:last-child {
  display: block;
}

/* SAAT SCROLL - tetap gunakan logo putih */
.navbar-mobile.scrolled .mobile-logo img:first-child {
  display: block;
  filter: brightness(0) invert(1);
}

.navbar-mobile.scrolled .mobile-logo img:last-child {
  display: none;
}

/* SAAT SCROLL + HOVER - tampilkan logo merah */
.navbar-mobile.scrolled:hover .mobile-logo img:first-child {
  display: none;
}

.navbar-mobile.scrolled:hover .mobile-logo img:last-child {
  display: block;
  filter: none;
}

/* SAAT HAMBURGER ACTIVE (menu terbuka) - tampilkan logo merah */
.navbar-mobile.active .mobile-logo img:first-child {
  display: none;
}

.navbar-mobile.active .mobile-logo img:last-child {
  display: block;
  filter: none;
}

/* ===== HAMBURGER MENU ===== */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 17px;
  cursor: pointer;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== FULLSCREEN OVERLAY ===== */
.mobile-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background: rgba(0, 0, 0, 0.98);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-overlay.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-menu {
  padding: 0;
  height: 100%;
}

/* ===== DROPDOWN TOGGLE - PADDING 18px 20px ===== */
.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-dropdown-toggle:active {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-arrow {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

.mobile-dropdown.open .dropdown-arrow {
  transform: rotate(270deg);
  color: #ee3025;
}

/* ===== DROPDOWN CONTENT ===== */
.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(20, 20, 20, 0.8);
}

.mobile-dropdown.open .mobile-dropdown-content {
  max-height: 75vh;
}

/* ===== CATEGORY HEADER - PADDING 18px 20px ===== */
.mobile-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  color:#fff;
  text-decoration:none;
}

.mobile-category-header a{
    color:#fff;
    text-decoration:none;
}

.mobile-category-header:active {
  background: rgba(255, 255, 255, 0.08);
}

.category-arrow {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

.mobile-category.open .category-arrow {
  transform: rotate(270deg);
  color: #ee3025;
}

/* ===== SUBMENU ITEMS - INDEMTASI ===== */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(30, 30, 30, 0.6);
}

.mobile-category.open .mobile-submenu {
  max-height: 300px;
}

.mobile-submenu-item {
  display: block;
  padding: 14px 20px 14px 40px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.mobile-submenu-item:active {
  background: rgba(255, 255, 255, 0.08);
  color: #ee3025;
  border-left-color: #ee3025;
}

/* Menu items tanpa dropdown */
.mobile-menu-item {
  display: block;
  padding: 18px 20px;
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.mobile-menu-item:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Language Selector Mobile */
.mobile-language {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-language img {
  height: 20px;
  width: 20px;
}

/* ===== RESPONSIVE BREAKPOINT ===== */
@media screen and (max-width: 767px) {
  .navbar-desktop {
    display: none !important;
  }

  .navbar-mobile {
    display: block;
  }
}

/* Small Mobile Adjustments */
@media screen and (max-width: 480px) {
  .navbar-mobile {
    height: 60px;
  }

  .mobile-nav-header {
    padding: 0 16px;
  }

  .mobile-logo img {
    height: 40px;
  }

  .mobile-overlay {
    top: 60px;
    height: calc(100vh - 60px);
  }

  .mobile-dropdown-toggle,
  .mobile-category-header,
  .mobile-menu-item,
  .mobile-language {
    padding: 16px 16px;
    font-size: 15px;
  }

  .mobile-submenu-item {
    padding: 12px 16px 12px 32px;
    font-size: 13px;
  }
}


/* --- Tablet (≤ 992px) --- */
@media (max-width: 992px) {
  .sub-nav {
    height: 70px;
    font-size: 14px;
    line-height: 70px;
    padding: 0 70px;
  }
}

/* --- Mobile landscape / small tablets (≤ 768px) --- */
@media (max-width: 768px) {
  .sub-nav {
    height: 64px;
    font-size: 14px;
    line-height: 64px;
    padding: 0 50px;
  }
}

/* --- Mobile portrait (≤ 480px) --- */
@media (max-width: 480px) {
  .sub-nav {
    height: auto;          /* biarkan tinggi menyesuaikan isi */
    font-size: 14px;
    line-height: 1.4;      /* pakai rasio agar teks rapi */
    padding: 12px 12px;
    text-align: center;
    justify-content: center;
  }
}

/* Body scroll lock */
body.mobile-menu-open {
  overflow: hidden;
}
