/* Way Back Home — print.css
 * Clean print / PDF stylesheet for resource cards.
 * Linked with media="print" — does not affect screen rendering.
 */

@media print {

  /* ── RESET / BASE ──────────────────────────────────────────────────────── */
  * { box-sizing: border-box; }

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

  /* ── HIDE NON-CONTENT UI ───────────────────────────────────────────────── */
  header,
  nav,
  .crisis-bar,
  .wbh-crisis-strip,
  .wbh-resources-bar,
  .state-nav-bar,
  .state-picker-bar,
  .wbh-card-arrow,
  .wbh-card-footer,
  .wbh-report-link,
  .wbh-section-dot,
  .wbh-count-badge,
  footer,
  [class*="nav"],
  [class*="hero"],
  [class*="picker"] { display: none !important; }

  /* ── PAGE LAYOUT ───────────────────────────────────────────────────────── */
  .wbh-resources-section {
    padding: 0.5in 0.75in;
    background: #fff !important;
  }

  .wbh-resources-inner {
    max-width: 100%;
    margin: 0;
  }

  /* ── SECTION HEADS ─────────────────────────────────────────────────────── */
  .wbh-section-head {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 4pt;
    margin: 18pt 0 8pt;
    page-break-after: avoid;
  }

  .wbh-section-h3 {
    font-size: 14pt;
    font-weight: bold;
    color: #000;
  }

  /* ── CARD GRID → BLOCK ─────────────────────────────────────────────────── */
  .wbh-cards {
    display: block;
  }

  /* ── INDIVIDUAL CARDS ──────────────────────────────────────────────────── */
  .wbh-card {
    display: block;
    border: 1px solid #aaa;
    border-radius: 4pt;
    margin-bottom: 10pt;
    padding: 8pt 10pt;
    page-break-inside: avoid;
    break-inside: avoid;
    background: #fff !important;
  }

  /* Force card bodies open */
  .wbh-card-body {
    display: block !important;
    visibility: visible !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 4pt 0 0 !important;
  }

  .wbh-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8pt;
    cursor: default;
    margin-bottom: 6pt;
  }

  .wbh-card-icon {
    width: 28pt;
    height: 28pt;
    font-size: 16pt;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f0f0f0 !important;
    border: 1px solid #ccc;
  }

  .wbh-card-title {
    font-size: 12pt;
    font-weight: bold;
    color: #000;
    margin-bottom: 2pt;
  }

  .wbh-card-subtitle {
    font-size: 10pt;
    color: #333;
    font-style: italic;
  }

  /* ── TAGS → PLAIN TEXT LABELS ──────────────────────────────────────────── */
  .wbh-card-tags { margin-top: 4pt; }

  .wbh-tag {
    display: inline-block;
    border: 1px solid #888;
    border-radius: 3pt;
    padding: 1pt 4pt;
    font-size: 8pt;
    color: #000;
    background: transparent !important;
    margin-right: 3pt;
    margin-bottom: 2pt;
  }

  /* ── BODY CONTENT ──────────────────────────────────────────────────────── */
  .wbh-card-body p {
    font-size: 10pt;
    margin-bottom: 4pt;
    color: #000;
  }

  .wbh-card-body ul {
    margin: 4pt 0 4pt 14pt;
    padding: 0;
  }

  .wbh-card-body li {
    font-size: 10pt;
    color: #000;
    margin-bottom: 3pt;
    line-height: 1.4;
  }

  /* ── TIP BOX ───────────────────────────────────────────────────────────── */
  .tip-box {
    border: 1px solid #888;
    border-left: 3pt solid #000;
    background: transparent !important;
    padding: 5pt 8pt;
    margin-top: 6pt;
    font-size: 10pt;
    color: #000;
    border-radius: 3pt;
  }

  /* ── LINKS ─────────────────────────────────────────────────────────────── */
  .wbh-card-links {
    margin-top: 6pt;
    display: flex;
    flex-direction: column;
    gap: 3pt;
  }

  .wbh-link-btn {
    display: block;
    font-size: 9pt;
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #444;
    word-break: break-all;
  }

  .wbh-card-header a::after { content: none; }

  /* ── PAGE BREAKS ───────────────────────────────────────────────────────── */
  .wbh-section-head { page-break-before: auto; }

  @page {
    margin: 0.75in;
    size: letter;
  }

} /* end @media print */
