/* Print Stylesheet for NorthernEdge Legal Solutions
 *
 * Enhanced print stylesheet for better paper output
 * Last updated: 2025-03-06
 */

@media print {
  /* Reset all backgrounds and text to optimize for printing */
  * {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    -ms-filter: none !important;
    background-image: none !important;
  }
  
  /* Set basic page layout */
  @page {
    margin: 2cm;
    size: portrait;
  }
  
  /* Ensure text is sharp and readable */
  body {
    font: 12pt Georgia, "Times New Roman", Times, serif;
    line-height: 1.4;
    color: #000 !important;
    background: #fff !important;
  }
  
  /* Format headings */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #000 !important;
    margin-top: 1cm;
  }
  
  h1 {
    font-size: 24pt;
  }
  
  h2 {
    font-size: 20pt;
  }
  
  h3 {
    font-size: 16pt;
  }
  
  /* Format paragraphs, lists, and images */
  p, ul, ol, dl, blockquote, img {
    page-break-inside: avoid;
    margin-bottom: 0.75cm;
  }
  
  /* Optimize images */
  img {
    max-width: 100% !important;
    display: block;
    margin: 0.5cm auto;
    filter: grayscale(100%); /* Save color ink */
  }
  
  /* Prevent orphans and widows */
  p {
    orphans: 3;
    widows: 3;
  }
  
  /* Optimize links for print */
  a {
    text-decoration: underline;
  }
  
  /* Show URL after links */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #333 !important;
    word-wrap: break-word;
  }
  
  /* Don't show URLs for internal links or javascript */
  a[href^="#"]:after,
  a[href^="javascript:"]:after,
  a[href^="tel:"]:after,
  a[href^="mailto:"]:after {
    content: "";
  }
  
  /* Enhance URLs for people to actually type them */
  article a[href^="http"]:after, 
  article a[href^="https"]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
    display: inline-block;
    word-break: break-all;
  }
  
  /* Abbreviations get their title printed */
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  
  /* Elements to hide when printing */
  .site-header,
  .site-footer,
  .mobile-menu-toggle,
  .nav-menu,
  .cta-section,
  .btn,
  .social-icons,
  .approach-grid,
  .cookie-consent-banner,
  .back-to-top,
  form,
  .subscribe-section,
  .pagination,
  nav,
  .blog-sidebar,
  .related-posts,
  .author-bio,
  .blog-navigation,
  video,
  audio,
  iframe,
  .no-print {
    display: none !important;
  }
  
  /* Ensure tables display properly */
  table {
    border-collapse: collapse;
    width: 100%;
    margin: 1cm 0;
    page-break-inside: avoid;
  }
  
  th, td {
    border: 1pt solid #999;
    padding: 0.25cm;
    text-align: left;
  }
  
  /* Improve layout for printing */
  main {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  .container, .content-container {
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: none;
  }
  
  /* Ensure content grids display properly */
  .content-grid, .row, .grid, .blog-grid {
    display: block;
  }
  
  .content-grid > *, 
  .row > *,
  .grid > *,
  .col, 
  .column {
    width: 100%;
    margin: 1em 0;
    padding: 0;
  }
  
  /* Company footer on each page */
  #print-company-info {
    position: running(footer);
    font-size: 9pt;
    text-align: center;
    color: #666 !important;
  }
  
  @page {
    @bottom-center {
      content: element(footer);
    }
    
    @bottom-right {
      content: "Page " counter(page) " of " counter(pages);
    }
  }
  
  /* Add company info at the top of first printed page */
  body::before {
    content: "NorthernEdge Legal Solutions | 67 Hugill St., Sault Ste. Marie, Ontario | (705) 123-4567";
    display: block;
    text-align: center;
    font-size: 10pt;
    margin-bottom: 2cm;
    border-bottom: 1pt solid #ccc;
    padding-bottom: 5mm;
  }
  
  /* Ensure page breaks don't happen in awkward spots */
  h1, h2, h3, h4, h5, h6, img, table, figure, blockquote {
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, section {
    page-break-after: avoid;
  }
  
  /* Ensure links don't break across lines */
  a {
    white-space: nowrap;
  }
  
  /* Special handling for legal documents */
  .legal-document {
    font-size: 10pt;
    line-height: 1.4;
  }
  
  .legal-document h2 {
    font-size: 14pt;
  }
  
  .legal-document h3 {
    font-size: 12pt;
  }
/**
 * Legacy Compatibility stylesheet
 * This file redirects all legacy references to our new modular CSS system
 * Last updated: 2025-03-06
 */

/* Import main CSS file which imports all other required styles */
@import 'main.css';

/* Preserve basic legacy selectors for backward compatibility */
/* Base Styles */
body {
    font-family: var(--font-body);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Legacy Header - map to new styling */
header {
    background: var(--primary-dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

/* Legacy Hero Section - map to new styling */
.hero-image {
    max-width: 100%;
    height: auto;
    margin-top: 2rem;
    border-radius: var(--radius-md);
}

/* Legacy Attorney Grid - map to new component styles */
.attorney-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.attorney-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Legacy link styles */
.learn-more,
.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

/* Legacy Footer - map to new styling */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Legacy Blog Styling - map to new blog styles */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.post-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.sidebar {
    padding: 2rem;
    background: var(--neutral-lightest);
    border-radius: var(--radius-md);
}

/* Legacy Link Hover - ensure consistent behavior */
a:hover {
    text-decoration: underline;
}

/* Legacy Button Styling - map to new button styles */
button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-fast);
}

button:hover {
    background-color: var(--primary-dark);
}

/* Legacy Form Element Styling - map to new form styles */
input, textarea {
    width: 100%;
    padding: 0.5rem;
    margin: 0.5rem 0 1rem;
    border: 1px solid var(--neutral-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
}

label {
    font-weight: bold;
    margin-top: 1rem;
    display: block;
}
