@import url('inner-common.css');

@font-face {
  font-family: 'Montserrat-Bold';
  src: url('../font/Montserrat-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.history-page .page-banner {
  background-image: url('../images/banner-history.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.history-content { padding-bottom: 100px; }
.history-page .page-heading { margin-bottom: 34px; }
.history-timeline {
  --history-axis: 24%;
  position: relative;
  max-width: 1320px;
  height: 590px;
  margin: 0 auto;
  overflow: hidden;
/*  background: #f7f7f7;*/
}
.history-timeline::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8.5%;
  width: 1px;
  pointer-events: none;
}
.history-viewport {
  position: relative;
  height: 100%;
  padding: 78px 44px;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  outline: 0;
}
.history-viewport::-webkit-scrollbar { display: none; }
.history-track { position: relative; margin: 0; padding: 0; list-style: none; }
.history-track::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: var(--history-axis);
  width: 1px;
  background: #dedede;
}
.history-item { position: relative; min-height: 112px; margin: 0; padding: 0; }
.history-item-button {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: calc(var(--history-axis) - 28px) 56px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 112px;
  padding: 15px 0;
  border: 0;
  background: transparent;
  color: #999;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.history-item-button:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: 4px; }
.history-year {
  padding-right: 12px;
  color: #c7c8c9;
  font-family: "Montserrat-Bold", Arial, "Microsoft YaHei", sans-serif;
  font-size: clamp(36px, 3.25vw, 58px);
  font-weight: 700;
  line-height: 1;
  text-align: right;
  transition: color .25s, transform .25s;
}
.history-dot {
  justify-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7c8c9;
  box-shadow: 0 0 0 4px #f7f7f7;
  transition: background .25s, transform .25s;
}
.history-text {
  min-width: 0;
  padding-left: 8px;
  color: #999;
  font-size: 16px;
  line-height: 1.9;
  text-align: left;
  transition: color .25s, font-weight .25s;
}
.history-item.is-active .history-year { color: var(--brand); transform: scale(1.03); transform-origin: right center; }
.history-item.is-active .history-dot { background: #333; transform: scale(1.15); }
.history-item.is-active .history-text { color: #333; font-weight: 500; }
.history-arrow {
  position: absolute;
  z-index: 3;
  left: var(--history-axis);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  padding: 0 0 3px;
  border-radius: 50%;
  background: #303030;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, opacity .2s, transform .2s;
}
.history-arrow:hover:not(:disabled) { background: var(--brand); transform: translateX(60%) scale(1); transition: 0.3s}
.history-arrow:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.history-arrow:disabled { opacity: .3; cursor: default; }
.history-arrow-prev { top: 9px; transform: translateX(60%); }
.history-arrow-next { bottom: 9px; transform: translateX(60%); padding-top: 3px; padding-bottom: 0; }
.history-arrow-next:hover:not(:disabled) { transform: translateX(60%) scale(1); transition: 0.3s}
.history-hint { margin: 16px auto 0; color: #aaa; font-size: 13px; text-align: center; }

@media (max-width: 1050px) {
  .history-timeline { --history-axis: 25%; height: 560px; }
  .history-viewport { padding-inline: 32px; }
  .history-text { font-size: 15px; }
}
@media (max-width: 760px) {
  .history-content { padding-bottom: 64px; }
  .history-page .page-heading { margin-bottom: 24px; }
  .history-timeline { --history-axis: 27%; height: 560px; }
  .history-timeline::after { left: 8%; }
  .history-viewport { padding: 64px 18px; }
  .history-item, .history-item-button { min-height: 118px; }
  .history-item-button { grid-template-columns: calc(var(--history-axis) - 12px) 34px minmax(0, 1fr); padding-block: 12px; }
  .history-year { padding-right: 4px; font-size: 29px; }
  .history-dot { width: 7px; height: 7px; }
  .history-text { padding-left: 2px; font-size: 13px; line-height: 1.85; }
  .history-arrow { width: 36px; height: 36px; margin-left: -18px; font-size: 23px; }
  .history-arrow-prev { top: 8px; }
  .history-arrow-next { bottom: 8px; }
  .history-hint { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .history-year, .history-dot, .history-text, .history-arrow { transition: none; }
}
