/* ============================================
   NAMSEZANA TRADING & PROJECTS
   Navbar Styles - Mobile Rework
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  padding: 0;
  transition: all var(--transition-base);
  background: white;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.navbar.scrolled {
  background: rgba(var(--color-secondary-rgb), 0.95); /* Darker glassmorphic */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 20;
}

/* =======================================
   TOP TIER
   ======================================= */
.navbar-top {
  border-bottom: 1px solid var(--gray-200);
}

.navbar.scrolled .navbar-top {
  border-bottom-color: rgba(255,255,255,0.08); /* Clean dark mode line */
}

.navbar-top .navbar-container {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  z-index: 21;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: height var(--transition-base);
}

.navbar.scrolled .logo-img {
  height: 40px;
  filter: brightness(0) invert(1);
}

/* Top Right Contact Info */
.navbar-top-contact {
  display: none; /* Hide on mobile */
}

@media (min-width: 1024px) {
  .navbar-top-contact {
    display: flex;
    align-items: center;
    gap: var(--space-8); /* Space between location and phone */
  }
}

.top-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--industrial-dark);
  transition: color var(--transition-base);
}

.navbar.scrolled .top-contact-item {
  color: rgba(255,255,255,0.85);
}

.top-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary-blue);
}

.navbar.scrolled .top-contact-item svg {
  color: var(--safety-yellow);
}

/* =======================================
   BOTTOM TIER
   ======================================= */
.navbar-bottom {
  display: none; /* Hide completely on mobile */
}

@media (min-width: 1024px) {
  .navbar-bottom {
    display: block;
  }
}

.navbar-bottom .navbar-container {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

/* Desktop Navigation */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8); /* Wide spacing per mockup */
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: var(--space-3) 0; /* Vertical padding expands hit area */
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--industrial-dark);
  border-radius: 0;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
  position: relative;
}

/* Base line under active/hover Nav items */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0px; 
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar.scrolled .nav-link {
  color: rgba(255,255,255,0.75);
}

.navbar.scrolled .nav-link::after {
  background: var(--safety-yellow);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: white;
}

/* =======================================
   CTA BUTTON
   ======================================= */
.nav-cta-btn {
  background: var(--primary-blue);
  color: white;
  font-family: var(--font-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 0; /* Square corners per design system */
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.nav-cta-btn:hover {
  background: var(--safety-yellow);
  color: var(--industrial-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.navbar.scrolled .nav-cta-btn {
  background: var(--safety-yellow);
  color: var(--industrial-dark);
}

.navbar.scrolled .nav-cta-btn:hover {
  background: white;
  color: var(--primary-blue-dark);
}

/* Mobile Toggle */
.navbar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: 0; /* Sharp corner */
  cursor: pointer;
  z-index: 25;
  transition: all var(--transition-fast);
}

.navbar.scrolled .navbar-toggle {
  border-color: rgba(var(--palette-white-rgb), 0.2);
}

@media (min-width: 1024px) {
  .navbar-toggle {
    display: none;
  }
}

.toggle-bar {
  display: block;
  width: 24px;
  height: 1.5px; /* Thinner, precise line */
  background: var(--primary-blue);
  border-radius: 0;
  transition: all var(--transition-fast);
  transform-origin: center;
}

.navbar.scrolled .toggle-bar {
  background: white;
}

.navbar-toggle.active {
  background: transparent;
  border-color: transparent;
}

.navbar-toggle.active .toggle-bar {
  background: white;
  /* In open menu (dark bg), bars are white */
}

.navbar-toggle.active .toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar-toggle.active .toggle-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.navbar-toggle.active .toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  background: rgba(var(--color-dominant-dark-rgb), 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 120px var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); /* Elegant easing */
  z-index: 10;
  overflow-y: auto;
  visibility: hidden;
}

.mobile-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  height: 100%;
  width: 1px;
  background: rgba(var(--palette-white-rgb), 0.05);
}

.mobile-menu.active {
  transform: translateX(0);
  visibility: visible;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
}

/* Nav Items */
.mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(var(--palette-white-rgb), 0.7);
  border-radius: 0;
  border-bottom: 1px solid rgba(var(--palette-white-rgb), 0.05);
  transition: all var(--transition-fast);
  position: relative;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  color: white;
  transform: translateX(10px);
  border-bottom-color: var(--safety-yellow);
}

.mobile-nav-number {
  font-family: var(--font-mono);
  font-size: 0.6em;
  color: var(--safety-yellow);
  background: rgba(var(--color-accent-rgb), 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Mobile CTA */
.mobile-nav-cta {
  background: var(--safety-yellow);
  color: var(--industrial-dark) !important;
  justify-content: center;
  margin-top: var(--space-6);
  border: none;
}

.mobile-nav-cta:hover {
  background: var(--safety-yellow-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--color-accent-rgb), 0.3);
}

/* Mobile Contact Footer */
.mobile-contact {
  margin-top: auto;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(var(--palette-white-rgb), 0.1);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.mobile-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(var(--palette-white-rgb), 0.7);
  font-size: var(--text-sm);
  text-decoration: none;
}

.mobile-contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--safety-yellow);
}