/* ============================================
   Home Blog Section — 4-col featured grid
   Mobile: single column / PC: 4-col, :first-child spans 2×2
   ============================================ */

.blog-section {
  padding: var(--sp-8) var(--sp-6);
  background: var(--gx-bg-page);
}

.blog-section__inner {
  max-width: var(--gx-content-max);
  margin: 0 auto;
}

/* ── Section header: title + "すべて見る" link ── */

.blog-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.blog-section__heading-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.blog-section__heading-wrap .brxe-icon {
  font-size: var(--fs-xl);
  color: var(--gx-accent);
}

.blog-section__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--gx-ink);
  margin: 0;
}

.blog-section__cta {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gx-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  white-space: nowrap;
}

.blog-section__cta:hover {
  text-decoration: underline;
}

/* ── Blog grid ─────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

/* ── Blog card ─────────────────────────────── */

.blog-card {
  background: var(--gx-white);
  border-radius: var(--gx-r-lg);
  box-shadow: var(--gx-shadow-md);
  overflow: hidden;
  transition: box-shadow var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.blog-card:hover {
  box-shadow: var(--gx-shadow-lg);
  transform: translateY(-2px);
}

.blog-card__inner {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Bricks wraps image in .brxe-image; also target img directly */
.blog-card__inner .brxe-image,
.blog-card__inner img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: var(--gx-gray-light);
}

.blog-card__body {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

.blog-card__title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--gx-ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Hidden on mobile for all cards; shown on PC featured card only */
.blog-card__excerpt {
  display: none;
  font-size: var(--fs-sm);
  color: var(--gx-ink-2);
  line-height: 1.6;
}

.blog-card__meta {
  font-size: var(--fs-xs);
  color: var(--gx-gray);
  margin-top: auto;
  padding-top: var(--sp-2);
}

/* ── PC (min-width: 768px) ────────────────── */

@media (min-width: 768px) {
  .blog-section {
    padding: var(--sp-12) var(--sp-8);
  }

  .blog-section__title {
    font-size: var(--fs-2xl);
  }

  .blog-section__heading-wrap .brxe-icon {
    font-size: var(--fs-2xl);
  }

  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Featured (first loop iteration): spans 2 cols × 2 rows */
  .blog-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  /* Featured card image: taller aspect ratio to fill 2-row space */
  .blog-card:first-child .blog-card__inner .brxe-image,
  .blog-card:first-child .blog-card__inner img {
    aspect-ratio: 4 / 3;
  }

  /* Show excerpt on featured card only */
  .blog-card:first-child .blog-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
