/* ========================================
   NS HOME 施工事例 - スタイル
   ========================================
   既存 style.css のカラーパレット・フォントに準拠
   - プライマリグリーン: #3D6B35
   - アクセントグリーン: #4A7C41
   - ベージュ/ゴールド: #C5A55A
   - ライトベージュ: #F5F0E8
   - ウォームホワイト: #FAFAF5
   ======================================== */

/* ========================================
   一覧ページ：ページヘッダー
   ======================================== */
.works-page-header {
  background: linear-gradient(135deg, #3D6B35, #2D5428);
  padding: 120px 0 60px;
  text-align: center;
  color: #fff;
}

.works-page-header .title-en {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: #C5A55A;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.works-page-header .title-ja {
  display: block;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.works-page-header .page-lead {
  margin-top: 16px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ========================================
   一覧ページ：フィルタ
   ======================================== */
.works-filter-section {
  background-color: #FAFAF5;
  padding: 40px 0 0;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 10px 24px;
  border: 2px solid #d0c9bc;
  border-radius: 50px;
  background-color: #fff;
  color: #555;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #3D6B35;
  color: #3D6B35;
}

.filter-btn.active {
  background-color: #3D6B35;
  border-color: #3D6B35;
  color: #fff;
}

/* ========================================
   一覧ページ：カードグリッド
   ======================================== */
.works-grid-section {
  background-color: #FAFAF5;
  padding: 40px 0 100px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.works-card {
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.works-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.works-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #f0ebe3;
  position: relative;
}

.works-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.works-card:hover .works-card-thumb img {
  transform: scale(1.06);
}

/* サムネイルにプレースホルダー（写真なし用） */
.works-card-thumb.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 2.5rem;
}

.works-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.works-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.works-card-tag {
  display: inline-block;
  padding: 3px 12px;
  background-color: #EDF5EB;
  color: #3D6B35;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.works-card-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2D2D2D;
  line-height: 1.5;
  margin-bottom: 10px;
}

.works-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: #999;
  margin-top: auto;
}

.works-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.works-card-meta i {
  font-size: 0.72rem;
  color: #bbb;
}

/* カード非表示アニメーション */
.works-card.hidden {
  display: none;
}

/* ========================================
   一覧ページ：事例なしメッセージ
   ======================================== */
.works-empty {
  text-align: center;
  padding: 80px 20px;
  color: #999;
  display: none;
}

.works-empty i {
  font-size: 2.5rem;
  color: #ccc;
  margin-bottom: 16px;
  display: block;
}

.works-empty.visible {
  display: block;
}

/* ========================================
   個別ページ：メインコンテンツ
   ======================================== */
.works-detail-header {
  background: linear-gradient(135deg, #3D6B35, #2D5428);
  padding: 120px 0 50px;
  color: #fff;
}

.works-detail-header .breadcrumb {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
}

.works-detail-header .breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.3s ease;
}

.works-detail-header .breadcrumb a:hover {
  color: #fff;
}

.works-detail-header .breadcrumb span {
  margin: 0 8px;
}

.works-detail-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.works-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.works-detail-tag {
  display: inline-block;
  padding: 5px 16px;
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- 詳細コンテンツ ---------- */
.works-detail-content {
  padding: 60px 0 100px;
  background-color: #FAFAF5;
}

.works-detail-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* ---------- 概要テーブル ---------- */
.works-info-table {
  background-color: #fff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.works-info-table table {
  width: 100%;
  border-collapse: collapse;
}

.works-info-table tr {
  border-bottom: 1px solid #f0ebe3;
}

.works-info-table tr:last-child {
  border-bottom: none;
}

.works-info-table th,
.works-info-table td {
  padding: 16px;
  font-size: 0.92rem;
  text-align: left;
  vertical-align: top;
}

.works-info-table th {
  width: 120px;
  font-weight: 600;
  color: #3D6B35;
  white-space: nowrap;
}

.works-info-table td {
  color: #555;
}

/* ---------- ビフォーアフター ---------- */
.works-ba-section {
  margin-bottom: 48px;
}

.works-ba-section h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #3D6B35;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #EDF5EB;
}

.ba-pair {
  margin-bottom: 36px;
}

.ba-pair-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
}

.ba-images {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: center;
}

.ba-image-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f0ebe3;
  aspect-ratio: 4 / 3;
}

