/*
 * MONSERRATO HERO SPACING AUDIT — 2026-10-17
 * Avoid counting the fixed header twice. The following templates already
 * offset #brx-content to the header's full expanded height. Keep hero content
 * breathing room without adding another full header height internally.
 * Do not change standalone hero variants (mfh, mdfp directory root, etc.)
 */

/* Editorial pages: Scopri and Contatti */
#brx-content.mel-page > .mel-hero {
  padding-top: 64px !important;
}

/* Directory landing pages: main /directory/ intentionally excluded because
   its hero manages the offset directly (no padding on #brx-content). */
body:not(.page-id-95) #brx-content.mdfp-directory-page > .mdfp-directory-hero {
  padding-top: 60px !important;
}

/* Other template families where the fixed-header height was added twice. */
#brx-content.mba-page > .mba-hero,
#brx-content.mmg-page > .mmg-hero,
#brx-content.msu-page > .msu-hero,
#brx-content.msjp-page > .msjp-hero {
  padding-top: 64px !important;
}

/* The activities map has a long title; slightly more compact opening. */
#brx-content.msmap-page > .msmap-hero {
  padding-top: 56px !important;
}

/* Native reading spacing on small screens; retain the same bottom padding,
   background, typography and SEO text used by the owning templates. */
@media (max-width: 767px) {
  #brx-content.mel-page > .mel-hero,
  body:not(.page-id-95) #brx-content.mdfp-directory-page > .mdfp-directory-hero,
  #brx-content.mmg-page > .mmg-hero,
  #brx-content.msu-page > .msu-hero,
  #brx-content.msjp-page > .msjp-hero {
    padding-top: 46px !important;
  }

  #brx-content.mba-page > .mba-hero {
    padding-top: 48px !important;
  }

  #brx-content.msmap-page > .msmap-hero {
    padding-top: 42px !important;
  }
}

/* Keep focus offsets robust after sticky header measurement. */
html:root {
  scroll-padding-top: calc(var(--ms-header-offset) + 16px);
}
