/* =====================================
    共通レイアウト
===================================== */

/* ヘッダー　ここから */
header .inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  position: relative;
}

br.pc-br{
  display: none;
}
br.sp-br{
  display: inline;
}

.pc-display{
  display: none;
}
.sp-display{
  display: inline;
}

.logo{
  flex-shrink: 0;
}

.logo img{
  max-width: 250px; 
  max-height: 100px; 
  height: auto;
}

.ac_menu{
  display: flex; 
  background-color: #4CAF50; 
  border-radius: 5px;       
  padding: 8px; 
  width: 45px; 
  height: 41px; 
  align-items: center;
  justify-content: center;
}
.ac_menu span,
.ac_menu span::before,
.ac_menu span::after{
  width: 30px; 
  left: 50%;
  transform: translate(-50%, -50%);
}
.ac_menu span {
  top: 50%;
}
.ac_menu span::before,
.ac_menu span::after {
  transform: translateX(-50%); 
}
.ac_menu span::before{
        top: -7px; 
}
.ac_menu span::after {
        bottom: -7px; 
}
.ac_menu.active span {
  background: transparent;
}
.ac_menu.active span::before {
  top: 0; 
  transform: translateX(-50%) rotate(45deg); 
}
.ac_menu.active span::after {
  bottom: 0; 
  transform: translateX(-50%) rotate(-45deg);
}

/* メニュー本体 */
header nav ul.navi{
  display: none;
  flex-direction: column;
  position: fixed !important;
  top: 0;
  right: -100%;
  width: 50%;
  height: 100%;
  background: #fff;
  box-shadow: -5px 0 15px rgba(0,0,0,0.2);
  z-index: 9999 !important;
  transition: right 0.3s ease;
  padding: 2em 2em;
  margin: 0;
}

  header nav ul.navi.active {
    right: 0 !important;
    display: flex !important;
  }

  header nav ul.navi li {
    width: auto;
    border-bottom: 1px solid #eee;
    padding: 0.8em 0;
    margin: 0;
  }

  header nav ul.navi li:last-child {
    border-bottom: none;
  }

  header nav ul.navi a {
    display: inline-block;
    text-decoration: none;
    color: #333;
    font-size: 1.2em;
  }

  header nav ul.navi a:hover {
    color: #0066cc;
  }

/* 背景オーバーレイ */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9000 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .menu-overlay.active {
    display: block;
    opacity: 1;
  }

/* 他要素との干渉防止 */
  header, main, footer, .mainimage, .slider {
    position: static !important;
    z-index: auto !important;
  }

  /* =====================================
     PCの斜線区切りを無効化
  ===================================== */
  header nav ul.navi li + li::before {
    content: none;
  }

  /* =====================================
     項目内容：
  ===================================== */
#content h2 {
    margin: 22px auto;
  }


  /* =====================================
     フッダー：
  ===================================== */
/* #inner と #copy の幅を画面いっぱいに広げる */
#inner,#copy {
    max-width: 100%; /* 最大幅を解除または画面幅に合わせる */
    padding: 0 10px; /* 画面端に少し余白を設定 */
    box-sizing: border-box; 
  }

  /* コピーライト部分のレイアウトを縦並び（順序反転）に変更 */
#copy {
    display: flex; 
    /* 要素を縦に並べ、順序を逆転させる（サイトポリシー→コピーライト） */
    flex-direction: column-reverse; 
    /* 横方向の中央寄せ */
    align-items: center; 
    /* スマホで横並びにならないよう、justify-content: space-between; を上書き */
    justify-content: center; 
    padding: 10px;
  }

  /* #copy 内の p 要素 */
#copy p{
    width: 100%; /* 幅を画面いっぱいにして縦並びを強調 */
    margin: 5px 0; /* 上下に間隔を設定 */
    text-align: center;
}

  /* 個別の左右寄せクラスをスマホでは中央寄せに上書き */
#copy p.textLeft,#copy p.textright{
    text-align: center;
}
    
  /* ページトップボタンの位置調整 */
#toTop{
    bottom: 10px;
    right: 10px;
    width: 40px; 
    height: 40px;
}

/* =====================================
    共通レイアウト　ここまで
===================================== */

/* =====================================
    トップページ　ここから
===================================== */
#index01{
  margin: 0 3px;
}

