/**
 * Movie archive page only.
 * Every selector is scoped to the movie page root to avoid affecting existing pages.
 */

.movie-page {
  padding-top: 0;
}

.page-template-page-movie .p-cta {
  margin-top: 100px;
}

.movie-page__inner {
  width: 100%;
  max-width: 1140px;
  padding-inline: 20px;
  margin-inline: auto;
}

.movie-page__title {
  margin: 0 0 60px;
  color: #191818;
}

.movie-page__title-ja,
.movie-page__title-en {
  display: block;
}

.movie-page__title-ja {
  position: relative;
  padding-left: 10px;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", YuGothic, "Yu Gothic", Meiryo, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.8;
  color: #a0a0a0;
}

.movie-page__title-ja::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  background: #191818;
  border-radius: 50%;
  transform: translateY(-50%);
  content: "";
}

.movie-page__title-en {
  font-family: "Open Sans", sans-serif;
  font-size: clamp(2.5rem, 1.466rem + 4.24vw, 3.5rem);
  font-weight: 600;
  line-height: 1.36;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 40px;
  padding: 0;
  margin: 0;
}

.movie-card {
  min-width: 0;
}

.movie-card__trigger {
  position: relative;
  display: grid;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 34 / 21;
  background: #fff;
  border: 1px solid #dedede;
  cursor: pointer;
  place-items: center;
}

.movie-card__trigger:disabled {
  cursor: default;
}

.movie-card__thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-card__play {
  position: relative;
  width: 40px;
  height: 40px;
  z-index: 1;
}

.movie-card__title {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.8;
  color: #191818;
  word-break: normal;
}

.movie-card__trigger:focus-visible,
.movie-pagination a:focus-visible {
  outline: 2px solid #191818;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .movie-card__trigger:not(:disabled) .movie-card__thumbnail,
  .movie-card__trigger:not(:disabled) .movie-card__play {
    transition: transform 0.3s ease;
  }

  .movie-card__trigger:not(:disabled):hover .movie-card__thumbnail {
    transform: scale(1.025);
  }

  .movie-card__trigger:not(:disabled):hover .movie-card__play {
    transform: scale(1.08);
  }
}

.movie-pagination {
  margin-top: 60px;
}

.movie-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0;
  margin: 0;
}

.movie-pagination ul.page-numbers li {
  flex: 0 0 auto;
}

.movie-pagination .page-numbers li > .page-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1;
  color: #191818;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 999px;
}

.movie-pagination .page-numbers li > .current {
  color: #fff;
  background: #191818;
  border-color: #191818;
}

.movie-pagination .page-numbers li > .prev,
.movie-pagination .page-numbers li > .next {
  min-width: 76px;
  font-weight: 600;
}

.movie-pagination .page-numbers li > .dots {
  border-color: transparent;
}

.movie-page__empty {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
}

@media screen and (max-width: 1023px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(24px, 5.21vw, 40px);
  }
}

@media screen and (max-width: 767px) {
  .movie-page {
    padding-top: 40px;
  }

  .movie-page__title {
    margin-bottom: 30px;
  }

  .movie-grid {
    row-gap: 30px;
  }

  .movie-pagination {
    margin-top: 40px;
  }

  .movie-pagination .page-numbers {
    gap: 10px;
  }
}

@media screen and (max-width: 600px) {
  .movie-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