.ba-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  z-index: 1;
}

.ba-label-before {
  background-color: #888;
}

.ba-label-after {
  background-color: #3D6B35;
}

.ba-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #C5A55A;
  font-size: 1.4rem;
}

/* 写真プレースホルダー（個別ページ用） */
.ba-image-box.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: #bbb;
  border: 2px dashed #ddd;
  background-color: #f9f9f6;
}

.ba-image-box.placeholder i {
  font-size: 1.8rem;
}

.ba-image-box.placeholder span {
  font-size: 0.8rem;
}

/* ---------- 工事内容（本文） ---------- */
.works-body-section {
  margin-bottom: 48px;
}

.works-body-section h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #3D6B35;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #EDF5EB;
}

.works-body-text {
  background-color: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  font-size: 0.95rem;
  color: #555;
  line-height: 2;
}

.works-body-text p {
  margin-bottom: 16px;
}

.works-body-text p:last-child {
  margin-bottom: 0;
}

/* ---------- 戻るリンク ---------- */
.works-back {
  text-align: center;
  margin-top: 48px;
}

.works-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background-color: #3D6B35;
  color: #fff;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid #3D6B35;
}

.works-back a:hover {
  background-color: #2D5428;
  border-color: #2D5428;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 107, 53, 0.3);
}

/* ========================================
   CTAバナー（個別ページ下部）
   ======================================== */
.works-cta {
  background: linear-gradient(135deg, #3D6B35, #2D5428);
  padding: 60px 0;
  text-align: center;
  color: #fff;
}

.works-cta h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}

.works-cta p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.works-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   施工の流れ（写真グリッド）
   ======================================== */
.works-process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.process-item {
  text-align: center;
}

.process-step-label {
  display: inline-block;
  padding: 4px 16px;
  background: linear-gradient(135deg, #3D6B35, #4A7C41);
  color: #fff;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.process-image-box {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background-color: #f0ebe3;
  margin-bottom: 10px;
}

.process-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process-caption {
  font-size: 0.82rem;
  color: #666;
  font-weight: 500;
  line-height: 1.5;
}

/* ========================================
   レスポンシブ（タブレット）
   ======================================== */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ========================================
   レスポンシブ（スマートフォン）
   ======================================== */
@media (max-width: 768px) {
  .works-page-header {
    padding: 100px 0 40px;
  }

  .works-page-header .title-ja {
    font-size: 1.4rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 0.82rem;
  }

  /* 個別ページ */
  .works-detail-header {
    padding: 100px 0 36px;
  }

  .works-detail-title {
    font-size: 1.35rem;
  }

  .works-detail-content {
    padding: 40px 0 70px;
  }

  .ba-images {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ba-arrow {
    transform: rotate(90deg);
    padding: 12px 0;
  }

  .works-info-table {
    padding: 24px 20px;
  }

  .works-info-table th {
    display: block;
    width: 100%;
    padding: 12px 0 4px;
  }

  .works-info-table td {
    display: block;
    padding: 0 0 12px;
  }

  .works-body-text {
    padding: 24px 20px;
  }

  .works-process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .works-cta h2 {
    font-size: 1.25rem;
  }

  .works-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .works-cta-buttons .btn {
    width: 260px;
  }
}

@media (max-width: 480px) {
  .works-page-header .title-ja {
    font-size: 1.25rem;
  }

  .works-detail-title {
    font-size: 1.2rem;
  }
}
