/* =====================================================
   SCREEN (NORMAL SITE DISPLAY)
   ===================================================== */

/* Hide print-only logo on screen */
.print-logo {
  display: none !important;
}

/* Ensure nav remains clickable */
.elementor-nav-menu--main,
.elementor-nav-menu--main * {
  pointer-events: auto !important;
}

/* Hide Elementor sticky spacer clone only (safe) */
.elementor-sticky__spacer {
  display: none !important;
  visibility: hidden !important;
}


/* =====================================================
   PRINT PAGE MARGINS (ALL PAGES)
   ===================================================== */
@page {
  margin: 0.75in;
}


/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {

  /* =====================================================
     PRINT LOGO
     - Default: prints everywhere
     - Blog posts: explicitly enabled below
     ===================================================== */
  .print-logo {
    display: block !important;
    margin: 0 0 0.35in 0 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  .print-logo img {
    max-height: 0.75in !important;
    width: auto !important;
    height: auto !important;
  }

  /* Print-only logo — BLOG POSTS ONLY (kept for safety/override) */
  body.single-post .print-logo {
    display: block !important;
    margin: 0 0 0.35in 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.single-post .print-logo img {
    max-height: 0.75in !important;
    width: auto !important;
    height: auto !important;
  }

  /* Remove printed link URLs */
  a[href]:after {
    content: "" !important;
  }

  /* ---------- Hide header/nav/search/buttons ---------- */
  header,
  .screen-header,
  .elementor-location-header,
  nav,
  .elementor-nav-menu,
  .elementor-widget-nav-menu,
  .elementor-widget-search,
  .elementskit-header-search,
  .elementor-widget-button {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Collapse theme wrappers */
  body,
  main,
  #content,
  .site-content,
  .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* ---------- General section cleanup ---------- */
  .elementor-section {
    background: none !important;
    min-height: auto !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 12px !important;
  }

  .elementor-background-overlay {
    display: none !important;
  }

  /* ---------- Headings and text ---------- */
  h1,
  h2,
  h3,
  .elementor-heading-title {
    color: #000 !important;
    margin-top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  h1 { margin-bottom: 6px !important; }
  h2, h3 { margin-top: 8px !important; }

  p {
    margin-top: 6px !important;
  }

  /* Ensure heading widgets/section titles are visible in print */
  .elementor-widget-heading,
  .elementor-widget-heading *,
  .elementor-heading-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #000 !important;
    height: auto !important;
    max-height: none !important;
  }

  /* ---------- Remove spacer widgets globally ---------- */
  .elementor-widget-spacer,
  .elementor-spacer,
  .elementor-spacer-inner,
  .wp-block-spacer {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ---------- Hide newsletter / CTAs in print ---------- */
  .no-print {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ---------- Footer + cookie cleanup ---------- */
  footer,
  .cookie,
  .cookie-notice,
  #cookie-notice,
  .cky-consent-container {
    display: none !important;
  }

  /* ---------- Allow breaking so blocks don't get bumped to later pages ---------- */
  .elementor-section,
  .e-con,
  .e-con-inner {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* =====================================================
     HOME PAGE / GENERAL: FORCE FIRST CONTENT TO PRINT ON PAGE 1
     Requires class: print-first
     ===================================================== */
  .print-first {
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .print-first,
  .print-first * {
    break-inside: auto !important;
    page-break-inside: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* =====================================================
     HOME/GENERAL: HERO-SPACER (keep H1, remove gap)
     Requires class: hero-spacer
     ===================================================== */
  .hero-spacer,
  .hero-spacer.elementor-element,
  .hero-spacer.e-con,
  .hero-spacer > .e-con-inner,
  .hero-spacer > .elementor-container,
  .hero-spacer > .elementor-widget-wrap {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .hero-spacer,
  .hero-spacer > .e-con-inner {
    row-gap: 0 !important;
    column-gap: 0 !important;
    gap: 0 !important;
    align-content: flex-start !important;
    align-items: flex-start !important;
  }

  .hero-spacer .elementor-widget-spacer,
  .hero-spacer .elementor-spacer,
  .hero-spacer .elementor-spacer-inner {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero-spacer h1,
  .hero-spacer .elementor-widget-heading,
  .hero-spacer .elementor-heading-title {
    display: block !important;
    margin: 0 0 0.12in 0 !important;
    padding: 0 !important;
  }

  /* =====================================================
     GOVERNANCE CONSULTING PAGE FIXES
     Requires classes: gov-hero, gov-first, gov-print
     ===================================================== */

  /* Remove spacers inside hero */
  body.page-governance-consulting .gov-hero .elementor-widget-spacer,
  body.page-governance-consulting .gov-hero .elementor-spacer,
  body.page-governance-consulting .gov-hero .elementor-spacer-inner {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Collapse hero spacing but keep text */
  body.page-governance-consulting .gov-hero,
  body.page-governance-consulting .gov-hero > .e-con-inner,
  body.page-governance-consulting .gov-hero > .elementor-container,
  body.page-governance-consulting .gov-hero > .elementor-widget-wrap {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0.15in !important;
    gap: 0 !important;
    row-gap: 0 !important;
  }

  /* Ensure first section prints */
  body.page-governance-consulting .gov-first {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.page-governance-consulting .gov-first * {
    visibility: visible !important;
    opacity: 1 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* Ensure subsequent sections print */
  body.page-governance-consulting .gov-print {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  body.page-governance-consulting .gov-print * {
    visibility: visible !important;
    opacity: 1 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* =====================================================
     BLOG POSTS: SAFETY — ensure post content always prints
     ===================================================== */
  body.single-post main,
  body.single-post #content,
  body.single-post .site-content,
  body.single-post .site-main,
  body.single-post article,
  body.single-post .elementor,
  body.single-post .elementor-location-single,
  body.single-post .elementor-widget-theme-post-content,
  body.single-post .elementor-post__content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
  }

  /* =====================================================
     OUR TEAM: restore intro + keep team layout behaving
     Requires class: team-intro on the section that holds the H2 + intro paragraphs
     ===================================================== */

  .team-intro,
  .team-intro * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .team-intro .elementor-widget-heading,
  .team-intro .elementor-heading-title,
  .team-intro h2 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .team-title-section {
    page-break-after: avoid !important;
    margin-bottom: 10px !important;
  }

  .team-first-row {
    page-break-before: avoid !important;
  }

  .team-print-row,
  .team-print-row * {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .team-print-row > .elementor-container {
    display: grid !important;
    gap: 18px !important;
  }

  .team-print-row.team-cols-1 > .elementor-container {
    grid-template-columns: 1fr !important;
  }

  .team-print-row.team-cols-2 > .elementor-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .team-print-row.team-cols-3 > .elementor-container {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
