.timeline {
  background-color: #f9fcf9;

  overflow-x: hidden;
}

@font-face {
  font-family: 'ESL Legend';
  src: url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Light.eot);
  src: url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Light.eot#iefix) format("embedded-opentype"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Light.woff2) format("woff2"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Light.woff) format("woff"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Light.ttf) format("truetype"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Light.svg#eicon) format("svg");
  font-style: normal;
  font-weight: 300;
}
@font-face {
  font-family: 'ESL Legend';
  src: url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Regular.eot);
  src: url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Regular.eot#iefix) format("embedded-opentype"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Regular.woff2) format("woff2"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Regular.woff) format("woff"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Regular.ttf) format("truetype"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Regular.svg#eicon) format("svg");
  font-style: normal;
  font-weight: normal;
}
@font-face {
  font-family: 'ESL Legend';
  src: url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Bold.eot);
  src: url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Bold.eot#iefix) format("embedded-opentype"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Bold.woff2) format("woff2"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Bold.woff) format("woff"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Bold.ttf) format("truetype"),
  url(https://raw.githubusercontent.com/SochavaAG/example-mycode/master/pens/timeline/fonts/legend/ESLLegend-Bold.svg#eicon) format("svg");
  font-style: normal;
  font-weight: bold;
}

img {
  max-width: 100%;
}

.ag-format-container {
  width: 1160px;
  margin: 0 auto;

  position: relative;
}

.ag-timeline-block {
  padding: 10px 0;
}
.ag-timeline_title-box {
  padding: 0 0 30px;

  text-align: center;
}
.ag-timeline_tagline {
  font-size: 40px;
  color: #000;
}
.ag-timeline_title {
  background-color:#31CDF8;
  background-repeat: no-repeat;
  background-position: 50% 50%;

  background-size: cover;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
 

  font-size: 40px;
}

.ag-timeline_item {
  margin: 0 0 50px;

  position: relative;
}
.ag-timeline_item:nth-child(2n) {
  text-align: right;
}

.ag-timeline {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;

  position: relative;
}
.ag-timeline_line {
  width: 2px;
  background-color: #393935;

  position: absolute;
  top: 2px;
  left: 50%;
  bottom: 0;

  overflow: hidden;

  -webkit-transform: translateX(-50%);
  -moz-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  -o-transform: translateX(-50%);
  transform: translateX(-50%);
}

.ag-timeline_line-progress {
  width: 100%;
  height: 20%;
  background-color: #12b614;
}

.ag-timeline-card_box {
  padding: 0 0 20px 50%;
}
.ag-timeline_item:nth-child(2n) .ag-timeline-card_box {
  padding: 0 50% 20px 0;
}
.ag-timeline-card_point-box {
  display: inline-block;
  margin: 0 14px 0 -28px;
}
.ag-timeline_item:nth-child(2n) .ag-timeline-card_point-box {
  margin: 0 -28px 0 14px;
}
.ag-timeline-card_point {
  height: 50px;
  line-height: 50px;
  width: 50px;
  border: 3px solid #12b614;
  background-color: #FFF ;

  text-align: center;
  font-family: 'ESL Legend', sans-serif;
  font-size: 20px;
  color: #1d1d1b;

  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
}
.js-ag-active .ag-timeline-card_point {
  color: white;
  background-color: #12b614;
}
.ag-timeline-card_meta-box {
  display: inline-block;
}
.ag-timeline-card_meta {
  margin: 10px 0 0;
  font-family: 'Jost', Jost;
  color:black;
  margin:5px ;
  line-height: 1.5rem;
}
.ag-timeline-card_item {
  display: inline-block;
  width: 45%;
  margin: -77px 0 0;
  background: rgba(40, 40, 40, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(49, 205, 248, 0.2);

  opacity: 0;

  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;

  -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  -o-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  -webkit-transition: -webkit-transform .5s, opacity .5s, transform .5s, box-shadow .3s, border-color .3s;
  -moz-transition: -moz-transform .5s, opacity .5s, box-shadow .3s, border-color .3s;
  -o-transition: -o-transform .5s, opacity .5s, box-shadow .3s, border-color .3s;
  transition: transform .5s, opacity .5s, box-shadow .3s, border-color .3s;

  position: relative;
  overflow: hidden;
}

.ag-timeline-card_item:hover {
  box-shadow: 0 12px 48px rgba(49, 205, 248, 0.3);
  border-color: rgba(49, 205, 248, 0.5);
}
.ag-timeline_item:nth-child(2n+1) .ag-timeline-card_item {
  -webkit-transform: translateX(-200%);
  -moz-transform: translateX(-200%);
  -ms-transform: translateX(-200%);
  -o-transform: translateX(-200%);
  transform: translateX(-200%);
}
.ag-timeline_item:nth-child(2n) .ag-timeline-card_item {
  -webkit-transform: translateX(200%);
  -moz-transform: translateX(200%);
  -ms-transform: translateX(200%);
  -o-transform: translateX(200%);
  transform: translateX(200%);
}
.js-ag-active.ag-timeline_item:nth-child(2n+1) .ag-timeline-card_item,
.js-ag-active.ag-timeline_item:nth-child(2n) .ag-timeline-card_item {
  opacity: 1;

  -webkit-transform: translateX(0);
  -moz-transform: translateX(0);
  -ms-transform: translateX(0);
  -o-transform: translateX(0);
  transform: translateX(0);
}
.ag-timeline-card_arrow {
  height: 18px;
  width: 18px;
  margin-top: 20px;
  background-color: #282828;

  z-index: -1;
  position: absolute;
  top: 0;
  right: 0;

  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}
.ag-timeline_item:nth-child(2n+1) .ag-timeline-card_arrow {
  margin-left: calc(-18px / 2);
  margin-right: calc(-18px / 2);
}
.ag-timeline_item:nth-child(2n) .ag-timeline-card_arrow {
  margin-left: -10px;

  right: auto;
  left: 0;
}
.ag-timeline-card_inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.ag-timeline-card_img-box {
  width: 100%;
  position: relative;
  cursor: pointer;
  transition: transform .3s ease;
  max-height: 320px; /* cap image container height */
  overflow: hidden; /* crop overflow for tall images */
}

.ag-timeline-card_item:hover .ag-timeline-card_img-box {
  transform: scale(1.05);
}

.ag-timeline-card_img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* keep aspect while filling the capped box */
  display: block;
  transition: opacity .3s ease;
}

