/* Northwards — Brooks Range Traverse (static restoration)
   Additions on top of the reused Bootstrap-3 base (brooks_style.css).
   Kept intentionally small and dependency-free. */

:root {
  --nw-dark: #2b3a42;
  --nw-accent: #3a87ad;
  --nw-line: #0033cc;
}

body {
  margin: 0;
  padding-top: 0; /* override shop-item.css body{padding-top:30px} (was for a fixed navbar) */
  background: #e9ecef url('../img/brooks/bg.JPG') no-repeat center top fixed;
  background-size: cover;
}

/* Trip stats box (compact) --------------------------------------------- */
.nw-stats {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  background: #fff; border: 1px solid #ddd; border-radius: 5px;
  padding: 10px 12px; margin-bottom: 12px;
}
.nw-stat { flex: 1 1 90px; text-align: center; padding: 2px 4px; }
.nw-stat + .nw-stat { border-left: 1px solid #eee; }
.nw-stat-val { display: block; font-size: 18px; font-weight: 700; color: var(--nw-dark); line-height: 1.2; }
.nw-stat-lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #888; }
.nw-maphint { font-size: 12px; color: #555; margin: 0 0 14px; }
@media (max-width: 480px) { .nw-stat { flex-basis: 45%; } .nw-stat + .nw-stat { border-left: 0; } }

/* Top bar --------------------------------------------------------------- */
.nw-topbar {
  background: var(--nw-dark);
  color: #fff;
  padding: 10px 0;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.nw-topbar .container { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; }
.nw-brand { font-size: 24px; font-weight: 700; color: #fff; text-decoration: none; }
.nw-brand span { color: var(--nw-accent); }
.nw-subtitle { color: #cbd5db; font-size: 14px; }

/* Language switcher (flag + code pills) */
.nw-lang { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.nw-lang-opt {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px; line-height: 1;
  color: #cfe3ea; font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
.nw-lang-opt:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.nw-lang-opt.active { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .35); }
.nw-flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); display: block; }

/* Layout ---------------------------------------------------------------- */
.whiter { border-radius: 5px; background-color: rgba(255, 255, 255, .35); padding-bottom: 20px; }
.nw-sidebar .list-group-item.active,
.nw-sidebar .list-group-item.active:hover {
  background-color: var(--nw-dark);
  border-color: var(--nw-dark);
  color: #fff;
  z-index: 1;
}
.nw-sidebar .list-group { margin-bottom: 10px; }

footer { margin: 30px 0 10px; color: #555; }

/* Map ------------------------------------------------------------------- */
#mapbrooks { width: 100%; height: 460px; margin-bottom: 15px; }
.top_radius { border-top-left-radius: 5px; border-top-right-radius: 5px; }
.leaflet-popup-content { font-size: 13px; line-height: 1.4; }
.leaflet-popup-content table td { padding: 0 4px 0 0; vertical-align: top; }
.nw-popup-title { font-weight: 700; display: block; margin-bottom: 2px; }
.nw-popup-meta { color: #666; font-style: italic; font-size: 12px; }

/* Tracker feed & news --------------------------------------------------- */
.brooks_index_div { border: 1px solid #ddd; border-radius: 5px; background: #fff; padding: 12px; margin-bottom: 15px; }
.nw-feed, .nw-news-scroll { overflow: auto; max-height: 900px; }
.nw-feed .nw-item, .nw-news-scroll .nw-item { border-top: 1px solid #eee; padding: 10px 0; }
.nw-feed table { width: 100%; margin: 4px 0; }
.nw-feed td { padding-right: 6px; }
.nw-sortbar { margin-bottom: 8px; }
.person { margin-bottom: 20px; border: 1px solid #ddd; border-radius: 5px; background: #fff; padding: 15px; overflow: hidden; }

/* Pictures gallery ------------------------------------------------------ */
.nw-gallery { overflow: hidden; }
.nw-thumb {
  float: left; width: 120px; height: 80px; margin: 2px; overflow: hidden;
  border: 1px solid #ccc; cursor: pointer; background: #f4f4f4;
}
.nw-thumb img { height: 80px; width: auto; display: block; margin: 0 auto; }

/* Videos ---------------------------------------------------------------- */
.nw-video { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-start; margin-bottom: 20px; }
.nw-video-thumb {
  position: relative; flex: 0 0 320px; max-width: 100%; height: 180px;
  background-size: cover; background-position: center; cursor: pointer; border-radius: 4px;
}
.nw-video-thumb::after {
  content: '\25B6'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 42px; text-shadow: 0 0 8px rgba(0,0,0,.7);
}
.nw-video-body { flex: 1 1 260px; }

/* Lightbox -------------------------------------------------------------- */
.nw-lb-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 2000;
  display: none; align-items: center; justify-content: center; flex-direction: column;
}
.nw-lb-overlay.open { display: flex; }
.nw-lb-stage { max-width: 92vw; max-height: 82vh; display: flex; align-items: center; justify-content: center; }
.nw-lb-stage img { max-width: 92vw; max-height: 82vh; box-shadow: 0 0 30px rgba(0,0,0,.6); }
.nw-lb-stage iframe { width: 80vw; height: 45vw; max-width: 960px; max-height: 540px; border: 0; }
.nw-lb-caption { color: #eee; margin-top: 12px; text-align: center; max-width: 80vw; font-size: 14px; }
.nw-lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15);
  color: #fff; border: 0; font-size: 34px; padding: 10px 18px; cursor: pointer; user-select: none;
}
.nw-lb-btn:hover { background: rgba(255,255,255,.3); }
.nw-lb-prev { left: 2vw; }
.nw-lb-next { right: 2vw; }
.nw-lb-close { position: absolute; top: 14px; right: 22px; font-size: 40px; color: #fff; background: none; border: 0; cursor: pointer; line-height: 1; }

/* Mobile menu toggle (hamburger) --------------------------------------- */
.nw-menu-toggle {
  display: none; order: -1;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px;
  font-size: 20px; line-height: 1; padding: 5px 11px; cursor: pointer;
}

/* Collapsible sections (News / Ticker) --------------------------------- */
.nw-collapse-head { margin-top: 0; }

/* ---- Desktop keeps everything open, toggles hidden ---- */
@media (min-width: 768px) {
  .nw-menu-toggle { display: none !important; }
  .nw-sidebar { display: block !important; }
  .nw-collapse-body { display: block !important; }
  .nw-collapse-head::after { display: none; }
}

/* ---- Kill the leftover fixed-navbar top offset on mobile/tablet ---- */
@media (max-width: 991px) {
  body { margin-top: 0 !important; }
}

/* ---- Mobile layout ---- */
@media (max-width: 767px) {
  /* stop the Bootstrap row negative-margins from causing a horizontal jiggle */
  html, body { overflow-x: hidden; }

  .nw-menu-toggle { display: inline-block; }
  .nw-brand { font-size: 20px; }
  .nw-subtitle { font-size: 12px; }
  .nw-topbar .container { flex-wrap: nowrap; }

  /* sidebar collapses behind the hamburger */
  .nw-sidebar { display: none; }
  .nw-sidebar.open { display: block; margin-bottom: 15px; }

  /* collapsible section headers get a chevron + become tappable */
  .nw-collapse-head {
    cursor: pointer; position: relative; padding-right: 26px; user-select: none;
  }
  .nw-collapse-head::after {
    content: '\25BE'; position: absolute; right: 4px; top: 50%;
    transform: translateY(-50%); transition: transform .2s; color: #999; font-size: 14px;
  }
  .nw-collapsible.collapsed .nw-collapse-head::after { transform: translateY(-50%) rotate(-90deg); }
  .nw-collapsible.collapsed .nw-collapse-body { display: none; }

  /* Homepage only: its content isn't wrapped in a padded .person, and
     brooks_style.css forces .whiter{padding:0} on mobile, so the Bootstrap
     row negative-margins pushed the cards off-screen. Give the homepage a
     uniform gutter and neutralise those row margins. */
  .nw-page-index { padding-left: 10px !important; padding-right: 10px !important; }
  .nw-page-index > .row { margin-left: 0; margin-right: 0; }
  .nw-page-index > .row > [class*="col-"] { padding-left: 0; padding-right: 0; }

  /* keep long lists scrolling inside their box, not down the page */
  .nw-news-scroll, .nw-feed { max-height: 60vh; }
  /* wide content (equipment table) scrolls inside its card instead of the page */
  .person { overflow-x: auto; }

  #mapbrooks { height: 340px; }
  .nw-lb-stage iframe { width: 94vw; height: 53vw; }
}

/* Very narrow screens: drop the subtitle so the top bar stays one line */
@media (max-width: 480px) {
  .nw-subtitle { display: none; }
}
