/* nav.css — the shared, persistent top navigation used on every non-map page
   (membership, legal, account). Mirrors the landing nav so navigation is
   consistent everywhere: a user can always reach Medlemskap, their profile, and
   the map. Filled in by /js/nav.js (a brand-only fallback renders without JS). */

.site-nav {
  position: sticky; top: 0; z-index: 1000;
  background: #1B3A4B;
}
.site-nav-inner {
  max-width: 1180px; margin: 0 auto; height: 60px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-nav .brand { display: inline-flex; align-items: center; text-decoration: none; }
.site-nav .brand-wordmark { height: 22px; width: auto; display: block; }

.site-nav-links { display: flex; align-items: center; gap: 26px; }
.site-nav-links a {
  font-size: 13px; color: rgba(255, 255, 255, 0.6);
  text-decoration: none; transition: color .15s ease;
}
.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] { color: #fff; }

.site-nav-cta {
  background: #fff; color: #1B3A4B !important; border-radius: 8px;
  padding: 8px 20px; font-weight: 500;
  transition: transform .15s ease, box-shadow .15s ease;
}
.site-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

/* "Min profil ▾" dropdown — mirrors the landing nav / map avatar popover. */
.site-nav-profile { position: relative; display: inline-flex; }
/* Shown only once a session is confirmed (JS clears [hidden]). This guard must
   outrank the explicit display rules (here + mobile query) so the dropdown does
   not leak into the logged-out menu, where its toggle is unwired. */
.site-nav-profile[hidden] { display: none; }
.site-nav-profile-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: rgba(255, 255, 255, 0.6);
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; transition: color .15s ease;
}
.site-nav-profile-btn:hover,
.site-nav-profile-btn[aria-expanded="true"] { color: #fff; }
.site-nav-chevron {
  width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .18s ease;
}
.site-nav-profile-btn[aria-expanded="true"] .site-nav-chevron { transform: rotate(180deg); }
.site-nav-profile-menu {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 200px;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #E5E2DB; border-radius: 12px;
  box-shadow: 0 8px 26px rgba(27, 58, 75, 0.18); padding: 8px; z-index: 60;
}
.site-nav-profile-menu[hidden] { display: none; }
.site-nav-profile-menu a,
.site-nav-profile-menu button {
  width: 100%; box-sizing: border-box; text-align: left;
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 14px; color: #1B3A4B; text-decoration: none;
  background: none; border: 0;
}
/* "Innlogget som …" — the signed-in account, understated, above the menu items. */
.site-nav-profile-email {
  padding: 6px 10px 8px; font-size: 12px; color: #5b6b76;
  border-bottom: 1px solid #EFEcE3; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-nav-profile-email[hidden] { display: none; }
.site-nav-profile-menu a:hover,
.site-nav-profile-menu button:hover { background: #F2F1ED; color: #1B3A4B; }

/* Burger (mobile only) — a CSS hamburger so no icon font is needed. */
.site-nav-burger {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 4px;
}
.site-nav-burger .sn-bar { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 768px) {
  .site-nav-burger { display: inline-flex; }
  .site-nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    background: #1B3A4B; flex-direction: column; align-items: stretch;
    gap: 0; padding: 8px 0; box-shadow: 0 12px 24px rgba(0, 0, 0, .3); display: none;
  }
  .site-nav-links.open { display: flex; }
  .site-nav-links a,
  .site-nav-profile-btn { padding: 14px 24px; font-size: 15px; text-align: left; }
  .site-nav-cta { margin: 8px 24px; text-align: center; }
  .site-nav-profile { display: block; width: 100%; }
  .site-nav-profile-btn { width: 100%; justify-content: space-between; }
  .site-nav-profile-menu {
    position: static; min-width: 0; background: none; border: 0;
    box-shadow: none; padding: 0; border-radius: 0;
  }
  .site-nav-profile-menu a,
  .site-nav-profile-menu button {
    color: rgba(255, 255, 255, 0.85); border-radius: 0; padding: 12px 24px 12px 40px; font-size: 15px;
  }
  .site-nav-profile-menu a:hover,
  .site-nav-profile-menu button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
}
