/* Top Info Bar */
.top-bar {
  background-color: var(--primary-blue);
  color: var(--bg-white);
  padding: 0.5rem 0rem;
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  position: relative;
  z-index: 1001;
  transition: var(--transition-medium);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Highlighted Item (Blinking Address) */
.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bg-white);
  text-decoration: none;
  font-weight: var(--font-weight-semibold); /* Optional, to make the address bold */
  animation: blink 1.5s infinite; /* Apply the blinking effect */
}

.top-bar-item:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.top-bar-item i {
  font-size: 1.2rem;
}

/* Blinking Animation */
@keyframes blink {
  0% {
    color: var(--accent-orange); /* Start with your highlight color */
  }
  50% {
    color: var(--bg-white); /* Change to white (or background color) */
  }
  100% {
    color: var(--accent-orange); /* Back to highlight color */
  }
}

/* Main Navigation */
.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  gap: 2rem;
  max-width: 1200px; /* Limit max-width for better spacing */
  margin: 0 auto;
}

/* Logo & Branding */
.navbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-logo-link {
  display: flex;
  align-items: center;
}

.navbar-logo-link:focus {
  outline: none;
}

.navbar-logo-link:focus-visible {
  outline: 2px solid var(--primary-blue);
}

.navbar-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Navigation Links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* CTA Button */
.navbar-cta {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.navbar-cta .btn {
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
}

.nav-link {
  color: var(--text-dark);
}

.nav-link:hover {
  color: var(--primary-blue);
  text-decoration: unset;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
  gap: 0.25rem;
}

.mobile-toggle span {
  width: 1.5rem;
  height: 2px;
  background-color: var(--text-dark);
  transition: var(--transition-fast);
  transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.375rem, 0.375rem);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.375rem, -0.375rem);
}

/* Mobile Menu */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-medium);
  z-index: 999;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  list-style: none;
  margin: 0;
}

.mobile-nav .nav-link {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  display: block;
}

.mobile-cta {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-cta .btn {
  width: 100%;
  justify-content: center;
}

/* Responsive Behavior */
@media (max-width: 768px) {
  .top-bar {
    font-size: 0.85rem;
    padding: 0.75rem 0;
  }

  .top-bar-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .navbar-nav,
  .navbar-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .navbar-content {
    padding: 1rem 0;
  }

  .top-bar.hidden {
    transform: translateY(-100%);
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 1.2rem;
  }

  .brand-subtitle {
    font-size: 0.8rem;
  }

  .mobile-toggle {
    padding: 0.25rem;
  }

  .mobile-toggle span {
    width: 1.25rem;
  }

  .top-bar {
    padding: 0.5rem 0;
  }

  .top-bar-item {
    font-size: 0.8rem;
  }
}

/* Loading Animation */
.navbar.loading {
  opacity: 0;
  animation: navbarFadeIn 0.5s ease-out forwards;
}

@keyframes navbarFadeIn {
  to {
    opacity: 1;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .navbar,
  .mobile-menu,
  .nav-link,
  .mobile-toggle span,
  .top-bar {
    transition: none;
  }

  .nav-link::after {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .navbar {
    border-bottom-width: 2px;
  }

  .nav-link::after {
    height: 3px;
  }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.mobile-toggle:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.top-bar-item:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
  .navbar-content {
    overflow-x: hidden;
  }
}

/* anchor and layer the menu */
.navbar {
  position: relative;
  z-index: 2000;
}

/* guarantee visibility when active */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white, #fff);
  border-bottom: 1px solid var(--border-light, #eee);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2001;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  display: block;
}

/* ======= FIXED TOP BAR ======= */
#topBar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background-color: #007bff;
  color: #fff;
  padding: 10px 0;
  font-size: 14px;
}

/* ======= FIXED NAVBAR BELOW TOP BAR ======= */
#navbar {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: top 0.3s ease-in-out;
  width: 100%;
  padding: 8px 12px;
}



/* ==== DYNAMIC STACK FIX: top bar + navbar alignment ==== */
:root {
  --topbar-h: 0px;
  --navbar-h: 64px; /* fallback height */
}

/* keep top bar fixed */
#topBar {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 10000;
}

/* place navbar directly below the real top bar */
#navbar {
  position: fixed;
  top: var(--topbar-h) !important;
  left: 0; right: 0;
  z-index: 9999;
  width: 100%;
}

/* ensure page content starts below both */
body {
  padding-top: calc(var(--topbar-h) + var(--navbar-h)) !important;
}

/* remove old hard-coded top values */
@media (max-width: 1440px), (max-width: 1020px), (max-width: 768px), (max-width: 480px) {
  #navbar { top: var(--topbar-h) !important; }
  body { padding-top: calc(var(--topbar-h) + var(--navbar-h)) !important; }
}
/* === DESKTOP FIX: topbar should NOT overlap navbar === */

/* 1) Layering: navbar > topbar */
#topBar { z-index: 9000 !important; }
#navbar  { z-index: 10001 !important; }

/* 2) Agar CTA thoda neeche drop ho raha ho to topbar me thoda extra bottom padding on desktop */
@media (min-width: 992px) {
  #topBar { padding-bottom: 10px !important; } /* 8–12px safe */
}

/* (already added earlier) navbar position below real topbar height */
#navbar { top: var(--topbar-h) !important; }
body { padding-top: calc(var(--topbar-h) + var(--navbar-h)) !important; }
