/* Print Stylesheet for SNSF Leading House Asia Site */
/* Created: December 2024 */

@media print {
  /* Hide navigation and interactive elements */
  .top-nav,
  .sidebar,
  .search-container,
  .cta-buttons,
  .resource-buttons,
  .nav-report,
  .copyright-footer,
  details summary::after {
    display: none !important;
  }

  /* Full width main content */
  .container {
    display: block !important;
  }

  .main-content,
  .content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
  }

  /* Readable typography */
  body {
    font-size: 12pt !important;
    line-height: 1.6 !important;
    color: black !important;
    background: white !important;
  }

  h1 { font-size: 18pt !important; }
  h2 { font-size: 16pt !important; }
  h3 { font-size: 14pt !important; }
  h4 { font-size: 12pt !important; }

  /* Show URLs for links */
  .content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
    word-wrap: break-word;
  }

  /* Don't show URL for internal links */
  .content a[href^="{{ site.baseurl }}"]::after,
  .content a[href^="/"]::after,
  .content a[href^="#"]::after {
    content: none;
  }

  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  .pub-card,
  .team-card,
  table {
    page-break-inside: avoid;
  }

  /* Remove backgrounds and shadows */
  .hero,
  .page-header,
  .footer,
  .pub-card,
  .team-card {
    background: none !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  /* Hero section adjustments */
  .hero {
    color: black !important;
    padding: 10px !important;
  }

  .hero h1,
  .hero p {
    color: black !important;
  }

  /* Footer visibility */
  .footer {
    color: black !important;
    border-top: 1px solid #ccc !important;
    padding-top: 10px !important;
    margin-top: 20px !important;
  }

  .footer a {
    color: black !important;
  }

  /* Table improvements */
  table {
    border-collapse: collapse !important;
  }

  th, td {
    border: 1px solid #ccc !important;
    padding: 8px !important;
  }

  th {
    background: #f0f0f0 !important;
  }

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

  /* Expand all details elements */
  details {
    display: block !important;
  }

  details[open] summary ~ * {
    display: block !important;
  }

  /* Links styling */
  a {
    color: black !important;
    text-decoration: underline !important;
  }

  /* Code blocks */
  pre, code {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
  }
}
