@charset "UTF-8";

/* ========================================================================== */
/* SUB_PAGE_HEADER */
/* ========================================================================== */
.sub_page_header { background-image: url("../images/works/sub_header_bg.jpg"); }


/* ========================================================================== */
/* CATEGORY TABS (上部タブメニュー) */
/* ========================================================================== */
.product_tabs {
   display: flex;
   justify-content: center;
   gap: 1px;
   width: calc(100% - 60px);
   max-width: 990px;
   margin: 43px auto 0;
   background-color: #F5F6F6;

   position: sticky;      /* 画面上部に張り付かせる設定 */
   top: 100px;            /* 固定ヘッダーの高さ（100px）のすぐ下に配置 */
   z-index: 900;          /* ヘッダー（1000）より下、コンテンツより上に浮かす */
   /*box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);*/ /* 【お好みで】固定時に少し影をつけて立体感を出す */
}

.product_tabs li {
   flex: 1;
   text-align: center;
}

.product_tabs li a {
   display: flex;
   align-items: center;
   justify-content: center;
   height: 60px;
   background-color: #E0E3E3;
   font-size: 18px;
   font-weight: 500;
   color: #2B2B2B;
   transition: all 0.5s ease;
}

/* アクティブなタブ（現在は全埋込型）のオレンジ背景 */
.product_tabs li.active a {
   background-color: #FA5B22;
   color: #FFF;
   opacity: 1;
}

.product_tabs li:not(.active) a:hover {
   background-color: #FA5B22;
   color: #FFF;
   opacity: 1;
}



/* ========================================================================== */
/* MAIN_CONTAINER */
/* ========================================================================== */
main .main_container { margin-top: 0; }



/* ========================================================================== */
/* TAB & INFINITE SCROLL CONTROL (表示・非表示とアニメーション制御) */
/* ========================================================================== */
/* 初期状態はすべてのコンテンツ（親の.tab_content）を非表示にする */
.tab_content {
   display: none; 
   opacity: 0; /* 最初は透明に */
}

/* activeクラスがついているコンテンツだけを表示する */
.tab_content.active {
   display: block; 
}

