.about-history {
  position: relative;
  margin-top: 40px;
  padding: 4.5% 3.5% 1.5% 3.5%;
  color: var(--color-mc-blue-dark);
  background: var(--color-mc-gray-light1);
  border-radius: 20px;
}

.about-history__card {
  display: flex;
  flex-direction: column;
  transition: height 0.3s ease;
}

.about-history__layout {
  display: grid;
  grid-template-columns: auto auto;
  gap: 40px;
  justify-content: space-between;
}

.about-history__layout > div {
  overflow: hidden;
}

.about-history h2 {
  color: var(--color-mc-blue-dark);
}

.about-history__tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-mc-muted);
}

.about-history__tabs button {
  flex-shrink: 0;
  padding: 5px 8px;
  min-height: 40px;
  color: var(--color-mc-blue-dark);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.about-history__tabs .is-active {
  color: var(--color-mc-blue-dark);
  background: var(--color-mc-teal);
}

.about-history__tabs button:focus-visible {
  outline: 2px solid var(--color-mc-blue-dark);
  outline-offset: -2px;
}

.about .about-history__label {
  margin-top: 12px;
  color: var(--color-mc-teal-dark);
  font-weight: 600;
  text-transform: uppercase;
}

.about-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4rem;
  margin-top: auto;
  padding: 40px 24px 0 24px;
  transition: opacity 0.18s ease;
}

.about-timeline.is-fading {
  opacity: 0;
}

.about-timeline::before {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  height: 1px;
  background: rgb(32 44 85 / 44%);
  content: "";
}

.about-event {
  position: relative;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
}

.about-event::after {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 40px;
  height: 40px;
  background: var(--color-mc-blue-dark);
  border-radius: 50%;
  content: "";
}

.about-event time {
  display: block;
  margin-block: auto 12px;
  color: var(--color-mc-teal-dark);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.about-event h3 {
  max-width: 210px;
  color: var(--color-mc-blue-dark);
  font-size: var(--font-size-s);
  line-height: 1.15;
}

.about-event p {
  max-width: 235px;
  margin-top: 12px;
  line-height: 1.25;
}

.about-history__range {
  display: flex;
  justify-content: space-between;
  margin-top: -4px;
  font-weight: 600;
}

[data-about-range-start]::before {
  content: "←";
  margin-right: 4px;
}

[data-about-range-end]::after {
  content: "→";
  margin-left: 4px;
}

.about-history__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.about-history__controls button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--color-mc-blue-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: var(--font-size-s);
  font-weight: 600;
}

.about-history__arrow {
  transition: color 0.3s ease;
}

.about-history__arrow:hover {
    color: var(--color-mc-teal-dark);
}

.about-history__arrow-left::before {
  content: "←";
  line-height: 1;
}

.about-history__arrow-right::before {
  content: "→";
  line-height: 1;
}

.about-history__dots {
  display: flex;
  align-items: center;
}

.about-history__dots span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.about-history__dots span::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  background: var(--color-mc-blue-dark);
  border-radius: 50%;
  opacity: 0.5;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.about-history__dots span:hover:before {
  opacity: 0.3;
}

.about-history__dots span.is-active::before {
  background: var(--color-mc-teal-dark);
  opacity: 1;
}

@media (min-width: 1701px) {
  .about-history__tabs {
    gap: 16px;
  }

  .about-history__tabs {
    padding-bottom: 20px;
  }

  .about-history__tabs button {
    font-size: var(--font-size-s);
    padding-inline: 12px;
  }

  .about .about-history__label {
    margin-top: 20px;
  }

  .about-timeline {
    padding-inline: 120px;
  }

  .about-event h3 {
    font-size: var(--font-size-m);
  }

  .about-event time {
    font-size: var(--font-size-s)
    margin-bottom: 16px;
  }

  .about-event p {
    margin-top: 16px;
  }

  .about-history__range {
    font-size: var(--font-size-s);
  }
}

@media (max-width: 900px) {
  .about-history {
    padding: 40px 24px;
  }

  .about-history h2 br {
    display: none;
  }

  .about-history__layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-history__tabs {
    justify-content: start;
  }
}

@media (min-width: 1301px) and (max-width: 1700px) {
  .about-history__tabs {
    gap: 12px;
  }

  .about-history__tabs button {
    padding-inline: 12px;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .about-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 20px 0 0 0;
  }

  .about-timeline::before {
    display: none;
  }

  .about-event {
    padding-bottom: 32px;
  }

  .about-event time {
    margin-top: 0;
  }

  .about-event::after {
    display: none;
  }

  .about-history__range {
    margin-top: 16px;
  }
}

@media (max-width: 700px) {
  .about-history__tabs {
    justify-content: flex-start;
  }

  .about-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 0 0 0;
    margin-block: 4px 20px;
  }

  .about-timeline::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 20px;
    width: 1px;
    height: auto;
  }

  .about-event {
    padding: 0 0.75rem 2rem 3rem;
  }

  .about-event::after {
    top: 0;
    bottom: auto;
    left: 8px;
    width: 25px;
    height: 25px;
  }

  .about-event h3,
  .about-event p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .about-history__range {
    margin-top: auto;
  }
}
