/* ===== GW ランダム記事カード ===== */

.gw-rp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 2em 0;
}

@media (max-width: 900px) {
  .gw-rp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .gw-rp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ---- スマホ用：カード内テキストを小さく・タグ非表示・行数制限 ---- */
@media (max-width: 560px) {
  .gw-rp-body {
    padding: 8px 10px 10px;
    gap: 5px;
  }
  .gw-rp-cat {
    font-size: 0.64em;
    padding: 2px 7px;
  }
  /* タイトル：最大2行 */
  .gw-rp-title {
    font-size: 0.78em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* 概要：最大2行 */
  .gw-rp-excerpt {
    font-size: 0.68em;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* タグは非表示 */
  .gw-rp-tags {
    display: none;
  }
}

/* ---- カード ---- */
.gw-rp-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.gw-rp-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

/* ---- サムネイル ---- */
.gw-rp-thumb-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0f0f0;
}

.gw-rp-thumb {
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gw-rp-card:hover .gw-rp-thumb {
  transform: scale(1.04);
}

/* No Image プレースホルダー */
.gw-rp-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gw-rp-no-img-text {
  color: #bbb;
  font-size: 0.8em;
  letter-spacing: 0.05em;
}

/* ---- カード本文エリア ---- */
.gw-rp-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

/* ---- カテゴリバッジ ---- */
.gw-rp-cat {
  display: inline-block;
  background: #f0f4ff;
  color: #4a6dd8;
  font-size: 0.72em;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}

.gw-rp-cat:hover {
  background: #dce5ff;
  color: #3558c2;
}

/* ---- タイトル ---- */
.gw-rp-title {
  font-size: 0.92em;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}

.gw-rp-title a {
  color: #222;
  text-decoration: none;
}

.gw-rp-title a:hover {
  color: #4a6dd8;
}

/* ---- 概要文 ---- */
.gw-rp-excerpt {
  font-size: 0.78em;
  color: #666;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

/* ---- タグ ---- */
.gw-rp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.gw-rp-tag {
  font-size: 0.62em;
  color: #888;
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 1px 7px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.gw-rp-tag:hover {
  background: #eef1ff;
  color: #4a6dd8;
  border-color: #c8d2f5;
}

/* ---- 空状態 ---- */
.gw-rp-empty {
  color: #999;
  font-size: 0.9em;
  text-align: center;
  padding: 2em 0;
}
