/* ICEMS Premium Homepage header repair, version 1.0.5.
   Scope intentionally excludes the Founders' Gallery and unrelated WordPress pages. */
body .icems-premium[data-icems-premium] .site-header,
body .icems-premium .site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9990 !important;
  display: block;
  width: 100% !important;
  background-color: #0d151a !important;
  background-image: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(210,184,130,.18);
}

/* WordPress admin toolbar is fixed above the front-end page on larger screens.
   Move the entire header below it rather than allowing half of its artwork to hide. */
body.admin-bar .icems-premium[data-icems-premium] .site-header,
body.admin-bar .icems-premium .site-header {
  top: var(--wp-admin--admin-bar--height, 32px) !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .icems-premium[data-icems-premium] .site-header,
  body.admin-bar .icems-premium .site-header {
    top: 46px !important;
  }
}

/* The WordPress toolbar stops being fixed on narrow mobile displays.
   Keep the homepage header at the viewport top when it scrolls out of view. */
@media screen and (max-width: 600px) {
  body.admin-bar .icems-premium[data-icems-premium] .site-header,
  body.admin-bar .icems-premium .site-header {
    top: 0 !important;
  }
}

/* The logo remains entirely inside the header box, not hidden by clipping. */
body .icems-premium .site-header .header-logo,
body .icems-premium .site-header .header-logo-link {
  visibility: visible;
  opacity: 1;
}

/* The reading-theme setting must not make the original ICEMS wordmark header translucent. */
body .icems-premium[data-theme="light"] .site-header {
  background-color: #0d151a !important;
  background-image: none !important;
}
