/* ── Print / Save-as-PDF stylesheet ─────────────────────
   Loaded with media="print" so browsers skip it on screen.
   Activated only when window.print() or Ctrl+P is triggered.
──────────────────────────────────────────────────────── */
@media print {
  /* Page setup + URL footer via CSS paged-media margin box */
  @page {
    size: A4 portrait;
    margin: 18mm 16mm 22mm 16mm;
    @bottom-center {
      content: "socialvalueengine.com  |  " url();
      font-size: 8pt;
      color: #555555;
    }
  }

  /* Reset */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Hide interactive / navigation chrome */
  header,
  footer,
  nav[aria-label="Breadcrumb"],
  nav[aria-label="Case study navigation"],
  /* bottom CTA section */
  section.py-16,
  /* "Further reading" sidebar actions */
  .print\:hidden,
  /* animations wrapper overlay */
  [data-framer-motion],
  /* scroll-to-top / cookie banners */
  [class*="cookie"],
  [id*="cookie"] {
    display: none !important;
  }

  /* Single-column, full-width body */
  body {
    background: #fff !important;
    color: #1a1a1a !important;
    font-family: 'DM Sans', Georgia, serif;
    font-size: 10.5pt;
    line-height: 1.6;
  }

  /* Remove max-width constraints so content fills the page */
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl,
  .max-w-xl {
    max-width: 100% !important;
  }

  /* Grid → single column */
  .grid {
    display: block !important;
  }
  .grid > * {
    margin-bottom: 1rem;
  }

  /* Hero section — preserve brand colours */
  section.relative.bg-\[\#01343F\] {
    background-color: #01343F !important;
    color: #fff !important;
    min-height: auto !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Hero text */
  section.relative.bg-\[\#01343F\] h1,
  section.relative.bg-\[\#01343F\] p {
    color: #fff !important;
  }

  /* Print-only branded header — first thing on the printed page. */
  .print-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 10px 0;
    margin: 0 0 14px 0;
    border-bottom: 1px solid #d1d5db;
    page-break-after: avoid;
    break-after: avoid;
  }
  .print-header__logo {
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
  }
  .print-header__url {
    font-size: 8.5pt;
    color: #555555;
    word-break: break-all;
    text-align: right;
  }

  /* Body section background */
  section.py-14 {
    background: #fff !important;
    padding-top: 1.5rem !important;
    padding-bottom: 0 !important;
  }

  /* Cards — keep white bg and light border */
  .rounded-xl,
  .rounded-2xl {
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* TL;DR callout */
  .bg-\[\#e8f4f4\] {
    background-color: #e8f4f4 !important;
  }

  /* Quote block */
  blockquote {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Outcomes grid → stacked */
  .sm\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Ensure headings keep brand colour */
  h1, h2, h3, h4, h5, h6 {
    color: #01343F !important;
  }

  /* Links — show URL in parens but keep text readable */
  a[href]::after {
    content: none;
  }

  /* Page URL footer line */
  .print-footer-url {
    display: block !important;
    font-size: 8pt;
    color: #555;
    text-align: center;
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
  }
}
