/*
 * ═══════════════════════════════════════════════════════════
 *  BHARAT MODULES — UNIVERSAL NAVBAR STYLESHEET
 *  Single source of truth. Linked in all pages.
 *  Do NOT add page-specific nav overrides inline.
 * ═══════════════════════════════════════════════════════════
 */

/* ── Backdrop blur fade behind nav ── */
.nav-backdrop-fade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: rgba(120, 120, 120, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  -webkit-mask-image: linear-gradient(to bottom, black 36px, transparent 120px);
  mask-image: linear-gradient(to bottom, black 36px, transparent 120px);
  z-index: 90;
  pointer-events: none;
}

/* ── Nav bar itself ── */
nav,
nav.topnav {
  position: fixed;
  top: 16px;
  left: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  justify-content: space-between;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* ── Logo ── */
.nav-logo {
  text-decoration: none !important;
  flex-shrink: 0;
}

.nav-logo-img {
  height: 50px;
  width: auto;
  cursor: pointer;
  display: block;
}

.nav-logo-text {
  font-family: "Melete", "Outfit", sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: 0.18em;
  text-decoration: none;
  white-space: nowrap;
  display: block;
  line-height: 1;
  user-select: none;
}

/* ── Nav default wrapper (used in pages with inline search) ── */
.nav-default {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition:
    opacity 0.25s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.search-mode .nav-default {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* ── Nav links list ── */
.nav-links,
.nav-links-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Nav link items ── */
.nav-links a,
.nav-links-list a {
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #cccccc;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links-list a:hover {
  color: #ff6b00;
}

.nav-links a.active,
.nav-links-list a.active {
  color: #ffffff;
}

/* ── Login / Dashboard / Register button ── */
.nav-btn-login,
.nav-links .nav-btn-login,
.nav-links-list .nav-btn-login {
  background: #ffffff !important;
  color: #0f0f0f !important;
  padding: 8px 20px;
  border-radius: 4px;
  border: none !important;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  /* override any inline style color */
  color: #0f0f0f !important;
}

.nav-btn-login:hover {
  background: #dddddd !important;
  transform: translateY(-1px);
  color: #0f0f0f !important;
}

/* ── Search icon button ── */
.nav-search {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  color: #cccccc;
  transition: color 0.2s;
  flex-shrink: 0;
}

.nav-search:hover {
  color: #ff6b00;
}

/* ── Hamburger (mobile) ── */
.hamburger,
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span,
.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  display: block;
  transition: all 0.3s;
}

/* ══════════════════════════════════
   MOBILE — max-width: 768px
   ══════════════════════════════════ */
@media (max-width: 768px) {
  nav,
  nav.topnav {
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    top: 12px !important;
    border-radius: 24px !important;
    width: auto !important;
    max-width: calc(100% - 32px) !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 18px !important;
    box-sizing: border-box !important;
    height: 56px !important;
    z-index: 1000 !important;
  }

  .nav-links,
  .nav-links-list {
    display: none;
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    z-index: 99;
  }

  .nav-links.open,
  .nav-links-list.open {
    display: flex;
  }

  .nav-links li,
  .nav-links-list li {
    width: 100%;
  }

  .nav-links a,
  .nav-links-list a,
  .nav-links button,
  .nav-links-list button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-btn-login,
  .nav-links .nav-btn-login,
  .nav-links-list .nav-btn-login {
    margin: 8px 16px;
    width: calc(100% - 32px);
    text-align: center;
    justify-content: center;
    border-radius: 8px;
  }

  .hamburger,
  .nav-hamburger {
    display: flex;
  }

  .nav-search {
    display: none;
  }

  .nav-logo-img {
    height: 36px !important;
    width: auto;
  }
}

/* ══════════════════════════════════
   MOBILE — max-width: 480px
   ══════════════════════════════════ */
@media (max-width: 480px) {
  nav,
  nav.topnav {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .nav-logo-text {
    font-size: 12px;
    letter-spacing: 0.12em;
  }
}
