/**
 * 投稿詳細ページ（single.php）専用スタイル
 * template-parts/content-single.php でのみ使用するクラスのため、
 * is_single() のときだけ読み込む（style.cssから分離）
 *
 * @package RIFF
 */

/* ==========================================================================
   施工実績投稿詳細ページスタイル
   ========================================================================== */

/* 施工実績記事全体 */
.construction-case {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  box-sizing: border-box;
}

/* ヘッダー部分 */
.construction-header {
  margin-bottom: 30px;
}

.construction-category {
  display: inline-block;
  background-color: #2c5282;
  color: #fff;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 3px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.construction-title {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
  margin: 0;
  padding: 0;
}

/* 施工事例（worksカテゴリー）専用: タグ一覧 */
.construction-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.construction-tag {
  display: inline-block;
  background-color: #1e73be;
  color: #fff;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

/* タイトル + 施工情報ボックスの横並びレイアウト */
.construction-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.construction-header-row .entry-header {
  flex: 1 1 auto;
  min-width: 0;
}

/* 施工事例詳細ページ専用: 工事費用・築年数などの情報ボックス */
.construction-meta-box {
  flex: 0 0 280px;
  box-sizing: border-box;
  border: 1px solid #2c3e50;
  padding: 16px 20px;
  background: #fff;
}

.construction-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #e0e0e0;
  font-size: 0.9rem;
}

.construction-meta-row:last-child {
  border-bottom: none;
}

.construction-meta-row .construction-meta-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #2c3e50;
}

.construction-meta-row .construction-meta-label {
  color: #555;
  flex: 0 0 auto;
}

.construction-meta-row .construction-meta-value {
  margin-left: auto;
  font-weight: 600;
  color: #222;
}

/* 施工詳細情報 */
.construction-details {
  background-color: #f8f9fa;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.detail-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #dee2e6;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #495057;
  min-width: 80px;
  flex-shrink: 0;
  font-size: 14px;
}

.detail-value {
  color: #333;
  margin-left: 20px;
  font-size: 14px;
  flex: 1;
}

/* コンテンツエリア */
.construction-content {
  margin-bottom: 40px;
}

.construction-content p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: #333;
}

/* Before/Afterギャラリー */
.before-after-gallery {
  margin: 40px 0;
}

.before-after-set {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

/* Before/After（施工事例詳細ページ用の画像バッジ＋矢印スタイル） */
.ba-image-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0;
  line-height: 0;
}

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

.ba-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border-radius: 0;
  letter-spacing: 0.5px;
}

.ba-badge-before {
  background-color: #2c3e50;
}

.ba-badge-after {
  background-color: #B8860B;
}

.ba-arrow {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e73be;
}

.ba-arrow .ba-arrow-icon {
  width: 40px;
  height: 40px;
}

.ba-caption {
  margin: 0 0 34px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* 施工前ギャラリー */
.process-gallery-section {
  margin: 40px 0;
}

.process-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2c5282;
}

.process-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
}

.process-item {
  flex: 0 0 calc(25% - 12px);
  text-align: center;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.process-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.process-image {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background-color: #f8f9fa;
}

.process-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.process-item:hover .process-image img {
  transform: scale(1.1);
}

.process-caption {
  padding: 12px 8px;
  font-size: 12px;
  color: #666;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  font-weight: 500;
}

/* フッター部分 */
.construction-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 30px;
  margin-top: 40px;
}

/* 施工事例詳細ページ専用: 一覧へ戻る・次の施工事例ボタン */
.construction-case-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 50px;
}

.construction-case-nav a {
  display: inline-block;
  padding: 14px 28px;
  background-color: #2c3e50;
  color: #fff;
  text-decoration: none;
  border-radius: 0;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  transition: background-color 0.3s ease;
}

.construction-case-nav a:hover {
  background-color: #415b74;
  color: #fff;
}

/* ==========================================================================
   SNSシェアボタン修正版（SVGアイコン対応）
   ========================================================================== */

/* SNSシェア */
.post-share {
  text-align: center;
}

.share-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.social-share-list {
  display: flex;
  justify-content: center;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-item {
  margin: 0;
}

.share-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
  position: relative;
}

