@charset "UTF-8";
/* CSS Document */

/* =========================================================
 modal
========================================================= */
.modal {
  padding: 0 0 80px;
}

/* モーダルを開くボタン */
.modal__images {
  display: flex;
  flex-wrap: wrap;
  margin: -6px;
}

.modal__images .modal__image {
  position: relative;
  width: calc((100% - (12px * 6)) / 6);
  transition: opacity .6s;
  height: 170px;
  margin: 6px;
}
.modal__images .modal__image::after {
	position: absolute;
	content: "";
	width: 20px;
	height: 20px;
	background: url('../../images/shared/ico_zoom.png') no-repeat;
	background-size: 20px 20px;
	right: 0;
	bottom: 0;
}

.modal__images .modal__image:hover {
  opacity: .6;
}

.modal__images .modal__trigger {
  cursor: pointer;
}

.modal__images .modal__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* モーダル本体 */
.modal__wrapper {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  z-index: 20;
  width: 100%;
  height: 100%;
}

.modal__layer {
  height: 100%;
  background: rgba(50, 50, 50, .85);
  cursor: pointer;
}

.modal__container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; /* 変更 */
  max-width: 1000px; /* 追加 */
  max-height: 90%; /* 変更 */
  overflow: hidden; /* 変更 */
}

/* モーダルを閉じるボタン */
.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(50, 50, 50, 1);
  cursor: pointer;
  transition: opacity .6s;
  border-radius: 999px;
  border: 1px solid #fff;
}

.modal__close:hover {
  opacity: .6;
}

.modal__close:before,
.modal__close:after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  background: #fff;
  content: '';
}

.modal__close:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal__content .modal__image img {
  width: 100%;
  height: auto; /* 追加 */
  max-height: 80vh; /* 追加 */
  object-fit: contain; /* 変更 */
}


/* //////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////

SPサイトcss

////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////*/
@media screen and (max-width: 768px) {
.modal {
  padding: 0 0 40px;
}
.modal__images .modal__image {
  position: relative;
  width: calc((100% - (12px * 3)) / 3);
  transition: opacity .6s;
  height: 100px;
  margin: 6px;
}

/* モーダルを閉じるボタン */
.modal__close {
  width: 24px;
  height: 24px;
  top: 10px;
  right: 10px;
}


.modal__close:before,
.modal__close:after {
  width: 10px;
}

}