#index01 h2{
  margin: 20px auto;
  font-size: 22px; 
  font-family: "din-2014-narrow", sans-serif; 
  font-weight: 600; 
  letter-spacing: 0.3em;
}
#index01 p {
  margin: 15px 10px;
  font-size: 16px;
  line-height: 55px;
}
#index01 p br {
    display: none; /* <br>タグを非表示にして改行を無効にする */
}

#index01 .scroll {
    margin: 50px 0;
    height: 150px;
    overflow: hidden;
    position: relative;
}
/* 1. コンテナ設定 - 縦並びに変更 */
#index02 .network{
    display: flex;
    flex-direction: column; /* 縦並び (画像の後にテキストが来る) */
    gap: 20px;
    align-items: center;    /* 横方向中央揃え */
    margin: 20px auto;
}


/* 3. PCで設定した横方向の間隔をリセット */
#index02 .image-box {
    padding: 10px auto;
    margin-top: 0;
}

#index02 .network img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 10px auto;
}

#index02 .network p{
  margin: 20px 15px;
  text-align: center;
  font-size: 16px;
  line-height: 55px;
}

  /* 2. 各アイテムの幅と間隔 - 100%幅にし、縦方向の余白を設定 */
#index02 .item{
    width: 100%; /* 幅いっぱいに広げる */
}

/* === 1. 製品リスト（.product-list*）の高さと間隔の調整 === */
    
    #index02 .product-list1,
    #index02 .product-list2,
    #index02 .product-list3,
    #index02 .product-list4 {
        /* モバイルでは padding を大幅に減らす */
        /* コンテンツを収める最小限の高さに調整（例: 80px） */
        padding: 60px 0px; 
        
        /* 背景画像を画面幅いっぱいに広げ、潰れを防ぐ */
        background-size: 100% 80%; 
    }
    
    /* === 2. コンテンツ (.item) のレイアウト調整（横並び維持） === */
    
    #index02 .item {
          display: flex;
          justify-content: center;
          gap: 10px; 
          align-items: center; 
    
          /* 修正: width: 100%; を削除/コメントアウト */
          /* width: 100%; */
            margin-left: 0;

          /* 左右のパディングは維持（左揃えの開始位置） */
          padding: 0 7px; 
          box-sizing: border-box;
}
    
    /* === 3. フォントサイズと間隔の調整 === */

    /* h3 のフォントサイズをモバイル向けに縮小 */
    #index02 .item h3 {
        font-size: 16px; /* PCの 40px から大幅に縮小 */
        letter-spacing: normal;
        
        /* PCの margin-left: -150px はモバイルでは不要なためリセットし、
           navとの間隔も縮小 */
        margin-left: 0; /* nav との間隔を狭くする */
        
        /* h3が2行になる場合を考慮し、左揃えを維持 */
        text-align: left;
    }

#index02 .product-list3 .item h3{
  letter-spacing: 5px;
}

/* li のフォントサイズをモバイル向けに縮小 */
    #index02 .item nav ul li {
        font-size: 14px; /* PCの 30px から大幅に縮小 */
        line-height: 1.5;
        
        /* PCの margin-left: 150px はモバイルでは不要なためリセット */
        margin-left: 0.4em; 
        
        letter-spacing: normal;
        text-align: left;
    }
    
    /* リストマーカーの表示を調整 */
    #index02 .item nav ul {
        list-style-type: disc; /* マーカーを維持する場合は disc に */
        padding-left: 1em; /* マーカー分のパディングを確保 */
    }

/* =====================================
    トップページ　ここまで
===================================== */

/* =====================================
    会社概要　ここから
===================================== */

#company01 {
        /* 子要素 (画像とテキストボックス) を縦に並べる */
        flex-direction: column; 
        /* 横並びの justify-content: center はそのまま残し、
           縦方向の中央寄せを解除 (通常は必要ない) */
        align-items: center; 
        /* 横方向の padding を追加して端に寄せすぎないようにする */
        padding: 0 15px; 
        margin: 20px auto; /* 縦の余白を調整 */
        gap: 0;
    }

    #company01 .item {
        /* スマホでは幅いっぱいに広がるように設定 */
        width: 100%;
        /* flex: none;  */ /* width: 100% で代替 */
    }

    /* 画像ボックスの調整 */
    #company01 .image-box {
        /* 横の padding をリセットまたは調整 */
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 20px; /* テキストとの間に縦のスペース */

        /* 画像ボックス内の画像配置調整はそのまま維持 (中央寄せ) */
        justify-content: center;
    }
    
    /* 画像の調整 */
    #company01 img {
        /* PCでの max-height の制限を解除または緩和 */
        max-height: 400px; /* 画像の大きさをスマホに合わせて調整 */
    }

    /* テキストボックスの調整 */