.ag-timeline-card_img-box::after {
  content: 'Tap for info';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(49, 205, 248, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.ag-timeline-card_item:hover .ag-timeline-card_img-box::after {
  opacity: 1;
}

.ag-timeline-card_info {
  flex-grow: 1;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s ease;
  background-color: #12b614!important;
}

.ag-timeline-card_item.show-info .ag-timeline-card_info {
  max-height: 500px;
  opacity: 1;
}
.ag-timeline-card_title {
  display: none;
  margin: 0 0 10px 0;
  font-family: 'ESL Legend', sans-serif;
  font-weight: bold;
  font-size: 20px;
  color: #FFF;
}

.ag-timeline-card_item.show-info .ag-timeline-card_title {
  display: block;
}

.ag-timeline-card_desc {
  line-height: 1.45;
  font-size: 14px;
  color: #FFF;
  margin: 0;
}


@media only screen and (max-width: 767px) {
  .ag-timeline_line {
    left: 30px;
  }

  .ag-timeline_item:nth-child(2n) {
    text-align: left;
  }

  .ag-timeline-card_box,
  .ag-timeline_item:nth-child(2n) .ag-timeline-card_box {
    padding: 0 0 20px;
  }
  .ag-timeline-card_meta-box {
    display: block; /* stack meta above the image card on small screens */
  }
  .ag-timeline-card_meta {
    margin-left: 75px; /* align meta text start to the year position */
  }
  .ag-timeline-card_point-box,
  .ag-timeline_item:nth-child(2n) .ag-timeline-card_point-box {
    margin: 0 0 0 8px;
  }
  .ag-timeline-card_point {
    height: 40px;
    line-height: 40px;
    width: 40px;
  }
  .ag-timeline-card_item {
    width: auto;
    margin: 10px 0 0 75px; /* place image card after meta on small screens */
  }
  .ag-timeline_item:nth-child(2n+1) .ag-timeline-card_item,
  .ag-timeline_item:nth-child(2n) .ag-timeline-card_item {
    -webkit-transform: translateY(50px);
    -moz-transform: translateY(50px);
    -ms-transform: translateY(50px);
    -o-transform: translateY(50px);
    transform: translateY(50px);
  }
  .js-ag-active.ag-timeline_item:nth-child(2n+1) .ag-timeline-card_item,
  .js-ag-active.ag-timeline_item:nth-child(2n) .ag-timeline-card_item {
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    transform: translateY(0);
  }
  .ag-timeline_item:nth-child(2n+1) .ag-timeline-card_arrow {
    right: auto;
    left: 0;
  }
  .ag-timeline-card_title {
    display: block;
  }
  .ag-timeline-card_arrow {
    margin-top: 12px;
  }
}

@media only screen and (max-width: 767px) {
  .ag-format-container {
    width: 96%;
  }

  .ag-timeline-card_img {
    height: auto;
    width: auto;
  }
  
  .ag-timeline-card_point {
    height: 35px;
    line-height: 35px;
    width: 35px;
    font-size: 14px;
  }
  
  .ag-timeline-card_meta {
    margin-left: 65px; /* keep meta aligned with the year for this breakpoint */
  }
  .ag-timeline-card_item {
    margin: 10px 0 0 65px; /* ensure image card appears after meta */
  }
}

@media only screen and (max-width: 639px) {
  .ag-timeline_title {
    font-size: 60px;
  }

  .ag-timeline-card_info {
    padding: 10px 15px;
  }
  .ag-timeline-card_desc {
    font-size: 14px;
  }
  
  .ag-timeline-card_meta {
    margin-left: 60px; /* align meta text for narrower screens */
  }
  .ag-timeline-card_item {
    margin: 10px 0 0 60px; /* keep image card after meta on very small screens */
  }
  
  .ag-timeline-card_point {
    height: 32px;
    line-height: 32px;
    width: 32px;
    font-size: 10px;
  }
}

@media only screen and (max-width: 479px) {

}

@media (min-width: 768px) and (max-width: 979px) {
  .ag-format-container {
    width: 750px;
  }

}

@media (min-width: 980px) and (max-width: 1161px) {
  .ag-format-container {
    width: 960px;
  }

}