/* ★タブ切り替え時にJQueryから付与されるフェードイン・浮き上がりクラス */
.tab_content.fade-in {
   animation: fadeInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* カンプ用のキーフレームをそのまま活用・リファイン */
@keyframes fadeInUp {
   from {
      opacity: 0;
      transform: translateY(30px); /* 下から浮き上がってくる距離 */
   }
   to {
      opacity: 1;
      transform: translateY(0);    /* 元の位置にジャストフィット */
   }
}



/* ========================================================================== */
/* MAIN CONTAINER ADJUSTMENT (1500pxの枠内に1340px幅でレイアウト) */
/* ========================================================================== */
.service_section_block {
   max-width: 1340px;
   width: calc(100% - 80px); /* 左右に適切な余白をキープ */
   margin: 0 auto;
}

/*
.service_section_block:not(:first-of-type) {
   margin-top: 100px;
   padding-top: 100px;
   border-top: 1px solid #DCDDDD;
}
*/

/* ========================================================================== */
/* TITLE & LEAD (共通タイトル回りのマージン微調整) */
/* ========================================================================== */
.title_flex {
   display: flex;
   align-items: flex-end;
   gap: 60px; /* タイトルと説明文の間のすき間 */
   margin-bottom: 50px;
}

/* 左側：セクションタイトル（装飾は common.css に任せ、幅の配置のみ指定） */
.title_flex .section_title {
   min-width: 240px;
   flex-shrink: 0;
}

/* 右側：リードテキスト（worksの綺麗な行間と幅計算を移植） */
.title_flex .description {
   font-size: 16px;
   line-height: 2.1;
}


/* ========================================================================== */
/* MAIN CONTENT LAYOUT (左右の均整のとれた横並び) */
/* ========================================================================== */
.service_detail_wrapper {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   gap: 60px;
   margin-bottom: 50px;
}

/* 左側：情報リストエリア */
.service_info_left {
   width: 380px;
   flex-shrink: 0;
}

/* 右側：画像グリッドエリア */
.service_grid_right {
   flex: 1;
   min-width: 0;
}

.service_single_wrapper {
   width: 100%;
   margin-bottom: 40px;
}

/* 小見出し：サイト全体のトーンに合わせたスタイリッシュなオレンジ色の左ボーダー */
.service_sub_title {
   font-size: 19px;
   font-weight: 700;
   padding-left: 12px;
   border-left: 4px solid #FA5B22;
   margin-bottom: 25px;
   line-height: 1.2;
   letter-spacing: 0.02em;
}

/* ========================================================================== */
/* LIST STYLES (施工対象物件：7項目) */
/* ========================================================================== */
.clean_pair_list {
   display: flex;
   flex-direction: column;
   padding: 0;
   margin: 0;
   list-style: none;
   border-top: 1px dashed #DCDDDD;
}

/* 7項目×この高さ ＋ すき間が、右側の画像2段の合計高さと完全に一致するように調整 */
.clean_pair_list li {
   display: flex;
   justify-content: flex-start;
   align-items: center;
   /* 上下パディングを14.5pxに設定（1行の総高さを約46pxに均等化） */
   padding: 14.5px 5px; 
   border-bottom: 1px dashed #DCDDDD;
   box-sizing: border-box;

   font-size: 15px;
   font-weight: 700;
}

.clean_pair_list li .p_type {
   position: relative;
   width: 200px;
   padding-left: 15px;
   flex-shrink: 0;
   box-sizing: border-box;
}

/* 洗練されたオレンジのスクエアドット */
.clean_pair_list li .p_type::before {
   content: "";
   position: absolute;
   left: 0;
   top: 50%;
   transform: translateY(-50%);
   width: 5px;
   height: 5px;
   border-radius: 50%;
   background-color: #FA5B22;
}

/*
.clean_pair_list li .b_name {
   color: #FA5B22;
   font-size: 13px;
   font-weight: 700;
   background-color: #FFF2EE;
   padding: 3px 8px;
   border-radius: 3px;
}
*/


/* ========================================================================== */
/* GRID STYLES */
/* ========================================================================== */

/* -------------------------------------------------------------
   製品一覧：すっきりとした4列正方形グリッド
   ------------------------------------------------------------- */
.modern_product_grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 25px;
}

.modern_product_grid figure {
   margin: 0;
   text-align: center;
}

.modern_product_grid figure img {
   width: 100%;
   aspect-ratio: 1 / 1;
   object-fit: contain;
   border: 1px solid #EEE;
   box-sizing: border-box;
}

.modern_product_grid figcaption {
   margin-top: 8px;
   font-size: 14px;
   line-height: 1.4;
}

/* -------------------------------------------------------------
   所有機械：4列（1列4枚フラット仕様）
   ------------------------------------------------------------- */
.modern_machine_grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 20px;
}

.modern_machine_grid figure { margin: 0; }

.modern_machine_grid figure img {
   width: 100%;
   aspect-ratio: 346 / 366;
   object-fit: cover;
   box-sizing: border-box;
}

.modern_machine_grid figcaption {
   margin-top: 6px;
   font-size: 14px;
   font-weight: 700;
}

/* -------------------------------------------------------------
   施工対象物件：右側 2×2（2列×2段）画像グリッド
   他の記述に絶対に負けないよう、詳細度（力関係）をマックスに引き上げて記述しています。
   ------------------------------------------------------------- */
.modern_works_grid {
   display: grid;
   grid-template-columns: repeat(2, 1fr); /* 強制的に2列に固定 */
   gap: 20px;
}

.modern_works_grid .works_img_box {
   margin: 0;
   width: 100%;
}

.modern_works_grid .works_img_box img {
   width: 100%;
   aspect-ratio: 40 / 27; /* 左側リストと高さを完璧に擦り合わせる黄金比率 */
   object-fit: cover;
   box-sizing: border-box;
}

/* ========================================================================== */
/* BOTTOM VISUAL GALLERY (トップページのトンマナを踏襲した3連フォト) */
/* ========================================================================== */
.service_visual_gallery {
   display: grid;
   grid-template-columns: repeat(3, 1fr); /* 綺麗な3カラム */
   gap: 25px;
}

