
/* ===== MILESTONES ===== */
.milestones-section {
  padding: 40px 0 80px;
}

.milestones-layout {
  position: relative;
  height: 600px;
}

.milestones-path-img {
  position: absolute;
  top: 0px;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.milestones-path {
  position: relative;
  height: 100%;
  margin-top: 70px;
}

.ms-path-bg {
  display: none;
}

.ms-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-dark);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  transform: translate(-50%, -50%);
  z-index: 2;
  overflow: visible;
}

/* Stem line above the dot */
.ms-dot::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 50px;
  background: #aaa;
}

.ms-dot span {
  position: absolute;
  bottom: calc(100% + 50px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark);
  white-space: nowrap;
  font-family: var(--font-family);
}

.ms-dot.active {
  background: transparent;
}

.ms-dot.active::before {
  height: 0;
  background: transparent;
}

.ms-dot.active span {
  color: var(--color-dark);
  font-size: 1.5rem;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Flag icon for active dot — replaced by travelling #ms-flag element */
.ms-dot.active::after {
  display: none;
}

/* Travelling flag element */
.ms-flag-travel {
  position: absolute;
  width: 75px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom left;
  z-index: 10;
  pointer-events: none;
  /* anchor flag base to dot center: dot is 14px wide/tall, flag bottom-left aligns to dot center */
  transform: translate(-24px, calc(-100% + 14px));
}

.ms-flag-travel.is-animating {
  transition-property: left, top;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  /* duration is set dynamically per step via JS */
}

/* Milestone info — positioned middle-right, inline layout */
.milestones-info {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 3;
}

.ms-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-border);
  background: #ddd;
  flex-shrink: 0;
}

.ms-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.ms-text h3 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.ms-text p {
  font-size: 1.8rem;
  color: var(--color-text);
  line-height: 1.5;
  /* max-width: 180px; */
}

/* Milestone bullet list */
.ms-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* max-width: 180px; */
}

.ms-bullet-list li {
  font-size: 1.8rem;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}

.ms-bullet-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #003da5;
  font-weight: bold;
  font-size: 1.8rem;
}

.ms-bullet-list li:last-child {
  margin-bottom: 0;
}

/* ===== OUR HISTORY TEXT ===== */
.our-history-text {
  padding: 60px 0 40px;
}

.history-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 50px;
  align-items: start;
  padding: 0 40px;
}

.history-text-content {
  margin: 0px;
}

.history-text-content h2 {
  /* font-size: 2.5rem;
  font-weight: 700; */
  color: var(--color-dark);
  margin-top: 0px;
}

.history-text-content p {
  font-size: 1.8rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 16px;
  text-align: justify;
}

.history-bottom-text {
  margin-top: 25px;
}

.history-bottom-text p {
  font-size: 1.8rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 16px;
  padding: 0 40px;
  text-align: justify;
}

