/* WikiMilano — header condiviso definitivo
   Barra ecosistema coordinata con Osservatorio Metropolitano.
*/

:root {
  --wm-gold: #ffb000;
  --wm-topbar-bg: #031827;
  --wm-header-border: #d9d6ce;
  --wm-note: #666;
  --wm-gold-height: 4px;
  --wm-topbar-height: 34px;
}

/* Linea, ecosistema e header principale formano un unico blocco sticky. */
.sticky-header-stack {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #fff;
}

.global-gold-line {
  display: block;
  width: 100%;
  height: var(--wm-gold-height);
  min-height: var(--wm-gold-height);
  margin: 0;
  padding: 0;
  background: var(--wm-gold);
}

.system-topbar {
  width: 100%;
  height: var(--wm-topbar-height);
  color: #fff;
  background: var(--wm-topbar-bg);
}

.system-topbar-inner {
  height: var(--wm-topbar-height);
  display: flex;
  align-items: center;
}

.system-topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.system-topbar-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.system-topbar-nav a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.system-topbar-nav a:first-child {
  padding-left: 0;
}

.system-topbar-nav a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(255,255,255,.16);
}

.system-topbar-nav a:hover,
.system-topbar-nav a:focus-visible {
  color: #fff;
}

.system-topbar-nav a[aria-current="page"]::after,
.system-topbar-nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 3px;
  background: var(--wm-gold);
}

.system-topbar-nav a:first-child[aria-current="page"]::after,
.system-topbar-nav a:first-child[aria-current="true"]::after {
  left: 0;
}

/* Fascia logo: geometria preesistente invariata. */
.site-header {
  position: static;
  background: #fff;
  border-bottom: 1px solid var(--wm-header-border);
}

.header-inner {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 0;
}

.brand {
  display: block;
  width: 470px;
  max-width: 65%;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-decoration: none;
  line-height: 0;
}

.brand-mark {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  object-fit: contain;
  border-radius: 0;
}

.nota-testata {
  width: 100%;
  margin: 0;
  padding: 0 0 8px;
}

.nota-testata p {
  margin: 0;
  padding: 0;
  color: var(--wm-note);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.nota-testata a {
  color: inherit;
  text-decoration: none;
}

.nota-testata strong {
  font-weight: 700;
}

.nota-testata a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  :root {
    --wm-topbar-height: 38px;
  }

  .system-topbar-nav a {
    padding: 0 10px;
    font-size: 10px;
  }

  .system-topbar-nav a[aria-current="page"]::after,
  .system-topbar-nav a[aria-current="true"]::after {
    left: 10px;
    right: 10px;
  }

  .system-topbar-nav a:first-child[aria-current="page"]::after,
  .system-topbar-nav a:first-child[aria-current="true"]::after {
    left: 0;
  }

  .header-inner {
    min-height: 88px;
    align-items: flex-start;
  }

  .brand {
    width: 330px;
    max-width: 65%;
  }

  .nota-testata p {
    font-size: 12px;
  }
}
