/* Print stylesheet for IJS website
   Used to generate clean PDFs of each page for partner review.
   Hides interactive chrome, preserves backgrounds, prevents awkward breaks. */

@media print {
  /* Force browsers to print backgrounds and exact colors */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Page setup — A4 landscape works best for the wide hero / grid layouts */
  @page {
    size: A4;
    margin: 12mm 10mm;
  }

  html, body {
    background: #fff !important;
  }

  /* Hide sticky navigation — would otherwise repeat on every printed page */
  .nav,
  nav.nav,
  #nav {
    display: none !important;
  }

  /* Hide trial-strip / floating CTA elements that don't make sense in print */
  .trial-strip-fixed,
  .floating-cta,
  .lightbox,
  [class*="lightbox"] {
    display: none !important;
  }

  /* Remove sticky/fixed positioning so things don't get stuck */
  * {
    position: static !important;
  }
  /* …but keep things that are intentionally relative (cards, etc.) — undo for those */
  .card, .coach-card, .program-card, .roster-card, [class*="-card"] {
    position: relative !important;
  }

  /* Prevent awkward page breaks inside meaningful blocks */
  .coach-profile,
  .program-card,
  .card,
  .roster-card,
  .credential-card,
  .testimonial,
  section {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Force a page break before each major coach profile so each gets its own page */
  .coach-profile + .coach-profile,
  section.coach-profile {
    page-break-before: auto;
  }

  /* Headings shouldn't be orphaned at bottom of page */
  h1, h2, h3, h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Images shouldn't span page breaks */
  img {
    page-break-inside: avoid;
    break-inside: avoid;
    max-width: 100% !important;
  }

  /* Links: keep underline visible but skip the URL-after-link annotation */
  a {
    text-decoration: none !important;
    color: inherit !important;
  }
  a[href]:after {
    content: "" !important;
  }

  /* Trial strips at end of pages — keep but compress */
  .trial-strip {
    margin-top: 24px;
  }

  /* Footer — show but compress */
  .footer {
    page-break-before: auto;
    margin-top: 16px;
  }

  /* Remove page-hero top padding that compensated for sticky nav */
  .page-hero {
    padding-top: 24px !important;
  }

  /* Ensure full-bleed sections don't overflow page */
  section {
    overflow: visible !important;
  }
}