/* ===== FACTORY EVOLUTION CIRCLES ===== */
.evolution-circles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.evo-circle {
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.evo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evo-circle-sm {
  width: 170px;
  height: 170px;
  margin-left: 60px;
  margin-bottom: -55px;
}

.evo-circle-md {
  width: 190px;
  height: 190px;
  margin-left: 170px;
  margin-bottom: -76px;
}

.evo-circle-lg {
  width: 210px;
  height: 210px;
  margin-left: 11px;
  margin-bottom: -78px;
  z-index: -1;
}

.evo-circle-xl {
  width: 248px;
  height: 248px;
  margin-left: 155px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 959px){
  .history-layout {
    grid-template-columns: 300px 1fr;
    padding: 0 10px;
  }
  
  .evo-circle-sm {
    width: 150px;
    height: 150px;
    margin-left: 50px;
    margin-bottom: -30px;
  }
  .evo-circle-md {
    width: 170px;
    height: 170px;
    margin-left: 110px;
    margin-bottom: -40px;
  }
  .evo-circle-lg {
    width: 190px;
    height: 190px;
    margin-left: 10px;
    margin-bottom: -30px;
    z-index: -1;
  }
  .evo-circle-xl {
    width: 230px;
    height: 230px;
    margin-left: 70px;
  }

  .history-bottom-text p {
    padding: 0 10px;
  }
}

@media (max-width: 768px) {
  .history-layout {
    grid-template-columns: 225px 1fr;
  }

  .evolution-circles{
    padding-top: 30%;
  }

  .evo-circle-sm {
    width: 100px;
    height: 100px;
    margin-left: 60px;
    margin-bottom: -15px;
  }
  .evo-circle-md {
    width: 120px;
    height: 120px;
    margin-left: 100px;
    margin-bottom: -30px;
  }
  .evo-circle-lg {
    width: 140px;
    height: 140px;
    margin-left: 15px;
    margin-bottom: -25px;
    z-index: -1;
  }
  .evo-circle-xl {
    width: 170px;
    height: 170px;
    margin-left: 70px;
  }

  .milestones-info {
    margin-top: 20px;
  }

  /* Our History Text Section */
  .our-history-text {
    padding: 40px 0 30px;
  }

  .history-text-content h2 {
    font-size: 2.4rem;
    margin-bottom: 16px;
  }

  .history-text-content p {
    font-size: 1.6rem;
    line-height: 1.7;
    margin-bottom: 14px;
  }

  .history-bottom-text {
    margin-top: 20px;
  }

  .history-bottom-text p {
    font-size: 1.6rem;
    line-height: 1.7;
    padding: 0 10px;
    margin-bottom: 14px;
  }

  /* Milestones Section */
  .milestones-section {
    padding: 30px 0 60px;
  }

  .milestones-path {
    margin-top: 50px;
  }

  /* Milestone Dots */
  .ms-dot {
    width: 12px;
    height: 12px;
  }

  .ms-dot::before {
    height: 20px;
  }

  .ms-dot span {
    font-size: 1.4rem;
    bottom: calc(100% + 34px);
  }

  .ms-dot.active span {
    font-size: 1.6rem;
  }

  .ms-dot.active::after {
    width: 55px;
    height: 60px;
  }

  .ms-flag-travel {
    width: 55px;
    height: 60px;
    transform: translate(-4px, calc(-100% + 6px));
  }

  .ms-image {
    width: 120px;
    height: 120px;
    border: 2px solid var(--color-border);
  }

  .ms-text h3 {
    font-size: 2.2rem;
    margin-bottom: 8px;
  }

  .ms-text p {
    font-size: 1.6rem;
    max-width: 100%;
  }

  .ms-bullet-list {
    max-width: 100%;
  }

  .ms-bullet-list li {
    font-size: 1.6rem;
    margin-bottom: 6px;
  }

  .ms-bullet-list li::before {
    font-size: 1.6rem;
  }
}

@media (max-width: 700px){
  .our-history-text {
    padding: 30px 0 20px;
  }

  .history-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .history-text-content {
    margin: 0;
    padding: 0 10px;
    text-align: left;
  }

  .history-text-content h2 {
    font-size: 2rem;
    margin-bottom: 14px;
  }

  .history-text-content p {
    font-size: 1.5rem;
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .history-bottom-text {
    margin-top: 16px;
  }

  .history-bottom-text p {
    font-size: 1.5rem;
    line-height: 1.7;
    padding: 0 20px;
    margin-bottom: 12px;
  }

  /* Evolution circles */
  .evolution-circles {
    align-items: center;
    padding-top: 0;
    margin-bottom: 10px;
  }

  .evo-circle-sm {
    width: 110px;
    height: 110px;
    margin-left: -85px;
    margin-bottom: -50px;
  }

  .evo-circle-md {
    width: 130px;
    height: 130px;
    margin-left: 95px;
    margin-bottom: -40px;
  }

  .evo-circle-lg {
    width: 150px;
    height: 150px;
    margin-left: -70px;
    margin-bottom: -35px;
  }

  .evo-circle-xl {
    width: 170px;
    height: 170px;
    margin-left: 95px;
  }
}

@media (max-width: 480px) {

  /* Milestones Section */
  .milestones-section {
    padding: 20px 0 40px;
  }

  .milestones-info {
    margin: 20px 10px 20px -27px;
  }


  .milestones-layout {
    height: 400px;
  }

  .milestones-path {
    margin-top: 40px;
  }

  /* Milestone Dots */
  .ms-dot {
    width: 10px;
    height: 10px;
  }

  .ms-dot::before {
    height: 16px;
  }

  .ms-dot span {
    font-size: 1rem;
    bottom: calc(100% + 20px);
  }

  .ms-dot.active span {
    font-size: 1.2rem;
  }

  .ms-dot.active::after {
    width: 45px;
    height: 50px;
  }

  .ms-flag-travel {
    width: 45px;
    height: 50px;
    transform: translate(-3px, calc(-100% + 5px));
  }

  /* Milestone Info */
  .ms-image {
    width: 80px;
    height: 80px;
  }

  .ms-text h3 {
    font-size: 1.8rem;
  }

  .ms-text p {
    font-size: 1.4rem;
  }

  .ms-bullet-list li {
    font-size: 1.4rem;
  }

  .ms-bullet-list li::before {
    font-size: 1.4rem;
  }

  .ms-bullet-list li {
    padding-left:8px;
  }

}
