/**
 * print.css
 * Print stylesheet for cfhpe.org
 * Ensures clean, readable output when pages are printed
 */

@media print {
  /* Reset backgrounds and colors for print */
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  /* Page setup */
  @page {
    margin: 2cm;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    font-family: Georgia, 'Times New Roman', Times, serif;
  }

  /* Hide non-essential elements */
  .site-header,
  .site-footer,
  .site-nav,
  .mobile-menu-toggle,
  .nav-overlay,
  .theme-toggle,
  .scroll-indicator,
  .cursor-glow,
  .page-transition-overlay,
  .reading-progress,
  .cta-section,
  .breadcrumb,
  [data-component="header"],
  [data-component="footer"] {
    display: none !important;
  }

  /* Ensure content is full width */
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .page-content {
    max-width: 100% !important;
  }

  .page-main {
    padding: 0 !important;
  }

  /* Typography adjustments */
  h1 {
    font-size: 24pt;
    margin-bottom: 12pt;
  }

  h2 {
    font-size: 18pt;
    margin-top: 18pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }

  h3 {
    font-size: 14pt;
    margin-top: 12pt;
    margin-bottom: 6pt;
    page-break-after: avoid;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  /* Show link URLs after link text */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-weight: normal;
    color: #555 !important;
  }

  /* Don't show URL for internal anchor links or javascript links */
  a[href^="#"]::after,
  a[href^="javascript:"]::after,
  a[href^="mailto:"]::after {
    content: "";
  }

  /* For mailto links, show the email */
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
  }

  /* Don't show URL for links that are just the URL text */
  a[href]:not([class])::after {
    word-break: break-all;
  }

  /* Images */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* Cards and sections */
  .program-card,
  .governance-card,
  .contact-card {
    border: 1px solid #ccc !important;
    padding: 12pt !important;
    margin-bottom: 12pt !important;
    page-break-inside: avoid;
  }

  .contact-card a::after {
    content: "" !important;
  }

  /* Page sections */
  .page-section,
  .governance-section,
  .program-section {
    page-break-inside: avoid;
  }

  /* Hero section - print as simple header */
  .hero {
    min-height: auto !important;
    padding: 12pt 0 !important;
    text-align: left !important;
  }

  .hero-title {
    font-size: 28pt !important;
  }

  .hero-subtitle {
    font-size: 12pt !important;
  }

  /* About section grid - stack for print */
  .about-content {
    display: block !important;
  }

  .about-image-container {
    display: none !important;
  }

  /* Programs grid - stack for print */
  .programs-grid,
  .program-grid {
    display: block !important;
  }

  .program-feature-card {
    border: 1px solid #ccc !important;
    padding: 8pt !important;
    margin-bottom: 8pt !important;
    page-break-inside: avoid;
  }

  /* References section */
  .references-list li {
    font-size: 10pt;
  }

  /* Ensure all reveal animations show content */
  [data-reveal],
  [data-reveal-stagger] > *,
  .site-footer .footer-section {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Print header with site name */
  .page-main::before {
    content: "Center for Housing & Poverty Education — cfhpe.org";
    display: block;
    font-size: 10pt;
    color: #666 !important;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6pt;
    margin-bottom: 18pt;
  }
}
