/* =========================================================
 * MUSK ABOUT - HÀNH TRÌNH PHÁT TRIỂN
 *
 * Không dùng CSS variable.
 * Shape navy lấy CSS dùng chung.
 * Title lấy hệ .musk-title dùng chung.
 * ========================================================= */

.musk-about-timeline {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: 92px 0 70px;
  color: #1d2940;
}

.musk-about-timeline,
.musk-about-timeline *,
.musk-about-timeline *::before,
.musk-about-timeline *::after {
  box-sizing: border-box;
}

/* =========================================================
 * HEADER
 * ========================================================= */

.musk-about-timeline__header {
  position: relative;
  z-index: 3;
  margin-bottom: 58px;
  text-align: center;
}

.musk-about-timeline__intro {
  max-width: 720px;
  margin: 10px auto 0;
  color: #273b55;
  font-weight: 400;
  line-height: 1.6;
}

/* =========================================================
 * TIMELINE LINE
 *
 * Bắt đầu sau header, không chạy xuyên header.
 * ========================================================= */

.musk-about-timeline__line {
  position: absolute;
  z-index: 0;
  top: 225px;
  bottom: 70px;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    #d7dce4 4%,
    #d7dce4 96%,
    transparent 100%
    );
  transform: translateX(-50%);
  pointer-events: none;
}

/* =========================================================
 * LIST
 * ========================================================= */

.musk-about-timeline__list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 38px;
}

/* =========================================================
 * ITEM
 * ========================================================= */

.musk-about-timeline__item {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    132px
    minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 28px;
}

.musk-about-timeline__left,
.musk-about-timeline__right {
  min-width: 0;
}

/* =========================================================
 * CARD TEXT
 * ========================================================= */

.musk-about-timeline__card {
  min-height: 185px;
  padding: 27px 28px;
  border: 1px solid #e5e9ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 35, 72, 0.07);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.musk-about-timeline__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17, 35, 72, 0.11);
}

/* =========================================================
 * CARD TITLE
 * ========================================================= */

.musk-about-timeline__title {
  margin: 0 0 15px;
  color: #182749;
  font-weight: 700;
  line-height: 1.35;
  font-size: 25px !important;
}

/* =========================================================
 * DESCRIPTION
 * ========================================================= */

.musk-about-timeline__description {
  margin: 0;
  color: #627087;
  font-weight: 400;
  line-height: 1.7;
}

/* =========================================================
 * IMAGE
 * ========================================================= */

.musk-about-timeline__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.72 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: #e8edf4;
  box-shadow: 0 12px 32px rgba(17, 35, 72, 0.11);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.musk-about-timeline__media img,
.musk-about-timeline__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.musk-about-timeline__media img {
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover;
  transform: translateZ(0) scale(1.001);
  transition: transform 0.5s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* =========================================================
 * PLACEHOLDER
 * ========================================================= */

.musk-about-timeline__media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
    circle at 70% 35%,
    rgba(65, 151, 255, 0.25),
    transparent 32%
    ),
    linear-gradient(145deg, #07175a, #0b4e9d);
  color: rgba(255, 255, 255, 0.22);
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

/* =========================================================
 * CENTER
 * ========================================================= */

.musk-about-timeline__center {
  position: relative;
  display: grid;
  grid-template-columns:
    1fr
    auto
    1fr;
  align-items: center;
  width: 100%;
}

/* =========================================================
 * CONNECTOR
 * ========================================================= */

.musk-about-timeline__center::before,
.musk-about-timeline__center::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: #d4d9e2;
}

/* =========================================================
 * YEAR
 * ========================================================= */

.musk-about-timeline__year {
  position: relative;
  z-index: 2;
  min-width: 66px;
  margin: 0 10px;
  padding: 8px 11px;
  border: 1px solid #dfe4ec;
  border-radius: 9px;
  background: #fff;
  color: #24375f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(22, 48, 95, 0.06);
}

/* =========================================================
 * DOT
 * ========================================================= */

.musk-about-timeline__dot {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #020650;
  box-shadow: 0 0 0 1px rgba(2, 6, 80, 0.08);
  transform: translateY(-50%);
}

.musk-about-timeline__dot--left {
  left: 0;
}

.musk-about-timeline__dot--right {
  right: 0;
}

@media (hover: hover) {
  .musk-about-timeline__media:hover img {
    transform: translateZ(0) scale(1.025);
  }
}

/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 767px) {
  .musk-about-timeline {
    padding: 68px 0 48px;
  }

  .musk-about-timeline__header {
    margin-bottom: 36px;
  }

  .musk-about-timeline__line {
    top: 185px;
    bottom: 48px;
    left: 14px;
    transform: none;
  }

  .musk-about-timeline__item {
    grid-template-columns:
      minmax(0, 1fr)
      92px
      minmax(0, 1fr);
    gap: 14px;
    padding-left: 40px;
  }

  .musk-about-timeline__card {
    min-height: 0;
    padding: 17px;
    border-radius: 15px;
  }

  .musk-about-timeline__title {
    margin-bottom: 10px;
  }

  .musk-about-timeline__description {
    line-height: 1.68;
  }

  .musk-about-timeline__media {
    border-radius: 14px;
    aspect-ratio: 1.55 / 1;
  }

  .musk-about-timeline__year {
    min-width: 68px;
    margin: 0;
    padding: 8px 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .musk-about-timeline__intro {
    margin-top: 7px;
    line-height: 1.55;
  }

  .musk-about-timeline__list {
    gap: 32px;
  }

  .musk-about-timeline__item,
  .musk-about-timeline__item.is-reverse {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 45px;
    gap: 14px;
  }

  .musk-about-timeline__center {
    order: 1;
    display: block;
    width: 100%;
  }

  .musk-about-timeline__center::before,
  .musk-about-timeline__center::after {
    display: none;
  }

  .musk-about-timeline__left,
  .musk-about-timeline__right {
    width: 100%;
  }

  .musk-about-timeline__item:not(.is-reverse) .musk-about-timeline__left {
    order: 2;
  }

  .musk-about-timeline__item:not(.is-reverse) .musk-about-timeline__right {
    order: 3;
  }

  .musk-about-timeline__item.is-reverse .musk-about-timeline__right {
    order: 2;
  }

  .musk-about-timeline__item.is-reverse .musk-about-timeline__left {
    order: 3;
  }

  .musk-about-timeline__dot--left {
    top: 50%;
    left: -30px;
    width: 9px;
    height: 9px;
  }

  .musk-about-timeline__dot--right {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .musk-about-timeline__card,
  .musk-about-timeline__media img {
    transition: none !important;
  }
}
