/* ============================================
   JLR Engineering - Top Bar Menu (TechRoute66 Style)
   Two-tier header: top utility bar + main nav bar
   ============================================ */

/* ---------- TOP UTILITY BAR ---------- */
.top-bar {
  background: #0A1F15;
  border-bottom: 1px solid #1A3A2A;
  position: relative;
  z-index: 10001;
}

.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.top-bar-brand img {
  height: 36px;
  width: auto;
  display: block;
}

.top-bar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.top-bar-brand .brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #C8A645;
  letter-spacing: 0.5px;
}

.top-bar-brand .brand-tagline {
  font-size: 0.7rem;
  color: #A5A5A5;
  font-weight: 400;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.top-bar-info-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #A5A5A5;
  text-decoration: none;
  transition: color 0.2s;
}

.top-bar-info-item:hover {
  color: #C8A645;
}

.top-bar-info-item .icon {
  font-size: 0.9rem;
  line-height: 1;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #C8A645 0%, #E8C665 100%);
  color: #0A1F15;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.top-bar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 166, 69, 0.3);
  color: #0A1F15;
}

/* Language switcher in top bar */
.top-bar .lang-switcher {
  position: relative;
  display: inline-block;
}

.top-bar .lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #1A3A2A;
  border: 1px solid #2A5A3A;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  color: #E5E5E5;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.top-bar .lang-toggle:hover {
  border-color: #C8A645;
}

.top-bar .lang-toggle .flag {
  font-size: 1.1rem;
  line-height: 1;
}

.top-bar .lang-toggle::after {
  content: '▼';
  font-size: 0.55rem;
  margin-left: 0.2rem;
  color: #A5A5A5;
  transition: transform 0.2s;
}

.top-bar .lang-switcher.open .lang-toggle::after {
  transform: rotate(180deg);
}

.top-bar .lang-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  min-width: 160px;
  background: #1A3A2A;
  border: 1px solid #2A5A3A;
  border-radius: 8px;
  padding: 0.4rem;
  list-style: none;
  margin: 0;
  z-index: 10002;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.top-bar .lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
}

.top-bar .lang-dropdown li {
  margin: 0;
}

.top-bar .lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  color: #E5E5E5;
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.top-bar .lang-dropdown a:hover {
  background: rgba(200, 166, 69, 0.1);
  color: #C8A645;
}

.top-bar .lang-dropdown a.is-active {
  background: rgba(200, 166, 69, 0.15);
  color: #C8A645;
  font-weight: 600;
  pointer-events: none;
}

.top-bar .lang-dropdown a .flag {
  font-size: 1.1rem;
  line-height: 1;
}

/* ---------- MAIN NAVIGATION BAR ---------- */
.main-nav-bar {
  background: linear-gradient(90deg, #0D2B1C 0%, #1A3A2A 50%, #0D2B1C 100%);
  border-bottom: 2px solid #C8A645;
  position: relative;
  z-index: 10000;
}

.main-nav-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 48px;
  gap: 0.25rem;
}

.main-nav-bar .nav-home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  color: #E5E5E5;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.main-nav-bar .nav-home:hover {
  background: rgba(255,255,255,0.08);
  color: #C8A645;
}

.main-nav-bar .nav-home svg {
  width: 20px;
  height: 20px;
}

.main-nav-bar-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav-bar-links::-webkit-scrollbar {
  display: none;
}

.main-nav-bar-links li {
  margin: 0;
  flex-shrink: 0;
}

.main-nav-bar-links a {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 6px;
  color: #E5E5E5;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.main-nav-bar-links a:hover {
  background: rgba(255,255,255,0.08);
  color: #C8A645;
}

.main-nav-bar-links a.active {
  background: rgba(200, 166, 69, 0.12);
  color: #C8A645;
}

.main-nav-bar-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: #C8A645;
  border-radius: 1px;
}

/* Mobile menu toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #E5E5E5;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .top-bar-inner {
    padding: 0.5rem 1rem;
  }
  
  .top-bar-brand .brand-tagline {
    display: none;
  }
  
  .top-bar-info {
    display: none;
  }
  
  .main-nav-bar-inner {
    padding: 0 1rem;
    height: auto;
    min-height: 48px;
  }
  
  .main-nav-bar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0D2B1C;
    border-top: 1px solid #1A3A2A;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  
  .main-nav-bar-links.open {
    display: flex;
  }
  
  .main-nav-bar-links li {
    width: 100%;
  }
  
  .main-nav-bar-links a {
    width: 100%;
    height: auto;
    padding: 0.75rem 1rem;
    justify-content: center;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .main-nav-bar .nav-home {
    display: none;
  }
}

/* Sticky header adjustment */
.top-bar + .main-nav-bar {
  position: sticky;
  top: 0;
}
