
.modal {
  position: relative;
  z-index: 999;
}

.modal-overlay {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transition: opacity 200ms linear;
}

.modal.is-open .modal-overlay {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  max-width: 1000px;
  max-height: 90vh;
  transform: translateY(24px);
  transition: transform 300ms ease-in-out;
  width: 77vw;
}

.modal.is-open .modal-container {
  transform: translateY(0);
  z-index: 999;
}

.modal-title {
  border-bottom: 1px solid #dedede;
  font-size: 1.25rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
}

.modal-footer {
  margin-top: 1.5rem;
  text-align: right;
}

.button {
  background-color: #71c9ce;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.12);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  outline: 0;
  padding: 0.75rem 1rem;
}


/* モーダルコンテンツ */

.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 76px;
  height: 40px;
  background-color: #EAF1E8;
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  width: 35px;
  height: 1px;
  background-color: #333;
}

.modal-close::before {
  transform: rotate(23deg);
}

.modal-close::after {
  transform: rotate(-23deg);
}

.modal-content {
  display: grid;
  /* grid-template-columns: repeat(3, 1fr);
  gap: 20px; */
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.modal-item {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
}

.modal-item a {
  display: inline-block;
  width: 100%;
}

.modal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {

  .modal-container {
    max-width: 816px;
  }
  .modal-container.col-2cal {
    max-width: 527px;
  }

  .sp-2cal.modal-container  {
    max-width: 527px;
  }

  .modal-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
  }

  .sp-2cal .modal-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .col-2cal .modal-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-close {
      width: 126px;
      height: 67px;
  }

  .modal-close::before,
  .modal-close::after {
    width: 57px;
  }


}