@charset "UTF-8";

/* =========================================================
   工事紹介ページ専用
   kouji.css

   対象:
   <body class="kouji-page gallery-page">

   土木工事部・建築工事部 共通
   他ページへの影響を防ぐため、
   基本的に .kouji-page 配下に限定
========================================================= */


/* =========================================================
   土木工事部・建築工事部 切替ボタン
========================================================= */

.kouji-page .department-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;

  margin: 30px 0;
}


/* 共通ボタン */

.kouji-page .department-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 200px;
  min-height: 54px;

  padding: 12px 20px;

  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;

  text-decoration: none;

  background-color: #0073b1;

  border-radius: 8px;

  transition:
    background-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


/* 現在表示中の部門 */

.kouji-page .department-btn[aria-current="page"] {
  background-color: #009900;
}


/* ホバー */

.kouji-page .department-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

  text-decoration: none;
}


/* 現在ページのボタンもホバー可 */

.kouji-page .department-btn[aria-current="page"]:hover {
  background-color: #008000;
}


/* キーボード操作時 */

.kouji-page .department-btn:focus-visible {
  outline: 3px solid rgba(0, 91, 171, 0.3);
  outline-offset: 3px;
}


/* ギャラリー共通定義は gallery.css。以下は工事ページ固有の差分。 */
.kouji-page .imagecard .image { margin: 0; }
.kouji-page .imagecard .image a { display: block; }
.kouji-page .imagecard .caption { margin-bottom: 0; line-height: 1.6; }

/* =========================================================
   過去の写真 アコーディオン
========================================================= */

.kouji-page .gallery-accordion {
  max-width: 960px;

  margin: 18px auto 30px;

  background: #fff;

  border: 1px solid #e6e8ef;
  border-radius: 12px;

  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);

  overflow: hidden;
}


/* =========================================================
   アコーディオン見出し
========================================================= */

.kouji-page .gallery-accordion summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 12px;

  padding: 14px 16px;

  color: #333;
  font-weight: 700;

  background: #fff;

  cursor: pointer;
  user-select: none;

  list-style: none;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}


/* Chrome / Safari 標準三角を非表示 */

.kouji-page .gallery-accordion summary::-webkit-details-marker {
  display: none;
}


/* hover */

.kouji-page .gallery-accordion summary:hover {
  background: #f5f9fd;
}


/* キーボード操作 */

.kouji-page .gallery-accordion summary:focus-visible {
  outline: 3px solid rgba(0, 91, 171, 0.25);
  outline-offset: -3px;
}


/* =========================================================
   枚数表示
========================================================= */

.kouji-page .gallery-accordion .summary-sub {
  color: #5a6474;

  font-size: 0.95rem;
  font-weight: 400;
}


/* =========================================================
   開閉矢印
========================================================= */

.kouji-page .gallery-accordion .chev {
  width: 10px;
  height: 10px;

  margin-left: auto;

  border-right: 2px solid #6b7688;
  border-bottom: 2px solid #6b7688;

  transform: rotate(45deg);

  transition: transform 0.18s ease;

  flex: 0 0 auto;
}


/* 開いた状態 */

.kouji-page .gallery-accordion[open] .chev {
  transform: rotate(-135deg);
}


/* =========================================================
   開いた状態の見出し
========================================================= */

.kouji-page .gallery-accordion[open] summary {
  background: #f5f9fd;

  border-bottom: 1px solid #e6e8ef;
}


/* =========================================================
   過去写真エリア
========================================================= */

.kouji-page .gallery-accordion .older-wrap {
  padding: 18px 12px 14px;
}


/* アコーディオン内のギャラリー余白 */

.kouji-page .gallery-accordion .older-wrap .imagebox {
  margin-bottom: 0;
}


/* =========================================================
   開閉アニメーション
========================================================= */

.kouji-page .gallery-accordion[open] .older-wrap {
  animation: koujiAccordionOpen 0.25s ease;
}


@keyframes koujiAccordionOpen {

  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}


/* =========================================================
   ギャラリー余白調整
========================================================= */

.kouji-page #koujiGallery {
  margin-bottom: 30px;
}


.kouji-page #olderGalleryMount {
  margin-top: 10px;
  margin-bottom: 30px;
}


/* =========================================================
   タブレット
========================================================= */

@media screen and (max-width: 768px) {

  .kouji-page .department-switch {
    gap: 12px;

    margin: 24px 0;
  }


  .kouji-page .department-btn {
    width: calc(50% - 6px);

    min-width: 0;

    padding: 12px 10px;

    font-size: 1rem;
  }


  .kouji-page .imagebox {
    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
  }


  .kouji-page .gallery-accordion {
    margin-top: 15px;
    margin-bottom: 25px;
  }


  .kouji-page .gallery-accordion summary {
    padding: 14px 12px;
  }


  .kouji-page .gallery-accordion .summary-sub {
    font-size: 0.85rem;
  }


  .kouji-page .gallery-accordion .older-wrap {
    padding: 15px 10px 12px;
  }

}


/* =========================================================
   小さいスマートフォン
========================================================= */

@media screen and (max-width: 480px) {

  .kouji-page .department-switch {
    flex-direction: column;
    align-items: stretch;

    gap: 10px;
  }


  .kouji-page .department-btn {
    width: 100%;
  }


  .kouji-page .imagebox {
    grid-template-columns: 1fr;

    gap: 18px;
  }


  .kouji-page .gallery-accordion summary {
    flex-wrap: wrap;

    font-size: 0.95rem;
  }


  .kouji-page .gallery-accordion .summary-sub {
    font-size: 0.82rem;
  }


  .kouji-page .gallery-accordion .chev {
    margin-left: auto;
  }


}