@charset "utf-8";
/* CSS Document */

/* =========================================================
   印刷用スタイルシート（修正版）
   ========================================================= */

@media print {

  /* ---- ページ設定（A4縦） ---- */
  @page {
    size: A4 portrait;
    margin: 15mm 12mm;
  }

  /* ---- ベースリセット ---- */
  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* 外側ラッパーの余白をゼロに */
  #page,
  .site,
  .custom-site-main,
  .content-area {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ---- 全体の文字サイズ・行間 ---- */
  body {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  p,
  li {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  ul,
  ol {
    padding-left: 1.4em;
  }

  .screen-only {
    display: none !important;
  }

  /* ---- ヘッダー・ナビ・パンくずなど非表示 ---- */
  header,
  nav,
  .site-header,
  .custom-site-header,
  .custom-header,
  .custom-global-nav,
  .global-nav,
  .custom-header-nav,
  .header-nav,
  .breadcrumb,
  .breadcrumbs,
  .custom-breadcrumbs,
  .custom-header-inner {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: auto !important;
  }

  /* ---- サイドバー ---- */
  .sidebar,
  .custom-site-sidebar,
  .widget-area,
  .custom-sidebar,
  .hp-side,
  .hp-aside,
  .l-sidebar {
    display: none !important;
  }

  /* 予約ボタンなどの固定ボタン */
  .page-top,
  .pagetop,
  .to-top,
  .fixed-buttons,
  .fixed-cta,
  .tel-button,
  .reservation-button,
  .custom-floating-banner,
  .custom-fixed-btn,
  .custom-fixed-btn-list,
  .custom-fixed-btn-list li,
  .custom-reserve-btn,
  .custom-tel-btn,
  #circle-pagetop,
  #page-top {
    display: none !important;
  }

  /* ---- メインコンテンツを 1 カラム化 ---- */
  #primary,
  #main,
  .custom-site-main,
  .custom-entry-content,
  .entry-content,
  .content-area,
  .clinic-inner-page {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  main {
    margin-top: 0 !important;
  }

  /* ---- 見出し ---- */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  /* ---- ページタイトル (#pagetitle) の高さ調整 ---- */
  #pagetitle,
  #pagetitle .custom-hero-wrapper {
    background: none !important;
    background-image: none !important;
    padding: 4mm 0 !important;
    margin: 0 0 4mm !important;
    min-height: auto !important;
  }

  #pagetitle h1 {
    display: block !important;
  }

  /* ---- 画像：最大 50% ---- */
  .custom-entry-content img,
  .custom-site-main img,
  .clinic-inner-page img,
  img.alignleft,
  img.alignright,
  img.aligncenter {
    max-width: 50% !important;
    height: auto !important;
    page-break-inside: avoid;
  }

  img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  /* ---- テーブル ---- */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
  }

  th,
  td {
    padding: 4px 6px !important;
    border: 1px solid #ccc !important;
    vertical-align: top;
  }

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  /* ---- フッター（ロゴ以外非表示） ---- */

  /* フッター本体の見た目を軽く */
  .custom-site-footer,
  .site-footer,
  .custom-footer-inner,
  footer {
    margin-top: 4mm !important;
    padding: 2mm 0 !important;
    min-height: auto !important;
    border-top: 1px solid #ccc !important;
    background-color: #fff !important;
  }

  /* いったんフッター内の全要素を非表示に */
  .custom-site-footer *,
  .site-footer *,
  .custom-footer-inner *,
  footer * {
    display: none !important;
  }

  /* .print-footer-logo だけ再表示（入れ子でも効くように） */
  .print-footer-logo,
  .print-footer-logo * {
    display: block !important;
  }

  .print-footer-logo {
    text-align: right !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-footer-logo img {
    max-width: 140px !important;
    height: auto !important;
    float: right;
  }

  /* 検索窓を念のため非表示 */
  .footer-search {
    display: none !important;
  }

  /* スクロール無効化 */
  body {
    overflow: visible !important;
  }
}
