@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background-color: #ccc;
}
.container {
  padding: 10px;
  width: 900px;
  min-height: 800px;
  background-color: #f1f1f1;
  cursor: pointer;
}
.images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1em;
}

.images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.images div {
  position: relative;
}
.images div span {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
}

.modal {
  position: fixed;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  display: none;
  place-items: center;
  color: #fff;
}
.close {
  position: absolute;
  top: 1em;
  right: 1.5em;
  font-size: 25px;
  cursor: pointer;
}
.modal-content {
  min-height: 800px;
  width: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-content img {
  width: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.modal-content img.show {
  opacity: 1;
}
.modal-txt {
  font-size: 20px;
  padding: 10px 5px;
}

.modal-nav {
  padding: 10px 5px;
}

.modal-nav button {
  padding: 5px;
  width: 100px;
  font-size: 20px;
  background-color: transparent;
  color: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
  cursor: pointer;
  transition: 0.5s;
}

.modal-nav button:hover {
  background-color: teal;
}

.show {
  display: grid;
}
