/* About, FAQ and Contact remain available in the footer, but are intentionally not shown in the top navigation. */
.site-header .top-nav a[href="/about.html"],
.site-header .top-nav a[href="/about"],
.site-header .top-nav a[href="/faq.html"],
.site-header .top-nav a[href="/faq"],
.site-header .top-nav a[href="/contact.html"],
.site-header .top-nav a[href="/contact"] {
  display: none !important;
}

/* FactBurst public navigation
   Single source of truth for header navigation styling.
   Loaded after the general/theme styles so navigation does not depend on
   selector order scattered through the large legacy stylesheet. */

.site-header .top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.site-header .top-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-header .top-nav-links > a,
.site-header .top-nav-links > .nav-more-menu > summary,
.site-header .top-nav-links > .account-nav-menu > summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--muted-strong);
  background: transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  transition: color 140ms ease, background 140ms ease;
}

.site-header .top-nav-links > a:hover,
.site-header .top-nav-links > a[aria-current="page"],
.site-header .top-nav-links > .nav-more-menu > summary:hover,
.site-header .top-nav-links > .nav-more-menu[open] > summary,
.site-header .top-nav-links > .nav-more-menu > summary[aria-current="page"],
.site-header .top-nav-links > .account-nav-menu > summary:hover,
.site-header .top-nav-links > .account-nav-menu[open] > summary,
.site-header .top-nav-links > .account-nav-menu > summary[aria-current="page"] {
  color: var(--text);
  background: rgba(255,255,255,.055);
}

.site-header .nav-more-menu,
.site-header .account-nav-menu {
  position: relative;
}

.site-header .nav-more-menu > summary,
.site-header .account-nav-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.site-header .nav-more-menu > summary::-webkit-details-marker,
.site-header .account-nav-menu > summary::-webkit-details-marker {
  display: none;
}

.site-header .nav-more-menu > summary::after,
.site-header .account-nav-menu > summary::after {
  content: "⌄";
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.site-header .nav-more-menu[open] > summary::after,
.site-header .account-nav-menu[open] > summary::after {
  content: "⌃";
}

.site-header .nav-more-panel,
.site-header .account-nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-header .nav-more-panel a,
.site-header .account-nav-panel a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--muted-strong);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
}

.site-header .nav-more-panel a:hover,
.site-header .nav-more-panel a[aria-current="page"],
.site-header .account-nav-panel a:hover,
.site-header .account-nav-panel a[aria-current="page"] {
  color: var(--text);
  background: rgba(53,199,255,.08);
}

.site-header .notification-nav-link {
  position: relative;
  width: 34px !important;
  height: 34px;
  min-height: 34px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.site-header .notification-bell {
  width: 19px;
  height: 19px;
}

.site-header .notification-nav-link .notification-nav-badge {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  padding: 0 4px;
}

.site-header .language-switcher {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}

@media (min-width: 621px) {
  .site-header { gap: 14px; }
  .site-header .brand { gap: 8px; flex: 0 0 auto; }
  .site-header .brand-mark,
  .site-header .brand-mark img { max-width: 148px; }
  .site-header .top-nav > .language-switcher select {
    min-width: 112px;
    padding-inline: 10px;
  }
}

.site-header .mobile-nav-menu {
  display: none;
}

@media (min-width: 841px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
  }

  .site-header > .brand { justify-self: start; }
  .site-header > .top-nav { justify-self: center; }
}

@media (max-width: 840px) {
  .site-header .top-nav {
    min-width: 0;
  }
  .site-header .top-nav {
    grid-area: nav;
    width: 100%;
    justify-content: flex-start;
  }
  .site-header .notification-slot {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .site-header .notification-slot:empty { visibility: hidden; }
  .site-header .notification-slot .notification-button-header {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
  }
  .site-header .notification-slot .notification-button-label { display: none; }

  .site-header .top-nav-links,
  .site-header .top-nav > .language-switcher {
    display: none;
  }

  .site-header .mobile-nav-menu {
    display: block;
    position: relative;
  }

  .site-header .mobile-nav-menu > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-soft);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }

  .site-header .mobile-nav-menu > summary::-webkit-details-marker {
    display: none;
  }

  .site-header .mobile-nav-menu > summary::after {
    content: "⌄";
    color: var(--muted);
    font-size: 17px;
  }

  .site-header .mobile-nav-menu[open] > summary::after {
    content: "⌃";
  }

  .site-header .mobile-nav-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 120;
    width: min(280px, calc(100vw - 30px));
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-header .mobile-nav-panel a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 9px;
    color: var(--muted-strong);
    text-decoration: none;
    font-weight: 750;
  }

  .site-header .mobile-nav-panel a:hover,
  .site-header .mobile-nav-panel a[aria-current="page"] {
    color: var(--text);
    background: var(--surface-soft);
  }

  .site-header .mobile-nav-panel .language-switcher {
    display: block;
    padding: 6px 4px 2px;
  }

  .site-header .mobile-nav-panel .language-switcher select {
    width: 100%;
    min-height: 42px;
  }
}

