/* Print view of every public page (last file of the theme.css bundle; nothing here affects screens).
   A4 pages with the AWGP brand header (logo, name, page address, date: .print-brand in base.html),
   a brand footer (.print-foot) and page numbers. Navigation, ads, buttons, video and decoration are
   left out; dark sections print light; hidden tabs, scrolling rails and reveal effects print in full. */
@media print {
  @page {
    size: A4;
    margin: 16mm 14mm 18mm;
    @bottom-left { content: "www.awgp.org"; font: 8pt "Noto Sans", sans-serif; color: #92400e; }
    @bottom-right { content: counter(page) " / " counter(pages); font: 8pt "Noto Sans", sans-serif; color: #78716c; }
  }
  @page :first { margin-top: 12mm; }

  /* ---- base */
  html { scroll-behavior: auto !important; }
  html, body {
    background: #fff !important; color: #1c1917 !important;
    font-size: 10.5pt; line-height: 1.55;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;   /* keep the brand colours */
  }
  *, *::before, *::after {
    box-shadow: none !important; text-shadow: none !important;
    animation: none !important; transition: none !important;
  }
  main, .site-main, .container, .container-fluid { width: 100% !important; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  h1, h2, h3, h4, h5, h6 { color: #1c1917 !important; break-after: avoid; page-break-after: avoid; }
  p, li, blockquote { orphans: 3; widows: 3; }
  img, svg, figure, table, tr, blockquote, pre, .card, .tile, .hub-card, .art-pager__link, .card-x, .founder-card { break-inside: avoid; page-break-inside: avoid; }
  img { max-width: 100% !important; height: auto !important; }
  a { color: #92400e !important; text-decoration: none !important; }

  /* ---- brand header and footer (base.html) */
  .print-brand[hidden] {
    display: flex !important; align-items: center; gap: 10pt;
    margin: 0 0 12pt; padding: 0 0 8pt; border-bottom: 2pt solid #f8b600;
  }
  .print-brand img { width: 34pt; height: 34pt; border-radius: 6pt; }
  .print-brand__name { display: flex; flex-direction: column; line-height: 1.25; }
  .print-brand__name strong { font-size: 13pt; color: #7f1d1d; letter-spacing: .01em; }
  .print-brand__name span { font-size: 8pt; color: #92400e; letter-spacing: .04em; text-transform: uppercase; }
  .print-brand__meta { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; max-width: 55%; font-size: 7.5pt; color: #78716c; text-align: right; word-break: break-all; }
  .print-foot[hidden] {
    display: flex !important; justify-content: space-between; gap: 12pt; flex-wrap: wrap;
    margin-top: 16pt; padding-top: 6pt; border-top: 1pt solid #fbcf5c; font-size: 7.5pt; color: #78716c;
    break-inside: avoid;
  }

  /* ---- left out of print */
  .skip-link, .site-header, .utility-bar, .main-bar, .offcanvas, .mobile-nav, .site-footer, .editor-dock,
  .ad-band, .ad-slot, .topBarAddWord, .hub-hero__ad, .hub-end-ad, .art-side__ad, [class*="adText"], .blink,
  .hub-nav, .hub-tools, .art-tools, .art-toc-inline, .art-side, .art-progress, .art-pager,
  .hero__scroll, .hero__sparks, .hero__actions, .quick-links, .hub-hero__rays, .hub-hero__bg, .hero__bg,
  .hub-hero__meta .hub-chip--link, .section-head__aside .art, .rail-buttons, .segmented, .nav-tabs, .nav-pills,
  #sharePage, .shareSocialMediaButton, .lang-switch, .form-select, .site-search,
  .photo-viewer, .lightbox, .modal, .modal-backdrop, .toast, .offcanvas-backdrop, .screenLockView,
  video, audio, iframe, embed, object, .video-lite__play, .noPrint, [data-no-print],
  .btn-glow::after, .live-dot, .art-sprite,
  .btn-theme, .btn-ghost, .btn-outline-theme, .btn-link-arrow, .btn-login, .tile__go, .hub-card__go { display: none !important; }
  button:not(.accordion-button), input, select, textarea { display: none !important; }
  .accordion-button { display: block !important; width: 100%; padding: 4pt 0 !important; background: none !important; border: 0 !important; color: #1c1917 !important; font-weight: 600; text-align: left; }
  .accordion-button::after { display: none !important; }

  /* ---- reveal effects, tabs, accordions and rails print in full */
  [data-reveal], .js-reveal [data-reveal]:not(.is-visible), .hero-in, .reveal { opacity: 1 !important; translate: none !important; transform: none !important; }
  .tab-content > .tab-pane, .tab-pane.fade { display: block !important; opacity: 1 !important; }
  .tab-content > .tab-pane + .tab-pane { margin-top: 12pt; }
  .collapse:not(.show) { display: block !important; }
  .timeline, .shelf__rail { display: grid !important; grid-auto-flow: row !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; overflow: visible !important; }
  .timeline { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; row-gap: 10pt !important; }
  .timeline li::before { display: none !important; }
  .du-jump__inner, .hub-nav__track { overflow: visible !important; flex-wrap: wrap !important; }

  /* ---- headers and dark sections print light */
  .hero, .hub-hero, .page-banner, .banner-area, .today, .impact, .section--dark, .vision, .involve, .involve__panel {
    background: none !important; color: #1c1917 !important;
  }
  .hero::before, .hero::after, .hub-hero::before, .page-banner::before, .page-banner::after, .banner-area::before, .overlay, .overlay-bg { display: none !important; }
  .hero, .hub-hero, .page-banner, .banner-area { min-height: 0 !important; padding: 0 0 10pt !important; margin: 0 0 8pt !important; }
  .hero *, .hub-hero *, .page-banner *, .banner-area *, .today *, .impact *, .section--dark *, .involve__panel * { color: #1c1917 !important; }
  .hub-hero__title, .hero h1, .page-banner h1, .banner-area h1 { font-size: 22pt !important; font-weight: 300 !important; max-width: none !important; margin: 0 !important; }
  .hub-hero__title::after { margin-top: 6pt !important; background: #f8b600 !important; }
  .hub-crumbs ol { margin: 0 0 4pt !important; font-size: 8pt; }
  .hub-crumbs a, .hub-crumbs li { color: #78716c !important; }
  .hub-crumbs li + li::before { color: #d97706 !important; }
  .hub-hero__lead, .hero__lead { font-size: 10.5pt !important; color: #44403c !important; }
  .hub-hero__meta { margin-top: 6pt !important; gap: 6pt !important; }
  .hub-chip { background: none !important; border: 1pt solid #e7e5e4 !important; color: #57534e !important; padding: 2pt 7pt !important; font-size: 8pt !important; backdrop-filter: none !important; }
  .hub-chip i { color: #d97706 !important; }
  .eyebrow, .hub-nav__label, .art-card__title { color: #b45309 !important; }

  /* ---- sections: tighter spacing, no decoration */
  .section, section { padding-top: 10pt !important; padding-bottom: 10pt !important; }
  .section-head { margin-bottom: 8pt !important; }
  .section-head h2, .art-section-title, .art-block__title { font-size: 15pt !important; }
  .hub, .art { background: none !important; padding-bottom: 0 !important; }
  .hub-intro { box-shadow: none !important; }

  /* ---- article text */
  .art-layout { display: block !important; padding-top: 4pt !important; }
  .art-body { border: 0 !important; padding: 0 !important; border-radius: 0 !important; background: none !important; }
  .art-prose { max-width: none !important; font-size: 10.5pt !important; line-height: 1.6 !important; color: #1c1917 !important; }
  .art-prose p { margin-bottom: 7pt !important; }
  .art-prose blockquote { background: #fff8e6 !important; border-left-color: #f8b600 !important; }
  .art-prose img { max-height: 120mm; width: auto !important; }
  .art-prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 7.5pt; color: #78716c; word-break: break-all; }
  .art-prose :is(td, th) { border: .5pt solid #d6d3d1 !important; }
  .art-prose table { display: table !important; overflow: visible !important; }
  .art-block + .art-block { margin-top: 12pt !important; padding-top: 12pt !important; }

  /* ---- cards and grids: two columns, light outline */
  .hub-grid, .art .hub-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8pt !important; }
  .hub-card, .tile, .card-x, .founder-card, .involve__card, .art-card {
    border: .75pt solid #e7e5e4 !important; border-radius: 8pt !important; background: #fff !important; transform: none !important;
  }
  .hub-card { padding: 8pt 10pt !important; gap: 4pt !important; }
  .hub-card::before, .tile::before { display: none !important; }
  .hub-card__title a::after { display: none !important; }
  .hub-card__icon, .tile__art { width: 30pt !important; height: 30pt !important; border-radius: 8pt !important; }
  .hub-card__icon svg, .tile__art svg { width: 22pt !important; height: 22pt !important; }
  .hub-card__num { font-size: 12pt !important; }
  .hub-card__title { font-size: 11pt !important; }
  .hub-card__text { -webkit-line-clamp: unset !important; display: block !important; font-size: 8.5pt !important; }
  .hub-card__subs a { background: none !important; border: .5pt solid #fde68a !important; font-size: 7.5pt !important; padding: 1pt 5pt !important; }
  .hub-card__foot { padding-top: 4pt !important; font-size: 8pt !important; }
  .hub-card__go { display: none !important; }

  /* ---- news / blog posts: the post only (related posts, side columns and image pop-ups left out) */
  #updateName, h3:has(+ #updateName), .newsView1, .popup, #image-popup, .rightColumnAddWord { display: none !important; }
  .col-lg-8, .col-lg-9 { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
  main img { max-height: 110mm !important; width: auto !important; object-fit: contain; }
  .newsView img, .articleText img { display: block; margin: 6pt auto !important; border-radius: 6pt; }

  /* old banners with a fixed-height row (news / blog / gurukulam) */
  .banner-area .row, .banner-area [style*="height"] { height: auto !important; min-height: 0 !important; }
  .banner-area:not(:has(h1, h2)) { display: none !important; }
  /* sideways-scrolling photo strips: a grid of thumbnails */
  main [style*="nowrap"], main [style*="nowrap"] * { white-space: normal !important; overflow: visible !important; }
  main [style*="nowrap"] { display: block !important; height: auto !important; }
  main [style*="nowrap"] > .image-container, main [style*="nowrap"] > a, main [style*="nowrap"] > img {
    display: inline-block !important; width: 32% !important; margin: 0 1% 6pt 0 !important; vertical-align: top; break-inside: avoid;
  }
  main [style*="nowrap"] .image-container { display: block !important; width: 100% !important; margin: 0 !important; }
  main [style*="nowrap"] img, .articleText main [style*="nowrap"] img {
    display: inline-block !important; width: 32% !important; height: 42mm !important; max-height: 42mm !important;
    margin: 0 1% 5pt 0 !important; object-fit: cover; border-radius: 4pt; vertical-align: top;
  }

  /* ---- landing page specifics */
  .hero__inner, .about-intro__grid, .media-feature__grid, .literature__grid { grid-template-columns: 1fr !important; }
  .hero__emblem { max-height: 60pt !important; filter: none !important; margin: 0 0 6pt !important; }
  .stats { grid-template-columns: repeat(4, 1fr) !important; }
  .stats dd { color: #b45309 !important; }
  .vision::before, .vision::after, .about-intro__media::before { display: none !important; }
}
