/* ------------------------------------------------------------------
 * 인쇄용 (디자인 평가 63 · 97 · 100)
 *
 * 왜 필요한가
 *   이 회사의 영업은 학회와 전시회다. 업자는 제품 페이지를 출력해서 들고 다닌다.
 *   지금 그대로 인쇄하면 메뉴·배너·푸터가 함께 나오고, 종이 두세 장에 걸쳐
 *   정작 필요한 스펙표가 잘린다.
 *
 * 하는 일
 *   화면에서만 쓰는 것(메뉴·배너·언어 전환·버튼)을 빼고,
 *   스펙과 사진만 A4 한 장에 들어가게 한다.
 *   주소를 모르는 종이가 되지 않도록 회사명·연락처·주소는 남긴다.
 *
 * 이 파일은 화면 표시에 영향을 주지 않는다. @media print 안에만 있다.
 * ------------------------------------------------------------------ */

@media print {

  /* 종이 여백. 위아래는 머리말 자리를 남긴다. */
  @page { size: A4; margin: 14mm 12mm; }

  /* 배경색·그림자는 잉크만 먹고 도움이 안 된다 */
  * {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  /* ── 종이에서 뺄 것 ── */
  .site-head,            /* 상단 로고·전화·언어 전환 */
  .topmenunew,           /* 메인 메뉴 */
  .m-nav, .m-nav-sec,    /* 모바일 메뉴 */
  .snav,                 /* 왼쪽 사이드 메뉴 */
  .location,             /* HOME > ... 위치 표시 */
  .head-tel-hours,
  #footer_menu,
  .footer-copy,
  .bx-controls,          /* 슬라이더 화살표·점 */
  .bx-pager,
  .btnType1, .btn-write, /* 화면용 단추 */
  button,
  input[type=submit],
  form,
  script, iframe, video, .lightbox {
    display: none !important;
  }

  /*
   * 배너는 뺀다. 종이 맨 위 3cm 를 차지하면서 아무 정보도 주지 않는다.
   * 제품 사진은 남긴다 — 그것이 스펙의 일부다.
   * 그림만 감추면 그 자리(<td>·<tr>)가 남아 종이 위쪽이 텅 빈다. 줄째로 없앤다.
   */
  table.content-card:not(.after-hero) > tbody > tr:first-child { display: none !important; }
  .main-hero { display: none !important; }   /* 화면 폭 배너(상자 밖)도 같은 이유로 뺀다 */
  img[src*="/banners/"] { display: none !important; }

  /*
   * 상단 머리말이 들어 있던 자리.
   * 안의 것을 감춰도 표의 높이(height="70", height="100%")가 남아 빈 종이가 된다.
   * 높이 값으로 집으면 그 숫자가 바뀔 때마다 인쇄가 조용히 깨진다.
   * 머리말을 담는 표라는 것만 보고 집는다.
   */
  body > table[height], body > table[height] > tbody > tr,
  body > table[height] > tbody > tr > td { height: auto !important; }
  table[bgcolor="#FFFFFF"][height], .nyt-sticky { display: none !important; }
  .nyt-sticky { position: static !important; }

  /*
   * 글자는 전부 검게.
   * 화면에서 초록 바탕에 흰 글자로 쓰던 제목("Information", "제품 사양" 등)이
   * 배경을 걷어내면 흰 종이에 흰 글자가 되어 사라진다. 실제로 그랬다.
   */
  body, p, div, span, td, th, li, strong, b, em, h1, h2, h3, h4, a {
    color: #000 !important;
  }

  /*
   * 화면 배치용 표의 테두리를 지운다.
   * 이 사이트는 <table> 로 화면을 짜 놓아서, 그냥 두면 빈 상자가 잔뜩 그려진다.
   * 스펙표의 테두리는 아래에서 따로 살린다.
   */
  table, tr, td, th { border: 0 !important; }
  td:empty, th:empty { display: none !important; }

  /* ── 폭을 종이에 맞춘다 ── */
  /* 화면은 1014px 로 고정돼 있다. 그대로 인쇄하면 오른쪽이 잘린다. */
  table, td, div, .content-card {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
  }
  table.content-card { border: 0 !important; }
  .sub-back { padding: 0 !important; }

  /* ── 제목 ── */
  .stit, .stit h1, h1 {
    font-size: 15pt !important;
    font-weight: 700;
    color: #000 !important;
    border-bottom: 1.2pt solid #000;
    padding-bottom: 3mm;
    margin: 0 0 5mm;
  }
  h2 { font-size: 12pt !important; margin: 5mm 0 2mm; }
  h3 { font-size: 11pt !important; margin: 4mm 0 2mm; }

  /*
   * ── 스펙표 (평가 63) ──
   * 업자가 들고 다니는 것이 이 표다. 잘리면 안 된다.
   */
  table { border-collapse: collapse !important; page-break-inside: auto; }
  tr    { page-break-inside: avoid; page-break-after: auto; }
  thead { display: table-header-group; }   /* 여러 장이 되면 머리글을 다시 찍는다 */
  /*
   * 스펙표에만 테두리를 준다.
   * 화면 배치용 표와 데이터 표를 가르는 표시가 필요해서 spec-table 을 붙였다.
   */
  table.spec-table th, table.spec-table td {
    border: 0.4pt solid #666 !important;
    padding: 1.6mm 2.4mm !important;
    font-size: 9.5pt !important;
  }
  table.spec-table th { font-weight: 700; }
  table.spec-table { width: 100% !important; }

  /* 제품 본문 안의 표(옛 파일)도 셀에 배경색이 있으면 데이터 표로 본다 */
  td[bgcolor="#f8f8f8"], td[bgcolor="#ffffff"], td[bgcolor="#FFFFFF"] {
    border: 0.4pt solid #999 !important;
    padding: 1.4mm 2.2mm !important;
    font-size: 9.5pt !important;
  }

  /* 초록 제목 줄은 아래에 선만 남긴다 */
  td[bgcolor="#2E7A6E"] {
    border: 0 !important;
    border-bottom: 1pt solid #000 !important;
    padding: 0 0 1.2mm !important;
  }
  td[bgcolor="#2E7A6E"] strong { font-size: 11pt !important; font-weight: 700; }

  /* 화면에서 표 안에서만 스크롤되던 것을 종이에서는 다 펼친다 */
  .spec-scroll, .tbl-scroll, [style*="overflow-x"] {
    overflow: visible !important;
    width: auto !important;
  }

  /*
   * 그림을 감추지 않고 높이를 묶는다.
   *
   * 처음에는 용도 소개 그림을 감췄는데, 그러면 "Applications" 제목만 남고
   * 그 아래가 비어 종이가 이상해진다. 감추는 대신 크기를 제한한다 —
   * 내용은 남고, 그림 하나가 종이 한 장을 통째로 먹는 일도 없다.
   */
  img { max-height: 88mm !important; max-width: 100% !important; height: auto !important; }
  img[src*="line.jpg"] { display: none !important; }   /* 화면 장식용 선 */

  /* 제목과 그 아래 표가 갈라지지 않게 */
  h1, h2, h3 { page-break-after: avoid; }
  img { page-break-inside: avoid; }

  /* ── 링크 ── */
  a { color: #000 !important; text-decoration: none !important; }
  /*
   * 본문 링크의 주소를 괄호로 적어 준다. 종이에서는 누를 수 없기 때문이다.
   * 다만 메뉴·이미지 링크까지 적으면 지저분해지므로 본문 글 안의 것만.
   */
  .tttext a[href^="http"]:after,
  .ttext a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #444;
  }

  /* ── 종이에만 나오는 것 ── */
  /*
   * 잘라 낸 종이가 어디서 왔는지 모르면 안 된다 (평가 100).
   * 회사명·연락처·주소·출력한 날을 맨 아래에 한 줄로 남긴다.
   */
  .print-foot { display: block !important; }
  .biz-info {
    display: block !important;
    margin-top: 6mm;
    padding-top: 2.5mm;
    border-top: 0.4pt solid #999;
    font-size: 8.5pt !important;
    color: #333 !important;
  }
}

/* 화면에서는 인쇄용 꼬리말을 감춘다 */
.print-foot { display: none; }
