.entry-content p {
  margin-bottom: 0.25 em !important;
}
.wp-block-group {
  padding-top: 15px !important;
  padding-bottom: 0x !important;
}
.wp-block-navigation a {
  font-size: 16px !important;
  font-weight: 500;
}
header.site-header {
  margin-bottom: 5px !important;
}
.entry-content p {margin-bottom: 0.25 em !important;
}

/* 1) Reduce the global block gap Gutenberg uses between blocks */
:root,
.wp-site-blocks {
  --wp--style--block-gap: 0.5em !important;  /* try 0.5em or 0.75em */
}

/* 2) Paragraph-specific spacing (covers classic and many themes) */
.entry-content p,
.wp-block-post-content p,
.wp-block-paragraph {
  margin-bottom: 0.5em !important;
}

/* 3) Flow layout: many block themes add TOP margin to every next block */
.is-layout-flow > :where(:not(.alignleft):not(.alignright))
  + :where(:not(.alignleft):not(.alignright)) {
  margin-block-start: 0.7em !important;
}

/* 4) Safety: consecutive paragraphs specifically */
.entry-content p + p,
.wp-block-post-content p + p,
.wp-block-paragraph + .wp-block-paragraph {
  margin-top: .75em !important;
}

/* 5) Optional: ensure readable line-height if it feels cramped */
.entry-content,
.wp-block-post-content {
  line-height: 1.3 !important; /* adjust to taste */
}
/* Reduce space above and below headings */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0.75em !important;   /* space above heading */
  margin-bottom: 0.4em !important; /* space below heading */
}

/* Optional: make sure headings inside content follow same pattern */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
  margin-bottom: 0.4em !important;
}
:root,
.wp-site-blocks {
  --wp--style--block-gap: 0.5em !important;
}
/* Global block gap - tighten space between all blocks */
:root,
.wp-site-blocks,
.is-layout-flow,
.wp-block-post-content,
.entry-content {
  --wp--style--block-gap: 0.25em !important;
}

/* Paragraph spacing (super tight) */
.entry-content p,
.wp-block-post-content p,
.wp-block-paragraph {
  margin-block-start: 0 !important;
  margin-block-end: 0.25em !important;
  line-height: 1.4 !important; /* keeps text readable */
}

/* Headings - minimal space above & below */
.entry-content :is(h1,h2,h3,h4,h5,h6),
.wp-block-post-content :is(h1,h2,h3,h4,h5,h6),
.wp-block-heading {
  margin-block-start: 0.4em !important;  /* above */
  margin-block-end: 0.2em !important;    /* below */
}

/* Consecutive paragraphs or blocks */
.is-layout-flow > * + * {
  margin-block-start: 0.25em !important;
}

/* Extra assurance against theme-level margins */
:where(.wp-block-post-content,.entry-content) :where(h1,h2,h3,h4,h5,h6,p) {
  margin-top: 0 !important;
  margin-bottom: 0.25em !important;
}
/* Make navigation menu text larger and bold */
.main-navigation a,
.primary-navigation a,
.wp-block-navigation a,
.site-header .menu a,
.main-header-menu a {
  font-size: 28px !important;   /* adjust to 22px or 24px if you want it bigger */
  font-weight: 700 !important;  /* 700 = bold */
  letter-spacing: 0.4px !important;
  text-transform: none !important;  /* optional, keeps normal case */
}
/* 0) TEMP TEST: toggle this to confirm CSS is applying */
body { outline: 0 solid transparent !important; }

/* 1) Remove extra bottom spacing on the header/logo area */
header,
.site-header,
.wp-site-blocks > .wp-block-template-part,
.site-branding,
.header-inner,
.header-main {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* 2) Many block themes add "global padding" inside header */
header .wp-block-group.has-global-padding,
.wp-site-blocks > .wp-block-template-part .wp-block-group.has-global-padding {
  padding-block-end: 0 !important;  /* same as padding-bottom */
}

/* 3) Kill top margin on the FIRST content block after the header */
.wp-site-blocks > header + *,
.wp-site-blocks > .wp-block-template-part + *,
.site-header + *,
.site-header + main,
.wp-site-blocks > header + main,
.wp-site-blocks > .wp-block-template-part + main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 4) If your hero/banner is a Cover block, flatten its top spacing */
.wp-block-cover,
.wp-block-cover-image,
.page-header,
.entry-header,
.hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 5) First block *inside* the page content—remove any top offset */
.entry-content > *:first-child,
.wp-block-post-content > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 6) Tame block-gap just for the seam between header and first block */
.wp-site-blocks { --wp--style--block-gap: 0.5em !important; }
.wp-site-blocks > header + *,
.wp-site-blocks > .wp-block-template-part + * {
  --wp--style--block-gap: 0 !important;
}

