/* memorial.css : 思い出写真館 一覧ページ用
   =============================================== */
.memoryWall-wrap {
  font-family: "ヒラギノ丸ゴ Pro", "Hiragino Maru Gothic Pro",
    "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka,
    "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  color: #333;
}

/* ===== カード全体レイアウト ===== */
.memoryWall-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 1fr;
  gap: 24px;
  justify-items: center;
  list-style: none;
  margin: 0 auto; /* センター寄せ */
  padding: 0;
  max-width: 1400px; /* ページ全体の最大幅を設定（任意） */
}

/* 最大5列固定（画面幅によって自動調整） */
@media (min-width: 1200px) {
  .memoryWall-track {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 1199px) and (min-width: 900px) {
  .memoryWall-track {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 899px) and (min-width: 600px) {
  .memoryWall-track {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 599px) {
  .memoryWall-track {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== 各カード ===== */
.memoryWall-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  background: #fafafa;
  border: 1px solid #ddd;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.memoryWall-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.memoryWall-card__link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

/* ===== サムネイル画像 ===== */
.memoryWall-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10; /* 横長比率 */
  overflow: hidden;
  flex-shrink: 0;
}

.memoryWall-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.memoryWall-card:hover .memoryWall-thumb img {
  transform: scale(1.05);
}

/* ===== タイトル ===== */
.memoryWall-card__title {
  padding: 12px 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  line-height: 1.4;
  flex-grow: 1;
}

/* ===== ページャ ===== */
.memoryWall-pager {
  margin-top: 40px;
  text-align: center;
  margin-bottom: 50px;
}

.page-numbers-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.page-numbers {
  display: inline-block;
  min-width: 32px;
  height: 32px;
  line-height: 32px;
  font-size: 14px;
  text-align: center;
  color: #333;
  border: 1px solid #ccc;
  background: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-numbers:hover {
  background: #f0f0f0;
}

.page-numbers.current {
  background: #333;
  color: #fff;
  border-color: #333;
}

.page-numbers.dots {
  pointer-events: none;
  color: #888;
}

/* ===== 「まだ投稿がありません」表示 ===== */
.memoryWall-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #777;
  font-size: 15px;
  padding: 50px 0;
}

/* ===== レスポンシブ微調整 ===== */
@media (max-width: 480px) {
  .memoryWall-card__title {
    font-size: 13px;
    padding: 10px 6px 14px;
  }
}

/* 他セクションと全体幅合わせる */
.mw-scope.memoryWall-wrap,
.mw-scope.memoryWall-wrap .memoryWall,
.mw-scope.memoryWall-wrap .memoryWall-track {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

.mw-scope.memoryWall-wrap .memoryWall-track {
  padding-left: 0 !important;
  list-style: none !important;
  outline: 2px dashed transparent;
}

.mw-scope.memoryWall-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ===== セクション下に余白を追加 ===== */
.memoryWall-wrap {
  margin-bottom: 60px; /* ページ下との間にゆとりを作る */
}
