.container .img-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  grid-gap: 1rem;
}
.container .img-grid .img-box {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  border: 0.1rem solid #0787ff;
  box-sizing: border-box;
  overflow: hidden;
}
.container .img-grid .img-box .img-timg {
  width: 100%;
  height: calc(100% + 1rem);
  object-fit: cover;
}
.container .img-grid .img-box .img-timg:hover {
  cursor: pointer;
}
.container .modal {
  display: none;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  padding-top: 3rem;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.9);
}
.container .modal .close, .container .modal .previous, .container .modal .next {
  position: absolute;
  color: gray;
  opacity: 0.7;
  user-select: none;
}
.container .modal .close:hover, .container .modal .previous:hover, .container .modal .next:hover {
  cursor: pointer;
  opacity: 1;
  transition: 200ms ease-in;
}
.container .modal .close {
  font-size: 3rem;
  font-weight: bold;
  top: 1rem;
  left: 2rem;
}
.container .modal .previous {
  font-size: 4rem;
  top: 37%;
  left: 2rem;
}
.container .modal .next {
  font-size: 4rem;
  top: 37%;
  right: 2rem;
}
.container .modal .modal-content {
  margin: auto;
  display: block;
  width: auto;
  height: 80%;
  border: 0.1rem solid teal;
  border-radius: 0.5rem;
}
.container .modal .caption {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-style: italic;
  text-align: center;
  color: gray;
  margin-top: 1rem;
}

@media (max-width: 1100px) {
  .container .modal .previous, .container .modal .next {
    display: none;
  }
}
@media (max-width: 1024px) {
  .container {
    padding: 0;
  }
  .container .modal .modal-content {
    width: 96%;
    height: auto;
    margin-top: 2rem;
  }
}