@charset "UTF-8";

/* ==========================================
   Reset & Base Styles
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  background-color: #f4f6f9;
  color: #333333;
  line-height: 1.6;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px;
}

.main-header {
  border-bottom: 3px solid #1a365d;
  margin-bottom: 30px;
  padding-bottom: 10px;
}

.main-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #1a365d;
  letter-spacing: 0.03em;
}

/* ==========================================
   Tab Navigation Layout (CSS-Only Tabs)
   ========================================== */
.menuWrap {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* ラジオボタンは画面上非表示 */
.menuWrap input[type='radio'] {
  display: none;
}

/* サイドバー（ナビゲーション） */
.sidebar {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.cell-label {
  display: block;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a5568;
  background-color: #f8fafc;
  border-left: 4px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cell-label:hover {
  background-color: #edf2f7;
  color: #2b6cb0;
}

/* ラジオボタンがチェックされた時のナビゲーションスタイル */
#cell1:checked ~ .sidebar [for="cell1"],
#cell2:checked ~ .sidebar [for="cell2"],
#cell3:checked ~ .sidebar [for="cell3"],
#cell4:checked ~ .sidebar [for="cell4"],
#cell5:checked ~ .sidebar [for="cell5"] {
  background-color: #ebf8ff;
  color: #2b6cb0;
  border-left-color: #2b6cb0;
}

/* コンテンツエリア */
.content-area {
  flex: 1;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  min-height: 500px;
}

/* 初期状態ではすべてのコンテンツを非表示 */
.cell-body {
  display: none;
}

/* チェックされたコンテンツのみを表示 (ふわっと浮き出るアニメーション付) */
#cell1:checked ~ .content-area #cell1-main,
#cell2:checked ~ .content-area #cell2-main,
#cell3:checked ~ .content-area #cell3-main,
#cell4:checked ~ .content-area #cell4-main,
#cell5:checked ~ .content-area #cell5-main {
  display: block;
  animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   Content Inner Styles (Grid Layout)
   ========================================== */
.cell-body h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 1.6rem;
  color: #2d3748;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 12px;
}

/* 上半分の仕様書と構造図を2カラムに並べる */
.cell-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* 仕様書（Spec）エリア */
.cell-spec {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
}

.cell-spec h3, .gallery-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.05rem;
  color: #1a365d;
  border-left: 3px solid #2b6cb0;
  padding-left: 8px;
}

.cell-spec ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cell-spec li {
  display: flex;
  padding: 9px 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.9rem;
}

.cell-spec li:last-child {
  border-bottom: none;
}

.spec-label {
  flex: 0 0 130px;
  font-weight: 600;
  color: #718096;
}

.spec-value {
  flex: 1;
  color: #2d3748;
}

/* 構造図（Graph/Diagram）エリア */
/* ==========================================
   構造図（Graph/Diagram）エリア
   ========================================== */
.cell-graph {
  display: flex;
  flex-direction: column;   /* ★子要素を縦並びにする命令を追加 */
  align-items: flex-start;  /* ★左寄せにして見出しの位置を揃える */
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;            /* 仕様書の枠と余白感を揃えるために 15px から 20px に変更 */
}

/* グラフエリア内に入った見出し（h3）のスタイルを追加 */
.cell-graph h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.05rem;
  color: #1a365d;
  border-left: 3px solid #2b6cb0;
  padding-left: 8px;
}

.cell-graph figure {
  margin: 0;
  text-align: center;
  width: 100%;              /* 横幅いっぱいに広げて中央配置を維持 */
}

.cell-graph img {
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.cell-graph figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #718096;
}

/* 画像がない場合のプレースホルダー（5番目のセル用） */
.empty-graph {
  min-height: 240px;
  border: 1px dashed #cbd5e0;
  background-color: #f7fafc;
}
.no-image {
  color: #a0aec0;
  font-size: 0.9rem;
}

/* ==========================================
   Gallery Section
   ========================================== */
.cell-gallery {
  grid-column: 1 / -1; /* 横いっぱいに広げる */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}

.gallery-section {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
}

/* ギャラリーの画像並び（Flexboxから、よりズレにくいGridレイアウトに変更） */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 均等に2分割して横並びにする */
  gap: 12px;
  align-items: start;
}

/* 直下の子要素（divでもfigureでもすべてに適用） */
.gallery-grid > * {
  margin: 0;
  padding: 0;
  text-align: center;
  width: 100%; /* 横幅いっぱいに広げる */
}

/* サムネイル画像自体のスタイル（aタグの中に画像があっても正しく適用されるように修正） */
.gallery-grid img {
   width: 150px; 
  height: 100%; 
  object-fit: cover; /* 画像の比率を保ったまま枠に収める */
  border-radius: 4px;
  border: 1px solid #edf2f7;
  display: block; /* 下部の余計な隙間を消す */
  transition: transform 0.2s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}
}

.gallery-grid figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #4a5568;
}

/* 特殊レイアウト用 (SUSセルの測定風景など) */
.full-width {
  grid-column: 1 / -1;
}

.measurement-fig {
  margin: 0;
}

.measurement-fig img {
  max-width: 300px;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.measurement-fig figcaption {
  margin-top: 4px;
  font-size: 0.8rem;
  color: #4a5568;
}

/* 最終更新日 */
.last-update {
  margin-top: 30px;
  margin-bottom: 0;
  text-align: right;
  font-size: 0.8rem;
  color: #a0aec0;
}

/* ==========================================
   Responsive Styles (モバイル対応)
   ========================================== */
@media (max-width: 840px) {
  .menuWrap {
    flex-direction: column;
  }
  .sidebar {
    flex: none;
    width: 100%;
    flex-direction: row;
    overflow-x: auto; /* タブが多くなったら横スクロール */
    white-space: nowrap;
    padding: 10px;
  }
  .cell-grid, .cell-gallery {
    grid-template-columns: 1fr;
  }
  .gallery-grid img {
    height: 180px;
  }
}
/* ==========================================
   CSS-Only Lightbox (写真拡大表示)
   ========================================== */

/* 拡大画面のベース（初期状態は非表示） */
.lightbox {
  display: none;
  position: fixed;
  z-index: 10000; /* ナビゲーションより手前に表示 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85); /* 背景の黒透過 */
  align-items: center;
  justify-content: center;
}

/* サムネイルがクリックされて、URLの末尾が「#ID名」になった瞬間に表示する */
.lightbox:target {
  display: flex;
  animation: lightboxFadeIn 0.3s ease-out;
}

/* 背景の黒いエリア（クリックで閉じる用） */
.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: default;
}

/* 拡大写真の表示コンテナ（シアターモード風に画面を贅沢に使う） */
.lightbox-content {
position: relative;
  background-color: transparent;
  padding: 0;
  margin: 0;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 拡大写真本体 */
.lightbox-content img {
width: auto;
  height: auto;
  max-width: 55vw;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* 閉じるボタン（右上に出る「×」） */
.lightbox-close {
position: fixed;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 50px;
  font-weight: 200;
  text-decoration: none;
  line-height: 1;
  z-index: 10001;
  transition: color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
color: #ff6b6b;
  transform: scale(1.1);
}

/* 拡大時のふわっとしたアニメーション */
@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* グラフ画像にマウスを乗せたときのホバーエフェクト（追加） */
.cell-graph img {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cell-graph img:hover {
  transform: scale(1.015); /* ほんの少しだけ拡大 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 軽い影をつけて浮かせる */
}