/*==================================
事例一覧ショートコード用スタイル
作成日: 2025.10.10
==================================*/

/* グリッドコンテナ */
.p-case-list-grid {
  display: grid;
  gap: 40px 32px;
  margin-bottom: 48px;
}

/* 3カラムレイアウト（デフォルト） */
.p-case-list-grid--col-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 2カラムレイアウト */
.p-case-list-grid--col-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* 4カラムレイアウト */
.p-case-list-grid--col-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* タブレット: 2カラム */
@media screen and (max-width: 1024px) {
  .p-case-list-grid--col-3,
  .p-case-list-grid--col-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .p-case-list-grid {
    gap: 32px 24px;
  }
}

/* スマートフォン: 1カラム */
@media screen and (max-width: 640px) {
  .p-case-list-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }
}

/* アイテム */
.p-case-list-item {
  position: relative;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.p-case-list-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* リンク */
.p-case-list-item__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* サムネイル */
.p-case-list-item__thumb {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 アスペクト比 */
  overflow: hidden;
  background: #f5f5f5;
}

.p-case-list-item__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.p-case-list-item:hover .p-case-list-item__thumb img {
  transform: scale(1.05);
}

/* コンテンツエリア */
.p-case-list-item__content {
  padding: 20px;
}

@media screen and (max-width: 640px) {
  .p-case-list-item__content {
    padding: 16px;
  }
}

/* タイトル */
.p-case-list-item__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #333;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 640px) {
  .p-case-list-item__title {
    font-size: 15px;
    margin-bottom: 10px;
  }
}

/* タグリスト */
.p-case-list-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.p-case-list-item__tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #666;
  background: #f0f0f0;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.p-case-list-item:hover .p-case-list-item__tag {
  background: #e0e0e0;
}

/* 空の状態 */
.p-case-list-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #999;
  background: #f9f9f9;
  border-radius: 8px;
}

@media screen and (max-width: 640px) {
  .p-case-list-empty {
    padding: 40px 20px;
    font-size: 14px;
  }
}

/* ローディング状態（オプション） */
.p-case-list-grid.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
  .p-case-list-item,
  .p-case-list-item__thumb img {
    transition: none;
  }
}

