/**
 * STICKY HEADER FIX - Gentle Approach
 * 
 * Problem: Plugin CSS może blokować sticky header motywu
 * Rozwiązanie: Łagodne przywrócenie właściwości dla sticky header
 * 
 * Priorytet: Po theme-colors-override.css
 */

/* ============================================================================
   GENTLE STICKY HEADER RESTORATION
   ============================================================================ */

/* MAXIMUM SPECIFICITY: html body selectors to override plugin CSS */
html body.single-jcm_inwestycja #site-header-sticky-wrapper,
html body.single-jcm_inwestycja #site-header.is-sticky,
html body.single-jcm_inwestycja .oceanwp-sticky-header-holder,
html body.single-jcm_lokal #site-header-sticky-wrapper,
html body.single-jcm_lokal #site-header.is-sticky,
html body.single-jcm_lokal .oceanwp-sticky-header-holder,
html body.post-type-archive-jcm_inwestycja #site-header-sticky-wrapper,
html body.post-type-archive-jcm_inwestycja #site-header.is-sticky,
html body.post-type-archive-jcm_inwestycja .oceanwp-sticky-header-holder {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* MAXIMUM SPECIFICITY: html body selectors for header elements */
html body.single-jcm_inwestycja #site-header,
html body.single-jcm_inwestycja #site-navigation-wrap,
html body.single-jcm_lokal #site-header,
html body.single-jcm_lokal #site-navigation-wrap,
html body.post-type-archive-jcm_inwestycja #site-header,
html body.post-type-archive-jcm_inwestycja #site-navigation-wrap {
  transform: none !important;
  perspective: none !important;
  will-change: auto !important;
  overflow: visible !important;
  contain: none !important;
}

/* ============================================================================
   GENERIC STICKY HEADER SUPPORT - All Themes  
   ============================================================================ */

/* MAXIMUM SPECIFICITY: html body for generic sticky headers */
html body.single-jcm_inwestycja [class*="sticky-wrapper"]:not(.jcm-plugin-wrapper *),
html body.single-jcm_inwestycja [class*="sticky-header"]:not(.jcm-plugin-wrapper *),
html body.single-jcm_inwestycja [class*="fixed-header"]:not(.jcm-plugin-wrapper *),
html body.single-jcm_lokal [class*="sticky-wrapper"]:not(.jcm-plugin-wrapper *),
html body.single-jcm_lokal [class*="sticky-header"]:not(.jcm-plugin-wrapper *),
html body.single-jcm_lokal [class*="fixed-header"]:not(.jcm-plugin-wrapper *),
html body.post-type-archive-jcm_inwestycja [class*="sticky-wrapper"]:not(.jcm-plugin-wrapper *),
html body.post-type-archive-jcm_inwestycja [class*="sticky-header"]:not(.jcm-plugin-wrapper *),
html body.post-type-archive-jcm_inwestycja [class*="fixed-header"]:not(.jcm-plugin-wrapper *) {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* ============================================================================
   PREVENT CSS CONFLICTS WITH STICKY POSITIONING
   ============================================================================ */

/* CRITICAL: Body level fixes with maximum specificity */
html body.single-jcm_inwestycja,
html body.single-jcm_lokal,
html body.post-type-archive-jcm_inwestycja {
  overflow-x: visible !important;
  overflow-y: visible !important;
  transform: none !important;
  perspective: none !important;
  will-change: auto !important;
  contain: none !important;
}

/* CRITICAL: Page container fixes */
html body.single-jcm_inwestycja #page,
html body.single-jcm_lokal #page,
html body.post-type-archive-jcm_inwestycja #page,
html body.single-jcm_inwestycja .site-content,
html body.single-jcm_lokal .site-content,
html body.post-type-archive-jcm_inwestycja .site-content {
  overflow: visible !important;
  transform: none !important;
  perspective: none !important;
  will-change: auto !important;
  contain: none !important;
}

/* ============================================================================
   DEBUG MODE
   ============================================================================ */

html body.single-jcm_inwestycja::before,
html body.single-jcm_lokal::before,
html body.post-type-archive-jcm_inwestycja::before {
  content: "";
  display: none;
  /* Marker that sticky-header-fix.css is loaded with maximum specificity */
  --jcm-sticky-header-fix-max-loaded: true;
}
