/* ===================== バナーグリッド ===================== */
.movie-section { padding: 60px 0; }
.movie-section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
  box-sizing: border-box;
}

.movie-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.movie-banner {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  line-height: 0;
  transition: opacity .25s ease, transform .25s ease;
}
.movie-banner:hover { opacity: .85; transform: translateY(-2px); }
.movie-banner:focus-visible { outline: 3px solid #98639B; outline-offset: 3px; }

.movie-banner__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===================== モーダル ===================== */
.movie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  box-sizing: border-box;
}
.movie-modal.is-open { display: flex; }

.movie-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}

.movie-modal__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: auto;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  padding: 30px;
  box-sizing: border-box;
}

/* 閉じるボタン（右上の濃いグレー丸＋白×） */
.movie-modal__close {
  position: absolute;
  top: -22px;
  right: -22px;
  z-index: 5;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #3a3a3a;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .2s ease;
}
.movie-modal__close::before,
.movie-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: #fff;
}
.movie-modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.movie-modal__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.movie-modal__close:hover { background: #555; }
.movie-modal__close:focus-visible { outline: 3px solid #98639B; outline-offset: 2px; }

/* YouTube動画（16:9） */
.movie-modal__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ddd;
}
.movie-modal__player,
.movie-modal__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.movie-modal__body { margin-top: 26px; }

.movie-modal__text {
  font-size: 15px;
  line-height: 1.9;
  color: #444;
  letter-spacing: .02em;
}

.movie-modal__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin-top: 26px;
  padding: 14px 24px;
  box-sizing: border-box;
  border: 1px solid #98639B;
  color: #98639B;
  font-size: 16px;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.movie-modal__link:hover {
  background: #98639B;
  color: #fff;
}

/* body スクロールロック用 */
body.movie-modal-open { overflow: hidden; }

/* ===================== 1024px以下 ===================== */
@media (max-width: 1024px) {
  .movie-section { padding: 48px 0; }
  .movie-section__inner { padding: 0 24px; }
  .movie-grid { gap: 28px; }
  .movie-modal__inner { max-width: 640px; padding: 26px; }
}

/* ===================== 599px以下 ===================== */
@media (max-width: 599px) {
  .movie-section { padding: 36px 0; }
  .movie-section__inner { padding: 0 16px; }

  .movie-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .movie-modal { padding: 40px 12px; align-items: flex-start; }
  .movie-modal__inner {
    max-width: none;
    padding: 50px 14px 24px;            /* 上部に×ボタン用の余白 */
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  }
  .movie-modal__close {
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
  }
  .movie-modal__close::before,
  .movie-modal__close::after { width: 16px; }
  .movie-modal__body { margin-top: 20px; }
  .movie-modal__text { font-size: 14px; line-height: 1.85; }
  .movie-modal__link { min-height: 54px; font-size: 15px; margin-top: 20px; }
}

/* モーション軽減 */
@media (prefers-reduced-motion: reduce) {
  .movie-banner,
  .movie-modal__link,
  .movie-modal__close { transition: none; }
  .movie-banner:hover { transform: none; }
}
