/* =====================================================================
 * Third Coast Luxury — Print Stylesheet
 *
 * Optimizes pages for clients/agents printing property details,
 * community pages, agent bios, and blog posts for offline review.
 *
 * Loaded site-wide via: <link rel="stylesheet" media="print" href="/css/print.css">
 *
 * Last updated: May 12, 2026
 * ===================================================================== */

@media print {

  /* ---- Reset for print ---- */
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
  }

  html, body {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
    margin: 0;
    padding: 0;
  }

  /* ---- Hide site chrome and interactive widgets ---- */
  nav,
  .nav-container,
  .top-nav,
  .main-nav,
  .nav-wrap,
  .nav-inner,
  .nav-links,
  .mobile-menu,
  #mobile-menu,
  #menu-overlay,
  .hamburger,
  .menu-toggle,

  footer,
  .footer,
  .footer-cta,
  .footer-logo,
  .blog-footer-logo,

  .cta-band,
  .cta-section,
  .related-posts,
  .related-communities,
  .testimonials-cta,
  .agent-cta-row,
  .agent-contact-row .em-btn,

  .skip-link,
  .btn-primary,
  .btn-secondary,
  .em-btn,

  /* Cookiebot widget + banner */
  #CookiebotWidget,
  #CybotCookiebotDialog,
  #CybotCookiebotDialogPoweredByExplanation,
  .cookiebot-banner,
  [data-cookieconsent],

  /* iHomefinder UI shell */
  .ihf-search-button,
  .ihf-control-bar,
  .ihf-pagination,
  .ihf-results-control-bar,

  /* Generic helpers */
  script,
  iframe,
  noscript,
  .no-print {
    display: none !important;
  }

  /* ---- Show URLs after external links ---- */
  a[href^="http"]::after,
  a[href^="https"]::after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #444 !important;
    word-break: break-all;
  }
  a[href^="#"]::after,
  a[href^="tel:"]::after,
  a[href^="mailto:"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  /* ---- Expand main content ---- */
  main,
  article,
  section,
  .container,
  .content,
  .post-body,
  .community-content,
  .agent-bio {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
  }

  /* ---- Typography ---- */
  h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: 600;
    page-break-after: avoid;
    page-break-inside: avoid;
    margin-top: 0.6em;
    margin-bottom: 0.3em;
  }
  h1 { font-size: 22pt; line-height: 1.2; }
  h2 { font-size: 16pt; line-height: 1.25; }
  h3 { font-size: 13pt; line-height: 1.3; }
  h4 { font-size: 12pt; }

  p, ul, ol, blockquote {
    page-break-inside: avoid;
    orphans: 3;
    widows: 3;
  }

  blockquote {
    border-left: 2pt solid #999 !important;
    padding-left: 12pt;
    margin: 0.6em 0;
    font-style: italic;
  }

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

  /* ---- Tables ---- */
  table {
    page-break-inside: auto;
    border-collapse: collapse;
    width: 100%;
  }
  thead { display: table-header-group; }
  tr, th, td { page-break-inside: avoid; }
  th, td {
    border: 1pt solid #999 !important;
    padding: 4pt 6pt;
    text-align: left;
  }

  /* ---- Collapse decorative hero sections, keep their text ---- */
  .hero,
  .agent-hero,
  .post-hero,
  .community-hero,
  .blog-hero {
    height: auto !important;
    min-height: 0 !important;
    background: none !important;
    padding: 0.6em 0 !important;
    margin: 0 0 0.6em 0 !important;
    display: block !important;
    position: static !important;
  }
  .hero h1,
  .agent-hero h1,
  .post-hero-title,
  .post-hero-content,
  .agent-info-col {
    color: #000 !important;
    padding: 0 !important;
  }

  /* Hide the hero photo + overlay — keeps the text visible */
  .post-hero-img,
  .hero-bg,
  .hero-overlay,
  .post-hero-overlay,
  .agent-photo-col picture,
  .agent-photo-col img {
    display: none !important;
  }

  /* ---- Page break hints for major sections ---- */
  article > section,
  article > div,
  .community-section {
    page-break-inside: avoid;
  }

  /* ---- Print-only utility ---- */
  .print-only {
    display: block !important;
  }

  /* ---- Page margins ---- */
  @page {
    margin: 0.6in;
  }
  @page :first {
    margin-top: 0.4in;
  }
}
