/* ===== Latest Posts Grid ===== */
.bcc-latestGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 22px;
}

/* カード共通 */
.bcc-latestCard {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  background: #fff;
}

.bcc-latestLink {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* 画像エリア（背景画像） */
.bcc-latestMedia {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

/* カテゴリラベル */
.bcc-catLabel {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .22);
}

/* 下部（投稿日＋タイトル＋抜粋） */
.bcc-latestBody {
  padding: 12px 14px 14px;
}

.bcc-latestMeta {
  font-size: 13px;
  font-weight: 700;
  opacity: .8;
}

.bcc-latestTitle {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== レイアウト指定 ===== */
/* 1件目：大きく（左にドン） */
.bcc-latestCard.is-featured {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}

.bcc-latestCard.is-featured .bcc-latestMedia {
  aspect-ratio: 16 / 10;
}

.bcc-latestCard.is-featured .bcc-latestTitle {
  font-size: 18px;
  -webkit-line-clamp: 3;
}

.bcc-latestCard.is-featured .bcc-latestExcerpt {
  -webkit-line-clamp: 3;
}

/* 2〜5件目：右側2×2 */
.bcc-latestCard.is-small {
  grid-column: auto / span 1;
}

/* ===== SP：1件目は100%、残りは2×2固定 ===== */
@media (max-width: 599px) {
  .bcc-latestGrid {
    grid-auto-rows: auto;
    /* ←これが効く */
    align-items: start;
    /* 念のため：上揃え */
    gap: 10px;
  }

  .bcc-latestCard.is-featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  /* 残り4件は2列（=2×2） */
  .bcc-latestCard.is-small {
    grid-column: auto / span 2;
  }

  .bcc-latestBody {
    padding: 10px 12px 12px;
  }

  .bcc-catLabel {
    left: 10px;
    top: 10px;
    font-size: 13px;
  }
}

.bcc-latestCard {
  transition: transform .25s ease, box-shadow .25s ease;
}

.bcc-latestCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}

.bcc-latestMedia {
  transition: transform .35s ease;
}

.bcc-latestCard:hover .bcc-latestMedia {
  transform: scale(1.05);
}