/* ===================================================================
Print CSS
印刷用スタイルシート
=================================================================== */

/* ------------------------------------------------
  基本設定
------------------------------------------------ */
@media print {
    /* ページ設定 */
    @page {
        margin: 15mm;
    }
    
 
    .sidebar,
    div.sidebar,
    .cont_wrap .sidebar,
    .cont_wrap > .sidebar,
    .cont_wrap > div.sidebar,
    .site_wrap .sidebar,
    main .sidebar,
    [class*="sidebar"],
    aside.sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
        opacity: 0 !important;
        flex: 0 0 0 !important;
        flex-basis: 0 !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        order: 9999 !important;
    }
    
    /* サイドバー内のすべての要素も非表示 */
    .sidebar *,
    .contactbox,
    .contactbox *,
    .sidebnr,
    .sidebnr *,
    .sidebnr_item,
    .sidebnr_item *,
    .sidebar_description,
    .sidebar_description *,
    .btn_flat,
    .btn_flat * {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* cont_wrap内の.contents以外のすべての要素を非表示 */
    .cont_wrap > *:not(.contents):not(.contents_access) {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* 全体的なリセット */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    

    .drawer,
    .navbar_toggle,
    .menu,
    #page-top,
    #tel_box {
        display: none !important;
    }
    
    /* ヘッダー・フッターの印刷用スタイル調整 */
    header {
        position: relative !important;
        top: 0 !important;
        background: #fff !important;
        border-bottom: 1px solid #ccc !important;
    }
    
    nav {
        background: #fff !important;
    }
    
    footer,
    .footer {
        background: #fff !important;
        border-top: 1px solid #ddd !important;
    }
    

    .site_wrap {
        margin-top: 20px !important;
        margin-bottom: 20px !important;
        padding: 0 !important;
    }
    
    /* コンテンツラッパーの調整 */
    .cont_wrap {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        flex: none !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }
    
    /* コンテンツエリアを全幅に */
    .contents,
    .contents_access,
    .cont_wrap > .contents {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        flex: none !important;
    }
    
    /* パンくずリスト */
    .breadcrumb {
        margin-bottom: 20px !important;
        padding: 0 !important;
    }
    
    /* ページタイトル */
    .page_title {
        background: #f5f5f5 !important;
        padding: 10px 15px !important;
        margin-bottom: 20px !important;
        page-break-after: avoid;
    }
    
    /* セクションブロック */
    .section_block {
        margin-bottom: 30px !important;
        page-break-inside: avoid;
    }
    
    .section_block h2 {
        page-break-after: avoid;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 8px !important;
        margin-bottom: 15px !important;
    }
    
    /* テーブル */
    table {
        page-break-inside: avoid;
        border: 1px solid #000 !important;
    }
    
    th, td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
    
    th {
        background: #f5f5f5 !important;
    }
    
    /* 画像 */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* SST工法の特徴セクション */
    .sst_feature {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .sst_feature_image {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .sst_feature_text {
        width: 100% !important;
    }
    
    /* 施工方法ステップ */
    .sst_step {
        page-break-inside: avoid;
        margin-bottom: 25px !important;
    }
    
    .sst_step_title {
        page-break-after: avoid;
        border-left: 3px solid #000 !important;
        padding-left: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .sst_step_content {
        display: block !important;
    }
    
    .sst_step_image {
        width: 100% !important;
        margin-top: 15px !important;
        page-break-inside: avoid;
    }
    
    .sst_step_text {
        width: 100% !important;
    }
    
    /* リンク */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    /* リンクのURLを表示（オプション） */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 80%;
        color: #666 !important;
    }
    
    a[href^="/"]:after {
        content: " (https://www.sstkyokai.co.jp" attr(href) ")";
        font-size: 80%;
        color: #666 !important;
    }
    
    /* 内部リンク（アンカーリンク）はURLを表示しない */
    a[href^="#"]:after {
        content: "";
    }
    
    /* ボタン */
    button,
    .btn_detail,
    .btn_flat {
        display: none !important;
    }
    
    /* ニュース関連 */
    .news_content {
        display: block !important;
    }
    
    .news_image {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .news_text {
        width: 100% !important;
    }
    
    /* アクセス情報 */
    .access_map {
        display: none !important;
    }
    
    /* 資料グリッド */
    .materials_grid {
        display: block !important;
    }
    
    .materials_grid .material_item {
        width: 100% !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
    
    /* 改ページ制御 */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
}
