html {
  scroll-behavior: smooth
}

section[id] {
  scroll-margin-top: 96px;
}

:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #0ea5e9;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* 橫向 Timeline Container */
.custom-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding-top: 20px;
}

/* 橫向主軸線：精準定位在卡片上方預留的空間中央 */
.custom-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  top: 26px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
}

/* Timeline Item */
.custom-timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Timeline Dot：精準置中對齊橫線 */
.custom-timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 21px;
  height: 21px;
  background: var(--card-bg);
  border: 4px solid rgb(44, 178, 255);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(14, 117, 148, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
}

.custom-timeline-item:hover .custom-timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateX(-50%) scale(1.15);
}

/* Timeline Content Card */
.custom-timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 70px;
  /* 預留上方軸線與圓點空間 */
  height: 100%;
  display: flex;
  flex-direction: column;
}

.custom-timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px -10px rgba(92, 201, 209, 0.08);
  border-color: #cbd5e1;
}

.custom-timeline-date {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: oklch(64.73% 0.11512 216.217);
  background: oklch(94.871% 0.04621 201.537);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  width: fit-content;
}

.custom-timeline-title {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.custom-timeline-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* RWD 響應式：螢幕較小時自動轉為單欄垂直排列 */
@media (max-width: 1024px) {
  .custom-timeline {
    grid-template-columns: 1fr;
    padding-left: 30px;
    padding-top: 0;
  }

  .custom-timeline::before {
    left: 9px;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
  }

  .custom-timeline-dot {
    left: -30px;
    transform: none;
    top: 5px;
  }

  .custom-timeline-item:hover .custom-timeline-dot {
    transform: scale(1.15);
  }

  .custom-timeline-content {
    margin-top: 0;
  }
}

/* Tags / Highlights */
.custom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-tag {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #1c9fb1;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.erp-list li {
  padding-left: 1.5em;
  text-indent: -1.5em;
}