/* Properties */
:root {
  --aged: #8E6F3E;
  --boiler-gold: #CFB991;
  --col-gap: 2rem;
  --dateH: 3rem;
  --inlineP: 1.5rem;
  --light-grey: #F1F1F1;
  --line-w: 25px;
  --row-gap: 2rem;
}


body {
  overflow-x: hidden;
}

.timeline ul li .date::before {
  text-align: center;
  display: grid;
  position: relative;
  top: -3px;
  left: -10px;
  content: "";
  z-index: 1;
  width: calc(100% + 21px);
  -webkit-transform: skewX(-15deg);
  transform: skewX(-15deg);
}

.historyCard {
  float: left;
  border: 1px solid #d4d4d4;
  border-radius: 2px;
  position: relative;
  -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
  max-width: 500px;    
}

.historyTitle {
  display: block;
  padding: 0.675rem 1.5rem;
  position: relative;
  background-color: #CFB991;
  color: #000;
  line-height: 1;
  font-family: "United Sans", Impact, "Arial Black", "sans serif";
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2.81px;
  transform: none;
  z-index: 1;
}

.historyIntro {
  font-size: 1.2rem;
  margin-bottom: 0;
  font-family: "United Sans", Impact, "Arial Black", "sans serif";
}

.historyImage {
  border-radius: 5px 5px 0 0;
}

.historyBody {
  border-top: 1px solid grey;
}

.imageContainer {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imageContainer img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
}

.timeline {
 width: 1200px;
}

.timeline ul {
  display: grid;
  grid-auto-columns: max-content;
  column-gap: var(--col-gap);
  list-style: none;
  margin-inline: auto;
}

.timeline ul::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 89;
  background: rgb(225, 225, 225);
  border-radius: 10px;
  width: 5px;
}

.timeline ul li .date::after {
  content: "";
  position: absolute;
  width: 2rem;
  aspect-ratio: 1;
  border: 0.3rem solid var(--aged);
  border-radius: 50%;
  background-color: var(--light-grey);
  top: 50%;
  transform: translate(50%, -50%);
  right: calc(107% + var(--col-gap) + var(--line-w) / 2);
}

.timeline ul li:not(:last-child) {
  margin-bottom: var(--row-gap);
}

.timeline ul li {
  grid-column: 2;
  border-radius: 5px;
  margin-inline: var(--inlineP);
  grid-row: span 2;
  display: grid;
  grid-template-rows: min-content min-content min-content;
}

.title, .bodyText {
  padding-inline: 1.5rem;
}

.timeline ul li .title {
  overflow: hidden;
  padding-block-start: 1.5rem;
  padding-block-end: 1rem;
  font-weight: 500;
}

.timeline ul li .bodyText {
  padding-block-end: 1.5rem;
}









/*------------ Media Queries ------------*/


@media (min-width: 1275px) {
  .timeline ul {
  grid-template-columns: 1fr var(--line-w) 1fr;
}
.timeline ul::before {
  grid-column: 2;
}
.timeline ul li:nth-child(odd) {
  grid-column: 1;
}
.timeline ul li:nth-child(even) {
  grid-column: 3;
}

/* start second card */
.timeline ul li:nth-child(2) {
  grid-row: 2/4;
}

.timeline ul li:nth-child(odd) .date::before {
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  left: 0;
}

.timeline ul li:nth-child(odd) .date::after {
  transform: translate(-50%, -50%);
  left: calc(103% + var(--col-gap) + var(--line-w) / 2);
}
.timeline ul li:nth-child(odd) .date {
  border-radius: 0 calc(var(--dateH) / 2) calc(var(--dateH) / 2) 0;
}
}











/* Media Queries */
@media (max-width: 800px) {
.timeline ul li .date::beffore {
  content: none;
}
.timeline ul li .date::after {
  content: none;
}
.timeline ul {
  margin-left: -70px;
}
.timeline ul li {
  grid-column: 1;
}
.historyCard {
  max-width: 350px;
}
}




@media (max-width: 850px) {
  .timeline ul li:nth-child(odd) .date::after {
    left: calc(111% + var(--col-gap) + var(--line-w) / 2);
  }
}
@media (max-width: 1275px) {
  .timeline ul li:nth-child(odd) .date::after {
    left: calc(-27% + var(--col-gap) + var(--line-w) / 2);
  }
  .timeline ul li .date::after {
    right: calc(103% + var(--col-gap) + var(--line-w) / 2);
  }
}
