@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

:root {
  --bggray: #a9a9a9;
  --datebox: red;
  --button: #276188;
  --bgwhite: white;
  --titlecolor: #333333;
  --timelineblue: #276188;
}
body {
  background-color: var(--bggray);
}
ul {
  list-style: none;
  padding: 0;
}
.container {
  position: relative;
  min-height: 100vh;
  width: 80%;
  margin: 0 auto;
}

.container::before {
  content: "";
  top: 0;
  bottom: 0;
  border: solid 2px var(--timelineblue);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-event:nth-child(odd)::before {
  font-family: "FontAwesome";
  content: "\f303";
  position: absolute;
  height: 25px;
  border-radius: 50%;
  width: 25px;
  padding-left: 2.5px;
  padding-top: 2px;
  color: var(--timelineblue);
  background-color: var(--timelineblue);
  border: 2px solid var(--timelineblue);
  color: var(--bgwhite);
  top: 15%;
  left: 111.3%;
}
.timeline-event:nth-child(even)::after {
  font-family: "FontAwesome";
  content: "\f303";
  position: absolute;
  height: 25px;
  border-radius: 50%;
  width: 25px;
  padding-left: 2.5px;
  padding-top: 2px;
  color: var(--timelineblue);
  background-color: var(--timelineblue);
  border: 2px solid var(--timelineblue);
  color: var(--bgwhite);
  top: 13%;
  left: -17%;
}
.timeline {
  display: flex;
  flex-direction: column;
}
.timeline-event {
  height: 230px;
  background-color: var(--bgwhite);
  width: 35%;
  position: relative;
  border-radius: 4px;
}
.timeline-event:nth-child(odd) {
  margin-left: 10%;
}
.timeline-event:nth-child(even) {
  margin: 3% 10% 3% auto;
}
.timeline-event:nth-child(odd)::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-left: 12px solid var(--bgwhite);
  border-bottom: 6px solid transparent;
  position: absolute;
  top: 18%;
  left: 100%;
}
.timeline-event:nth-child(even)::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-right: 12px solid var(--bgwhite);
  border-bottom: 6px solid transparent;
  position: absolute;
  top: 16%;
  right: 100%;
}

.odd-datebox {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--datebox);
  border: none;
  color: var(--bgwhite);
  font-family: "Roboto", sans-serif;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 4px;
}
.even-datebox {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--datebox);
  border: none;
  color: var(--bgwhite);
  font-family: "Roboto", sans-serif;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 4px;
}
.image-container {
  position: absolute;
  top: 0;
  height: 50%;
  width: 100%;
  background-image: url("images/thirdcat.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
h2 {
  margin: 0;
  top: 4%;
  left: 3%;
  display: inline-block;
  position: absolute;
  font-family: "Roboto", sans-serif;
  color: var(--titlecolor);
}
.image-container > h2 {
  top: 80%;
  transform: translateY(-50%);
  color: var(--bgwhite);
}
p {
  margin: 3px;
  position: absolute;
  top: 33%;
  left: 3%;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  padding-right: 20px;
  color: var(--titlecolor);
}
.timeline-event:nth-child(even) > p {
  top: 52%;
}
.button {
  position: absolute;
  bottom: 5%;
  left: 3%;
  background-color: var(--button);
  border: none;
  border-radius: 3px;
  padding: 6px 10px;
  color: var(--bgwhite);
  font-family: "Roboto", sans-serif;
  font-size: 10px;
  transition-duration: 0.3s;
}

.button:hover {
  background-color: #43a2e5;
  color: #ffffff;
  font-size: 12px;
}
@media (max-width: 1120px) {
  .timeline-event:nth-child(odd) {
    margin: 5% 0 5% 10%;
  }
  .container::before {
    left: 2%;
  }
  .timeline-event:nth-child(even) {
    margin: 5% 0 5% 10%;
  }
  .timeline-event:nth-child(odd)::before {
    font-family: "FontAwesome";
    content: "\f303";
    position: absolute;
    height: 25px;
    border-radius: 50%;
    width: 25px;
    padding-left: 2.5px;
    padding-top: 2px;
    color: var(--timelineblue);
    background-color: var(--timelineblue);
    border: 2px solid var(--timelineblue);
    color: var(--bgwhite);
    top: 5%;
    left: -30%;
  }
  .timeline-event:nth-child(even)::after {
    font-family: "FontAwesome";
    content: "\f303";
    position: absolute;
    height: 25px;
    border-radius: 50%;
    width: 25px;
    padding-left: 2.5px;
    padding-top: 2px;
    color: var(--timelineblue);
    background-color: var(--timelineblue);
    border: 2px solid var(--timelineblue);
    color: var(--bgwhite);
    top: 12.6%;
    left: -30%;
  }
  .timeline-event:nth-child(odd)::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-right: 12px solid var(--bgwhite);
    border-bottom: 6px solid transparent;
    border-left: 6px solid transparent;
    position: absolute;
    top: 8%;
    left: -7%;
  }
  p {
    margin: 3px;
    position: absolute;
    top: 30%;
    left: 3%;
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    padding-right: 20px;
    color: var(--titlecolor);
    font-size: x-small;
  }
  .timeline-event:nth-child(even) > p {
    top: 50%;
    font-size: xx-small;
    max-height: 10%;
  }
  .button {
    float: inline-end;
  }
  h2 {
    top: 15%;
  }
}