:root {
  --fig-color: #0066CC;
}

/* 詳細表示リンク */
.detail {
  text-align: right;
  color: var(--fig-color);
  text-decoration: underline 1px dotted;
}

p.detail::before {
  content: "≫";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.4em;
  height: 1.4em;
  margin-right: 0.4em;
  background: #333;
  color: #fff;
  border-radius: 50%;
  font-size: 0.9em;
}

/* 年表 */
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  print-color-adjust: exact;
}
.timeline-header div {
  width: 45%;
  max-width: 25rem;
  text-align: center;
  background-color: gray;
  color: white;
  padding: 0.5rem;
  border-radius: 0.5rem;
}
#vertical-timeline {
  position: relative;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  z-index: 2;
  print-color-adjust: exact;
}
#vertical-timeline p {
  text-indent: 0;
}
#vertical-timeline .timeline-start,
#vertical-timeline .timeline-end {
  display: table;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  background: var(--fig-color);
  padding: 0.5rem;
  color: #fff;
  width: 6rem;
  text-align: center;
  margin: 0 auto;
}
#vertical-timeline .vertical-center-line {
  position: absolute;
  width: 3px;
  height: 100%;
  top: 0;
  left: 50%;
  margin-left: -2px;
  background-color: var(--fig-color);
  z-index: -1;
}
#vertical-timeline .vertical-center-line::after {
  content: "";
  position: absolute;
  bottom: -5rem;
  left: 0;
  width: 100%;
  height: 5rem;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--fig-color),
    transparent
  );
}
#vertical-timeline .vertical-timeline-content {
  padding-top: 0rem;
  padding-bottom: 2rem;
}
.timeline-article {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 1rem 0;
}
.timeline-article .content-left-container,
.timeline-article .content-right-container {
  max-width: 44%;
  width: 100%;
}
.timeline-article .timeline-author {
  display: block;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: #242424;
  text-align: right;
}
.timeline-article .content-left,
.timeline-article .content-right {
  position: relative;
  width: auto;
  border-radius: 0.5rem;
  background-color: #fff;
  padding: 1rem 1.5rem;
  min-height: 3rem;
}
/* あゆみはグレー枠、災害史は青枠 */
.timeline-article .content-left {
  border: 1px solid #ddd;
}
.timeline-article .content-right {
  border: 1px solid var(--main-color-transparent);
}
/* リンクが付いている要素のみホバー時の動作設定 */
a .content-left:hover,
a .content-right:hover {
  background-color: #c0d4ff;
  box-shadow: 0rem 0rem 1rem inset rgba(0,0,0,.03);
}

.timeline-article p {
  margin: 0 0 0 4rem;
  padding: 0;
  font-weight: 400;
  color: #242424;
  font-size: 1rem;
  line-height: 1.5rem;
  position: relative;
}
.timeline-article .not-date {
  margin: 0;
}
.timeline-article p span.article-date {
  position: absolute;
  font-weight: bold;
  font-size: 1.5rem;
  top: 0rem;
  left: -5rem;
  color: var(--fig-color);
}
.timeline-article .content-left-container {
  float: left;
}
.timeline-article .content-right-container {
  float: right;
}
/* 各項目から中央の縦線に伸びる横線 */
.timeline-article .content-left:before,
.timeline-article .content-right:before{
  position: absolute;
  top: 2.5rem;
  font-size: 1.5rem;
  color: var(--fig-color);
  background-color: var(--fig-color);
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
}
.timeline-article .content-left:before {
  right: -3rem;
}
.timeline-article .content-right:before {
  left: -3rem;
}
/* 年表に入れないコンテンツの書式設定は最下部 */


/* 年表の中心年 */
.timeline-article .meta-year {
  position: absolute;
  top: 0;
  left: 50%;
  width: 5rem;
  height: 4rem;
  margin-left: -2.5rem;
  padding-top: 1rem;
  color: #fff;
  border-radius: 100%;
  background: var(--fig-color);
  z-index: 2;
}
.timeline-article .meta-year .year,
.timeline-article .meta-year .nengo {
  display: block;
  text-align: center;
  font-weight: 900;
}
.timeline-article .meta-year .year {
  font-size: 1.5rem;
  line-height: 2rem;
}
.timeline-article .meta-year .nengo {
  font-size: 0.8rem;
  line-height: 1rem;
}
/*===== // Vertical Timeline =====*/

