/* ==========================================================================
   AILO × 그누보드5 — 인쇄용 (판매 준비 #18)
   inc/head.sub.bottom.php 가 테마 CSS 뒤에 media="print" 로 링크한다(화면에는 영향 없음).
   - 숨김: 헤더(고정)·모바일 메뉴·햄버거·팝업레이어·관리자 안내 띠·건너뛰기 링크·
           인쇄 직전 position:fixed 인 요소(하단 고정 바·플로팅 버튼·대시보드 사이드바·딤 — ailo-g5.js 가 data-ailo-print-fixed 표시)
           게시판의 버튼·댓글 쓰기·검색·페이지 번호·이전/다음 글
   - AOS 등장 애니메이션은 끝난 상태로(안 보이던 요소가 빈칸으로 인쇄되지 않게)
   - 글자는 검정, 바탕은 흰색(어두운 테마·배경 이미지 위 흰 글자도 읽히게)
   - 본문(게시판 글·내용관리 페이지) 안 외부 링크는 뒤에 주소를 붙인다
   - 제목 바로 뒤·그림·표 행에서 페이지가 끊기지 않게
   ========================================================================== */
@page { margin: 14mm 12mm; }

@media print {
  html, body { background: #fff !important; }
  html { scroll-padding-top: 0 !important; }
  body { padding: 0 !important; margin: 0 !important; overflow: visible !important; }
  body, body *:not(svg):not(svg *) { color: #000 !important; text-shadow: none !important; }
  *, *::before, *::after { box-shadow: none !important; animation: none !important; transition: none !important; }
  /* 배경 이미지·그라데이션은 잉크만 쓰고 글자를 가리므로 뺀다(사진은 <img> 라 그대로 인쇄) */
  body *:not(img):not(svg):not(svg *):not(video):not(canvas) { background-color: transparent !important; background-image: none !important; }

  /* 숨김 */
  [data-ailo-header], .ailo-mnav, .ailo-burger, [data-ailo-nav-toggle], .ailo-skip, a.ailo-skip,
  .hd_pops, #hd_pop, #ailo-setup-notice, .ailo-ver-notice, #ailo-setup-bar,
  [data-ailo-print-fixed], [data-ailo-print-hide], .ailo-print-hide,
  iframe.ailo-map-frame, #ailo-hd-search,
  /* 게시판(그누보드 기본·아일로 게시판 스킨) */
  .btn_top, .bo_fx, #bo_btn_top, #bo_v_top, #bo_v_bot, .bo_v_nb, #bo_vc_w, #bo_sch, .pg_wrap,
  .ab-vactions, .ab-vnav, .ab-share, .ab-good, .ab-cform, .ab-list-tools, .ab-pager, #bo_list_total,
  /* 회원·검색 보조 */
  .ailo-mem { display: none !important; }

  /* 고정·붙음 헤더가 남는 테마(숨김 대상이 아닐 때)도 첫 쪽 위에만 */
  .ailo-page { padding-top: 0 !important; margin-top: 0 !important; --ailo-sub-offset: 0px !important; }
  [style*="position: sticky"], [style*="position:sticky"] { position: static !important; }

  /* 등장 애니메이션 끝난 상태 */
  [data-aos], .aos-init, .aos-animate { opacity: 1 !important; transform: none !important; visibility: visible !important; }

  /* 본문 */
  .ailo-g5 { background: #fff !important; border: 0 !important; padding: 0 !important; max-width: none !important; }
  a { text-decoration: underline; }
  :is(#bo_v_con, .ailo-co, #ctt_con) a[href^="http"]:not(:has(img))::after {
    content: " (" attr(href) ")"; font-size: 85%; font-weight: 400; word-break: break-all;
  }
  img, svg, video, canvas, figure, table, tr, pre, blockquote, .ailo-co-note, .ailo-co-toc { break-inside: avoid; page-break-inside: avoid; }
  img { max-width: 100% !important; height: auto !important; }
  h1, h2, h3, h4, h5, h6 { break-after: avoid; page-break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  thead { display: table-header-group; }
  table, th, td { border-color: #999 !important; }
  .ailo-co-scroll { overflow: visible !important; }
  .ailo-co-scroll table.ailo-co-table { min-width: 0 !important; }
}
