/* ============================================================
   Loreto Vertical Scroll Timeline (vtl) — Elementor widget styles.

   Custom properties are scoped to .vtl (not :root) so several timelines with
   different Elementor settings can coexist on one page. No page/body styling.
   ============================================================ */

.vtl {
  /* colours */
  --vt-line: #72A0C2;
  --vt-node: #123a63;
  --vt-page-bg: #f7f6ef;
  --vt-media-bg: #dfe3da;

  /* layout / sizing */
  --vt-max-w: 1320px;
  --vt-col-gap: 70px;
  --vt-media-w: 530px;
  --vt-media-ratio: 530 / 300;
  --vt-rail-w: 46px;
  --vt-line-w: 1.5px;
  --vt-node-size: 15px;
  --vt-node-ring: 1.5px;
  --vt-star-size: 60px;
  --vt-item-gap: 64px;

  /* motion */
  --vt-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --vt-dur: 0.4s;

  display: flex;
  align-items: flex-start;
  gap: var(--vt-col-gap);
  max-width: var(--vt-max-w);
  margin: 0 auto;
  padding: 90px 40px;
}

/* ---------- Sticky media (left) ---------- */
.vtl__media {
  position: sticky;
  top: 50%;
  transform: translateY(1%);
  flex: 0 0 var(--vt-media-w);
  width: var(--vt-media-w);
  aspect-ratio: var(--vt-media-ratio);
  background: var(--vt-media-bg);
  overflow: hidden;
}

.vtl__media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--vt-dur) var(--vt-ease);
}

.vtl__media-img.is-active {
  opacity: 1;
}

/* ---------- Timeline track (right) ---------- */
.vtl__track {
  position: relative;
  flex: 1 1 auto;
  padding-left: var(--vt-rail-w);
}

/* The vertical line */
.vtl__track::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: calc(var(--vt-rail-w) / 2);
  width: var(--vt-line-w);
  background: var(--vt-line);
  transform: translateX(-50%);
}

.vtl__item {
  position: relative;
  margin-bottom: var(--vt-item-gap);
  transition: opacity var(--vt-dur) var(--vt-ease);
}

.vtl__item:last-child {
  margin-bottom: 0;
}

/* ---- Node marker on the line ---- */
.vtl__marker {
  position: absolute;
  top: 4px;
  left: calc(-1 * var(--vt-rail-w));
  width: var(--vt-rail-w);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hollow circle (inactive) */
.vtl__node {
  width: var(--vt-node-size);
  height: var(--vt-node-size);
  border-radius: 50%;
  border: var(--vt-node-ring) solid var(--vt-node);
  background: var(--vt-page-bg);
  transition: opacity var(--vt-dur) var(--vt-ease);
}

/* Compass star (active) */
.vtl__star {
  position: absolute;
  width: var(--vt-star-size);
  height: var(--vt-star-size);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.55) rotate(-40deg);
  transition:
    opacity var(--vt-dur) var(--vt-ease),
    transform var(--vt-dur) var(--vt-ease);
  pointer-events: none;
}

/* Active state swaps circle -> star */
.vtl__item.is-active .vtl__node {
  opacity: 0;
}

.vtl__item.is-active .vtl__star {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ---- Item text ---- */
.vtl__title {
  margin: 0 0 16px;
  color: #082D63;
  font-family: "Noto Sans", sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
}

.vtl__text {
  max-width: 470px;
  margin: 0;
  color: #082D63;
  font-family: "Noto Sans", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7em;
}

.vtl__text p {
  margin: 0 0 1em;
}

.vtl__text p:last-child {
  margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .vtl {
    flex-direction: column;
    gap: 40px;
    padding: 56px 24px;
  }

  .vtl__media {
    position: relative;
    top: auto !important;
    transform: none;
    flex-basis: auto;
    width: 100%;
  }

  .vtl__item:not(.is-active) {
    opacity: 1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vtl__media-img,
  .vtl__item,
  .vtl__node,
  .vtl__star {
    transition: none !important;
  }
}