@media (max-width: 700px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas: "brand account" "nav nav";
    column-gap: 12px;
    row-gap: 7px;
  }
  .site-header > .brand { grid-area: brand; min-width: 0; justify-self: start; }
  .site-header > .top-nav { grid-area: nav; }
  .site-header .top-nav {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-header .top-nav::-webkit-scrollbar { display: none; }
}

/* Light theme */
html[data-theme="light"] .site-header .top-nav-links > a,
html[data-theme="light"] .site-header .top-nav-links > .nav-more-menu > summary,
html[data-theme="light"] .site-header .top-nav-links > .account-nav-menu > summary {
  color: var(--light-muted);
}

html[data-theme="light"] .site-header .top-nav-links > a:hover,
html[data-theme="light"] .site-header .top-nav-links > a[aria-current="page"],
html[data-theme="light"] .site-header .top-nav-links > .nav-more-menu > summary:hover,
html[data-theme="light"] .site-header .top-nav-links > .nav-more-menu[open] > summary,
html[data-theme="light"] .site-header .top-nav-links > .nav-more-menu > summary[aria-current="page"],
html[data-theme="light"] .site-header .top-nav-links > .account-nav-menu > summary:hover,
html[data-theme="light"] .site-header .top-nav-links > .account-nav-menu[open] > summary,
html[data-theme="light"] .site-header .top-nav-links > .account-nav-menu > summary[aria-current="page"] {
  color: var(--light-text);
  background: rgba(46,72,108,.06);
}

html[data-theme="light"] .site-header .nav-more-panel,
html[data-theme="light"] .site-header .account-nav-panel,
html[data-theme="light"] .site-header .mobile-nav-panel {
  background: var(--light-panel);
  border-color: var(--light-border);
  box-shadow: 0 18px 40px rgba(30,50,80,.16);
}

html[data-theme="light"] .site-header .nav-more-panel a,
html[data-theme="light"] .site-header .account-nav-panel a,
html[data-theme="light"] .site-header .mobile-nav-panel a {
  color: var(--light-muted);
}

html[data-theme="light"] .site-header .nav-more-panel a:hover,
html[data-theme="light"] .site-header .nav-more-panel a[aria-current="page"],
html[data-theme="light"] .site-header .account-nav-panel a:hover,
html[data-theme="light"] .site-header .account-nav-panel a[aria-current="page"],
html[data-theme="light"] .site-header .mobile-nav-panel a:hover,
html[data-theme="light"] .site-header .mobile-nav-panel a[aria-current="page"] {
  color: var(--light-text);
  background: #eef8fc;
}


/* Public language selector. */
.site-header .language-switcher {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  margin: 0;
}
.site-header .language-switcher select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 128px;
  height: 42px;
  padding: 0 38px 0 14px;
  color: #f7fbff;
  border: 1px solid rgba(91, 211, 255, 0.34);
  border-radius: 11px;
  background-color: rgba(14, 28, 65, 0.96);
  background-image: linear-gradient(45deg, transparent 50%, #9db0ca 50%), linear-gradient(135deg, #9db0ca 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.site-header .language-switcher select:hover { border-color: rgba(91, 211, 255, 0.62); background-color: rgba(19, 38, 82, 0.98); }
.site-header .language-switcher select:focus { outline: none; border-color: rgba(91, 211, 255, 0.82); box-shadow: 0 0 0 3px rgba(91, 211, 255, 0.13), 0 6px 20px rgba(0, 0, 0, 0.18); }
.site-header .language-switcher select option { color: #f7fbff; background: #101d3d; font-weight: 700; }


/* Header logo sizing. */
.site-header .brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #03112a;
  background: linear-gradient(145deg, var(--cyan), #7ee6ff);
  box-shadow: 0 0 28px rgba(0, 204, 255, 0.25);
  font-size: 22px;
  font-weight: 900;
}
.site-header .brand > span:last-child { color: #fff; }
.site-header .language-switcher { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; }
.site-header .language-switcher a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 800; }
.site-header .language-switcher a:hover { color: #fff; }

