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

body {
  background: #F0F8FF;
}

.placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-header {
  padding: 10px;
  font-family: "Patrick Hand SC";
  font-size: 3.5em;
  text-align: center;
  color: #ffcccc;
  text-shadow: 1px 1px 1px black;
}

.heading, .memory-date {
  font-family: "our-font";
  font-size: 2em;
  color: #000;
}

.text, .memory-text {
  font-family: "Nunito", sans-serif;
  font-size: 1em;
  color: #000;
}

.placeholder {
  background-color: #F0F8FF;
  height: 300px;
  width: auto;
}

.memory-date {
  text-align: center;
}

.memory-text {
  margin: 10px 0px;
  text-align: center;
}

.timeline {
  margin: 50px 0px;
}

.memory {
  list-style-type: none;
  position: relative;
  margin: 0 auto;
  width: 6px;
  padding-top: 50px;
  background: #ffcccc;
}

.memory::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 30px;
  height: 30px;
  border: 2px solid black;
  border-radius: 50%;
  background: #ffcccc;
  transition: background 0.5s ease-in-out;
}

.memory.in-view::after {
  background: #ffcccc;
}

.memory-container {
  position: relative;
  bottom: 0;
  width: 400px;
  padding: 5px;
  border-radius: 10px;
  background: #ffcccc;
  visibility: hidden;
  opacity: 0;
  transition: all 0.5s ease-in-out;
}

.memory-container.in-view {
  transform: none;
  visibility: visible;
  opacity: 1;
}

.memory-container::before {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 0;
  height: 0;
  border-style: solid;
}

.memory:nth-child(odd) .memory-container {
  left: 45px;
  transform: translate3d(200px, 0, 0);
}

.memory:nth-child(odd) .memory-container.in-view {
  transform: none;
}

.memory:nth-child(odd) .memory-container::before {
  left: -15px;
  border-width: 8px 16px 8px 0;
  border-color: transparent #ffcccc transparent transparent;
}

.memory:nth-child(even) .memory-container {
  right: 470px;
  transform: translate3d(-200px, 0, 0);
}

.memory:nth-child(even) .memory-container.in-view {
  transform: none;
}

.memory:nth-child(even) .memory-container::before {
  right: -15px;
  border-width: 8px 0 8px 16px;
  border-color: transparent transparent transparent #ffcccc;
}

/* ---- TIMELINE RESPONSIVENESS --- */
@media screen and (max-width: 900px) {
  .memory-container {
    width: 250px;
  }

  .memory:nth-child(even) .memory-container {
    right: 320px;
    /* 250 + 45 - 6*/
  }
}
@media screen and (max-width: 600px) {
  .memory {
    margin-left: 20px;
  }

  .memory-container {
    width: calc(100vw - 91px);
  }

  .memory:nth-child(even) .memory-container {
    left: 45px;
  }

  .memory:nth-child(even) .memory-container::before {
    left: -15px;
    border-width: 8px 16px 8px 0;
    border-color: transparent #ffcccc transparent transparent;
  }
}