/* AIMS International | Homepage services timeline | local-only enhancement */
/* The original service links, descriptions, and media-settings mappings remain intact. */
.servicecards {
  --timeline-line: #d7e3eb;
  --timeline-accent: #0799cb;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 24px;
  margin: 26px auto 0;
  max-width: 1080px;
}
.servicecards::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 3px;
  top: 22px;
  bottom: 22px;
  left: calc(50% - 1.5px);
  background: var(--timeline-line);
  border-radius: 4px;
  pointer-events: none;
}
.servicecards > .servicecard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  align-items: center;
  column-gap: 68px;
  min-height: 190px;
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: none;
}
.servicecards > .servicecard:hover { transform: none; }
.servicecards > .servicecard::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 12px; height: 12px;
  border: 4px solid white;
  background: var(--timeline-accent);
  border-radius: 100%;
  box-shadow: 0 0 0 2px var(--timeline-line);
}
.servicecards .servicepic {
  height: 190px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px #102c3b13;
  order: 1;
}
.servicecards .servicepic > span { display: none; }
.servicecards .servicebody {
  position: relative;
  z-index: 2;
  background: white;
  border: 1px solid #b8cbd6;
  border-radius: 8px;
  padding: 19px 22px;
  box-shadow: 0 4px 12px #0b293112;
  order: 2;
}
.servicecards .servicebody h3 { font-size: 19px; margin: 0 0 8px; }
.servicecards .servicebody p { font-size: 14px; line-height: 1.5; margin: 0 0 8px; }
.servicecards .servicebody > span { font-size: 12px; }
.servicecards > .servicecard:nth-child(odd) .servicebody { order: 1; }
.servicecards > .servicecard:nth-child(odd) .servicepic { order: 2; }
.servicecards > .servicecard:nth-child(even) .servicebody { order: 2; }
.servicecards > .servicecard:nth-child(even) .servicepic { order: 1; }
.servicecards .servicebody::before {
  content: "";
  position: absolute;
  top: calc(50% - 8px);
  left: -9px;
  width: 16px; height: 16px;
  background: white;
  transform: rotate(45deg);
  border-left: 1px solid #b8cbd6;
  border-bottom: 1px solid #b8cbd6;
}
.servicecards > .servicecard:nth-child(odd) .servicebody::before {
  left: auto; right: -9px;
  border: 0;
  border-top: 1px solid #b8cbd6;
  border-right: 1px solid #b8cbd6;
}
/* Reduce the very large section gaps on the homepage only. */
body:has(.servicecards) .section { padding-top: 62px; padding-bottom: 62px; }
body:has(.servicecards) .topspace { margin-top: 36px; }
@media (max-width: 760px) {
  .servicecards { gap: 18px; margin-top: 20px; padding-left: 22px; }
  .servicecards::before { left: 8px; top: 12px; bottom: 12px; }
  .servicecards > .servicecard { display: flex; flex-direction: column; gap: 0; min-height: 0; }
  .servicecards > .servicecard::before { left: -14px; top: 22px; transform: none; }
  .servicecards > .servicecard .servicepic { order: 1; height: 200px; width: 100%; border-radius: 8px 8px 0 0; }
  .servicecards > .servicecard .servicebody { order: 2; width: 100%; border-radius: 0 0 8px 8px; }
  .servicecards .servicebody::before { display: none; }
  body:has(.servicecards) .section { padding-top: 42px; padding-bottom: 42px; }
}
/* AIMS-PHOTO-HEIGHT-START */
/* Taller pictures and aligned timeline rows; leave text and photos intact. */
@media (min-width: 761px) {
  .servicecards > .servicecard { min-height: 270px; }
  .servicecards .servicepic { height: 270px; background-position: center center; background-size: cover; }
}
@media (max-width: 760px) {
  .servicecards > .servicecard .servicepic { height: 230px; background-position: center center; background-size: cover; }
}
/* AIMS-PHOTO-HEIGHT-END */
