/* fonts and general */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 200vh;
}

/* the container */

.container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin: 1em;
  min-height: 100vh;
  width: 90vw;
  box-sizing: border-box;
}

/* header */

header {
  padding: 20px;
  border-radius: 10px;
  color: #333333;
  background-image: url('https://images.unsplash.com/photo-1542435503-956c469947f6?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1867&q=80');
  background-position: center;
  background-size: cover;
  margin: 4em 0 0 0;
  width: 70%;
  text-align: center;
}

/* info box */
.info {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 50%;
  height: 3em;
  position: relative;
  margin: 1em;
}

.info .button {
  position: absolute;
  margin: auto;
  cursor: pointer;
}

.info i {
  color: #333;
  font-size: 3rem;
}

.info p {
  font-size: 1rem;
  width: 30em;
  height: 0;
  opacity: 0;
}

.info a {
  text-decoration: underline;
  color: #333333;
}

.info a:hover {
  text-decoration: none;
}

.info.active p {
  opacity: 1;
  transition: opacity 1.3s ease;
  height: auto;
}

.info.active i {
  transform: rotate(-360deg);
  transition: transform 1.3s ease;
}

.info.active .button {
  transform: translateX(-18rem);
  transition: transform 1.3s ease;
}

/* the list */

.entry {
  width: 50%;
  cursor: pointer;
  margin: 10px;
  padding: 1em;
  background-position: center;
  background-size: cover;
  position: relative;
  background-color: #e2e1e1;
  border-radius: 10px;
  flex: initial;
  transition: flex 0.8s ease-out;
}

.entry a {
  text-decoration: none;
  color: #333333;
  display: inline-block;
  width: 100%;
  height: 100%;
}

.entry h3 {
  margin-block-start: 0;
  margin-block-end: 0;
}

.entry p {
  position: absolute;
  right: 20px;
  bottom: 10px;
  margin: 0;
  font-style: italic;
  font-size: smaller;
  opacity: 0;
}

.entry.active {
  transform: scale(1.1);
  transition: transform 0.8s ease;
}

.entry.active p {
  opacity: 1;
  transition: opacity 0.2s ease-in 0.4s;
}

@media screen and (max-width: 1000px) {
  header {
    width: 90%;
  }

  .container {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .info {
    width: 80%;
  }

  .entry {
    width: 80%;
  }
}

@media screen and (max-width: 550px) {
  .info {
    width: 80%;
    height: auto;
    flex-direction: column;
  }

  .info p {
    width: auto;
    display: inline-block;
  }

  .info a {
    height: auto;
    width: auto;
  }

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

  .info.active .button {
    position: initial;
    transform: none;
  }

  .entry {
    width: 90%;
  }

  .entry p {
    display: none;
  }

  .entry.active p {
    opacity: 0;
    display: none;
  }
}