#company01 .text-box {
  margin: 0 auto;
  /* 横の padding をリセットまたは調整 */
  padding-left: 0;
  padding-right: 0;
        /* スマホでは挨拶文のテキストも中央寄せにする場合 */
        /* text-align: center; */
}

    /* その他のテキスト調整 (必要に応じて) */
#company01 .text-box h2{
        text-align: center; /* タイトルと挨拶文を中央寄せにする例 */
}
#company01 .text-box p{
  text-align: center; /* タイトルと挨拶文を中央寄せにする例 */
  font-size: 16px;
  margin: 0 0.5em;
}
#company01 .text-box br.pc-br{
  display: none;
}
#company01 .text-box p.bold{
  margin-top: 30px;
  margin-right: 15px;
  text-align: right;
  font-size: 14px;
  font-weight: bold;
}

    /* 社長名の右寄せはそのまま維持 */
    #company01 .text-box p.bold{
        text-align: right;
    }

#company02 .company02-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

#company02 table tbody tr th{
    text-align-last: left;
}

#company02 table tbody tr{
  display: flex;
  flex-direction: column;
}

#company02 .company02-container .history table tbody tr th{
    text-align-last: left;
    padding-left: 14px;
}

/* company03-container の設定: 縦並びにする */
#company03 .company03-container {
      display: flex;
      flex-direction: column;
      padding: 0 15px; 
    }

    /* 2. 各営業所情報 (.item) の幅: 画面幅いっぱいに広げる */
    .company03-container .item {
        width: 100%; /* 幅いっぱいに広げる */
        /* PCで設定した width: 32% をここで上書きします */
        margin-bottom: 30px; 
    }

    /* 3. 画像と地図のラッパー（.media-row）も縦並びに戻す */
    .company03-container .media-row {
        display: flex;
        flex-direction: column; /* ★★★ 縦並びに戻す ★★★ */
        /* PCで設定した justify-content: space-between などはここで不要なら上書きしない */
        margin: 0;
    }

    /* 4. 画像と地図のラッパーの幅を100%にする */
    .company03-container .img-wrapper,
    .company03-container .iframe-wrapper {
        width: 100%; /* ★★★ PCで設定した width: 48% をここで上書き ★★★ */
        flex-shrink: 1;
    }

    /* 5. 画像と地図の潰れ防止（アスペクト比維持）をスマホ用に調整 */
    .company03-container .iframe-wrapper {
        position: relative; 
        /* 幅100%に対して、例えば4:3の高さ（75%）を確保 */
        padding-top: 75%; /* スマホ画面で適切なアスペクト比を設定 */
        height: 0; 
        overflow: hidden; 
        margin-bottom: 15px;
    }
    /* iframe 本体の設定はそのまま */
    .company03-container .iframe-wrapper iframe {
        position: absolute; 
        top: 0;
        left: 0;
        width: 100%; 
        height: 100%; 
    }

/* =====================================
    会社概要　ここまで
===================================== */

/* =====================================
    取扱商品　ここから
===================================== */
#products #content h3{
  margin: 0 auto;
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 0.1em; 
}
#products #content h4{
  margin: 15px auto;
  color: #ffffff;
  font-size: 18px;
  letter-spacing: 0.3em;
  text-align: center; 
}
#products #content p{
  font-size: 11px;
}

#products #content p.black{
  margin: 0 5px;
  color:  #333;
  font-size: 14px;
}

.product-container{
  margin: 70px auto;
}

/* product-list の設定を縦並び（通常のブロック要素）に変更 */
    .product-list {
        /* FlexboxやGridを解除し、デフォルトのブロック要素（縦並び）にする */
        display: block; 
        
        /* もしFlexboxで横並びになっている場合は、flex-direction: column; に変更する方法もあります */
        /* display: flex; */
        /* flex-direction: column; */
        
        /* 中央寄せを解除（または左寄せに設定） */
        justify-content: flex-start; 
        align-items: flex-start;
        
        /* 左右のパディング調整（画面端との余白） */
        padding: 0 15px; 
    }

    /* 各カテゴリブロック (.item) のスタイルを調整 */
    .product-list .item {
        /* 必要に応じて、各ブロックの下部に十分なマージンを設定 */
        margin-bottom: 30px; 
        /* PC版で設定されている固定幅を解除し、画面幅いっぱいに広げる */
        width: 100%; 
    }

    .product-icon {
    display: grid;
    /* アイコンの最小幅を100pxに設定し、画面幅に応じて自動で折り返し・拡大縮小する */
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
    gap: 10px; 
}

