/* How to apply — services timeline (from horizoneurope opportunities/apply.html) */

.apply-page .section-head {
  margin-bottom: 2rem;
}

.apply-page .section-head > div {
  width: 100%;
}

.apply-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  width: 100%;
}

.apply-head-row h2 {
  margin: 0;
  flex: 0 1 auto;
}

.apply-head-row .btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.apply-page .section-head p {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.services-timeline {
  --tl-gutter: 1.15rem;
  --tl-line-x: calc(var(--tl-gutter) + 0.45rem);
  --tl-ball: 2.35rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: calc(var(--tl-ball) / 2) 0 0.5rem;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.services-timeline::before {
  content: "";
  position: absolute;
  left: var(--tl-line-x);
  top: calc(var(--tl-ball) / 2);
  bottom: 0.35rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--navy) 55%, var(--light-blue) 100%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  transform: translateX(-50%);
}

.service-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-gutter) 1fr;
  gap: 0;
  align-items: stretch;
  width: 100%;
  padding-left: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  z-index: 1;
}

.service-timeline-item:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.service-timeline-node {
  position: absolute;
  left: var(--tl-line-x);
  top: 0;
  z-index: 5;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.service-timeline-item .service-num {
  position: static;
  min-width: var(--tl-ball);
  height: var(--tl-ball);
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--white);
  border: 2px solid var(--accent);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(6, 54, 119, 0.12);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-grid;
  place-items: center;
}

.service-timeline-panel {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 0;
  width: 100%;
  margin-left: 0;
  grid-column: 2;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(6, 54, 119, 0.06);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
  min-height: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.service-timeline-item:hover .service-timeline-panel {
  border-color: rgba(251, 135, 28, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(6, 54, 119, 0.12);
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.apply-page .service-card-media {
  position: relative;
  min-height: 150px;
  height: 100%;
  background-color: var(--navy);
  overflow: hidden;
  isolation: isolate;
  border-radius: 16px 0 0 16px;
  z-index: 1;
}

.apply-page .service-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.45s var(--ease);
  z-index: 0;
}

.apply-page .service-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6, 54, 119, 0.05) 0%, rgba(6, 54, 119, 0.4) 100%);
  pointer-events: none;
}

.service-timeline-item:hover .service-card-media img {
  transform: scale(1.06);
}

.apply-page .service-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1.25rem 1.25rem;
  flex: 1;
  min-width: 0;
  background: var(--white);
  border-radius: 0 16px 16px 0;
}

.apply-page .service-card-body h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--navy);
}

.apply-page .service-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .services-timeline {
    --tl-gutter: 1.05rem;
    --tl-line-x: calc(var(--tl-gutter) + 0.4rem);
  }

  .service-timeline-panel {
    margin-left: 0;
    width: 100%;
    grid-column: 2;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .apply-page .service-card-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 16px 16px 0 0;
  }

  .apply-page .service-card-body {
    border-radius: 0 0 16px 16px;
  }

  .apply-head-row .btn {
    width: 100%;
    justify-content: center;
  }
}
