@charset "utf-8";

*,
::before,
::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.centerGroup {
  margin: 0 auto;
  text-align: center;
  padding: 4.8rem 0 8.3rem;
}

.backImg {
  width: 100%;
  min-height: 100vh; /* 最低でも画面高さは確保 */
  background-image: url("../img/greenback.jpg");
  background-size: cover; /* 画像を要素に合わせて拡大縮小 */
  background-position: center; /* 中央寄せ */
  border-radius: 200px; /* 角丸の大きさ */
  background-repeat: no-repeat; /* 繰り返さない */
  margin-top: 16rem;
  padding: 0 4rem 18.7rem;
}

.posterGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem 8rem;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
  justify-items: center;
}

.posterFrame {
  width: 29.161rem;
  height: 47.8rem;
  background-image: url("../img/frame.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8.1rem 5.2rem 9rem;
  position: relative;
}

.posterInner {
  width: 100%;
  height: 100%;
  overflow: visible;
  position: relative;
}

.posterInner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.posterText h3 {
  position: absolute;
  bottom: -5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  color: #8e3331; /* 文字色 */
  text-align: center;
  padding: 0.5rem 0;
  font-size: 1.4rem;
  margin-top: 1.2rem;
  background-color: #f9f6f1;
}

.posterDate {
  font-size: 1.2rem;
  position: absolute;
  top: -6rem;
  left: 50%;
  transform: translateX(-50%);
  color: #8e3331;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 5;
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}
#modalCaption {
  text-align: center;
  margin-top: 2.4rem; 
  font-size: 2.4rem;
  color: #f9f6f1; 
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 10px;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: #f9f6f1;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

@media screen and (max-width: 1024px) {
  .posterGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .posterGrid {
    grid-template-columns: 1fr;
  }
  
}
