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

.timeline {
  display: flex;
  flex-direction: column;
  font: 500 16px/1.56 "Roboto", sans-serif;
  height: 100vh;
  overflow: hidden;
}

.timeline button,
.timeline .timeline_card,
.popup h2 {
  font-family: "Source Serif 4", serif;
}

.timeline button {
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: #58341a;
  background-color: transparent;
  border-width: 2px 0;
  border-style: solid;
  border-color: #fff;
  padding: 2px 0;
  position: relative;
  z-index: 5;
  cursor: pointer;
}
.timeline button span {
  display: inline-block;
  background-color: #fff;
  padding: 2px 24px 3px;
}

.timeline button:before,
.timeline button:after {
  content: "";
  background-image: url("./assets/button-ornament.png");
  background-size: contain;
  width: 18px;
  height: 32px;
  position: absolute;
  top: -2px;
  z-index: -1;
}

.timeline button:before {
  right: 100%;
}
.timeline button:after {
  left: 100%;
  transform: rotateZ(180deg);
}

.timeline header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background-color: #f4a3c3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  padding: 24px 120px 25px;
}

.timeline header,
.timeline section,
.timeline footer {
  position: relative;
}

.timeline header,
.timeline footer {
  z-index: 10;
}

.timeline section {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 30px 0;
  position: relative;
  z-index: 5;
}

.timeline footer {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("./assets/footer-bg.jpg");
  background-size: calc(100vw - 150px) 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.6);
  height: 205px;
}

.timeline footer:before,
.timeline footer:after {
  content: "";
  background-size: contain;
  background-repeat: no-repeat;
  width: 100%;
  height: 384px;
  position: absolute;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
}

.timeline footer:before {
  background-image: url("./assets/footer-ornament-left.png");
  background-position: left bottom;
  left: 0;
}
.timeline footer:after {
  background-image: url("./assets/footer-ornament-right.png");
  background-position: right bottom;
  right: 0;
}

.timeline .timeline_bg,
.timeline .timeline_bg img {
  width: 100%;
  height: 100%;
  position: absolute;
}

