/* --- Safari fixes for Procurement timeline --- */
/* Center the vertical line precisely at container middle */
.consulting-step .timeline-line {
  left: 50% !important;
  transform: translateX(-50%);
  width: 2px; /* Make the line slightly thinner */
}

/* Align each dot to the centered line */
.single-consulting-one .timeline-dot {
  left: 50% !important;
  transform: translateX(-50%);
}

/* Ensure text does not overlap the line and stays to the right */
.single-consulting-one .right-area {
  position: relative;
  z-index: 1;
  padding-left: 30px; /* space from vertical line */
}

/* Fallback when Safari doesn't support flex gap (older versions) */
@supports not (gap: 1rem) {
  .single-consulting-one {
    gap: 0 !important; /* neutralize gap if unsupported */
  }
  .single-consulting-one .thumbnail {
    margin-right: 150px; /* replicate intended spacing */
  }
}

/* Mobile keeps original behavior (line on the left) */
@media only screen and (max-width: 767px) {
  .consulting-step .timeline-line,
  .single-consulting-one .timeline-dot {
    left: 0 !important;
    transform: none;
  }
  .single-consulting-one .right-area {
    padding-left: 30px; /* as original mobile spacing */
  }
}

/* Timeline layout adjustments */
:root {
  --timeline-gap: 40px; /* space between line and content on each side */
}

/* Ensure the vertical line is centered */
.consulting-step .timeline-line,
.single-consulting-one .timeline-dot {
  left: 50% !important;
  transform: translateX(-50%);
}

/* Layout: two equal halves with equal inner padding to the line */
.single-consulting-one {
  justify-content: space-between !important;
  gap: 0;
}

/* Left half: container for image is half width, content aligned to the line */
.single-consulting-one .thumbnail {
  width: calc(50% - var(--timeline-gap));
  padding-right: var(--timeline-gap);
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.single-consulting-one .thumbnail img {
  max-width: 280px; /* keep images reasonably small */
  width: 100%;
  height: auto;
}

/* Right half: text block also half width with mirrored padding */
.single-consulting-one .right-area {
  width: calc(50% - var(--timeline-gap));
  padding-left: var(--timeline-gap);
  box-sizing: border-box;
  text-align: left !important;
}

/* Responsive tuning of the gap and image max width */
@media (max-width: 1399px) {
  :root { --timeline-gap: 36px; }
  .single-consulting-one .thumbnail img { max-width: 260px; }
}
@media (max-width: 1199px) {
  :root { --timeline-gap: 32px; }
  .single-consulting-one .thumbnail img { max-width: 220px; }
}
@media (max-width: 991px) {
  /* Use the earlier mobile layout rules */
  .single-consulting-one { flex-direction: row; padding-left: 30px; }
  .single-consulting-one .thumbnail { width: 120px; padding-right: 20px; }
  .single-consulting-one .thumbnail img { max-width: 120px; }
  .single-consulting-one .right-area { width: calc(100% - 140px); padding-left: 20px; }
  .consulting-step .timeline-line,
  .single-consulting-one .timeline-dot { left: 150px !important; transform: none; }
}
@media (max-width: 767px) {
  .single-consulting-one { padding-left: 20px; }
  .single-consulting-one .thumbnail { width: 80px; padding-right: 15px; }
  .single-consulting-one .thumbnail img { max-width: 80px; }
  .single-consulting-one .right-area { width: calc(100% - 95px); padding-left: 15px; }
  .consulting-step .timeline-line,
  .single-consulting-one .timeline-dot { left: 100px !important; }
}

/* Hide header phone text on mobile */
.header-phone span {
  display: none;
}

/* Show text on larger screens */
@media (min-width: 768px) {
  .header-phone span {
    display: inline;
    margin-left: 8px;
  }
}

/* Tidy up headings and paragraphs */
.single-consulting-one .right-area h4.title,
.single-consulting-one .right-area h4,
.single-consulting-one .right-area p {
  margin-left: 0;
  margin-right: 0;
  text-align: left !important;
  width: 100%;
  max-width: 100%;
}
