/* ========================================
   建築実例 詳細ページ (single-works) - 【最終微調整版】
======================================== */

/* --- ページ全体の基本設定 --- */
.works-detail-stylish {
  font-family: "Montserrat", "M PLUS 1", sans-serif;
  color: #333;
  background-color: #ffffff;
}

/* --- ヘッダー 2カラムエリア --- */
.works-hero-header {
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: center;
  background-color: #f7f6f2;
  min-height: 80vh;
  border-bottom: 1px solid #e9e7e1;
}
.works-hero-content {
  padding: 5%;
}
.works-hero-title {
  font-family: "Shippori Mincho", serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  margin-bottom: 2.5rem;
}
.works-hero-excerpt {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #555;
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.works-hero-company a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 2.3rem;
  transition: opacity 0.3s;
}
.works-hero-company a:hover {
  opacity: 0.7;
}
.works-hero-company img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

/* メイン画像の枠サイズ固定 */
.works-hero-gallery {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: 80vh;
}
.hero-main-image {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  background-color: #e9e7e1;
}
.hero-main-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-thumb-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}
.hero-thumb-nav .thumb-item {
  flex-basis: 0;
  flex-grow: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
}
.hero-thumb-nav .thumb-item:hover {
  opacity: 1;
}
.hero-thumb-nav .thumb-item.is-active {
  opacity: 1;
  border-bottom-color: #333;
}
.hero-thumb-nav .thumb-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- コンテンツエリア --- */
.works-content-container {
  max-width: 960px;
  margin: 120px auto;
  padding: 0 40px;
}
.works-section {
  padding-bottom: 60px;
  margin-bottom: 60px;
}

/* ★★★★★ ご指摘箇所1の修正 ★★★★★ */
.works-section-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.5rem; /* ★CONCEPTのサイズを大きく */
  font-weight: 700; /* ★太字にして視認性を向上 */
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #333; /* ★色を濃くしてはっきりと */
  text-align: center;
  margin-bottom: 2.5rem;
}
.works-section-title span {
  display: none;
}
/* ★★★★★ ここまで ★★★★★ */

/* コンセプト・声のレイアウト */
.works-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  border-top: 1px solid #eee;
  padding-top: 60px;
}
.story-grid-left {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.voice-card {
  background: #fff;
  padding: 0;
  border: 0;
}
.voice-card .voice-title {
  font-family: "Montserrat", "M PLUS 1", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #222;
  padding-bottom: 1rem;
  border-bottom: 2px solid #c9b071;
  margin-bottom: 2.5rem;
}
.voice-card .voice-title span {
  display: none;
}

/* ★★★★★ ご指摘箇所2の修正 ★★★★★ */
.voice-card blockquote p,
.works-concept .works-section-body p {
  font-family: "Shippori Mincho", serif;
  font-size: 1.6rem;
  line-height: 2.2; /* ★行間を少し詰めて、読みやすさを最適化 */
  color: #222;
  margin-top: 0;
  margin-bottom: 2em;
}
/* ★★★★★ ここまで ★★★★★ */

.voice-card blockquote > *:last-child,
.works-concept .works-section-body > *:last-child {
  margin-bottom: 0;
}

/* ギャラリー 3カラム */
.works-full-gallery {
  border-top: 1px solid #eee;
  padding-top: 60px;
}

.gallery-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1.5rem;
}

/* ★★★★★ ここからが核心的な修正 ★★★★★ */
.gallery-grid-3col a {
  display: block;
  overflow: hidden; /* はみ出した画像を隠す */
  border-radius: 5px; /* 角を丸める */
  position: relative;

  /* アスペクト比を16:9に固定するテクニック */
  padding-top: 66.66%; /* 9 / 16 * 100% */

  /* 正方形にしたい場合はこちらを使う */
  /* padding-top: 100%; */

  background-color: #eee; /* 画像読み込み中の背景色 */
}

.gallery-grid-3col img {
  position: absolute; /* 親要素(aタグ)を基準に絶対配置 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* 親要素の高さに合わせる */
  object-fit: cover; /* 比率を保ったまま枠いっぱいに表示 */
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-grid-3col a:hover img {
  transform: scale(1.05); /* ホバー時に少し拡大するエフェクト */
}

/* --- レスポンシブ --- */
@media (max-width: 1024px) {
  .works-hero-header {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .works-hero-gallery {
    height: 60vh;
    order: -1;
  }
  .works-hero-content {
    padding: 80px 40px;
    text-align: center;
  }
  .works-hero-title {
    font-size: 3.5rem;
  }
}
@media (max-width: 768px) {
  .works-content-container {
    margin: 80px auto;
    padding: 0 20px;
  }
  .works-story-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
  .works-hero-title {
    font-size: 2.8rem;
  }
  .voice-card blockquote p,
  .works-concept .works-section-body p {
    font-size: 1.4rem;
    line-height: 2; /* SPでも行間調整 */
  }
}
@media (max-width: 480px) {
  .gallery-grid-3col {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   同じ会社の他の実例 (single-works.php Footer)
   - スマホ・PC レスポンシブ対応版
   ========================================= */

/* --- セクション全体 --- */
.related-works-section {
  margin-top: 120px;
  padding: 80px 0;
  border-top: 1px solid #f0f0f0;
  background-color: #fff;
}

.related-works-section .works-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* --- 見出し --- */
.related-works-title {
  text-align: center;
  margin-bottom: 60px;
}

.related-works-title .en {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #bbb;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.related-works-title .jp {
  display: block;
  font-family: "M PLUS 1", sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #333;
}

/* --- グリッドレイアウト (ここが重要) --- */
.related-works-grid {
  display: grid;
  width: 100%;
  /* 【スマホ・タブレット初期値】縦1列 */
  grid-template-columns: 1fr;
  gap: 40px; /* 上下の間隔 */
  margin-bottom: 60px;
}

/* 【PC (768px以上)】横3列に切り替え */
@media (min-width: 768px) {
  .related-works-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* 横の間隔 */
  }
}

/* --- カードデザイン --- */
.related-work-card {
  display: block;
  text-decoration: none;
  color: #333;
  transition: opacity 0.3s;
}

.related-work-card:hover {
  opacity: 0.8;
}

/* --- サムネイル画像 --- */
.related-work-thumb {
  position: relative;
  width: 100%;
  /* 画像の比率を固定 (4:3) して、ガタつきを防ぐ */
  padding-top: 75%;
  background: #f5f5f5;
  overflow: hidden;
  margin-bottom: 15px;
}

.related-work-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 枠いっぱいにトリミングして表示 */
  transition: transform 0.5s ease;
}

/* --- テキストエリア --- */
.related-work-body {
  text-align: left;
}

.related-work-title {
  font-family: "M PLUS 1", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 5px 0;
  /* 長すぎるタイトルを2行で省略する設定 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.related-work-cat {
  font-size: 11px;
  color: #999;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.05em;
}

/* --- ボタンエリア --- */
.related-works-btn-area {
  text-align: center;
  margin-top: 60px;
}

.related-works-btn-area .button-secondary {
  display: inline-block;
  padding: 12px 50px;
  border: 1px solid #ddd;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  background: #fff;
  transition: all 0.3s;
}

/* スマホではボタンを幅いっぱいに */
@media (max-width: 767px) {
  .related-works-btn-area .button-secondary {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}
