/*HISTORY PAGE CSS IS BELOW*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

main {
  background-color: rgb(231, 231, 231);
}

h3 {
  margin-bottom: 0;
}

.year-entry {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 6rem 1fr 3rem;
  max-width: 80rem;
  margin: 10rem auto 0 auto;
}

.year-entry img {
  width: 30rem;
  height: auto;
  border-radius: 0.5rem;
}

.year-entry p {
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  font-size: 1.8rem;
  line-height: 1.8;
  background-color: rgb(199, 199, 199);
  border: 4px solid #0b900b;
  padding: 2.5rem;
  border-radius: 0.5rem;
}

.year {
  grid-column: 1 / 4;
  grid-row: 1 / 2;
  margin-bottom: 3.2rem;
  justify-self: center;
  font-size: 4.2rem;
  color: rgb(41, 41, 41);
}

.img-left {
  grid-row: 2 / 3;
  grid-column: 1 / 4;
  /* max-width: 100%; */
  align-self: flex-start;
  justify-self: center;
}

.text-right {
  grid-row: 2 / 3;
  grid-column: -1 / -4;
  align-self: flex-start;
}

.text-left {
  grid-row: 2 / 3;
  grid-column: 1 / 4;
  align-self: flex-start;
}

.img-right {
  grid-row: 2 / 3;
  grid-column: 4 / 7;
  width: 100%;
  /* padding: 0 4rem; */
  align-self: flex-start;
  justify-self: center;
}

.img-flex-2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5rem;
  justify-self: center;
}

.return-to-top {
  font-style: italic;
  font-size: 2rem;
  color: #097309;
  grid-column: -1 / -4;
  grid-row: 3 / 4;
  margin-left: auto;
}

.return-to-top:hover {
  text-decoration: underline;
}

.inline-phone:link,
.inline-phone:visited {
  text-decoration: underline;
}

.inline-phone:hover,
.inline-phone:active {
  color: #fe7102;
}

/**********************************
      MEDIA QUERIES
***********************************/

/* smaller than 768px */

@media (max-width: 48em) {
  .year-entry img {
    width: 24rem;
    align-self: center;
  }

  .year-entry {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }

  .return-to-top {
    margin-right: 0.4rem;
  }

  .year-entry p {
    font-size: 1.6rem;
    display: inline;
  }

  .text-right {
    align-self: center;
  }

  .text-left {
    align-self: center;
  }

  .img-flex-2 {
    gap: 2rem;
    align-self: center;
  }
}

/* smaller than 560px */

@media (max-width: 35em) {
  .year-entry {
    grid-template-columns: 1fr;
    grid-template-rows: 6rem auto 1fr;
  }

  .year-entry p {
    margin: 2rem 0.4rem 0 0.4rem;
    line-height: 1.2;
    padding: 1rem;
  }

  .year {
    grid-column: 1 / 2;
  }

  .img-left {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .text-right {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }

  .img-right {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .text-left {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }

  .return-to-top {
    grid-column: 1 / 2;
    grid-row: 4 / 5;
  }
}f

@media (max-width: 30em) {
  .history-main-title {
    font-size: 2.8rem;
    margin: 0;
    padding: 2rem 1rem 0 1rem;
  }

  .year-entry {
    margin-top: 2rem;
  }

  .year {
    font-size: 2.8rem;
    align-self: center;
    margin: 0;
  }
}
