/* ===== Journey (Desktop defaults) =================================== */
.journey-container{
  margin:100px auto;
  max-width:1420px;
  overflow:visible; /* the section itself should not scroll horizontally */
}

.journey-container h2{
  font-family:Archivo;
  font-weight:700;
  font-size:62px;
  line-height:1.1;
  letter-spacing:0;
  text-align:center;
  color:#191919;
  margin-bottom:40px;
}

/* Make only the track scroll horizontally */
.timeline-wrapper{
  position:relative;
  width:calc(100% - 145px);
  margin:0 auto;
  height:522px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-behavior:smooth;
  padding-bottom:16px;
  /* IMPORTANT: no white-space here; let children control layout */
}

/* Put the boxes in one horizontal row, but allow text to wrap inside */
.timeline-box{
  display:inline-block;        /* horizontal flow */
  vertical-align:top;
  width:210px;                 /* matches your PHP child width */
  height:208.5px;
  white-space:normal;          /* allow text wrapping */
  text-align:center;
  /* your existing structure */
  flex:0 0 210px;              /* harmless when inline-block; keeps intent */
  display:flex;                /* keep your inner layout */
  flex-direction:column;
  justify-content:space-between;
  align-items:center;
}

/* Bottom variant as you had */
.timeline-box-bottom{
  top:270px;
  align-self:flex-end;
}

/* Mid line visuals */
.timeline-wrapper .middle-line{
  position:absolute;
  margin:0 100px;
  height:1.65px;
  top:calc(50% - 10px);
  transform:translateY(-50%);
  background:#F1F1F1;
}
.timeline-wrapper .middle-line-circle{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:10px; height:10px;
  border-radius:100%;
  background:#F1F1F1;
}

/* Text + image */
.journey-container p{ white-space:normal; line-height:1.5; } /* <-- fixes single-line issue */
.timeline-details h3{
  font-family:Archivo;
  font-weight:800;
  font-size:18px;
  line-height:1.2;
  letter-spacing:0;
  color:#000;
  margin-bottom:7.15px;
}
.timeline-details p{
  font-family:Archivo;
  font-weight:400;
  font-size:18px;
  line-height:1.5;
  letter-spacing:0;
  color:#000;
  margin:0;
}
.timeline-details p span{ font-weight:600; }
.timeline-img{ width:120px; height:120px; margin-top:6px;}
.timeline-img img{
  width:100%; height:100%;
  object-fit:cover; border-radius:100%;
}

/* ===== Controls (below track) ======================================= */
.timeline-controls{
  margin-top:20px;
  display:flex;
  gap:12px;
  justify-content:center;
}
.timeline-btn{
  width:44px; height:44px; border-radius:50%;
  border:none;
  background:#FFDF00;   /* yellow */
  color:#0B2D35;        /* dark green arrows */
  font-size:22px; font-weight:bold;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.timeline-btn:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.2); }
.timeline-btn:disabled{ opacity:.4; cursor:default; transform:none; box-shadow:none; }

.journey-container {
  margin: 100px auto;
  max-width: 1420px;
}
.journey-container h2 {
  font-family: Archivo;
  line-height: normal;
  letter-spacing: 0;
  text-align: center;
  color: #191919;
  margin-bottom: 40px;
}
.timeline-wrapper {
  display: flex;
  position: relative;
  width: calc(100% - 145px);
  margin: 0 auto;
  height: 498.5px;
  overflow-x: auto;
  padding-bottom: 20px;
}
.journey-container h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 36px;
  font-weight: 600;
}

.timeline-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding-bottom: 16px;
}

/* prevent h2 from being affected by horizontal scroll */
.journey-container {
  overflow: visible; /* container itself should not scroll horizontally */
}
.timeline-controls {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.timeline-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #FFDF00;   /* bright yellow background */
  color: #0B2D35;        /* dark green arrow */
  font-size: 22px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: transform .2s ease, box-shadow .2s ease;
}

.timeline-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

