/* ==================================================
   SECTION GRID – FINAL
   ルール：
   - PC：cols指定どおり（触らない）
   - cols-1：常に1列
   - cols-2〜6：SP / Tablet は常に2列
   - スマホ判定：768
   - タブレット判定：1024
================================================== */

.section-grid {
  display: grid;
  gap: 32px;
}

/* =========================
   COLUMNS（PC）
========================= */

.section-grid.cols-1 { grid-template-columns: 1fr; }
.section-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.section-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.section-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.section-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.section-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

/* =========================
   CARD
========================= */

.section-grid .card {
  display: block;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

/* =========================
   IMAGE
========================= */

.section-grid .card-image {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.section-grid .card-image img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s ease;
}

/* VIEW MORE（hover） */
.section-grid .card-image::after {
  content: "VIEW MORE";
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.section-grid .card:hover .card-image::after {
  opacity: 1;
}

.section-grid .card:hover .card-image img {
  opacity: 0.9;
}

/* =========================
   TEXT
========================= */

.section-grid .card-title {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.section-grid .card-text {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
}

/* =========================
   GRID : COLS-1 HERO
========================= */

.section-grid.cols-1 .card-image {
  height: 300px;
  overflow: hidden;
}

.section-grid.cols-1 .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {

  .section-grid.cols-1 {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .section-grid.cols-1 .card-image {
    height: 200px;
  }
}

/* =========================
   RESPONSIVE（SP + TABLET）
========================= */

@media (max-width: 1024px) {

  /* cols-1 は例外：常に1列 */
  .section-grid.cols-1 {
    grid-template-columns: 1fr;
  }

  /* cols-2〜6 は常に2列 */
  .section-grid.cols-2,
  .section-grid.cols-3,
  .section-grid.cols-4,
  .section-grid.cols-5,
  .section-grid.cols-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section-grid {
    gap: 16px;
  }
}
