/* =========================================================
 * MUSK - QUY TRÌNH TRIỂN KHAI
 * Nội dung theo Row/Column Flatsome, nền tràn full width
 * ========================================================= */

.musk-process {
  position: relative;
  z-index: 1;
  width: 100%;
  color: #6d6c91;
}

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

/* =========================================================
 * LAYOUT TRONG COLUMN
 * ========================================================= */

.musk-process__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 100px 0px 50px 0px;
}

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

.musk-process__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto 58px;
  text-align: center;
}

.musk-process__intro {
  max-width: 720px;
  margin: 10px auto 0;
  color: #29394f;
  font-weight: 400;
  line-height: 1.6;
}

/* =========================================================
 * PROCESS CONTENT
 * ========================================================= */

.musk-process__content {
  position: relative;
}

/* =========================================================
 * SVG ROUTE
 * ========================================================= */

.musk-process__route {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.musk-process__route--desktop {
  top: -12px;
  left: 50%;
  display: block;
  width: 100%;
  height: 225px;
  transform: translateX(-50%);
}

.musk-process__route--mobile {
  display: none;
}

.musk-process__route svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.musk-process__route-path {
  animation: musk-process-route-dash 8s linear infinite;
}

.musk-process.is-paused .musk-process__route-path {
  animation-play-state: paused;
}

@keyframes musk-process-route-dash {
  to {
    stroke-dashoffset: -100;
  }
}

/* =========================================================
 * GRID
 * ========================================================= */

.musk-process__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 30px;
}

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

.musk-process__item {
  position: relative;
  min-width: 0;
  text-align: center;
}

/* =========================================================
 * ICON WRAP
 * ========================================================= */

.musk-process__icon-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: 26px;
}

/* =========================================================
 * ICON CIRCLE
 * ========================================================= */

.musk-process__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  border: 3px solid #f5f7fc;
  border-radius: 50%;
  background: #ffffff;
  color: #18203e;
  box-shadow: 0 15px 40px rgba(17, 91, 122, 0.07);
  transform: translateZ(0);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.musk-process__icon svg {
  position: relative;
  z-index: 2;
  display: block;
  width: 39px;
  height: 39px;
}

.musk-process__icon-image {
  position: relative;
  z-index: 2;
  display: block;
  width: 44px;
  height: 44px;
  margin: 0;
  object-fit: contain;
}

/* =========================================================
 * STEP NUMBER
 * ========================================================= */

.musk-process__number {
  position: absolute;
  top: -9px;
  right: -7px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  background: #ffffff;
  color: #003ed0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 12px 25px rgba(41, 112, 210, 0.2);
}

/* =========================================================
 * DOTS GIỮA CÁC BƯỚC
 * ========================================================= */

.musk-process__dots {
  position: absolute;
  top: 50%;
  right: -73px;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateY(-50%);
}

.musk-process__dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1558f4;
  opacity: 0.18;
  animation: musk-process-dot 1.25s ease-in-out infinite;
}

.musk-process__dots span:nth-child(2) {
  animation-delay: 0.23s;
}

.musk-process__dots span:nth-child(3) {
  animation-delay: 0.46s;
}

.musk-process__item:last-child .musk-process__dots {
  display: none;
}

.musk-process.is-paused .musk-process__dots span {
  animation-play-state: paused;
}

@keyframes musk-process-dot {
  0%,
  100% {
    opacity: 0.18;
    transform: scale(0.72);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

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

.musk-process__name {
  margin: 20px 0 13px;
  color: #07004f;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

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

.musk-process__description {
  max-width: 255px;
  margin: 0 auto !important;
  color: #6d6c91;
  font-weight: 400;
  line-height: 1.65;
}

@media (hover: hover) {
  .musk-process__item:hover .musk-process__icon {
    transform: translateY(-6px);
    box-shadow: 0 22px 45px rgba(17, 91, 122, 0.12);
  }
}

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

@media (max-width: 767px) {
  .musk-process__inner {
    padding: 50px 0;
  }

  .musk-process__content {
    min-height: 0;
    position: relative;
  }

  .musk-process__grid {
    grid-template-columns: 1fr;
    gap: 58px;
  }

  .musk-process__route--desktop,
  .musk-process__route--mobile,
  .musk-process__dots {
    display: none;
  }

  .musk-process__description {
    max-width: 300px;
    padding: 0 10px;
    line-height: 1.65;
  }

  .musk-process__header {
    margin-bottom: 42px;
  }

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

  .musk-process__route--desktop {
    display: none;
  }

  .musk-process__route--mobile {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 0;
    display: block;
    width: 155px;
    height: calc(100% - 36px);
    transform: translateX(-50%);
  }

  .musk-process__item {
    z-index: 2;
  }

  .musk-process__icon {
    width: 122px;
    height: 122px;
  }

  .musk-process__number {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }

  .musk-process__name {
    margin-top: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .musk-process__route-path,
  .musk-process__dots span {
    animation: none !important;
  }

  .musk-process__icon {
    transition: none;
  }
}
