/* ==========================================================================
   ALBINI E CASTELLI — Mega-bar
   Figma 77:345 (Servizi) / 77:430 (Progetti). 1440x60, beige.

   Both bars are a *centred* row of content-width labels inside the 1280
   container — not a slot grid. Figma's text boxes hug their labels and the
   group centres on the canvas (Servizi spans 297–1142, centre 719.5;
   Progetti spans 83–1365, centre 720).

   Implemented as `space-between` inside a list capped at the group's exact
   width, so at >=1440 the slack resolves to the Figma gap and the labels land
   on their drawn positions, while below 1440 the same rule simply tightens
   the gaps instead of overflowing. The cap reuses the container's --pad-x so
   the row keeps the page gutter at every width.

   The group widths below bake in the rendered width of the current Italian
   labels; if the WP menu changes them, re-measure (same caveat as the header
   nav — see FIGMA-MAP.md).

   Mobile override (accordion) lives in mobile-drawer.css and must load
   after this file.
   ========================================================================== */
.megabar {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  z-index: var(--z-megabar);
  height: var(--h-megabar);
  background: var(--c-surface-alt);
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.site-nav__item.is-open .megabar { visibility: visible; opacity: 1; }

.megabar__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  /* 3 labels (563.6px of text) + 2 gaps of 135.2 */
  max-width: calc(834px + var(--pad-x) * 2);
}
.megabar__item { flex: 0 0 auto; }
.megabar__link {
  font-weight: var(--fw-megabar);
  font-size: var(--fs-megabar);
  line-height: var(--lh-megabar);
  text-transform: uppercase;
  color: var(--c-text-muted);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.megabar__link:hover { color: var(--c-accent); }

/* The Progetti bar carries 5 labels, so its group is wider and its gap
   narrower — 5 labels (930.8px of text) + 4 gaps of 75.05. */
.megabar--projects .megabar__list { max-width: calc(1231px + var(--pad-x) * 2); }
