/* ─── PREMIUM HEADER ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 72px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(26, 92, 58, 0.08);
  transition: all 0.3s ease;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav.scrolled {
  height: 64px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* ─── LOGO ─── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-logo:hover { opacity: 0.85; }

.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-main {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  max-width: 260px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 700; /* Ditebalkan sedikit agar lebih jelas */
  color: var(--text-darker); /* Hijau gelap pekat untuk kejelasan maksimal */
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ─── NAVIGATION MENU ─── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
}

.nav-menu > a,
.nav-menu > div {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-menu > a {
  padding: 0 18px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
  border-bottom: 3px solid transparent;
}

.nav-menu > a:hover {
  color: var(--green);
  border-bottom-color: var(--gold);
}

/* ─── DROPDOWN TRIGGER ─── */
.nav-item-dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  outline: none;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.dropdown-trigger:hover,
.dropdown-trigger.active {
  color: var(--green);
  border-bottom-color: var(--gold);
}

/* ─── CHEVRON ─── */
.chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
  margin-left: 2px;
  opacity: 0.7;
}

/* ─── DROPDOWN MENU ─── */
.mega-menu-content {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2000;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(-8px);
}

.mega-menu-content.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-item {
  display: block !important;
  padding: 10px 14px !important;
  border-radius: 8px;
  color: #334155 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  white-space: nowrap;
}

.mega-item:hover {
  background: var(--green) !important;
  color: #fff !important;
}

.mega-title {
  display: block;
}

/* ─── CATEGORY GROUPING IN MEGA MENU ─── */
.mega-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 70vh;
  overflow-y: auto;
}

.mega-category-group {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.mega-category-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.mega-category-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 14px 4px;
  opacity: 0.75;
}

/* ─── CTA BUTTON ─── */
.nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-actions .btn {
  padding: 0.65rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--green) 0%, #1a7a4a 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26, 92, 58, 0.3);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.nav-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 92, 58, 0.4);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .nav-menu > a,
  .dropdown-trigger { padding: 0 12px; }
  .brand-main { font-size: 0.85rem; max-width: 200px; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav { padding: 0 5%; }
}
 /* MOBILE OVERRIDES BY AI */
@media (max-width: 768px) {
  .nav { height: 64px !important; }
  .brand-main { font-size: 0.8rem !important; max-width: 180px !important; }
  .brand-sub { display: none !important; }
  .nav-logo img { height: 32px !important; }
  .header-logo-img { height: 32px !important; }
  .nav-actions .btn { padding: 0.5rem 1.2rem !important; font-size: 0.75rem !important; }
}

@media (max-width: 480px) {
  .brand-main { font-size: 0.7rem !important; max-width: 140px !important; }
  .nav-actions .btn { padding: 0.45rem 1rem !important; font-size: 0.7rem !important; }
  .nav { padding: 0 3% !important; }
}