/* Site-wide layout fixes for the restored Enfold theme. Linked on every page by scripts/apply-seo.mjs
   (seo-overrides.json -> site.stylesheets), after the theme CSS so these rules win.

   Phones (max-width 767px, the theme's mobile breakpoint): an inline theme rule keeps #header
   position:fixed (161px tall: 60px top bar + 101px logo row), while Enfold's .responsive #top #main
   rule removes #main's top padding. The theme's own fix is a script that prepends a header-height
   spacer to #main, but WP Rocket delays that script until the first scroll or tap, so on load the
   header covers the first heading, and the page then jumps when the spacer arrives. Reserve the
   header height in CSS instead and hide the late spacer so it cannot double the gap.
   Tablet and desktop (768px and up) are unchanged: the theme already pads #main by 120px there. */
@media only screen and (max-width: 767px) {
  .responsive #top #wrap_all #main { padding-top: 161px !important; }
  #top #main > div[style^="height:"]:empty:first-child { display: none !important; }
  html { scroll-padding-top: 171px; }
}
/* In-page anchors (#top, deep links) land below the fixed header at every width. Scroll padding
   only changes where an anchor scrolls to, not the layout. */
@media only screen and (min-width: 768px) {
  html { scroll-padding-top: 152px; }
}