.timeline .timeline_bg {
  z-index: -1;
}
.timeline .timeline_bg img {
  object-fit: cover;
  object-position: center;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.timeline .timeline_bg img.visible {
  opacity: 1;
  visibility: visible;
}

.timeline .timeline_title {
  line-height: 0.63;
  text-align: center;
  text-transform: uppercase;
  border-top: 1px solid #fff;
  overflow: hidden;
}
.timeline .timeline_title h1 {
  font-size: 40px;
  padding: 15px 3px 9px;
}
.timeline .timeline_title h2 {
  display: inline-block;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  padding: 0 7px;
  position: relative;
  z-index: 5;
}

.timeline .timeline_title h2:before,
.timeline .timeline_title h2:after {
  content: "";
  background-color: #fff;
  width: 500px;
  height: 1px;
  position: absolute;
  top: 8px;
}

.timeline .timeline_title h2:before {
  right: 100%;
}

.timeline .timeline_title h2:after {
  left: 100%;
}

.timeline .timeline_bar,
.timeline .timeline_bar figure {
  display: flex;
  align-items: center;
}

.timeline .timeline_bar {
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  color: #b5a087;
  background-image: url("./assets/timeline-bg.png");
  background-size: contain;
  background-position: center center;
  width: 1208px;
  height: 85px;
  padding: 0 81px;
}

.timeline .timeline_bar figure,
.timeline .timeline_bar span {
  position: relative;
  z-index: 5;
}

.timeline .timeline_bar figure {
  justify-content: space-between;
  width: 100%;
  user-select: none;
}
.timeline .timeline_bar figure > * {
  flex: 0 0 auto;
}

.timeline .timeline_bar span {
  overflow: hidden;
  pointer-events: none;
}
.timeline .timeline_bar s {
  text-decoration: none;
  background-color: #b39e84;
  border-radius: 50%;
  width: 5px;
  height: 5px;
}

.timeline .timeline_follow_wrapper {
  width: 100%;
  height: auto;
  position: absolute;
  top: -39px;
  left: 0;
  z-index: 10;
}
.timeline .timeline_follow {
  width: 111px;
  height: 245px;
  transform: translateX(-21px);
}

.timeline .timeline_cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.timeline .timeline_card {
  text-align: center;
  text-decoration: none;
  color: inherit;
  background-image: url("./assets/card-bg-l.jpg");
  background-size: cover;
  width: 236px;
  padding: 14px 18px 24px;
  position: relative;
  z-index: 5;
}

.timeline .timeline_card:before,
.popup .popup_images figure:before {
  content: "";
  background-image: url("./assets/pin.png");
  width: 21px;
  height: 21px;
  position: absolute;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
}

.timeline .timeline_card:before {
  top: 5px;
}

.timeline .timeline_card:nth-child(even) {
  margin-left: -40px;
}
.timeline .timeline_card + .timeline_card {
  margin-top: 60px;
}

.timeline .timeline_card img {
  display: block;
  width: 100%;
  margin-bottom: 15px;
}
.timeline .timeline_card h3 {
  font-size: 10px;
  line-height: 1.35;
  max-width: 161px;
  margin: 0 auto;
  user-select: none;
}

.timeline .timeline_card--s {
  width: 179px;
}
.timeline .timeline_card--l {
  width: 339px;
}
.timeline .timeline_card--l h3 {
  max-width: 212px;
}

.timeline .timeline_slider {
  display: flex;
  gap: 60px;
}

.clockwise {
  transform: rotate(7deg);
}

.cclockwise {
  transform: rotate(-7deg);
}

.popup {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 16px/1.56 "Roboto", sans-serif;
  color: #58341a;
  text-align: center;
  background-color: rgba(77, 77, 77, 0.8);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.popup.visible {
  opacity: 1;
  visibility: visible;
}

.popup button {
  background-color: transparent;
  border: 0;
  position: absolute;
  top: 14px;
  right: 17px;
  z-index: 5;
  cursor: pointer;
}
.popup h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  max-width: 700px;
  margin: 0 auto 20px;
}
.popup p {
  margin-bottom: 20px;
}
.popup p:after {
  content: "";
  display: table;
  line-height: 0;
  clear: both;
}
.popup img {
  height: auto;
}

.popup .popup_content img,
.popup .popup_images figure,
.popup .popup_gallery a {
  border: 8px solid #fff;
}

.popup .popup_body {
  background-image: url("./assets/card-bg-xl.png");
  background-size: cover;
  background-position: center top;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border-radius: 25px;
  max-width: 1182px;
  height: 664px;
  padding: 63px 27px 43px 85px;
  position: relative;
  z-index: 5;
}

.popup .popup_inner {
  height: 100%;
  padding: 20px 102px 20px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #6b4529cc #fff;
  scrollbar-width: thin;
}

.popup .popup_images {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 44px;
}
.popup .popup_images figure {
  position: relative;
  z-index: 5;
}
.popup .popup_images figure:before {
  top: -15px;
}
.popup .popup_images figure:nth-child(odd) {
  transform: rotateZ(4deg);
}
.popup .popup_images figure:nth-child(even) {
  transform: rotateZ(-4deg);
  margin: 5px 0 0 -70px;
}
.popup .popup_images img {
  display: block;
}

.popup .popup_content img {
  margin-bottom: 15px;
}
.popup .popup_content img.left {
  float: left;
  margin-right: 15px;
}
.popup .popup_content img.right {
  float: right;
  margin-left: 15px;
}
.popup .popup_content img.center {
  display: block;
  height: auto;
  margin-right: auto;
  margin-left: auto;
}
.popup .popup_gallery {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.popup .popup_gallery a {
  flex: 0 0 auto;
  height: 200px;
}
.popup .popup_gallery img {
  display: block;
  width: auto;
  height: 100%;
}
