header ul.navbar-nav li {
  display: block;
  font-weight: 700;
}

header ul.navbar-nav li a {
  display: block;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0.2rem;
  margin-bottom: 0.3rem;
  margin-right: 1.25rem;
}

header ul.navbar-nav li.active a {
  border-bottom: 0.25rem solid white;
}

/* live clocks: UTC and station local time */
header .clocks { display: flex; flex-direction: column; align-items: flex-end; margin-right: 0.9rem;
  font-size: 0.78rem; line-height: 1.05rem; color: rgba(255,255,255,0.75); }
header .clock { display: flex; gap: 0.4rem; }
header .clock-label { opacity: 0.7; }
header .clock-time { font-variant-numeric: tabular-nums; font-weight: 600; color: #fff; min-width: 4.1em; text-align: right; }

/* language menu: flag and name, a list of languages with flags */
header .lang-menu { margin-inline-end: 0.5rem; }
header #lang-btn { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600;
  padding: 0.22rem 0.5rem; }
.lang-menu .flag { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px rgba(127,127,127,0.35); }
.lang-menu .dropdown-menu { min-width: 10rem; font-size: 0.9rem; }
.lang-menu .dropdown-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.9rem; }
.lang-menu .dropdown-item.active, .lang-menu .dropdown-item:active { background: #2f80ed; color: #fff; }

/* right-to-left languages (Arabic): mirror the spacing; maps, logs and numbers stay left to right */
html[dir="rtl"] header ul.navbar-nav li a { margin-right: 0; margin-left: 1.25rem; }
html[dir="rtl"] header .clocks { margin-right: 0; margin-left: 0.9rem; align-items: flex-start; }
html[dir="rtl"] header #theme-toggle { margin-right: 0 !important; margin-left: 1rem !important; }
html[dir="rtl"] #meteor-map, html[dir="rtl"] .sl-log, html[dir="rtl"] .clock-time { direction: ltr; }

/* menu icons: beside the label on wide screens, alone on phones (the label is the link's title
   and aria-label) */
header .nav-ic { margin-inline-end: 0.4rem; opacity: 0.85; }
header .nav-link:hover .nav-ic, header .active .nav-ic { opacity: 1; }

/* phones: keep the menu on one line (scrolls sideways if needed), drop the time zone */
@media (max-width: 575.98px) {
  header .navbar { padding-left: 0.75rem; padding-right: 0.75rem; }
  header ul.navbar-nav { overflow-x: auto; scrollbar-width: none; }
  header ul.navbar-nav::-webkit-scrollbar { display: none; }
  header ul.navbar-nav li a { white-space: nowrap; margin-right: 0.6rem; font-size: 0.9rem; }
  header .clocks { margin-right: 0.5rem; font-size: 0.7rem; line-height: 0.9rem; }
  header .lang-menu { margin-inline-end: 0.4rem; }
  header #lang-btn { padding: 0.15rem 0.35rem; }
  header #lang-btn .lang-name { display: none; }
  html[dir="rtl"] header ul.navbar-nav li a { margin-left: 0.6rem; }
  html[dir="rtl"] header .clocks { margin-left: 0.5rem; }
  html[dir="rtl"] header #theme-toggle { margin-left: 0 !important; }
  header .nav-long { display: none; }
  header .nav-ic { margin-inline-end: 0; font-size: 1.2rem; }
  header ul.navbar-nav li a { padding-left: 0.3rem; padding-right: 0.3rem; margin-right: 0.8rem; }
  html[dir="rtl"] header ul.navbar-nav li a { margin-left: 0.8rem; }
  header #theme-toggle { margin-right: 0 !important; }
}
/* narrow phones: the clocks drop their labels (UTC on top, local below) and their seconds
   (.clock-sec hidden, so hh:mm always shows whole), and the links sit closer, so the six menu
   items fit */
@media (max-width: 419.98px) {
  header .clock-label { display: none; }
  header ul.navbar-nav li a { margin-right: 0.75rem; }
  html[dir="rtl"] header ul.navbar-nav li a { margin-left: 0.75rem; }
  header .clock-time { min-width: 0; white-space: nowrap; }
  header .clock-sec { display: none; }
  header .clocks { margin-right: 0.35rem; }
}

/* the top menu stays at the top of the window while the page scrolls (under the full-screen
   views, .fs-on and the image viewer, and Bootstrap's modals) */
header { position: sticky; top: 0; z-index: 1020; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
/* links to a spot on the page land below the menu, not under it */
html { scroll-padding-top: 4rem; }

/* the site's two halves (v2.0.0, Lib\Cat): weather satellites / amateur satellites. Part of the
   sticky header, always dark like the menu; the chosen half is underlined in its satellites' colours */
header .cat-bar { display: flex; gap: 0.25rem; padding: 0 1rem; background: #23272b;
  border-top: 1px solid rgba(255,255,255,0.08); }
header .cat-bar a.cat-tab { display: flex; align-items: baseline; gap: 0.45rem; padding: 0.45rem 0.9rem 0.4rem;
  color: rgba(255,255,255,0.62); font-weight: 600; font-size: 0.9rem; position: relative; white-space: nowrap; }
header .cat-bar a.cat-tab:hover { color: #fff; text-decoration: none; }
header .cat-bar a.cat-tab i { font-size: 0.95rem; }
header .cat-bar a.cat-tab small { font-weight: 500; font-size: 0.72rem; color: rgba(255,255,255,0.45); }
header .cat-bar a.cat-tab.is-on { color: #fff; }
header .cat-tab::after { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: transparent; }
header .cat-tab.cat-weather.is-on::after { background: linear-gradient(90deg, #f2b33d, #4fd1c5); }
header .cat-tab.cat-amateur.is-on::after { background: linear-gradient(90deg, #a78bfa, #f472b6); }
header .cat-tab.cat-weather.is-on i { color: #f2b33d; }
header .cat-tab.cat-amateur.is-on i { color: #a78bfa; }
@media (max-width: 575.98px) {
  header .cat-bar { padding: 0 0.5rem; }
  header .cat-tab { flex: 1; justify-content: center; padding: 0.45rem 0.4rem 0.4rem; }
  header .cat-tab small { display: none; }
}
