

.tmline {
  position: relative;
  max-width: 900px;
  margin: auto;
  padding: 40px 0;
}

.tmline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #999;
  transform: translateX(-50%);
}

/* default tanpa animasi */
.tmline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 0;
  background: #800080;
  transform: translateX(-50%);
}

/* animasi hanya kalau ada class .animate */
.tmline.animate::after {
  animation: line-grow 4s linear forwards;
}

@keyframes line-grow {
  to {
    height: 100%;
  }
}


.tmline-article {
  position: relative;
  width: 50%;
  box-sizing: border-box;
  opacity: 0;
  transform: perspective(1000px) rotateY(90deg) scaleX(0.2);
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.tmline-article.visible {
  opacity: 1;
  transform: perspective(800px) rotateY(0deg) scaleX(1);
}

.tmline-article.left {
  left: 0;
  padding-top: 10px;
  padding-left: 0px;
  padding-right: 20px;
  text-align: right;
  transform-origin: right center;
}

.tmline-article.right {
  left: 50%;
  padding-top: 10px;
  padding-right: 0px;
  padding-left: 20px;
  text-align: left;
  transform-origin: left center;
}

.tmline-article .meta-date {
  position: absolute;
  top: 32px;
  font-weight: bold;
  color: #444;
}

.tmline-article.left .meta-date {
  right: -120px;
}

.tmline-article.right .meta-date {
  left: -120px;
}

/* kode buletan */
.tmline-article::after {
  content: "";
  position: absolute;
  top: 30px;
  width: 16px;
  height: 16px;
  background: #800080;
  border: 3px solid #800080;
  border-radius: 50%;
  z-index: 1;
}
/* /kode buletan */

/* Garis penghubung card ke garis utama */
.tmline-article.left::before,
.tmline-article.right::before {
  content: "";
  position: absolute;
  top: 38px;
  width: 40px;
  height: 3px;
  background: #800080;
}

.tmline-article.left::before {
  right: 0;
}

.tmline-article.right::before {
  left: 0;
}

.tmline-article.left::after {
  right: -10px;
}

.tmline-article.right::after {
  left: -10px;
}

.tmline-article .content {
  display: inline-block;
  width: auto;
  max-width: 85%;
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tmline-article .content h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #524f52;
}

@media screen and (max-width: 768px) {
.tmline-article .content h3 {
  margin: 0 0 10px;
  font-size: 10px;
  color: #524f52;
}

}

/* Hari ini (active) */
.tmline-article.left.active .content,
.tmline-article.right.active .content {
  background: linear-gradient(135deg, #d1c4e9, #b39ddb);
  color: #4e342e;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
  transition: all 0.3s ease;
}

.tmline-article.active .content h3 {
  color: #66147a;
}

.tmline-article.active .meta-date {
  color: #58002c;
}

/* Sudah lewat (completed) */
.tmline-article.left.completed .content,
.tmline-article.right.completed .content {
  background: linear-gradient(135deg, rgb(176, 176, 176), rgb(141, 141, 141));
  color: #4a148c;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
  transition: all 0.3s ease;
}

.tmline-article.completed .meta-date {
  color: #808080;
}

/* Akan datang (upcoming) */
.tmline-article.left.upcoming .content,
.tmline-article.right.upcoming .content {
  background: linear-gradient(135deg, rgb(255, 255, 255), rgb(255, 255, 255));
  color: #4e342e;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
  transition: all 0.3s ease;
  color: #222;
}

.tmline-article.upcoming .meta-date {
  color: #808080;
}
