* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background-image: url('https://cdn.dribbble.com/users/1514097/screenshots/3457456/media/b1cfddae9e7b9645b9cde7ad9ee4f6bf.gif');
  background-repeat: repeat;
  background-size: 160px;
}

main {
  position: relative;
  margin-top: auto;
  width: 100%;
  height: 100vh;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.popup {
  position: fixed;
  top: 20%;
  width: 50%;
  border: 2px solid white;
  padding: 2rem;
  border-radius: 20px;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0,0.8);
  transition: opacity 0.3s ease-in-out;
}

.popup p {
  font: 1rem helvetica, sans-serif;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.popup button {
  background-color: rgba(255, 255, 255, 0.5);
  color: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.6);
  margin: 0 0.25rem;
  padding: 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.popup button:hover {
  background-color: rgba(27, 53, 82, 0.3);
}

.popup a {
  color: white;
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
}

.popup a:hover {
  text-decoration: underline;
}

header nav div a img {
  width: auto;
  height: 70px;
  margin: 0 10px;
  transition: all 0.3s ease-in-out;
}

#container {
  margin-top: 100px;
}
.item {
  width: 200px;
  height: 300px;
  list-style-type: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: 0 20px 30px rgba(255, 255, 255, 0.3) inset;
  transition: transform 0.1s, left 0.75s, top 0.75s, width 0.75s, height 0.75s;
}

.item:nth-child(1),
.item:nth-child(2) {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
}

.item:nth-child(3) {
  left: 50%;
}

.item:nth-child(4) {
  left: calc(50% + 220px);
}

.item:nth-child(5) {
  left: calc(50% + 440px);
}

.item:nth-child(6) {
  left: calc(50% + 660px);
  opacity: 0;
}

.content {
  width: min(30vw, 400px);
  position: absolute;
  top: 50%;
  left: 3rem;
  transform: translateY(-50%);
  font: 400 0.85rem helvetica, sans-serif;
  color: white;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  display: none;
}

.content .title {
  font-family: 'arial-black';
  text-transform: uppercase;
  margin-left: 5px;
}

.content .description {
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  font-size: 0.8rem;
  margin-left: 5px;
}

.button-link {
  width: fit-content;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: 2px solid white;
  border-radius: 0.25rem;
  padding: 0.75rem;
  cursor: pointer;
}

.item:nth-of-type(2) .content {
  display: block;
  animation: show 0.75s ease-in-out 0.3s forwards;
}

@keyframes show {
  0% {
    filter: blur(5px);
    transform: translateY(calc(-50% + 75px));
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  user-select: none;
}

.nav .btn {
  background-color: rgba(255, 255, 255, 0.5);
  color: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.6);
  margin: 0 0.25rem;
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
}

.nav .btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}
.text {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 15px;
}

@media screen and (min-width: 650px) and (max-width: 900px) {
  .content .title {
    font-size: 1rem;
  }
  .content .description {
    font-size: 0.7rem;
  }
  .button-link {
    font-size: 0.7rem;
  }
  .item {
    width: 160px;
    height: 270px;
  }
  .item:nth-child(3) {
    left: 50%;
  }
  .item:nth-child(4) {
    left: calc(50% + 170px);
  }
  .item:nth-child(5) {
    left: calc(50% + 340px);
  }
  .item:nth-child(6) {
    left: calc(50% + 510px);
    opacity: 0;
  }
}

@media screen and (max-width: 650px) {
  main {
    height: 100vh;
  }
  .nav {
    bottom: 15%;
  }
  .content {
    min-width: 70%;
    left: 1rem;
  }
  .content .title {
    font-size: 1.5rem;
  }
  .content .description {
    font-size: 0.8rem;
  }
  .button-link {
    font-size: 0.7rem;
  }
  .item {
    width: 130px;
    height: 220px;
  }
  .item:nth-child(3) {
    left: 50%;
  }
  .item:nth-child(4) {
    left: calc(50% + 140px);
  }
  .item:nth-child(5) {
    left: calc(50% + 280px);
  }
  .item:nth-child(6) {
    left: calc(50% + 420px);
    opacity: 0;
  }
  .item.image-hidden {
    display: none;
  }
  .popup {
    width: 100%;
  }
}