/* Print stylesheet — applied only when @media print */
@media print {
  /* Reset color scheme to light for printing (saves ink, improves legibility) */
  :root {
    color-scheme: light !important;
  }

  html, body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 11pt !important;
    line-height: 1.45 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Force serif body for readability on paper */
  body, p, li, td, th {
    color: #111111 !important;
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif !important;
  }

  /* Headings stay in display family */
  h1, h2, h3, h4, h5, h6 {
    color: #000000 !important;
    page-break-after: avoid;
  }

  /* Hide all chrome */
  nav, .nav, .topnav, .nav-bar,
  .hero-cta, .cta, .btn,
  .toggle, .menu, .mobile-menu,
  video, audio, iframe, canvas,
  .noise, .grain, .overlay,
  .scroll-progress, .scroll-indicator {
    display: none !important;
  }

  /* Disable all heavy effects */
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* Body noise overlay - off */
  body::before, body::after {
    display: none !important;
  }

  /* Links: show URL after text for non-internal links */
  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
  a[href^="http"]:not([href*="jmenergyconsulting.de"])::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555555;
    word-break: break-all;
  }
  a[href^="mailto:"]::after,
  a[href^="tel:"]::after {
    content: "";
  }

  /* Page setup */
  @page {
    margin: 18mm 18mm 22mm;
  }
  @page :first {
    margin-top: 24mm;
  }

  /* Avoid breaking inside cards / blocks */
  .card, .glass-card, .pruef-card, .contact-card,
  .toc, .placeholder, blockquote, table {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Print URL of page in footer */
  body::after {
    content: "© JM Energy Consulting · jmenergyconsulting.de";
    display: block !important;
    position: fixed;
    bottom: 5mm;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 8pt;
    color: #888888;
    font-family: 'SF Mono', Menlo, monospace;
    background: transparent !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    z-index: auto;
    pointer-events: none;
  }

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

  /* Hero/banner reduction */
  .hero, .hero-section, .pruef-head {
    padding: 24px 0 !important;
    margin-top: 0 !important;
  }

  /* Footer */
  footer {
    border-top: 1px solid #ddd !important;
    padding: 16px 0 !important;
    margin-top: 32px !important;
    color: #555555 !important;
    font-size: 9pt !important;
  }
  footer a {
    color: #555555 !important;
  }

  /* Lists */
  ul li::before {
    color: #555555 !important;
  }

  /* Form elements - in case form is printed */
  input, textarea, select, button {
    border: 1px solid #999 !important;
    background: #ffffff !important;
    color: #111111 !important;
  }
}
