/* =========================================================
   🔹 TOP STRIP (same look as index) + keep dropdown above nav
   ========================================================= */
.top-header-bar {
  position: relative;
  background-color: #1f2937;
  color: #f97316;
  border-bottom: 1px solid #374151;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  z-index: 650;
  overflow: visible;
}

.top-header-bar>.container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .15rem 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.top-header-bar .contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-align: center;
  width: 100%;
}

.top-header-bar img,
.icon-sm {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.top-header-bar a {
  color: #f97316;
  font-weight: 500;
  font-size: .88rem;
  transition: color .2s;
}

.top-header-bar a:hover {
  color: #fb923c;
}

/* Language */
.lang-wrapper {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-48%);
  display: flex;
  align-items: center;
  z-index: 660;
}

#langToggle {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: none;
  color: #f97316;
  font-weight: 500;
  font-size: .85rem;
  cursor: pointer;
  padding: .15rem .4rem;
  border-radius: .25rem;
}

#langToggle:hover {
  color: #fb923c;
}

#langToggle img {
  width: 16px;
  height: 16px;
}

#langToggle svg {
  color: inherit;
}

/* Dropdown (overlay everything) */
#langMenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 9rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  border-radius: .5rem;
  display: flex;
  flex-direction: column;
  padding: .25rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 10000;
  overflow: hidden;
}

#langMenu.open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(2px) !important;
}

#langMenu button[data-lang] {
  display: block !important;
}

#langMenu button {
  border: none;
  background: transparent;
  font-size: .88rem;
  color: #374151;
  text-align: left;
  padding: .42rem .8rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}

#langMenu button:nth-child(odd) {
  background: #f9fafb;
}

#langMenu button:hover {
  background: #fff7ed;
  color: #ea580c;
}

/* Mobile stacking for the top strip */
@media (max-width: 767px) {
  .top-header-bar>.container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .25rem;
    padding: .25rem .5rem;
  }

  .top-header-bar .contact-info {
    flex-direction: column;
    gap: .15rem;
  }

  .lang-wrapper {
    position: static;
    align-self: flex-end;
    margin-right: 1rem;
    transform: none;
  }
}

/* =========================================================
   🔹 MAIN HEADER — match index size/feel
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 600;
  /* below top-header so dropdown appears above */
  background: #fff;
}

/* inner container */
header>.max-w-7xl,
header .max-w-7xl.mx-auto {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem;
  padding-top: .25rem;
  padding-bottom: .25rem;
}

/* Logo visual height (~56px mobile, ~64px desktop) */
header a[aria-label="Reclaim Bharosa Home"] img {
  height: 56px !important;
  width: auto !important;
  object-fit: contain !important;
}

@media (min-width:768px) {
  header a[aria-label="Reclaim Bharosa Home"] img {
    height: 64px !important;
  }
}

/* Nav occupies remaining space */
header>.max-w-7xl nav {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
}

/* inner wrapper spacing ≈ gap-6 from index */
header nav .mx-auto {
  display: flex !important;
  gap: 1.5rem !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Link visuals (desktop) */
header nav .mx-auto>a {
  display: inline-flex !important;
  align-items: center !important;
  gap: .25rem !important;
  padding: .25rem .5rem !important;
  color: #374151 !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

header nav a:hover {
  color: #ea580c !important;
}

/* Language labels — show only active text */
header nav a [data-lang],
#mobile-menu a [data-lang] {
  display: none !important;
}

header nav a [data-lang].active,
#mobile-menu a [data-lang].active {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Login button */
header nav a[href="login.html"] {
  display: inline-flex !important;
  background: #1f2937 !important;
  color: #fff !important;
  padding: .4rem .9rem !important;
  border-radius: .5rem !important;
  font-weight: 600 !important;
}

a[href="login.html"]:hover {
  background-color: #f97316 !important;
  color: #fff !important;
}

a[href="login.html"]:active {
  background-color: #ea580c !important;
}

/* =========================================================
   🔹 MOBILE MENU PANEL + LINKS (stack vertically)
   ========================================================= */
#mobile-menu {
  transition: all .3s ease;
  z-index: 550 !important;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

#mobile-menu a {
  display: block !important;
  padding: .75rem 1rem !important;
  color: #374151 !important;
  font-weight: 500 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
  white-space: normal !important;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}

#mobile-menu a:hover {
  color: #ea580c !important;
  background: #fff7ed;
}

#mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-cta-row {
  display: flex;
  gap: .75rem;
  justify-content: center;
  margin-top: .5rem;
  padding: .5rem 1rem;
}

.mobile-cta-row a {
  flex: 1;
  text-align: center;
}

/* Focus polish */
#langToggle:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* =========================================================
   🔧 RESPONSIVE VISIBILITY RULES TO PREVENT DOUBLE MENUS
   ========================================================= */

/* ✅ On phones: hide the desktop nav row + desktop login pill */
@media (max-width: 767px) {
  header nav .mx-auto {
    display: none !important;
  }

  header nav a[href="login.html"] {
    display: none !important;
  }
}

/* ✅ On tablets/desktop: hide hamburger + mobile panel */
@media (min-width: 768px) {
  #mobile-menu-button {
    display: none !important;
  }

  #mobile-menu {
    display: none !important;
  }
}

/* ✅ Make mobile Login button match desktop style */
#mobile-menu a[href="login.html"] {
  background-color: #1f2937 !important;  /* dark gray */
  color: #fff !important;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  margin: 0.75rem 1rem;
  padding: 0.6rem 0.9rem !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
#mobile-menu a[href="login.html"]:hover {
  background-color: #f97316 !important;  /* orange */
  color: #fff !important;
}
#mobile-menu a[href="login.html"]:active {
  background-color: #ea580c !important;  /* darker orange */
}
