@charset "utf-8";

/* ========================================
  スマートフォン用 (最大幅 768px)
======================================== */
@media screen and (max-width: 768px) {

    br {
        display: none;
    }

  /* --- 1. ヘッダー・ロゴ調整 --- */
  #headerArea {
    height: 100px !important; /* PCの120pxから縮小 */
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 20px solid rgba(58, 83, 2, 1); /* 上部の飾り線 */
  }

  #headerArea h1 img {
    height: 42px !important; /* ロゴをスッキリしたサイズに */
    width: auto;
  }

  /* --- 2. ハンバーガーメニュー (ボタン) --- */
  .nav-button {
    display: block;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 2000;
    cursor: pointer;
  }

  .nav-button span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    position: absolute;
    transition: 0.3s ease-in-out;
  }

  .nav-button span:nth-child(1) { top: 0; }
  .nav-button span:nth-child(2) { top: 10px; }
  .nav-button span:nth-child(3) { bottom: 0; }

  /* 開閉時のアニメーション */
  .nav-button.active span:nth-child(1) { transform: translateY(10px) rotate(-45deg); }
  .nav-button.active span:nth-child(2) { opacity: 0; }
  .nav-button.active span:nth-child(3) { transform: translateY(-10px) rotate(45deg); }

  /* --- 3. ナビゲーションメニュー (全画面) --- */
  #headerArea nav {
    display: block !important;
    position: fixed;
    top: 0;
    right: -100%; /* 初期は隠す */
    width: 100%;
    height: 100vh;
    background-color: rgba(23, 34, 0, 0.98); /* 深い緑 */
    z-index: 1500;
    transition: 0.4s ease-in-out;
    padding-top: 100px;
  }

  #headerArea nav.active {
    right: 0 !important;
  }

  #headerArea nav ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 30px;
  }

  #headerArea nav ul li {
    margin: 0 !important;
  }

  #headerArea nav ul li a {
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
  }

  /* 背景の暗幕 */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 1400;
    display: none;
  }
  .nav-overlay.active {
    display: block;
  }

  /* --- 4. 共通設定：左右20px余白の適用 --- */
  /* 全幅背景を持つ要素以外、主要なコンテンツに一括適用 */
  .leadArea div,
  #business .layoutbox,
  #case .heading03,
  .columnbox,
  .dlist,
  .formbox,
  .footerlogo,
  .footertext,
  .heading02 {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
  }

  .txtimg {
    padding: 0 10px;
  }



  /* --- 5. 個別セクション調整 --- */

  /* リードエリア */
  .leadArea div {
    padding: 3rem 0;
  }
  .leadArea p {
    text-align: left;
    font-size: 1rem;
  }

  /* 事業案内（横並び解除） */
  #business {
    padding: 50px 0 0;
  }
  #business .layoutbox {
    display: block !important;
  }
  #business .rightimgbox {
    margin-top: 30px;
  }

  /* スライド画像（アスペクト比維持） */
  .slideimg ul li {
    width: 280px;
    flex-shrink: 0;
  }
  .slideimg ul li img {
    height: auto !important;
    object-fit: contain;
  }

  /* 背景ボックス（figure 2カラム化） */
  .bgbox {
    margin: 50px 20px;
    padding: 20px;
  }
  .bgbox p {
    margin-bottom: 20px;
  }
  .bgbox div {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 0 !important;
  }
 
  #case .heading03 {
    margin: 30px 0 20px;
    font-size: 1.5rem;
    text-align: left;
  }

  #case .heading03::after {
    width: 70%; /* 画面幅分長くする */
    height: 8px; /* 装飾の厚み */
  }

#case figcaption p {
  margin: 0;
}

/* --- 6. 詳細を見るボタン (丸ボタン) --- */
#case figcaption div a {
    font-size: 0.8rem;
}
  /* 施工例（1列化） */
  .columnbox {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

#company {
  padding: 50px 0;
}

  /* お知らせ・リスト（縦並び・ボーダー解除） */
  .dlist {
    margin: 0 auto;
  }
  .dlist dl {
    display: block !important;
    padding: 10px;
  }
  .dlist dt, .dlist dd {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  .dlist dt {
    font-weight: bold;
    margin-bottom: 5px !important;
  }

#contact {
  padding: 0;
  margin: 0 0 100px;
}

  /* フォーム（左右余白・縦並び） */
  .formbox {
    margin: 20px;
    padding: 20px !important;
  }
  .formlist {
    margin-bottom: 20px;
  }
  .formlist dl {
    display: block !important;
  }
  .formlist dt, .formlist dd {
    width: 100% !important;
    display: block;
    margin-left: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0;
  }
  .formlist dd {
    margin-bottom: 15px;
  }
  .formbox div button {
    width: 100%;
  }

  /* フッター */
  .footerlogo, .footertext {
    margin-left: 0 !important;
  }

  /* --- 6. ページトップボタン --- */
  #pageTop {
    right: 10px !important; /* さらに右寄せ */
    bottom: 20px !important;
    text-align: right;
  }
  /* 確認画面のボタンスタイル */
.form-btns {
    display: block;
}
.form-btns button {
    margin: 10px 0;
    padding: 10px 30px;
}
}

/* PC用 (769px以上) で隠す要素 */
@media screen and (min-width: 769px) {
  .nav-button, .nav-overlay {
    display: none !important;
  }
}