/* ============================================
   NAVBAR — Apple-style Ultra Glass Effect
   ============================================ */

.navbar {
  position: fixed;
  top: 32px;
  /* sits right below the 32px-high top ticker */
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  margin-top: 16px;
  width: calc(100% - 48px);
  max-width: 1160px;
  z-index: var(--z-navbar);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  height: auto;

  /* Apple-style glassmorphism */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(32px) saturate(2) brightness(1.1);
  -webkit-backdrop-filter: blur(32px) saturate(2) brightness(1.1);

  /* Subtle top highlight like glass edge */
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.28);

  border-radius: 100px;
  display: flex;
  align-items: center;

  /* Layered shadow like floating glass */
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.22),
    0 0 0 0.5px rgba(255, 255, 255, 0.06) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  padding: 6px 8px 6px 20px;
  transition: background 0.4s ease, box-shadow 0.4s ease, top 0.3s ease, margin-top 0.3s ease;
}

.navbar.scrolled {
  background: var(--primary-800);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.18),
    0 12px 40px rgba(0, 68, 27, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ── Logo ── */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 10;
  flex-shrink: 0;
}

.navbar__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: transform 0.35s ease;
}

.navbar__logo-icon svg {
  width: 28px !important;
  height: 28px !important;
}

.navbar__logo:hover .navbar__logo-icon {
  transform: rotate(-8deg) scale(1.08);
}

.navbar__logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.navbar__logo-text span {
  font-family: var(--font-logo, "Outfit", sans-serif);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff !important;
  line-height: 1;
  font-style: normal;
}

.navbar__logo-text span:last-child {
  margin-top: 2px;
}

/* ── Nav Links — centred on desktop ── */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.navbar__link {
  font-family: 'Satoshi', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  padding: 4px 14px;
  border-radius: 100px;
  transition: color 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}

.navbar__link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.navbar__link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

/* ── Actions (right side) ── */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  flex-shrink: 0;
}

/* Hide old elements that are removed */
.navbar__badge-lang,
.navbar__badge-search,
.navbar__plan-btn,
.navbar__cta {
  display: none !important;
}

.navbar__cta-mobile {
  display: none;
}

/* ── Mobile Menu Toggle ── */
.navbar__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
}

.navbar__toggle::before {
  content: 'MENU';
  font-family: 'Satoshi', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.navbar__toggle.active::before {
  content: 'CLOSE';
}

.navbar__toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.navbar__toggle span {
  display: none !important;
}


/* ============================================================
   MOBILE BOTTOM-SHEET MENU (matches references exactly)
   ============================================================ */

/* Backdrop overlay */
.nav-sheet-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.nav-sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* The sheet card itself */
.nav-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  /* constant() is the older iOS 11.0-11.2 syntax; env() is modern */
  bottom: calc(12px + constant(safe-area-inset-bottom));
  bottom: calc(12px + env(safe-area-inset-bottom));
  /* Bottom of the screen like iOS sheet */
  z-index: 999;
  background: var(--primary-800);
  border: 1.5px solid rgba(35, 139, 69, 0.18);
  border-radius: 18px;
  padding: 14px 14px 18px;
  transform: translateY(calc(100% + 24px));
  /* slide up from completely off-screen */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease,
    visibility 0.5s ease;
  box-shadow: 0 20px 60px rgba(0, 68, 27, 0.45);
  /* iOS momentum scrolling for sheet content */
  -webkit-overflow-scrolling: touch;
  /* Prevent sheet from rubber-banding into page */
  overscroll-behavior: contain;
}

.nav-sheet.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

/* Drag pill at top */
.nav-sheet__pill {
  width: 32px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  margin: 0 auto 16px;
}

/* Header row: NAVIGATION + Himalayan Locals */
.nav-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.nav-sheet__label {
  font-family: 'Satoshi', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold, #238B45);
}

.nav-sheet__brand {
  font-family: var(--font-heading);
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
}

/* Divider */
.nav-sheet__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

/* Grid of links */
.nav-sheet__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.nav-sheet__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Satoshi', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.nav-sheet__item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.nav-sheet__item.active {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid #ffffff !important;
  color: #ffffff;
}

.nav-sheet__item--full {
  grid-column: 1 / -1;
}

.nav-sheet__arrow {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-sheet__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-sheet__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 100px;
  font-family: 'Satoshi', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-sheet__btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.nav-sheet__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-sheet__btn--gold {
  background: var(--primary-600);
  border: 1px solid transparent;
  color: #ffffff;
}

.nav-sheet__btn--gold:hover {
  background: var(--primary-700);
  box-shadow: 0 4px 16px rgba(35, 139, 69, 0.35);
}


/* ============================================================
   TICKER / MARQUEE BAR (perfectly placed at absolute top)
   ============================================================ */

.nav-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 32px;
  background: var(--primary-800);
  border-bottom: 1px solid rgba(35, 139, 69, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 16px;
}

.nav-ticker__track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  white-space: nowrap;
  animation: none;
}

.nav-ticker__item {
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nav-ticker__dot {
  display: none !important;
}

@media (max-width: 480px) {
  .nav-ticker {
    height: 30px;
    padding: 0 12px;
  }
  .nav-ticker__item {
    font-size: clamp(8.5px, 2.7vw, 10px);
    letter-spacing: 0.01em;
  }
}


/* ── Desktop: hide sheet & toggle, show centered links ── */
@media (min-width: 1025px) {
  .navbar__toggle {
    display: none;
  }

  .nav-sheet,
  .nav-sheet-backdrop {
    display: none !important;
  }
}

/* ── Mobile & Tablet ── */
@media (max-width: 1024px) {
  .navbar {
    width: calc(100% - 32px);
    top: 32px;
    margin-top: 12px;
    padding: 5px 8px 5px 16px;
    height: auto;
  }

  .navbar__inner {
    padding: 0 4px;
  }

  /* Hide the desktop link rail */
  .navbar__links {
    display: none !important;
  }

  .navbar__actions {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }
}

@media (max-width: 480px) {
  .navbar {
    width: calc(100% - 24px);
    margin-top: 10px;
  }

  .nav-sheet {
    left: 8px;
    right: 8px;
    /* constant() fallback for older iOS 11 */
    bottom: calc(8px + constant(safe-area-inset-bottom));
    bottom: calc(8px + env(safe-area-inset-bottom));
    /* sits at bottom of screen on smaller devices */
    top: auto;
  }
}

@media (max-width: 768px) {
  .nav-sheet__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Prevent Desktop Overlapping on Cramped Viewports ── */
@media (min-width: 1025px) and (max-width: 1180px) {
  .navbar__link {
    padding: 4px 8px;
    font-size: 11px;
  }

  .navbar__links {
    gap: 4px;
  }

  .navbar__logo-text span {
    font-size: 10px;
  }
}
