/* Gloventure print stylesheet.
 *
 * Every declaration is !important by design. The page's own CSS lives in
 * <style> blocks inside <body> (base.njk, tour-page.njk, flyer-lightbox.njk),
 * which come after this file in source order and therefore win every
 * equal-specificity tie. !important is the only override that survives that,
 * and it keeps this file immune to future edits to those blocks. */

@page {
  size: A4;
  margin: 13mm 11mm 15mm;
}

@media print {
  /* Version stamp. build-pdfs.mjs asserts this value; bump it whenever this
   * file changes so a stale copy in _site/ fails the build instead of
   * silently producing the previous layout. */
  html { --gv-print: 4 !important; }

  html, body {
    background: #fff !important;
    font-size: 10.5pt !important;
  }

  body, .vn, .vn-hero, .vn-dep, .vn-price, .vn-final, .vn-band-mist, .vn-band-sand {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .utility,
  header,
  .menu-btn,
  .vn-jump,
  .fab,
  .lightbox,
  .gv-lb,
  footer.site,
  .vn-cta-row,
  .vn-contact,
  .vn-flyer,
  .vn-seal,
  .vn-dep a,
  .vn-price a,
  .vn-band + .vn-band::before {
    display: none !important;
  }

  .vn-print-foot { display: block !important; }

  .wrap { max-width: none !important; padding: 0 2mm !important; }
  section { padding: 0 !important; }
  .vn-band { padding: 13px 0 !important; }

  /* Hero — brand block kept, decorative treatment dropped */
  .vn-hero { padding: 14px 0 16px !important; }
  .vn-hero::after { display: none !important; }
  .vn-hero .wrap {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .vn-hero h1 { font-size: 24pt !important; margin: .4rem 0 .2rem !important; }
  .vn-route { font-size: 10pt !important; max-width: none !important; color: #E4F2F0 !important; }
  .vn-flag { padding: .22rem .7rem !important; color: #FFC24D !important; border-color: rgba(255,255,255,.45) !important; }
  .vn-stats { gap: 6px !important; margin-top: .8rem !important; }
  .vn-stat { padding: .35rem .7rem !important; min-width: 0 !important; }
  .vn-stat b { font-size: 10.5pt !important; }
  .vn-stat span { font-size: .56rem !important; color: #DCEDEB !important; letter-spacing: .08em !important; }

  /* Gallery — flex sidesteps the grid-template/grid-column rules entirely */
  .vn-gallery, .vn-gallery.no-flyer {
    display: flex !important;
    gap: 6px !important;
    max-width: none !important;
    margin: 12px 0 0 0 !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
  }
  .vn-shot,
  .vn-shot:first-of-type,
  .vn-shot:last-of-type,
  .vn-shot:nth-of-type(3),
  .vn-gallery.no-flyer .vn-shot,
  .vn-gallery.no-flyer .vn-shot:first-of-type {
    flex: 1 1 30% !important;
    min-width: 28% !important;
    height: 30mm !important;
    min-height: 0 !important;
    width: auto !important;
    transform: none !important;
    box-shadow: none !important;
    border-width: 2px !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 !important;
  }
  .vn-shot figcaption { padding: 16px 7px 5px !important; font-size: .55rem !important; letter-spacing: .06em !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

  .vn-head { margin-bottom: 11px !important; break-after: avoid !important; }
  .vn-head h2 { font-size: 15pt !important; }
  .vn-head p { font-size: 9.5pt !important; color: #3E5057 !important; }
  .vn h1, .vn h2, .vn h3 { break-after: avoid !important; }

  /* One chapter break only. Forcing breaks before #included and #price
   * produced a blank page when the previous section ended near a boundary. */
  #itinerary { break-before: page !important; }

  .vn-hl-grid, .vn-dep-grid { gap: 10px !important; }
  .vn-hl, .vn-dep, .vn-day, .vn-list-card, .vn-map, .vn-stay tr, .vn-notes li, .vn-price, .vn-print-foot {
    break-inside: avoid !important;
  }
  .vn-hl { padding: 12px 14px !important; }
  .vn-hl b { font-size: 10pt !important; }
  .vn-hl p { font-size: 8.8pt !important; color: #3E5057 !important; }
  .vn-dep { padding: 15px !important; }
  .vn-dep .d { font-size: 15pt !important; }
  .vn-dep p { font-size: 8.8pt !important; margin: .15rem 0 0 0 !important; color: #E4F2F0 !important; }
  /* The 'Private departure' card is a .vn-dep with a white background and its
   * own inline text colour. The light-on-teal colour above is !important and
   * would otherwise beat that inline style, leaving white text on white. Any
   * .vn-dep paragraph carrying an inline colour states its own intent, so it
   * gets the dark body colour instead. */
  .vn-dep p[style*="color"] { color: #35474E !important; }
  .vn-dep[style*="#fff"] .d { color: #062E33 !important; }

  .vn-day { padding: 0 0 14px 52px !important; }
  .vn-day h3 { font-size: 11pt !important; }
  .vn-day p { font-size: 9pt !important; max-width: none !important; color: #35474E !important; }
  .vn-num { width: 34px !important; height: 34px !important; font-size: .85rem !important; }
  .vn-tl::before { left: 16px !important; }
  .vn-tags { margin-top: .4rem !important; gap: 5px !important; }
  .vn-tag { font-size: .66rem !important; padding: .1rem .5rem !important; }

  .vn-list-card { padding: 15px 17px !important; }
  .vn-list-card h3 { font-size: 11pt !important; margin-bottom: .5rem !important; }
  .vn-list-card li { font-size: 8.8pt !important; padding: .2rem 0 !important; color: #35474E !important; }
  .vn-map { padding: 8px !important; }
  .vn-map img { max-height: 100mm !important; width: auto !important; margin: 0 auto !important; }

  .vn-stay th, .vn-stay td { padding: 6px 10px !important; font-size: 8.8pt !important; }

  .vn-price { padding: 20px !important; border-radius: 14px !important; gap: 20px !important; }
  .vn-amount { font-size: 23pt !important; margin: .3rem 0 .2rem !important; }
  .vn-price small { font-size: 8.5pt !important; max-width: none !important; color: #E4F2F0 !important; }
  .vn-price li { font-size: 8.8pt !important; padding: .22rem 0 !important; color: #EAF6F4 !important; }

  /* Multi-column fragmentation across a page boundary reordered these notes
   * after the final CTA in the first render. Single column avoids it. */
  .vn-notes { columns: 1 !important; column-gap: 0 !important; }
  .vn-notes li { font-size: 8.5pt !important; margin-bottom: .3rem !important; color: #3E5057 !important; }

  .vn-final { padding: 18px 0 !important; }
  .vn-final h2 { font-size: 15pt !important; }
  .vn-final p { font-size: 9.5pt !important; margin-top: .5rem !important; color: #3A2800 !important; }

  a[href]::after { content: none !important; }
}

/* Print-only contact block — hidden on screen, emitted at the end of the PDF */
.vn-print-foot { display: none; }

@media print {
  .vn-print-foot {
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px solid #D8E0DD !important;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 8pt !important;
    line-height: 1.5 !important;
    color: #41535A !important;
  }
  .vn-print-foot p { margin: 0 !important; }
  .vn-print-foot b { color: #0D5C63 !important; }
}
