/* ========================================
   Navigation Styles
   ======================================== */

#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  border-bottom: 1px solid transparent;
}

#main-header.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid transparent;
}

#main-header.solid {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
}

#main-header.header-hidden {
  transform: translateY(-100%);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

#main-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 16px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo .logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.nav-logo .logo-text-wrap {
  line-height: 1.1;
}

.nav-logo .logo-name {
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 800;
  color: #fff;
  display: block;
  letter-spacing: 0.01em;
}

.nav-logo .logo-name em {
  color: var(--color-red);
  font-style: normal;
}

.nav-logo .logo-sub {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-top: 1px;
}

/* Nav Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Language Toggle */
#lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

#lang-toggle:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: white;
  box-shadow: 0 4px 14px rgba(201, 147, 42, 0.35);
}

#lang-toggle .lang-active {
  color: var(--color-gold-light);
}

/* Dark Mode Toggle */
#theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#theme-toggle:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  box-shadow: 0 4px 14px rgba(201, 147, 42, 0.35);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Sliding Nav Panel
   ======================================== */

/* Overlay */
#nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(2px);
}

#nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Panel */
#nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 85vw);
  background: rgba(8, 24, 16, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1100;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(201, 147, 42, 0.18);
  box-shadow: none;
}

#nav-panel.open {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 6px 0 40px rgba(0, 0, 0, 0.4);
}

/* Panel Header */
.nav-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.nav-panel-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

#nav-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

#nav-panel-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Nav Links inside panel */
.nav-links {
  list-style: none;
  margin: 0;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.25s, background 0.25s;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  gap: 10px;
}

.nav-links a:hover {
  color: var(--color-gold-light);
  background: rgba(201, 147, 42, 0.12);
}

.nav-links a.active {
  color: var(--color-gold-light);
  background: rgba(201, 147, 42, 0.14);
}

.nav-links a.nav-harga {
  color: var(--color-gold-light);
}

.nav-links a.nav-harga:hover {
  background: rgba(201, 147, 42, 0.18);
}

/* Left edge nav trigger button */
#nav-edge-hint {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 1098;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 16px 12px 16px 8px;
  /* Provide click target area */
  background: transparent;
  border: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-edge-hint .hint-arrows {
  display: flex;
  flex-direction: row;
  gap: 4px;
  /* Slightly wider gap for larger arrows */
  align-items: center;
}

#nav-edge-hint .hint-arrows span {
  display: block;
  width: 14px;
  height: 14px;
  border-top: 3px solid var(--color-gold);
  border-right: 3px solid var(--color-gold);
  transform: rotate(45deg);
  /* Point right */
  opacity: 0.6;
  /* Static idle opacity */
  transition: opacity 0.3s, transform 0.3s;
}

#nav-edge-hint:hover {
  transform: translateY(-50%) translateX(4px);
}

@keyframes fade-wave {
  0% {
    opacity: 0.15;
  }

  35% {
    opacity: 1;
    border-color: var(--color-gold-light);
  }

  100% {
    opacity: 0.15;
  }
}

#nav-edge-hint:hover .hint-arrows span {
  animation: fade-wave 1.2s infinite ease-out;
  opacity: 0.15;
  /* baseline for animation */
}

#nav-edge-hint:hover .hint-arrows span:nth-child(1) {
  animation-delay: 0s;
}

#nav-edge-hint:hover .hint-arrows span:nth-child(2) {
  animation-delay: 0.2s;
}

#nav-edge-hint:hover .hint-arrows span:nth-child(3) {
  animation-delay: 0.4s;
}

#nav-edge-hint.hidden {
  transform: translateY(-50%) translateX(-100%);
  pointer-events: none;
}

/* === Mobile Nav === */
@media (max-width: 768px) {
  .nav-logo .logo-icon {
    width: 34px;
    height: 34px;
  }

  .nav-logo .logo-name {
    font-size: 0.8rem;
  }

  .nav-logo .logo-sub {
    font-size: 0.52rem;
  }

  .nav-logo {
    gap: 8px;
  }

  #lang-toggle {
    padding: 4px 10px;
    font-size: 0.68rem;
  }

  #theme-toggle {
    padding: 4px 8px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .nav-logo .logo-text-wrap {
    display: none;
  }

  .nav-logo .logo-icon {
    width: 36px;
    height: 36px;
  }

  .nav-controls {
    gap: 6px;
  }

  .hamburger {
    width: 36px;
    height: 36px;
  }

  /* Touch-friendly nav links */
  .nav-links a {
    padding: 14px 16px;
    min-height: 44px;
    font-size: 0.85rem;
  }

  #nav-panel {
    width: min(280px, 88vw);
  }
}

@media (max-width: 360px) {
  .nav-logo .logo-icon {
    width: 32px;
    height: 32px;
  }

  #lang-toggle {
    padding: 3px 8px;
    font-size: 0.62rem;
  }

  #theme-toggle {
    padding: 3px 6px;
    font-size: 0.8rem;
  }

  .hamburger {
    width: 34px;
    height: 34px;
    gap: 4px;
  }

  .hamburger span {
    width: 18px;
  }

  #nav-panel {
    width: min(260px, 90vw);
  }

  .nav-panel-header {
    padding: 16px 14px 12px;
  }

  .nav-links {
    padding: 12px 8px;
  }

  .nav-links a {
    padding: 12px 12px;
    font-size: 0.82rem;
  }
}