/* Align the logged-in desktop preview of Astra's transparent header with the homepage. */
@media (min-width: 921px) {
  body.admin-bar.ast-theme-transparent-header:not(.home):not(.mpl-news-layout) #masthead {
    top: calc(-1 * var(--wp-admin--admin-bar--height, 32px)) !important;
  }

  /* News pages keep the header in the layout; remove the admin-bar offset so the menu matches the homepage. */
  body.admin-bar.ast-theme-transparent-header.mpl-news-layout #masthead {
    margin-top: calc(-1 * var(--wp-admin--admin-bar--height, 32px));
  }
}

/* Reserve the real header height above both news listings and article details. */
body.ast-theme-transparent-header.mpl-news-layout #masthead {
  position: relative !important;
  top: 0 !important;
}

/* The Astra/Elementor #primary styles otherwise remove the news template's own padding. */
body.mpl-news-layout #content #primary.mpl-news-page {
  padding: 40px 24px 88px !important;
}

@media (max-width: 740px) {
  body.mpl-news-layout #content #primary.mpl-news-page {
    padding: 24px 15px 60px !important;
  }
}
