/* -------------------------------------------------
   PPwix Timeline — Clean Alternating Layout
-------------------------------------------------- */

.ppwix-timeline {
  position: relative;
  max-width: 1100px;
  margin: 80px auto;
  padding: 40px 0;
}

/* vertical center line */
.ppwix-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #680656; /* PPwix purple */
  transform: translateX(-50%);
  z-index: 0;
}

/* each timeline row */
.ppwix-timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin: 60px 0;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
  position: relative;
  z-index: 1;
}

.ppwix-timeline-row.active {
  opacity: 1;
  transform: translateY(0);
}

/* left/right boxes */
.ppwix-timeline-box {
  width: 45%;
  box-sizing: border-box;
}

.ppwix-timeline-box.text {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ppwix-timeline-box.image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* dots on the line */
.ppwix-timeline-row::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 4px solid #680656;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* text alignment control default */
.ppwix-timeline-box.text h3,
.ppwix-timeline-box.text p {
  margin: 0 0 10px;
}

/* -------------------------------------------------
   ABSOLUTE MOBILE RESET — banner/text always above image
-------------------------------------------------- */
@media (max-width: 768px) {

  /* 1. Reset the container layout completely */
  .ppwix-timeline-row {
    display: block !important;
    margin: 40px 0 !important;
  }
  


  /* 2. Force the order by hiding/reinserting the pieces in flow order */
  .ppwix-timeline-row .ppwix-timeline-box.text {
    display: block !important;
    width: 100% !important;
    margin-bottom: 15px !important;
  }

  .ppwix-timeline-row .ppwix-timeline-box.image {
    display: block !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  /* 3. Move timeline line to left edge for vertical layout */
  .ppwix-timeline::before {
    left: 20px !important;
    transform: none !important;
  }

  /* 4. Align connector dot to that line */
  .ppwix-timeline-row::after {
    left: 20px !important;
    transform: translate(-50%, -50%) !important;
  }
}