/*===== Responsive Vertical Timeline =====*/
@media only screen and (max-width: 830px) {
  /* 年表ヘッダを非表示 */
  .timeline-header {
    display: none;
  }
  /* 年表 */
  #vertical-timeline .timeline-start,
  #vertical-timeline .timeline-end {
    margin: 0;
  }
  #vertical-timeline .vertical-center-line {
    margin-left: 0;
    left: 50px;
  }
  .timeline-article .meta-year {
    margin-left: 0;
    left: 0.75rem;
  }
  .timeline-article .content-left-container,
  .timeline-article .content-right-container {
    max-width: 100%;
    width: auto;
    float: none;
    margin-left: 7rem;
    min-height: 4rem;
  }
  .timeline-article .content-left-container {
    margin-bottom: 1.5rem;
  }
  .timeline-article .content-left,
  .timeline-article .content-right {
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    min-height: 4rem;
  }
  .timeline-article .content-left:before,
  .timeline-article .content-right:before {
    content: "";
    display: block;
    width: 4rem;
    height: 3px;
    background-color: var(--fig-color);
    top: 2.5rem;
    left: -4rem;
  }
}
@media only screen and (max-width: 400px) {
  .timeline-article p {
    margin: 0;
  }
  .timeline-article p span.article-date {
    display: none;
  }
  
}


/* 年表に入れないコンテンツ */
.timeline-article .not-history {
  border: none;
}
.timeline-article .not-history:before {
  display: none;
}
/*===== // Resonsive Vertical Timeline =====*/

/* キャッチフレーズ */
#catchphrase {
  width: 100%;
  max-width: var(--box-width);
  height: 35rem;
  margin: 0 auto;
  margin-top: -20rem;
  padding-top: 35rem;

  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0) 50%
    ),
    url(../history/timeline/img/office_shoot_from_Tsutsujigaoka_Park.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom;
  print-color-adjust: exact;

  position: relative;
}
#catchphrase p {
  text-align: center;
  font-size: 1.5rem;
}
#office-logo {
  width: 17rem;
  max-width: 100%;
}
#catchphrase .btn-next-timeline {
  position: absolute;
  text-align: center;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
#catchphrase .btn-next-timeline:hover {
    transform: translateX(-50%) scale(1.1);
}

/* 年表スクロールバー */
/* スライダーUI */
#timeline-slider-wrapper {
  position: fixed;
  bottom: 1rem;
  left: calc( 50vw - var(--scrollbar-width) );
  width: 90%;
  max-width: 1000px;
  height: 35px;
  box-sizing: border-box;
  padding: 0 20px;
  max-width: 800px;
  z-index: 500;

  opacity: 0;
  transform: translate(-50%, 3rem);
  transition:
    opacity 0.5s ease-in-out,
    transform 0.5s ease-in-out;
  
    background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 15px 10px rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

#timeline-slider-wrapper.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* スライダー */
#timeline-touch-slider {
  position: relative;
  height: 40px;
  cursor: pointer;
}

/* トラック */
#touch-track {
  position: absolute;
  top: 15px;
  width: 100%;
  height: 8px;
  background: #ddd;
  transform: translateY(-50%);
  border-radius: 999px;
}

/* ノブ */
#touch-thumb {
  position: absolute;
  top: 40%;
  width: 26px;
  height: 26px;
  background: #007bff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  transition: transform 0.1s;
}

#touch-thumb:active {
  transform: translate(-50%, -50%) scale(1.2);
}

/* 目盛り */
#slider-ticks {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 10px;
}

.tick {
  position: absolute;
  width: 2px;
  height: 11px;
  background: #333;
  transform: translateX(-50%);
}

.tick-label {
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  font-size: 10px;
}

/* 年表示 */
#year-indicator {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  z-index: 505;
}

/* タイムライン強調 */
.timeline-article,
.timeline-article .content-right-container,
.timeline-article .content-left-container,
.timeline-article .meta-year {
  transition: all 0.4s ease;
}
.timeline-article.active {
  transform: scale(1.05);
}
.timeline-article.active .meta-year {
  background-color: #7da6ff;
}

/* 印刷用の書式設定 */
@media print {
  /* .detail, button,  */
  #timeline-slider-wrapper.active {
    display: none;
  }
  #catchphrase .btn-next-timeline {
    display: none;
  }
}