/* SVGアイコン共通スタイル */
.share-item a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.share-item a:hover svg {
  transform: scale(1.1);
}

/* LINEアイコン */
.share-line {
  background-color: #00c300;
}

.share-line:hover {
  background-color: #00a000;
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 195, 0, 0.3);
}

/* Xアイコン（公式ブラック） */
.share-twitter {
  background-color: #000000;
}

.share-twitter:hover {
  background-color: #1a1a1a;
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Facebookアイコン */
.share-facebook {
  background-color: #1877f2;
}

.share-facebook:hover {
  background-color: #166fe5;
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

/* Instagramアイコン */
.share-instagram {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

.share-instagram:hover {
  background: linear-gradient(
    45deg,
    #e6683c 0%,
    #dc2743 25%,
    #cc2366 50%,
    #bc1888 75%,
    #9b1c8c 100%
  );
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 12px rgba(240, 148, 51, 0.3);
}

/* ホバーエフェクト強化 */
.share-item a:hover {
  color: #fff;
}

/* レスポンシブ対応 767px */
@media (max-width: 767px) {
  .social-share-list {
    gap: 12px;
  }

  .share-item a {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .share-item a svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .share-item a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .share-item a svg {
    width: 14px;
    height: 14px;
  }

  .social-share-list {
    gap: 10px;
  }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .share-item a,
  .share-item a svg {
    transition: none;
  }

  .share-item a:hover {
    transform: none;
  }

  .share-item a:hover svg {
    transform: none;
  }
}

/* フォーカス表示 */
.share-item a:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* 高コントラスト対応 */
@media (prefers-contrast: high) {
  .share-item a {
    border: 2px solid #fff;
  }

  .share-item a:hover {
    border-color: #000;
  }
}

/* レスポンシブ対応 767px */
@media (max-width: 767px) {
  .construction-case {
    padding: 15px;
  }

  .construction-title {
    font-size: 22px;
    line-height: 1.4;
  }

  .construction-details {
    padding: 15px;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .detail-label {
    margin-bottom: 5px;
    min-width: auto;
  }

  .detail-value {
    margin-left: 0;
  }

  .before-after-set {
    flex-direction: column;
    gap: 20px;
  }

  .construction-header-row {
    flex-direction: column;
    gap: 16px;
  }

  .construction-meta-box {
    flex: 1 1 auto;
    width: 100%;
  }

  .ba-image-wrap {
    aspect-ratio: 3 / 2;
  }

  .ba-arrow {
    margin: 4px auto;
  }

  .ba-arrow .ba-arrow-icon {
    transform: rotate(90deg);
  }

  .construction-case-nav a {
    flex: 1 1 100%;
  }

  .process-gallery {
    gap: 10px;
  }

  .process-item {
    flex: 0 0 calc(50% - 5px);
  }

  .process-image {
    height: 100px;
  }

  .process-caption {
    padding: 10px 6px;
    font-size: 11px;
  }

  .social-share-list {
    gap: 12px;
  }

  .share-item a {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .share-item a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* 投稿ナビゲーション（前後の記事） */
.post-navigation {
  margin: 40px 0;
  padding: 30px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  flex: 0 0 48%;
  text-align: center;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
  display: inline-block;
  padding: 12px 20px;
  background-color: #f8f9fa;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
}

.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover {
  background-color: #2c5282;
  color: #fff;
  border-color: #2c5282;
  transform: translateY(-2px);
}

.post-navigation .nav-subtitle {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-navigation .nav-title {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

/* レスポンシブ対応 - 投稿ナビゲーション */
@media (max-width: 767px) {
  .post-navigation .nav-links {
    flex-direction: column;
    gap: 15px;
  }

  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    flex: 0 0 100%;
    width: 100%;
  }

  .post-navigation .nav-previous a,
  .post-navigation .nav-next a {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .construction-case {
    padding: 10px;
  }

  .construction-title {
    font-size: 20px;
  }

  .construction-details {
    padding: 12px;
  }

  .process-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .process-item {
    flex: 0 0 calc(50% - 5px);
  }

  .process-image {
    height: 80px;
  }

  .process-caption {
    padding: 8px 4px;
    font-size: 10px;
  }

  .share-item a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}