/* 7) Some themes give headings/banner titles their own top margin—neutralize */
.wp-block-post-title,
.entry-title {
  margin-top: 0 !important;
}
/* 1) Cover/Hero blocks – override inline min-height */
.wp-block-cover,
.wp-block-cover-image,
.wp-block-cover[style*="min-height"],
.wp-block-cover-image[style*="min-height"] {
  min-height: 200px !important;   /* try 180px or 150px for thinner */
  height: auto !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

/* 2) First banner/hero section after header (block & classic themes) */
.site-header + .wp-block-cover,
.site-header + .wp-block-group.has-background,
header + .wp-block-cover,
header + .wp-block-group.has-background,
.site-header + .hero,
header + .hero,
.site-header + .page-header,
header + .page-header,
.site-header + .entry-header,
header + .entry-header {
  min-height: 200px !important;
  margin-top: 0 !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

/* 3) Classic "Custom Header" image (non-block themes) */
.wp-custom-header,
.custom-header,
#wp-custom-header {
  max-height: 200px !important;
  overflow: hidden !important;
}
#wp-custom-header img,
.wp-custom-header img {
  height: 200px !important;
  width: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* 4) Common theme hero/banner class names (catch-alls) */
.hero, .hero-section, .site-hero, .page-hero, .banner, .site-banner {
  min-height: 200px !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

/* 5) Tighten space below the banner too (optional) */
.wp-block-cover, .wp-block-cover-image, .hero, .page-header, .entry-header {
  margin-bottom: 8px !important;
}

/* 6) If text inside banner is too large, scale it down responsively */
.wp-block-cover__inner-container h1,
.wp-block-cover__inner-container h2,
.wp-block-cover__inner-container p {
  font-size: clamp(16px, 2vw, 28px) !important;
  margin: 0 !important;
}

/* 7) Mobile: make it even thinner on small screens */
@media (max-width: 768px) {
  .wp-block-cover,
  .wp-block-cover-image,
  .wp-custom-header,
  .custom-header,
  #wp-custom-header,
  .hero, .hero-section, .site-hero, .page-hero, .banner, .site-banner {
    min-height: 150px !important;
    max-height: 150px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}
/* 1) Keep dropdowns from getting clipped by header/wrappers */
.site-header,
.site-header *:not(img) {
  overflow: visible !important;
}

/* 2) Make sure the nav and its submenus sit above everything */
.site-header,
.main-navigation,
.main-navigation .sub-menu,
.main-navigation .sub-menu .sub-menu {
  position: relative;
  z-index: 99999;
}

/* 3) Standardize submenu positioning */
.main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;            /* change to right:0; if your theme opens to the right edge */
  /* Remove transforms that can create a new stacking context in some themes */
  transform: none !important;
}

/* 4) If a submenu is taller than the viewport, let it scroll instead of cutting off */
@media (min-width: 1024px) {
  .main-navigation .sub-menu {
    max-height: calc(100vh - 120px);  /* leave room for header/footer */
    overflow-y: auto;
  }
}

/* 5) Improve hover/focus reliability on desktop */
@media (min-width: 1024px) {
  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu {
    display: block;
    visibility: visible;
    opacity: 1;
  }
}
/* ==== Adjust to your actual header height on desktop ==== */
:root { --header-h: 88px; }        /* change 88px to match your header */
:root { --adminbar-h: 0px; }       /* WP admin bar offset if logged in */
@media (min-width: 783px){ body.admin-bar { --adminbar-h: 32px; } }
@media (max-width: 782px){ body.admin-bar { --adminbar-h: 46px; } }

/* Untrap clipping/stacking */
.site-header, .header, .header-inner, .wp-site-blocks,
.primary-navigation, .main-navigation, .wp-block-navigation,
#page, .site, .site-content, .content-area {
  overflow: visible !important;
  transform: none !important;
  contain: none !important;
}

/* Keep nav above galleries/lightboxes etc. */
.site-header,
.primary-navigation,
.main-navigation,
.wp-block-navigation {
  position: relative;
  z-index: 2147483646 !important;
}

/* ===== Block theme menus (Gutenberg Navigation) ===== */
@media (min-width: 1024px){
  .wp-block-navigation .wp-block-navigation-item { position: static !important; }
  .wp-block-navigation__submenu-container{
    position: fixed !important;
    top: calc(var(--header-h) + var(--adminbar-h)) !important;
    bottom: 0 !important;
    left: auto !important; right: auto !important;
    overflow-y: auto !important;
    max-height: none !important;
    display: block !important; visibility: visible !important; opacity: 1 !important;
    z-index: 2147483647 !important;
    padding-bottom: 12px !important; /* keep last item fully tappable */
    clip-path: none !important; -webkit-clip-path: none !important;
    transition: none !important; mask: none !important; filter: none !important;
  }
  .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
  .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container{
    display: block !important;
    pointer-events: auto !important;
  }
}

/* ===== Classic menus (.sub-menu) ===== */
@media (min-width: 1024px){
  .main-navigation > ul > li { position: static !important; }
  .main-navigation > ul > li > .sub-menu{
    position: fixed !important;
    top: calc(var(--header-h) + var(--adminbar-h)) !important;
    bottom: 0 !important;
    left: auto !important; right: auto !important;
    overflow-y: auto !important;
    max-height: none !important;
    display: block !important; visibility: visible !important; opacity: 1 !important;
    z-index: 2147483647 !important;
    padding-bottom: 12px !important;
    clip-path: none !important; -webkit-clip-path: none !important;
    transition: none !important; mask: none !important; filter: none !important;
  }
  .main-navigation .sub-menu .sub-menu{
    position: absolute !important;
    top: 0 !important; left: 100% !important;
    bottom: auto !important;
    max-height: none !important; overflow: visible !important;
  }
  .menu-item-has-children:hover > .sub-menu,
  .menu-item-has-children:focus-within > .sub-menu{
    display: block !important; visibility: visible !important; opacity: 1 !important;
    pointer-events: auto !important;
  }
}

/* ===== WooCommerce product pages: ensure menu wins z-index ===== */
.woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product .images,
.woocommerce div.product .summary{
  z-index: 2 !important;
}