.service_visual_gallery .gallery_item {
   width: 100%;
   aspect-ratio: 400 / 270;
   overflow: hidden;
}

.service_visual_gallery .gallery_item img {
   width: 100%;
   height: 100%;
   object-fit: cover;
}


/* ========================================================================== */
/* RESPONSIVE DESIGN (モバイル表示) */
/* ========================================================================== */

/* タブレット（1024px以下） */
@media screen and (max-width: 1024px) {
   .service_section_block {
      width: 100%;
      margin: 0 auto;
   }

   .service_section_block .title_flex {
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
      margin-bottom: 40px;
   }

   .title_flex .description {
      max-width: 100%;
      font-size: 15px;
      line-height: 1.8;
   }

   .title_flex .description br.hideSp { display: none;}

   .service_sub_title {
      font-size: 17px;
      letter-spacing: 0;
   }

   .service_detail_wrapper {
      flex-direction: column;
      gap: 40px;
   }
   
   .service_info_left { width: 100%; }
   
   .modern_product_grid { grid-template-columns: repeat(4, 1fr); }
 
   main .main_container .modern_machine_grid, 
   main .main_container .modern_works_grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* スマートフォン（768px以下） */
@media screen and (max-width: 768px) {
    /* 見出しの直線を横幅100%に広げる設定 */
   .title_flex .section_title {
      display: block; /* inline-blockを解除して横いっぱいに広げる */
      width: 100%;
   }
   .title_flex .section_title .en {
      display: block; /* 100%幅で線を端まで伸ばす */
      width: 100%;
      box-sizing: border-box;
   }

   .title_flex .description {
      font-size: 14px;
      line-height: 1.6;
   }

   #installation .service_detail_wrapper { margin-bottom: 15px; }
   
   .service_sub_title { font-size: 15px; }

   .clean_pair_list li { display: block; font-size: 14px; }

   .clean_pair_list li span {
      display: block;
      width: auto;
      padding-left: 15px;
      box-sizing: border-box;
   }

   /* 各種グリッドをスマホに最適な2列にリサイズ */
   .modern_product_grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px 12px;
   }
   
   main .main_container .modern_machine_grid {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 15px 12px !important;
   }
   
   .modern_product_grid figcaption,
   .modern_machine_grid figcaption {
      margin-top: 6px;
      font-size: 12px;
   }

   /* 施工対象物件：右側の画像グリッドを強制的に1列（縦並び）にする */
   main .main_container .modern_works_grid {
      grid-template-columns: 1fr !important; /* 1列に固定 */
      gap: 15px !important; /* 画像と画像の下のすき間 */
      margin-bottom: 0;
   }

   main .main_container .modern_works_grid .works_img_box {
      width: 100% !important;
   }

   main .main_container .modern_works_grid .works_img_box img {
      width: 100% !important;
      /* 縦並びのときに画像が縦長に伸びすぎないよう、スマホで見やすい横長（16:10）に比率を最適化 */
      aspect-ratio: 16 / 10 !important; 
      object-fit: cover !important;
   }

   /* 3連ギャラリーもスマホ時は1列縦並びですっきり見せる */
   .service_visual_gallery {
      grid-template-columns: repeat(1, 1fr);
      gap: 15px;
   }
   
   .service_visual_gallery .gallery_item {
      aspect-ratio: 16 / 10;
   }
}


/* ========================================================================== */
/* RESPONSIVE DESIGN (レスポンシブ対応) */
/* ========================================================================== */
/* タブレットサイズ（1024px以下）: 3カラムに変更 */
@media screen and (max-width: 1024px) {
   .product_tabs {
      width: calc(100% - 40px); /* 左右の余白を少し詰める */
      margin-top: 40px;
   }
   .product_list_wrapper {
      padding: 0 20px;
   }
}

/* スマートフォンサイズ（768px以下）: リストを2カラムに変更 */
@media screen and (max-width: 768px) {
   .product_tabs {
      width: calc(100% - 30px); /* 左右の余白を少し詰める */
      margin-top: 30px;
      top: 60px !important;
   }
   .product_list_wrapper {
      padding: 0 15px;
   }
   .product_tabs li a {
      height: 46px;
      font-size: clamp(10px, 3.125vw, 13px);
   }
}
