/* ============================================================
   works-style.css - 制作事例テンプレート専用スタイル
   【使い方】
   このCSSをテーマの contentsstyle.css に追記するか、
   header.php で別ファイルとして読み込んでください。
   
   例: <link rel="stylesheet" href="<?=URL;?>css/works-style.css">
   ============================================================ */


/* ============================================================
   制作事例 共通スタイル
   ============================================================ */

/* カテゴリーラベル（青いバッジ） */
.works-cat-label {
  display: inline-block;
  background: #717171;
  color: #fff !important;
  font-size: 0.7rem;
  text-decoration: none !important;
  padding: 2px 4px;
  border-radius: 3px;
  margin: 0 4px 0px 0;
  text-decoration: none;
  transition: background 0.2s;
}
.works-cat-label:hover {
  background: #92000c;
  color: #fff;
}

/* タグラベル（グレーのバッジ） */
.works-tag-label {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  margin: 0 4px 4px 0;
  text-decoration: none;
  transition: background 0.2s;
}
.works-tag-label:hover {
  background: #ddd;
  color: #333;
}


/* ============================================================
   一覧ページ - フィルター部分
   ============================================================ */
.works-archive-title {
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 400;;
}

.works-filter {
  margin-bottom: 40px;
  padding: 20px 0 0 0;
  background: #f9f9f9;
  border-radius: 6px;
}

/* カテゴリータブ */
.works-filter-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px 0;
  padding: 0;
}
.works-filter-cats li a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #e60012;
  color: #e60012;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.works-filter-cats li a:hover,
.works-filter-cats li.active a {
  background: #e60012;
  color: #fff;
}
.works-filter-cats .count {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* タグフィルター */
.works-filter-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.filter-label {
  font-size: 0.875rem;
  color: #555;
  white-space: nowrap;
}
.works-tag-link {
  display: inline-block;
  padding: 3px 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  color: #555;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s;
}
.works-tag-link:hover,
.works-tag-link.active {
  background: #555;
  color: #fff;
  border-color: #555;
}


/* ============================================================
   一覧ページ - カードグリッド
   ============================================================ */
.works-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PC: 3列 */
  gap: 50px;
  margin-bottom: 40px;
}

@media screen and (max-width: 900px) {
  .works-list {
    grid-template-columns: repeat(2, 1fr); /* タブレット: 2列 */
  }
}
@media screen and (max-width: 600px) {
  .works-list {
    grid-template-columns: 1fr; /* スマホ: 1列 */
  }
}

/* カード */
.works-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.works-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

/* カード内画像 */
.works-card-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3; /* 画像の比率を統一 */
}
.works-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.works-card:hover .works-card-img img {
  transform: scale(1.05); /* ホバーでズーム */
}

/* カード内テキスト */
.works-card-body {
  padding: 3px 0 0 0;
}
.works-card-cats {
  margin-bottom: -3px;
}
.works-card-title {
  font-size: 1rem;
  margin: 0;
  line-height: 1.2;
  font-weight: 400;
}
.works-card-title a {
  color: #333;
  text-decoration: none;
}
.works-card-title a:hover {
  color: #e60012;
}
.works-card-excerpt {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
}
.works-card-tags {
  margin-top: 8px;
}

/* 関連事例用の小さいカード */
.works-list-sm {
  grid-template-columns: repeat(3, 1fr);
}
.works-card-sm .works-card-title {
  font-size: 0.9rem;
}

/* 投稿なし */
.works-not-found {
  text-align: center;
  padding: 60px;
  color: #999;
  grid-column: 1 / -1;
}


/* ============================================================
   詳細ページ
   ============================================================ */

/* パンくずリスト */
.breadcrumb {
  margin-bottom: 24px;
  margin-top: 20px;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0;
  font-size: 0.85rem;
}
.breadcrumb li {
  color: #999;
}
.breadcrumb li + li::before {
  content: ' › ';
  padding: 0 6px;
  color: #ccc;
}
.breadcrumb li a {
  color: #e60012;
  text-decoration: none;
}
.breadcrumb li.current {
  color: #666;
}

/* 詳細ヘッダー */
.works-single-header {
  margin-bottom: 24px;
}
.works-single-cats {
  margin-bottom: 10px;
}
.works-single-title {
  font-size: 1.6rem;
  line-height: 1.4;
  font-weight: 400;
  margin: 0 0 12px 0;
}
.works-single-tags {
  margin-top: 10px;
}

/* メイン画像 */
.works-single-thumbnail {
  margin-bottom: 32px;
  border-radius: 6px;
  overflow: hidden;
}
.works-single-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* 制作概要テーブル */
.works-single-meta {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 32px;
}
.works-meta-heading {
  font-size: 1.1rem;
  margin-bottom: 16px;
  border-left: 4px solid #e60012;
  padding-left: 10px;
}
.works-meta-table {
  width: 100%;
  border-collapse: collapse;
}
.works-meta-table th,
.works-meta-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
  text-align: left;
}
.works-meta-table th {
  width: 30%;
  color: #555;
  white-space: nowrap;
}
.works-meta-table td a {
  color: #e60012;
  word-break: break-all;
}

/* 本文 */
.works-single-body {
  margin-bottom: 48px;
  line-height: 1.8;
}

/* 前後ナビゲーション */
.works-post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 48px;
}
.works-nav-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.works-nav-link.prev {
  align-items: flex-start;
}
.works-nav-link.next {
  align-items: flex-end;
  text-align: right;
}
.nav-label {
  font-size: 0.8rem;
  color: #e60012;
}
.nav-title {
  font-size: 0.9rem;
  color: #333;
  margin-top: 4px;
}
.works-nav-archive {
  background: #2e2e2e;
  color: #fff !important;
  padding: 5px 15px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: background 0.2s;
}
.works-nav-archive:hover {
  background: #8f000c;
  color: #fff;
}

/* 関連事例 */
.works-related {
  margin-top: 48px;
}
.works-related-title {
  font-size: 1.2rem;
  margin-bottom: 24px;
  border-bottom: 2px solid #eee;
  padding-bottom: 12px;
}

/* タクソノミーの説明文 */
.works-taxonomy-desc {
  text-align: center;
  color: #666;
  margin-bottom: 32px;
}
