/* 
 * Film Photography Educational Website
 * Print Stylesheet
 */

@media print {
  /* Hide navigation, interactive elements, and other non-essential content */
  header, nav, footer, .quiz-container, .flashcard-container, 
  .btn, .nav-toggle, .keyboard-shortcuts, .quiz-controls {
    display: none !important;
  }
  
  /* Reset page margins and background */
  body {
    margin: 0;
    padding: 0;
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  /* Ensure content is readable */
  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.5cm;
  }
  
  /* Improve typography for print */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  
  h1 {
    font-size: 24pt;
    margin-bottom: 0.5cm;
  }
  
  h2 {
    font-size: 18pt;
    margin-top: 1cm;
  }
  
  h3 {
    font-size: 14pt;
  }
  
  p, ul, ol, dl {
    page-break-inside: avoid;
    margin-bottom: 0.5cm;
  }
  
  /* Handle links */
  a {
    color: black;
    text-decoration: none;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    font-style: italic;
  }
  
  /* Make images fit on page */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  /* Add page breaks before major sections */
  section {
    page-break-before: always;
  }
  
  /* First section should not have a page break */
  main section:first-child {
    page-break-before: avoid;
  }
  
  /* Ensure tables are readable */
  table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1cm;
  }
  
  table, th, td {
    border: 1px solid #ddd;
  }
  
  th, td {
    padding: 8px;
    text-align: left;
  }
  
  /* Add URL to the bottom of the page */
  @page {
    margin: 2cm;
  }
  
  @page:first {
    margin-top: 3cm;
  }
  
  /* Add website URL at the bottom of each page */
  @page {
    @bottom-center {
      content: "Film Photography Guide - www.filmphotographyguide.com";
      font-size: 9pt;
    }
  }
}