@media print {
  @page {
    size: A4;
    margin: 1cm;
  }

  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Hide navigation and UI elements */
  header,
  .lg\:hidden.fixed.bottom-0,
  button[title="Download as PDF"],
  button:has(.lucide-heart),
  button:has(.lucide-share-2),
  button:has(.lucide-arrow-left) {
    display: none !important;
  }

  /* Expand all sections */
  [class*="hidden"] {
    display: block !important;
  }

  /* Preserve colors and backgrounds */
  .bg-red-50,
  .bg-amber-50,
  .bg-emerald-50,
  .bg-slate-50 {
    background-color: inherit !important;
    border: 1px solid #ccc !important;
  }

  /* Prevent page breaks inside cards */
  .rounded-2xl,
  .rounded-xl {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Ensure images print */
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  /* Remove hover effects */
  *:hover {
    background-color: inherit !important;
  }
}
