@charset "utf-8";

/* History page – vertical alternating timeline */



/* Main timeline area */
.history-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 2% 120px;
  position: relative;
}

.history-decade-title {
  font-size: clamp(48px, 8vw, 50px);
  font-weight: 800;
  color: #0460a0;
  opacity: 0.12;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -2px;
  transition: opacity 0.5s;
  user-select: none;
}

.history-decade-title.active {
  opacity: 0.18;
}

/* Vertical timeline */
.history-decades {
  position: relative;
}

.history-timeline {
  position: relative;
  padding: 20px 0;
  display: none;
}

.history-timeline.active {
  display: block;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #0460a0 8%, #0460a0 92%, transparent);
  transform: translateX(-50%);
  opacity: 0.25;
}

.history-event {
  display: flex;
  align-items: flex-start;
  margin-bottom: 48px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.history-event.visible {
  opacity: 1;
  transform: translateY(0);
}

.history-event:nth-child(odd) {
  flex-direction: row;
  padding-right: calc(50% + 40px);
  text-align: right;
}

.history-event:nth-child(even) {
  flex-direction: row-reverse;
  padding-left: calc(50% + 40px);
  text-align: left;
}

.history-event-dot {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid #0460a0;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(4, 96, 160, 0.15);
  transition: box-shadow 0.3s, transform 0.3s;
}

.history-event:hover .history-event-dot {
  box-shadow: 0 0 0 8px rgba(4, 96, 160, 0.2);
  transform: translateX(-50%) scale(1.2);
}

.history-event-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8ecf0;
  transition: box-shadow 0.35s, transform 0.35s;
  width: 100%;
}

.history-event:hover .history-event-card {
  box-shadow: 0 8px 32px rgba(4, 96, 160, 0.12);
  transform: translateY(-4px);
}

.history-event-year {
  font-size:28px;
  font-weight: 700;
  color: #0460a0;
  margin-bottom: 12px;
  line-height: 1;
}

.history-event-desc {
  font-size: 16px;
  line-height: 22px;
  color: #555;
  margin: 0;
}

/* Bottom decade selector – fixed while scrolling, pins at content bottom near footer */
.history-decade-bar-slot {
  height: 56px;
  position: relative;
  margin-top: 20px;
}

.history-decade-bar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 40px);
}

.history-decade-bar.is-pinned {
  position: absolute;
  bottom:50px;
  left: 50%;
  transform: translateX(-50%);
}

.history-decade-bar .decade-btn {
  border: none;
  background: transparent;
  padding: 12px 70px;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  border-radius: 40px;
  transition: all 0.35s;
  font-family: inherit;
  white-space: nowrap;
}

.history-decade-bar .decade-btn:hover {
  color: #0460a0;
  background: rgba(4, 96, 160, 0.06);
}

.history-decade-bar .decade-btn.active {
  background: #0460a0;
  color: #fff;
  font-weight: 600;
}

.history-decade-bar .decade-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e4e8;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  transition: background 0.3s;
  flex-shrink: 0;
}

.history-decade-bar .decade-back:hover {
  background: #f0f4f8;
}

.history-decade-bar .decade-back svg {
  width: 18px;
  height: 18px;
  fill: #666;
}

/* Fade transition when switching decades */
.history-timeline.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
}

.history-timeline.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s 0.1s, transform 0.4s 0.1s;
}

/* Responsive */
@media (max-width: 768px) {
  .history-subnav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 4%;
  }

  .history-subnav-links {
    flex-wrap: wrap;
    width: 100%;
  }

  .history-subnav-links li a {
    padding: 10px 16px;
    font-size: 14px;
  }

  .history-breadcrumb {
    padding: 8px 0 4px;
  }

  .history-main {
    padding: 40px 4% 140px;
  }

  .history-timeline::before {
    left: 20px;
  }

  .history-event,
  .history-event:nth-child(odd),
  .history-event:nth-child(even) {
    flex-direction: row;
    padding-left: 52px;
    padding-right: 0;
    text-align: left;
  }

  .history-event-dot {
    left: 20px;
  }

  .history-event-year {
    font-size: 26px;
  }

  .history-event-card {
    padding: 20px 22px;
  }

  .history-decade-bar {
    bottom: 70px;
    left: 4%;
    right: 4%;
    transform: none;
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    max-width: none;
    width: auto;
  }

  .history-decade-bar.is-pinned {
    left: 4%;
    right: 4%;
    transform: none;
  }

  .history-decade-bar .decade-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
}
