/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {

  /* ----------------------------------------------------------
     1. PAGE SETUP
  ---------------------------------------------------------- */
  @page {
    margin: 1.5cm 2cm;
    size: A4 portrait;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
    line-height: 1.5;
  }

  /* ----------------------------------------------------------
     2. HIDE — chrome, decorative blocks, CTAs
  ---------------------------------------------------------- */
  header,
  footer,
  nav,
  .site-header,
  .site-footer,
  .main-navigation,
  .mobile-menu,
  .sidebar,
  .widget-area,
  .wp-block-navigation,

  /* decorative / non-content blocks */
  .callout,
  .callout-2,
  .logos,
  .team-list,
  .news-grid,
  .quote-grid,
  .inline-icon-box .wp-block-image,   /* icon images only */
  .inline-quote .md\:w-\[98px\],      /* quote avatar image */
  .inline-icon .w-\[72px\],            /* inline icon image container */
  .stat--images,                       /* stat photo — irrelevant on paper */
  .stat--content-cta,                  /* CTA button inside stats block */

  /* print button itself */
  .print-page-btn,
  .no-print,
  .print-none {
    display: none !important;
  }

  /* ----------------------------------------------------------
     3. CONTENT AREA — strip block padding/margins
  ---------------------------------------------------------- */
  main,
  .entry-content,
  .wp-block-post-content,
  .page-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Generic block padding reset */
  .wp-block {
    padding-top: 12pt !important;
    padding-bottom: 12pt !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* ----------------------------------------------------------
     4. STATS SECTION
     Image col is hidden; make content col full-width.
  ---------------------------------------------------------- */
  .stats-section .grid {
    display: block !important;
  }

  .stat--content {
    padding: 8pt 0 !important;
  }

  .stat--content-item {
    margin-bottom: 8pt !important;
  }

  /* Stat numbers — shrink from 80px screen size */
  .stat--content h2 {
    font-size: 22pt !important;
    line-height: 1.2 !important;
    margin-bottom: 2pt !important;
    color: #000 !important;
  }

  .stat--content .editor {
    color: #000 !important;
  }

  .divider {
    margin: 6pt 0 !important;
    background: #ccc !important;
  }

  /* ----------------------------------------------------------
     5. COUNT BOX
  ---------------------------------------------------------- */
  .count-box .number-counter {
    font-size: 28pt !important;
    line-height: 1.2 !important;
    color: #000 !important;
  }

  /* ----------------------------------------------------------
     6. INLINE ICON BOX & INLINE QUOTE
  ---------------------------------------------------------- */
  .inline-icon-box,
  .inline-quote {
    flex-direction: column !important;
    padding: 6pt 0 !important;
    gap: 4pt !important;
  }

  /* ----------------------------------------------------------
     7. LIST ITEMS
  ---------------------------------------------------------- */
  .list-items__item {
    padding: 6pt !important;
    margin-bottom: 4pt !important;
    background: none !important;
    border: 1pt solid #ccc !important;
  }

  /* ----------------------------------------------------------
     8. EXPANDABLES / ACCORDION
  ---------------------------------------------------------- */
  .accordion-item {
    margin-bottom: 4pt !important;
  }

  .accordion-header {
    padding: 4pt 8pt !important;
    background: #f0f0f0 !important;
    color: #000 !important;
  }

  /* Force accordion bodies open */
  .accordion-body {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* ----------------------------------------------------------
     9. TYPOGRAPHY SIZES
  ---------------------------------------------------------- */
  h1 { font-size: 20pt; line-height: 1.2; margin: 8pt 0 4pt; color: #000 !important; }
  h2 { font-size: 16pt; line-height: 1.2; margin: 6pt 0 4pt; color: #000 !important; }
  h3 { font-size: 13pt; line-height: 1.3; margin: 5pt 0 3pt; color: #000 !important; }
  h4 { font-size: 11pt; line-height: 1.3; margin: 4pt 0 2pt; color: #000 !important; }
  h5,
  h6 { font-size: 10pt; line-height: 1.4; margin: 3pt 0 2pt; }

  p, li, td, th {
    font-size: 10pt;
    line-height: 1.5;
    color: #000 !important;
  }

  /* ----------------------------------------------------------
     10. IMAGES
  ---------------------------------------------------------- */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }

  /* Featured/hero images — cap height so they don't eat a full page */
  .wp-post-image,
  .entry-content > figure:first-child img {
    max-height: 200pt !important;
    width: auto !important;
    display: block;
    margin: 0 auto 12pt;
  }

  /* ----------------------------------------------------------
     11. LINKS — show URL after link text
  ---------------------------------------------------------- */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after,
  a[href^="tel:"]::after {
    content: "";
  }

  /* ----------------------------------------------------------
     12. PAGE BREAKS
  ---------------------------------------------------------- */
  h1, h2, h3 { page-break-after: avoid; }
  p, blockquote, ul, ol, table, .wp-block { page-break-inside: avoid; }

  /* ----------------------------------------------------------
     13. FONT-SIZE CLASS OVERRIDES
     WP emits .has-font-size-X { font-size: … !important } so a
     plain h1/h2 rule loses. Match specificity with [class*=].
  ---------------------------------------------------------- */
  h1[class*="has-font-size"] { font-size: 20pt !important; line-height: 1.2 !important; }
  h2[class*="has-font-size"] { font-size: 16pt !important; line-height: 1.2 !important; }
  h3[class*="has-font-size"] { font-size: 13pt !important; }
  h4[class*="has-font-size"] { font-size: 11pt !important; }
  h5[class*="has-font-size"],
  h6[class*="has-font-size"] { font-size: 9pt !important; }

  /* ----------------------------------------------------------
     14. HERO BLOCK
  ---------------------------------------------------------- */
  .hero--3 {
    padding-top: 10pt !important;
    padding-bottom: 10pt !important;
  }
  /* Hide the decorative photo column on the right */
  .hero--3 > .wp-block-columns > .wp-block-column:last-child {
    display: none !important;
  }

  /* ----------------------------------------------------------
     14b. ANIMATION RESET
     data-animation elements start opacity:0 / visibility:hidden
     and rely on JS to reveal them — JS never runs in print.
  ---------------------------------------------------------- */
  [data-animation] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  /* ----------------------------------------------------------
     15. ICON CARDS (wpny/icon-card block)
     The card uses h-full (height:100%) inside a flex column,
     which collapses to zero in print. Force block + auto height.
  ---------------------------------------------------------- */
  .icon-card .wp-block-image { display: none !important; }
  .icon-card {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: none !important;
    padding: 4pt 0 !important;
  }
  .icon-card h4 { color: #000 !important; }
  .icon-card .editor, .icon-card .editor * { color: #000 !important; }

  /* Force the icon-card columns to stack so flex doesn't clip content */
  .wp-block-columns:has(.icon-card) {
    display: block !important;
  }
  .wp-block-columns:has(.icon-card) > .wp-block-column {
    width: 100% !important;
    margin-bottom: 6pt !important;
  }

  /* ----------------------------------------------------------
     16. CTA / GRADIENT BLOCK — hide, URL already appears via §11
  ---------------------------------------------------------- */
  .is-style-bg-gradient { display: none !important; }

  /* ----------------------------------------------------------
     17. SPACER BLOCKS
  ---------------------------------------------------------- */
  .wp-block-spacer {
    height: 2pt !important;
    min-height: 0 !important;
  }

  /* ----------------------------------------------------------
     18. INLINE PRESET SPACING OVERRIDES
     CSS custom properties (var(--wp--preset--spacing--huge))
     still resolve in print. Collapse them on major wrappers.
  ---------------------------------------------------------- */
  .wp-block-group[style*="padding"] {
    padding-top: 8pt !important;
    padding-bottom: 8pt !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .wp-block-group[style*="margin"],
  .wp-block-columns[style*="margin"] {
    margin-top: 4pt !important;
    margin-bottom: 4pt !important;
  }
}
