/* ══════════════════════════════════════════
   NAV — topbar, hamburger, mobile menu
══════════════════════════════════════════ */

/* unit toggle (km / mi) */
.unit-toggle { display: inline-flex; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.unit-toggle button { background: transparent; border: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer; transition: background .15s, color .15s; }
.unit-toggle button.active { background: var(--orange); color: #fff; }
.unit-toggle button:not(.active):hover { color: var(--text); }
.mode-toggle button { padding: 6px 11px; display: flex; align-items: center; }
.mode-toggle button svg { width: 16px; height: 16px; display: block; }

/* language toggle (EN / ID) on the landing page */
.lang-toggle { display: inline-flex; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-toggle button { background: transparent; border: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 7px 11px; cursor: pointer; transition: background .15s, color .15s; }
.lang-toggle button.active { background: var(--orange); color: #fff; }
.lang-toggle button:not(.active):hover { color: var(--text); }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 24px;
  height: var(--nav-h);
  background: rgba(19, 19, 19, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.5px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 26px;
  height: 26px;
  fill: var(--orange);
  flex-shrink: 0;
}

.logo-sub { color: var(--muted); font-weight: 600; }

/* floating actions — Save Image + Share Story, side by side, bottom-right */
.fab-group {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000;
  display: flex; align-items: center; gap: 10px;
}
.fab {
  display: flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 12px 18px; font-weight: 800; font-size: 14px; cursor: pointer;
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .42);
}
.fab.fab-primary {
  background: var(--orange); color: #fff; border: none;
  box-shadow: 0 8px 24px rgba(252, 76, 2, .42);
}
.fab svg { width: 20px; height: 20px; }
.fab:active { transform: scale(.96); }

/* "Install app" pill — mobile only; sits above the floating FAB row so the two
   never overlap on narrow screens */
.install-pill {
  position: fixed; left: 16px; bottom: 78px; z-index: 9000;
  display: flex; align-items: stretch;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.install-pill-main {
  display: flex; align-items: center; gap: 7px;
  background: none; border: none; color: var(--text);
  padding: 11px 8px 11px 16px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.install-pill-main svg { width: 18px; height: 18px; color: var(--orange); }
.install-pill-x {
  background: none; border: none; border-left: 1px solid var(--border);
  color: var(--muted); padding: 0 13px; font-size: 13px; cursor: pointer;
}
.install-pill-x:hover { color: var(--text); }
@media (min-width: 769px) { .install-pill { display: none !important; } }

.nav-links {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.badge {
  display: none;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
}

.badge img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  object-fit: cover;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  flex-direction: column;
  padding: 8px 10px 14px;
  gap: 2px;
  box-shadow: var(--shadow-md);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu .nav-link {
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  gap: 10px;
}
