.p-gallery__container {
  margin-top: 100px;
  margin-bottom: 120px;
}
@media (max-width: 47.9375em) {
  .p-gallery__container {
    margin-top: 40px;
    margin-bottom: 60px;
  }
}

.p-gallery__links {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
@media (max-width: 47.9375em) {
  .p-gallery__links {
    justify-content: space-between;
    gap: 15px 0;
    margin-bottom: 38px;
  }
}

@media not all and (max-width: 47.9375em) {
  .p-gallery__links-item {
    border-left: 1px solid #d9d9d9;
  }
  .p-gallery__links-item:last-of-type {
    border-right: 1px solid #d9d9d9;
  }
}
@media (max-width: 47.9375em) {
  .p-gallery__links-item {
    width: 46.9565217391%;
  }
}

.p-gallery__links-item a {
  display: block;
  padding: 12px 30px;
  line-height: 1.625;
  text-align: center;
}
@media (max-width: 47.9375em) {
  .p-gallery__links-item a {
    display: flex;
    position: relative;
    align-items: center;
    border-bottom: 1px solid #d9d9d9;
    padding: 0 0 15px;
    height: 100%;
    text-align: left;
    line-height: calc(21 / 15);
  }
}
@media not all and (max-width: 47.9375em) {
  .p-gallery__links-item a:hover {
    opacity: 0.8;
  }
  .p-gallery__links-item a:hover span::after {
    top: 10px;
  }
}
.p-gallery__links-item span {
  display: inline-block;
  position: relative;
  padding-right: 20px;
}
@media (max-width: 47.9375em) {
  .p-gallery__links-item span {
    display: block;
    position: static;
    padding-right: 0;
  }
}
.p-gallery__links-item span::after {
  position: absolute;
  top: 7px;
  right: 0;
  transform: rotate(135deg);
  transition: top 0.3s;
  border-top: solid 3px #0c3388;
  border-right: solid 3px #0c3388;
  width: 10px;
  height: 10px;
  content: "";
}
@media (max-width: 47.9375em) {
  .p-gallery__links-item span::after {
    top: calc(50% - 15px);
    right: 5px;
    transform: rotate(135deg) translateY(-50%);
    border-width: 2px;
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 47.9375em) {
  .p-gallery__links-item {
    border-left: 1px solid #d9d9d9;
    width: 33.3333333333%;
  }
  .p-gallery__links-item:nth-child(3n) {
    border-right: 1px solid #d9d9d9;
  }
  .p-gallery__links-item:last-of-type {
    border-right: 1px solid #d9d9d9;
  }
  .p-gallery__links-item a {
    justify-content: center;
    border-bottom: 0;
    padding: 5px 0;
  }
  .p-gallery__links-item span {
    position: relative;
    padding-right: 19px;
  }
  .p-gallery__links-item span::after {
    top: calc(50% - 8px);
    right: 0;
  }
}

.p-gallery__item {
  margin-top: 40px;
}

.p-gallery__item + .p-gallery__item {
  margin-top: 80px;
}

@media (max-width: 47.9375em) {
  .p-gallery__item + .p-gallery__item {
    margin-top: 58px;
  }
}

.p-gallery__item-wrap {
  margin-top: 40px;
}

.p-gallery__item-wrap + .p-gallery__item-wrap {
  margin-top: 60px;
}

@media (max-width: 47.9375em) {
  .p-gallery__item-wrap {
    margin-top: 28px;
  }

  .p-gallery__item-wrap + .p-gallery__item-wrap {
    margin-top: 40px;
  }
}


.p-gallery__movie {
  margin-top: 40px;
  max-width: 780px;
  margin-inline: auto;
  background-color: #f0f4fb;
}

@media (max-width: 47.9375em) {
  .p-gallery__movie {
    margin-top: 20px;
  }
}

.p-gallery__movie-wrap iframe {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #ccc;
}

.p-gallery__movie-title {
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: #000;
  padding: 19px 28px;
}

@media (max-width: 47.9375em){
  .p-gallery__movie-title {
    font-size: 1.3rem;
    line-height: calc(19/13);
    padding: 18px 23px;
  }
}

.p-gallery__poster {
  margin-top: 40px;
  max-width: 780px;
  margin-inline: auto;
}