.timeline-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.timeline-wrapper .middle-line {
  position: absolute;
  margin: 0 100px;
  height: 1.65px;
  top: calc(50% - 10px);
  transform: translateY(-50%);
  background: #F1F1F1;
}
.timeline-wrapper .middle-line-circle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 100%;
  background: #f1f1f1;
}
.timeline-box {
  flex: 0 0 210px;
  /* position: absolute; */
  height: 208.5px;
  /* float: left; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}
/* .timeline-box-top {
  text-align: right;
  align-items: end;
  align-self: flex-end;
  margin-left: -40px;
} */
.timeline-box-bottom {
  top: 270px;
  align-self: flex-end;
}
.timeline-details h3 {
  font-family: Archivo;
  font-weight: 800;
  font-size: 18px;
  line-height: normal;
  letter-spacing: 0;
  color: #000000;
  margin-bottom: 7.15px;
}
.timeline-details p {
  font-family: Archivo;
  font-weight: 400;
  font-size: 18px;
  line-height: normal;
  letter-spacing: 0;
  color: #000000;
  margin: 0;
}
.timeline-details p span {
  font-weight: 600;
}
.timeline-img {
  width: 120px;
  height: 120px;
}
.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100%;
}
.journey-mobile-center-circle {
  display: none;
}
@media (max-width: 1275px) {
  .journey-container {
    margin: 40px 9px;
  }
  .journey-container h2 {
    margin-bottom: 25px;
    font-size: 26px;
	line-height:1.2;
	font-weight:600;
    color: #000000;
  }
  .timeline-wrapper {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    align-items: center;
    padding: 0;
    overflow: unset;
  }
  .middle-line,
  .middle-line-circle {
    display: none;
  }
  .timeline-box {
    position: static;
    height: 80px;
    gap: 13px;
    flex: 0 0 auto;
    align-items: unset;
    text-align: unset;
  }
  .timeline-box-top {
    flex-direction: row;
    margin-left: 0;
    justify-content: end;
    align-items: end;
    text-align: right;
    align-self: unset;
  }
  .timeline-box-bottom {
    flex-direction: row-reverse;
    justify-content: start;
    align-self: unset
  }
  .timeline-img {
    width: 75px;
    height: 80px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .timeline-details h3 {
    font-size: 16px;
    margin-bottom: 4.85px;
  }
  .timeline-details p {
    font-size: 16px;
  }
  .timeline-wrapper .timeline-box:last-child {
    margin-bottom: 0;
  }
  .timeline-box-bottom .timeline-details {
    margin-bottom: 10px;
    align-self: flex-end;
    position: absolute;
    left: calc(50% + 53.25px);
  }
  .timeline-box-top .timeline-details {
    align-self: flex-start;
    position: absolute;
    right: calc(50% + 53.25px);
  }
  .timeline-box-top::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #E9E5DE;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    top: -86px;
    border-radius: 100%;
  }
  .timeline-box-top::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #E9E5DE;
    position: relative;
    right: 50%;
    transform: translateX(50%);
    bottom: -12px;
    border-radius: 100%;
  }
  .timeline-box-bottom::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #E9E5DE;
    position: relative;
    right: 50%;
    transform: translateX(50%);
    top: -12px;
    border-radius: 100%;
  }
  .timeline-box-bottom::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #E9E5DE;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    bottom: -86px;
    border-radius: 100%;
  }
  .timeline-wrapper>.timeline-box:nth-of-type(2)::before{
    display: none;
  }
  .timeline-wrapper>.timeline-box:last-of-type::after {
    display: none;
  }
  .journey-mobile-center-circle {
    display: block;
    width: 4px;
    height: 4px;
    margin: 16px auto;
    background: #E9E5DE;
    border-radius: 100%;
  }
	/* ===== Tablet/Mobile ================================================ */
@media (max-width:1275px){
  .journey-container{ margin:40px 9px; }
  .journey-container h2{
    margin-bottom:25px; font-size:26px; color:#191919;
  }

  /* Stack timeline vertically for mobile; disable horizontal track visuals */
  .timeline-wrapper{
    width:100%; margin:0;
    display:flex; flex-direction:column;
    height:auto; align-items:center;
    padding:0;
    overflow:unset;
  }
  .middle-line, .middle-line-circle{ display:none; }

  .timeline-box{
    position:static;
    height:80px; gap:13px;
    flex:0 0 auto;
    align-items:unset; text-align:unset;
    display:flex; /* ensure flex layout remains */
  }
  .timeline-box-top{
    flex-direction:row;
    margin-left:0;
    justify-content:end;
    align-items:end;
    text-align:right;
    align-self:unset;
  }
  .timeline-box-bottom{
    flex-direction:row-reverse;
    justify-content:start;
    align-self:unset;
  }
  .timeline-img{
    width:75px; height:80px;
    position:absolute; left:50%; transform:translateX(-50%);
  }
  .timeline-details h3{ font-size:15px; margin-bottom:4.85px; }
  .timeline-details p{ font-size:15px; }

  .timeline-wrapper .timeline-box:last-child{ margin-bottom:0; }

  .timeline-box-bottom .timeline-details{
    margin-bottom:-20px; align-self:flex-end; position:absolute; left:calc(50% + 53.25px);
  }
  .timeline-box-top .timeline-details{
    align-self:flex-start; position:absolute; right:calc(50% + 53.25px);
  }

  .timeline-box-top::before{
    content:''; width:6px; height:6px; background:#E9E5DE; position:relative;
    left:50%; transform:translateX(-50%); top:-86px; border-radius:100%;
  }
  .timeline-box-top::after{
    content:''; width:6px; height:6px; background:#E9E5DE; position:relative;
    right:50%; transform:translateX(50%); bottom:-12px; border-radius:100%;
  }
  .timeline-box-bottom::before{
    content:''; width:6px; height:6px; background:#E9E5DE; position:relative;
    right:50%; transform:translateX(50%); top:-12px; border-radius:100%;
  }
  .timeline-box-bottom::after{
    content:''; width:6px; height:6px; background:#E9E5DE; position:relative;
    left:50%; transform:translateX(-50%); bottom:-86px; border-radius:100%;
  }
  .timeline-wrapper > .timeline-box:nth-of-type(2)::before{ display:none; }
  .timeline-wrapper > .timeline-box:last-of-type::after{ display:none; }

  .journey-mobile-center-circle{
    display:block; width:4px; height:4px; margin:16px auto; background:#E9E5DE; border-radius:100%;
  }
}

}