/* =========================================================
   about03-history.css
   載入：shared-typography.css 之後
   頁面：about_history.aspx
========================================================= */

/* =========================================================
   about_history.aspx — 大事紀要（垂直時間軸 + 企業卡片）
   版型：shared-sidebar.css；主標題樣式見 shared-typography.css
========================================================= */

.about-history-page .history-intro {
  margin: 0 0 28px;
  max-width: 52rem;
  color: #425863;
  font-size: 1rem;
  line-height: 1.75;
}

.about-history-page .history-timeline {
  position: relative;
  margin: 0;
  padding: 8px 0 12px;
}

.about-history-page .history-timeline::before {
  content: "";
  position: absolute;
  left: 108px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--about-accent) 0%, rgba(12, 89, 111, 0.22) 100%);
  border-radius: 999px;
}

.about-history-page .history-timeline__list {
  margin: 0;
  padding: 0;
}

.about-history-page .history-milestone {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 0 28px;
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

.about-history-page .history-milestone:last-child {
  margin-bottom: 0;
}

.about-history-page .history-milestone__rail {
  position: relative;
  padding: 4px 24px 0 0;
  text-align: right;
}

.about-history-page .history-milestone__year {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--about-primary-deep);
  letter-spacing: 0.02em;
}

.about-history-page .history-milestone__rail::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 0.72em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--about-accent);
  box-shadow: 0 0 0 3px #fff;
  z-index: 2;
}

.about-history-page .history-milestone__card {
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(12, 89, 111, 0.12);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(7, 41, 56, 0.06);
  overflow: hidden;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-history-page .history-milestone__card:hover {
  border-color: rgba(25, 167, 184, 0.35);
  box-shadow: 0 8px 28px rgba(7, 41, 56, 0.1);
}

.about-history-page .history-milestone__inner {
  display: grid;
  grid-template-columns: minmax(132px, 168px) minmax(0, 1fr);
  gap: 0;
}

.about-history-page .history-milestone__inner--text-only {
  grid-template-columns: 1fr;
}

.about-history-page .history-milestone__media {
  margin: 0;
  background: #f0f6f8;
  border-right: 1px solid rgba(12, 89, 111, 0.08);
  min-height: 112px;
  display: flex;
  align-items: stretch;
}

.about-history-page .history-milestone__inner--text-only .history-milestone__media {
  display: none;
}

.about-history-page .history-milestone__img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  display: block;
}

.about-history-page .history-milestone__img[src=""],
.about-history-page .history-milestone__img:not([src]) {
  display: none;
}

.about-history-page .history-milestone__content {
  padding: 22px 24px 20px;
}

.about-history-page .history-milestone__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about-history-page .history-milestone__list li {
  position: relative;
  margin: 0;
  padding: 0 0 12px 16px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: #263c46;
  border-bottom: 1px solid rgba(12, 89, 111, 0.08);
}

.about-history-page .history-milestone__list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.about-history-page .history-milestone__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--about-accent);
  transform: translateY(-50%);
}

.about-history-page .history-milestone__list.info-text.show-limit li:nth-child(n+3) {
  display: none;
}

.about-history-page .history-milestone__list.info-text.show-all li {
  display: block !important;
}

.about-history-page .history-milestone__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--about-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.about-history-page .history-milestone__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.2s ease;
}

.about-history-page .history-milestone__toggle:hover {
  color: var(--about-accent);
}

.about-history-page .history-milestone__toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.about-history-page .history-milestone__toggle.is-hidden {
  display: none;
}

.about-history-page .history-loadmore {
  margin-top: 36px;
  padding-top: 28px;
  text-align: center;
  border-top: 1px solid rgba(12, 89, 111, 0.1);
}

.about-history-page .history-loadmore__btn {
  display: inline-block;
  min-width: 200px;
  padding: 12px 32px;
  border: 2px solid var(--about-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--about-primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.about-history-page .history-loadmore__btn:hover {
  background: var(--about-primary);
  border-color: var(--about-primary);
  color: #fff;
}

@media (max-width: 991.98px) {
  .about-history-page .history-timeline::before {
    left: 72px;
  }

  .about-history-page .history-milestone {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0 16px;
  }

  .about-history-page .history-milestone__rail {
    padding-right: 16px;
  }

  .about-history-page .history-milestone__year {
    font-size: 1.35rem;
  }

  .about-history-page .history-milestone__inner {
    grid-template-columns: 1fr;
  }

  .about-history-page .history-milestone__media {
    border-right: 0;
    border-bottom: 1px solid rgba(12, 89, 111, 0.08);
    min-height: 140px;
  }

  .about-history-page .history-milestone__img {
    min-height: 140px;
  }
}

@media (max-width: 575.98px) {
  .about-history-page .history-timeline::before {
    display: none;
  }

  .about-history-page .history-milestone {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .about-history-page .history-milestone__rail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    text-align: left;
  }

  .about-history-page .history-milestone__rail::after {
    position: static;
    flex-shrink: 0;
  }

  .about-history-page .history-milestone__year {
    font-size: 1.25rem;
  }

  .about-history-page .history-milestone__content {
    padding: 18px 16px;
  }
}