#space-create .product-list .item:first-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}
#space-create .product-list .item:last-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}

#energy-saving .product-list .item:first-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}
#energy-saving .product-list .item:nth-child(2) .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
}

#energy-saving .product-list .item:last-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}

#safety .product-list .item:first-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}

#efficiency .product-list .item:first-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}
#efficiency .product-list .item:last-child .product-icon{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 1行に3列作成 */
}

/* =====================================
    取扱商品　ここまで
===================================== */

/* =====================================
    関連会社　ここから
===================================== */
/* コンテナの幅を調整し、PC版の広いパディング (padding: 0 120px;) を上書きする */
#affiliated01 .container {
    /* PC版のmax-widthを解除し、幅を画面いっぱいに広げる */
    max-width: 100%;
    /* 左右のパディングを画面端から適度に確保 (例: 15px) */
    padding: 0 15px;
    margin: 20px auto;
}

/* 各関連会社アイテム (.item) を縦に積み、幅を画面いっぱいにする */
#affiliated01 .container .item {
    width: 100%;      /* 幅を画面幅いっぱいに設定 */
    margin: 15px 0;   /* 縦の余白を確保 */
    float: none;      /* floatが使われていた場合の解除 */
    display: block;   /* ブロック要素として縦積みさせる */
}

/* 住所などのテキストボックスのパディングを調整 */
#affiliated01 .text-box {
    padding: 15px;
    text-align: center;
}

#affiliated01 h2 ruby{
  /* ルビテキストをベーステキストの中央に揃える */
  ruby-align: center; 
  /* 親文字とルビのフォントサイズを調整する場合（任意） */
  /* font-size: 1em; */ 
}

#affiliated #content h4{
  font-size: 18px;
}
/* テキストサイズをモバイルで見やすいように調整（必要に応じて） */
#affiliated01 p {
    font-size: 0.9rem;
}

#affiliated01 br.sp-br{
    display: inline; /* もしくは inline, initial など */
  }

/* =====================================
    関連会社　ここまで
===================================== */


/* =====================================
    サポート　ここから
===================================== */
#support01 h3,#support01 p{
  text-align: center;
}

/* フォーム全体（#support02）の幅を画面いっぱいに広げる */
#support02 {
    max-width: 100%;
    width: 100%; /* 左右に少し余白を持たせる */
}

.form-row {
    /* justify-content: center; はそのまま維持 */
    width: 100%;
    display: inline;
    margin: 0;
}

.form-group {
    display: inline;
    width: 100%; 
    /* max-width を設定して、小さな画面では幅を制限する */
    max-width: 450px; 
    /* 中央寄せの感覚を出すため、左右のマージンを auto に */
    margin-left: auto;
    margin-right: auto;
}

/* .form-group.full-width: 全幅の要素も同じく親要素の幅いっぱいに */
.form-group.full-width {
    width: 100%;
    max-width: 450px; 
    margin-left: auto;
    margin-right: auto;
}

/* input/textarea: 入力欄自体がはみ出さないように調整 */
#mailformpro input[type="text"],
#mailformpro input[type="email"],
#mailformpro input[type="tel"],
#mailformpro textarea {
    box-sizing: border-box; /* paddingやborderを含めてwidthを計算 */
    width: 100%; /* 親要素の幅いっぱいに広げる */
}

.button{
  display: block;
}

    #confirm_content h2{
    font-size: 32px;
  }
#confirm_content h2 br.sp-br{
    display: inline; /* もしくは inline, initial など */
}
.data-row{
  display: block;
}
.data-label,
.data-value {
  width: 100%;
  padding: 5px 0;
}
.data-label {
  border-top: 1px solid #eee;
}

.buttons{
  text-align: center;
  margin-top: 40px;
}

.buttons button {
  padding: 10px 30px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  font-weight: bold;
}

.confirm-button{
  margin: 40px auto 20px auto;
}
.reset-button,.back-button{
  margin: 40px auto 20px auto;
}
/* =====================================
    サポート　ここまで
===================================== */

/* =====================================
    採用情報　ここから
===================================== */
#recrut #content h3{
  text-align: center;
}

#recrut p{
  margin: 0 6px;
}

/* =====================================
    採用情報　ここまで
===================================== */