main.movie-gallery .movie-gallery__inner {
  max-width: 1160px;
  margin: 0 auto;

  @media screen and (max-width: 767px) {
    padding: 0 calc(40 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__heading {
  padding-top: 230px;
  margin-bottom: 100px;
  text-align: center;
  line-height: 1;

  @media screen and (max-width: 767px) {
    padding: calc(220 / 750 * 100vw) 0 0;
    margin-bottom: calc(80 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__heading-inner {
  position: relative;
  display: inline-block;
}

main.movie-gallery .movie-gallery__heading-deco {
  position: absolute;
  top: -50px;
  left: -76px;
  width: 134px;

  @media screen and (max-width: 767px) {
    top: calc(-50 / 750 * 100vw);
    left: calc(-50 / 750 * 100vw);
    width: calc(145 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__heading-main {
  display: block;
  font-size: 4.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;

  @media screen and (max-width: 767px) {
    font-size: calc(50 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__filter {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 80px;
  padding: 30px 60px;
  background-color: #e8e8db;

  @media screen and (max-width: 767px) {
    margin-bottom: calc(80 / 750 * 100vw);
    gap: calc(30 / 750 * 100vw);
    flex-direction: column;
    align-items: stretch;
    padding: calc(50 / 750 * 100vw) calc(95 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__filter-label {
  flex-shrink: 0;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0.15em;

  @media screen and (max-width: 767px) {
    letter-spacing: 0.2em;
    font-size: calc(32 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__filter-selects {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 10px;

  @media screen and (max-width: 767px) {
    flex-direction: column;
    gap: calc(20 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__filter-item {
  flex: 1;
  min-width: 0;
}

main.movie-gallery .movie-gallery__filter-select {
  appearance: none;
  width: 100%;
  height: 60px;
  border-radius: 9999px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='6' viewBox='0 0 7 6'%3E%3Cpath fill='%23555' d='M0 0h7L3.5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 22px center;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: inherit;
  filter: brightness(100%);
  transition: filter 0.5s;

  @media (hover: hover) {
    &:hover {
      filter: brightness(90%);
    }
  }

  &:focus-visible {
    outline: 2px solid #3a3733;
    outline-offset: 2px;
  }

  @media screen and (max-width: 767px) {
    height: calc(80 / 750 * 100vw);
    font-size: calc(28 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__filter-result {
  margin-bottom: 40px;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0.15em;
  font-weight: 600;

  @media screen and (max-width: 767px) {
    margin-bottom: calc(50 / 750 * 100vw);
    font-size: calc(26 / 750 * 100vw);
    letter-spacing: 0.2em;
  }
}

main.movie-gallery .movie-gallery__filter-result-value {
  font-size: 3rem;
  letter-spacing: 0.1em;
  font-weight: 500;

  @media screen and (max-width: 767px) {
    font-size: calc(40 / 750 * 100vw);
    letter-spacing: 0.2em;
  }
}

main.movie-gallery .movie-gallery__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 40px;

  @media screen and (max-width: 767px) {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(60 / 750 * 100vw) calc(38 / 750 * 100vw);
  }
}

main.movie-gallery .movie-gallery__item {
  min-width: 0;
}

main.movie-gallery .movie-card {
  text-align: center;
}

main.movie-gallery .movie-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  overflow: clip;

  @media (hover: hover) {
    &:hover img {
      transform: scale(1.05);
    }
  }
}

main.movie-gallery .movie-card__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.5s;
}

main.movie-gallery .movie-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 70px;
  border: 1px solid #fff;
  border-radius: 50%;
  background-color: transparent;
  transform: translate(-50%, -50%);

  &::before {
    position: absolute;
    top: 50%;
    left: 54%;
    width: 20%;
    aspect-ratio: 14 / 17;
    background-color: #fff;
    content: "";
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 17'%3E%3Cpath d='M0 3Q0 0 2.56 1.56L11.44 6.94Q14 8.5 11.44 10.06L2.56 15.44Q0 17 0 14Z' fill='%23fff'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: 100% 100%;
    transform: translate(-50%, -50%);
  }

  @media screen and (max-width: 767px) {
    width: calc(90 / 750 * 100vw);
    height: calc(90 / 750 * 100vw);
  }
}

main.movie-gallery .movie-card__title {
  margin-top: 30px;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  line-height: 1.7;

  @media screen and (max-width: 767px) {
    margin-top: calc(40 / 750 * 100vw);
    font-size: calc(26 / 750 * 100vw);
  }
}

main.movie-gallery .movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.5em;
  margin-top: 19px;
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  line-height: 2;
  color: rgba(51, 51, 51, 0.5);

  @media screen and (max-width: 767px) {
    margin-top: calc(30 / 750 * 100vw);
    font-size: calc(20 / 750 * 100vw);
  }
}

main.movie-gallery .movie-card__tag {
  white-space: nowrap;
}

main.movie-gallery .movie-card__article {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 180px;
  margin-top: 25px;
  padding: 13px 30px;
  border-radius: 999px;
  background-color: #3a3733;
  color: #fff;
  font-size: 1.4rem;
  text-decoration: none;
  transition: transform 0.5s;

  @media (hover: hover) {
    &:hover {
      transform: scale(1.05);
    }
  }

  @media screen and (max-width: 767px) {
    min-width: 0;
    gap: calc(16 / 750 * 100vw);
    margin-top: calc(30 / 750 * 100vw);
    padding: calc(19 / 750 * 100vw) calc(36 / 750 * 100vw);
    font-size: calc(24 / 750 * 100vw);
  }
}

main.movie-gallery .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: clip;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.movie-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;

  &.is-open {
    display: block;
  }
}

.movie-gallery-modal .modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(51, 51, 51, 0.8);
}

.movie-gallery-modal .wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.movie-gallery-modal .modal__close {
  position: fixed;
  top: 40px;
  right: 40px;
  z-index: 1001;
  width: 74px;
  height: 74px;
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity 0.2s;

  @media (hover: hover) {
    &:hover {
      opacity: 0.7;
    }
  }

  &::before,
  &::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 2px;
    background: #fff;
    content: "";
    transform: translate(-50%, -50%) rotate(45deg);
  }

  &::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  @media screen and (max-width: 767px) {
    top: calc(40 / 750 * 100vw);
    right: calc(40 / 750 * 100vw);
    width: calc(120 / 750 * 100vw);
    height: calc(120 / 750 * 100vw);

    &::before,
    &::after {
      width: calc(168 / 750 * 100vw);
      height: 1px;
    }
  }
}

.movie-gallery-modal .modal__container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
  padding: 120px 20px 80px;

  @media screen and (max-width: 767px) {
    padding: calc(200 / 750 * 100vw) calc(40 / 750 * 100vw) calc(120 / 750 * 100vw);
  }
}

.movie-gallery-modal .modal__content {
  width: 100%;
  max-width: 900px;
}

.movie-gallery-modal .movie-gallery-modal__title {
  margin-bottom: 21px;
  text-align: center;
  font-size: 3rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: #fff;
  line-height: 1.6;

  @media screen and (max-width: 767px) {
    font-size: calc(40 / 750 * 100vw);
  }
}

.movie-gallery-modal .movie-gallery-modal__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.5em;
  margin-bottom: 50px;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;

  @media screen and (max-width: 767px) {
    margin-bottom: calc(60 / 750 * 100vw);
    font-size: calc(26 / 750 * 100vw);
    letter-spacing: 0.2em;
  }
}

.movie-gallery-modal .movie-gallery-modal__tag {
  white-space: nowrap;
}

.movie-gallery-modal .movie-gallery-modal__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.movie-gallery-modal .movie-gallery-modal__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.movie-gallery-modal .movie-gallery-modal__article {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  min-height: 60px;
  margin: 50px auto 0;
  padding: 23px 30px;
  border-radius: 999px;
  background-color: #f7f5ec;
  font-size: 1.4rem;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: transform 0.5s;

  @media (hover: hover) {
    &:hover {
      transform: scale(1.05);
    }
  }

  @media screen and (max-width: 767px) {
    max-width: none;
    width: calc(480 / 750 * 100vw);
    margin-top: calc(80 / 750 * 100vw);
    padding: calc(27 / 750 * 100vw) calc(40 / 750 * 100vw);
    font-size: calc(28 / 750 * 100vw);
    letter-spacing: 0.05em;
    min-height: 40px;
  }
}

.movie-gallery-modal .movie-gallery-modal__article-arrow {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);

  @media screen and (max-width: 767px) {
    right: calc(30 / 750 * 100vw);
  }
}
