/* -----------------------------------------
   PROCESS TIMELINE (WPBakery element)
   Numbered steps down a line that fills as you scroll, with a sticky
   image beside them that changes with the current step.

   Step states (set by the script):
   - data-status="active"  the line has reached this step
   - data-current          the step the line is on now
----------------------------------------- */

.ccg-process-timeline {
  --pt-text: #fff;
  --pt-accent: #fff;
  --pt-on-accent: #111112;
  --pt-bg: #000;
  --pt-line: rgb(255 255 255 / 15%);
  --pt-border: rgb(255 255 255 / 25%);
  --pt-placeholder: rgb(255 255 255 / 6%);
  --pt-radius: var(--border-radius-value, 1rem);
  --pt-marker: 3rem;
  --pt-item-gap: clamp(1.5rem, 3vw, 3rem);   /* number to text */
  --pt-gap: 8rem;
  --pt-ease: cubic-bezier(0.645, 0.045, 0.355, 1);
  /* set inline by the shortcode */
  --pt-ratio: 0.75;
  --pt-top: 0px;
  --pt-activation: 0.7;

  position: relative;
  width: 100%;
  color: var(--pt-text);
}

.ccg-process-timeline.is--light {
  --pt-text: #111112;
  --pt-accent: #111112;
  --pt-on-accent: #fff;
  --pt-bg: #fff;
  --pt-line: rgb(0 0 0 / 12%);
  --pt-border: rgb(0 0 0 / 20%);
  --pt-placeholder: rgb(0 0 0 / 5%);
}

.ccg-process-timeline.is--shape-pill {
  --pt-radius: 100em;
}

.ccg-process-timeline.is--shape-square {
  --pt-radius: 0px;
}

.ccg-process-timeline,
.ccg-process-timeline *,
.ccg-process-timeline *::before,
.ccg-process-timeline *::after {
  box-sizing: border-box;
}

/* ---- Layout: steps + sticky image ---- */

.ccg-process-timeline .ccg-pt__inner {
  display: flex;
  align-items: stretch;
  gap: 45px;
  /* max-width: 1600px; */
  margin: auto !important;
  /* padding: 0px 75px; */
}

.ccg-process-timeline.is--img-left .ccg-pt__inner {
  flex-direction: row-reverse;
}

.ccg-process-timeline .ccg-pt__main {
  flex: 1 1 0;
  min-width: 0;
  padding-bottom: 8% !important;
  padding: 0px 45px 0px 0px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Images switched off (or none set): steps only, centred, closer together */
.ccg-process-timeline.no--images {
  --pt-gap: 4.5rem;
}

.ccg-process-timeline.no--images .ccg-pt__main {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
}

.ccg-process-timeline .ccg-pt__media {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}

/* ---- Header ---- */

.ccg-process-timeline .ccg-pt__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 3rem;
  padding-top: 0;
  margin-top: 0%;
}

.ccg-process-timeline .ccg-pt__eyebrow {
  font-size: var(--eyebrow-text);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nectar-extra-color-2);
  font-weight: 500;
}

.ccg-process-timeline .ccg-pt__title {
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ---- Line ---- */

.ccg-process-timeline .ccg-pt__wrapper {
  position: relative;
}

/* top + height are set by the script so the line runs first number to last */
.ccg-process-timeline .ccg-pt__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pt-marker) / 2 - 1px);
  width: 2px;
  background-color: var(--pt-line);
  pointer-events: none;
}

.ccg-process-timeline .ccg-pt__fill {
  position: absolute;
  inset: 0;
  background-color: var(--nectar-extra-color-2);
  transform-origin: 50% 0;
  transform: scaleY(0);
}

/* ---- Steps ---- */

.ccg-process-timeline .ccg-pt__list,
.ccg-process-timeline .ccg-pt__item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ccg-process-timeline .ccg-pt__list {
  display: flex;
  flex-direction: column;
  gap: var(--pt-gap);
  padding-right: 0;
}

.ccg-process-timeline .ccg-pt__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--pt-item-gap);
}

.ccg-process-timeline .ccg-pt__item::before,
.ccg-process-timeline .ccg-pt__item::marker {
  content: none;
}

.ccg-process-timeline .ccg-pt__marker {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pt-marker);
  height: var(--pt-marker);
  border: 1.5px solid var(--pt-border);
  border-radius: 50%;
  background-color: var(--pt-bg);
  color: var(--pt-text);
  font-size: 1rem;
  line-height: 1;
  transition:
    background-color 0.4s var(--pt-ease),
    border-color 0.4s var(--pt-ease),
    color 0.4s var(--pt-ease),
    box-shadow 0.4s var(--pt-ease);
}

.ccg-process-timeline [data-pt-item][data-status="active"] .ccg-pt__marker {
  border-color: var(--pt-accent);
  background-color: var(--pt-accent);
  color: var(--pt-on-accent);
}

.ccg-process-timeline [data-pt-item][data-current] .ccg-pt__marker {
  box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--pt-accent) 16%, transparent);
}

.ccg-process-timeline .ccg-pt__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.25rem;
}

.ccg-process-timeline .ccg-pt__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  max-width: 100%;
  transition: opacity 0.25s ease;
}

/* Faded until reached, half-faded once passed, full on the current step.
   Only once the script is running, so the text never stays faint without it. */
html.js .ccg-process-timeline.is--ready [data-pt-item] .ccg-pt__content {
  opacity: 0.25;
}

html.js .ccg-process-timeline.is--ready [data-pt-item][data-status="active"] .ccg-pt__content {
  opacity: 0.5;
}

html.js .ccg-process-timeline.is--ready [data-pt-item][data-current] .ccg-pt__content {
  opacity: 1;
}

.ccg-process-timeline .ccg-pt__label {
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.ccg-process-timeline .ccg-pt__step-title {
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 1.8rem !important;
  line-height: 1 !important;
  letter-spacing: -0.02em;
  margin-bottom: 7.5px !important;
}

.ccg-process-timeline .ccg-pt__text,
.ccg-process-timeline .ccg-pt__text p {
  color: inherit;
  font-size: 1.1rem;
  line-height: 1.45;
  opacity: 0.75;
  /* max-width: 500px; */
}

.ccg-process-timeline .ccg-pt__text p {
  margin: 0 0 0.75em;
  padding: 0;
}

.ccg-process-timeline .ccg-pt__text > :last-child {
  margin-bottom: 0;
}

/* ---- Button under the last step, lined up with the step text ---- */

.ccg-process-timeline .ccg-pt__cta {
  margin-top: 3rem;
  padding-left: calc(var(--pt-marker) + var(--pt-item-gap));
}

/* villa-btn (cta-list.css) is white on dark: flip it on light rows */
.ccg-process-timeline.is--light .ccg-pt__cta .villa-btn {
  border-color: var(--pt-border);
  color: var(--pt-text) !important;
}

.ccg-process-timeline.is--light .ccg-pt__cta .villa-btn:hover {
  border-color: var(--pt-text) !important;
  background: var(--pt-text) !important;
  color: var(--pt-bg) !important;
}

/* ---- Image frames (sticky panel + under each step) ---- */

.ccg-process-timeline .ccg-pt__frame {
  position: relative;
  aspect-ratio: var(--pt-ratio);
  border-radius: var(--pt-radius);
  overflow: hidden;
  isolation: isolate;
  background-color: var(--pt-placeholder);
  height: calc(100% - 40px);
}

.ccg-process-timeline .ccg-pt__frame img.ccg-pt__img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
}

/* Under each step: tablet/phone only */
.ccg-process-timeline .ccg-pt__inline-media {
  display: none;
}

/* ---- Sticky panel (desktop) ---- */

.ccg-process-timeline .ccg-pt__sticky {
  position: sticky;
  top: var(--pt-top);
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--pt-top));
  height: calc(100dvh - var(--pt-top));
}

/* Fallback when a parent's overflow stops position: sticky working:
   the script pins it with ScrollTrigger instead */
.ccg-process-timeline .ccg-pt__sticky.is--pin {
  position: relative;
  top: auto;
}

/* As big as the column allows, but always fits the screen */
.ccg-process-timeline .ccg-pt__sticky .ccg-pt__frame {
  width: min(100%, calc((100vh - var(--pt-top) - 4rem) * var(--pt-ratio)));
  width: min(100%, calc((100dvh - var(--pt-top) - 4rem) * var(--pt-ratio)));
  width: 100%;
}

/* Room under the last step so it can become current while the image is still pinned */
.ccg-process-timeline.has--images .ccg-pt__main {
  padding-bottom: max(2rem, calc((1 - var(--pt-activation)) * 100vh - 8rem));
  padding-bottom: max(2rem, calc((1 - var(--pt-activation)) * 100dvh - 8rem));
}

.ccg-process-timeline.has--images {
  --pt-gap: 5.5rem;
}

/* All the images sit on top of each other. Reached ones are shown, so the
   current step's image covers the earlier ones and nothing flashes through. */
.ccg-process-timeline .ccg-pt__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease-in-out,
    visibility 0s linear 0.6s;
}

.ccg-process-timeline .ccg-pt__slide.is--first,
.ccg-process-timeline .ccg-pt__slide[data-status="active"] {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.6s ease-in-out,
    visibility 0s;
}

.ccg-process-timeline .ccg-pt__slide img.ccg-pt__img {
  transform: scale(1.08);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ccg-process-timeline .ccg-pt__slide.is--first img.ccg-pt__img,
.ccg-process-timeline .ccg-pt__slide[data-status="active"] img.ccg-pt__img {
  transform: none;
}

/* Wipe up: the next image slides up over the last */
.ccg-process-timeline.is--fx-wipe .ccg-pt__slide {
  opacity: 1;
  clip-path: inset(100% 0 0 0);
  transition:
    clip-path 0.9s cubic-bezier(0.77, 0, 0.175, 1),
    visibility 0s linear 0.9s;
}

.ccg-process-timeline.is--fx-wipe .ccg-pt__slide.is--first,
.ccg-process-timeline.is--fx-wipe .ccg-pt__slide[data-status="active"] {
  clip-path: inset(0 0 0 0);
  transition:
    clip-path 0.9s cubic-bezier(0.77, 0, 0.175, 1),
    visibility 0s;
}

/* ---- Tablet + phone: image under each step, no sticky panel ---- */

@media screen and (max-width: 999px) {
  .ccg-process-timeline .ccg-pt__inner {
    display: block;
  }

  .ccg-process-timeline .ccg-pt__media {
    display: none;
  }

  .ccg-process-timeline.has--images .ccg-pt__main {
    padding: 0 !important;
  }

  .ccg-process-timeline.has--images {
    --pt-gap: 6rem;
  }

  .ccg-process-timeline .ccg-pt__inline-media {
    display: block;
    width: 100%;
    max-width: 100%;
    transition: opacity 0.5s ease;
  }

  .ccg-process-timeline .ccg-pt__frame {
    aspect-ratio: 1.5 / 1;
    margin-right: 0 !important;
  }

  .ccg-process-timeline .ccg-pt__list {
    padding: 0;
  }

  html.js .ccg-process-timeline.is--ready [data-pt-item] .ccg-pt__inline-media {
    opacity: 0.4;
  }

  html.js .ccg-process-timeline.is--ready [data-pt-item][data-status="active"] .ccg-pt__inline-media {
    opacity: 1;
  }
}


@media (prefers-reduced-motion: reduce) {
  .ccg-process-timeline .ccg-pt__marker,
  .ccg-process-timeline .ccg-pt__content,
  .ccg-process-timeline .ccg-pt__inline-media,
  .ccg-process-timeline .ccg-pt__slide,
  .ccg-process-timeline .ccg-pt__slide img.ccg-pt__img {
    transition: none !important;
  }

  .ccg-process-timeline .ccg-pt__slide img.ccg-pt__img {
    transform: none;
  }
}


@media screen and (max-width: 1600px) {
  .ccg-process-timeline .ccg-pt__inner {
    max-width: 100%;
    gap: 0;
    padding-right: 0px;
  }
  
.ccg-process-timeline.has--images {
  --pt-gap: 3.5rem;
}
  .ccg-process-timeline .ccg-pt__main {
    padding: 0px 65px;
    padding-right: 35px !important;
  }
  .ccg-process-timeline .ccg-pt__list {
    padding-right: 0;
  }
  .ccg-process-timeline .ccg-pt__frame {
    margin-right: 20px;
    height: calc(100% - 40px);
  }
}

@media screen and (max-width: 1300px) {
  .ccg-process-timeline .ccg-pt__text,
  .ccg-process-timeline .ccg-pt__text p {
      color: inherit;
      font-size: 1rem;
  }
  .ccg-process-timeline .ccg-pt__inner {
      /* padding-left: 50px; */
  }
}


@media screen and (max-width: 999px) {
  .ccg-process-timeline .ccg-pt__inner {
      max-width: var(--mobile-container-width);
      padding: 0;
      margin-bottom: 45px !important;
  }
  .ccg-process-timeline .ccg-pt__wrapper {
    width: 100%;
  }
    .ccg-process-timeline .ccg-pt__main {
    padding: 0px 65px;
    padding-right: 0px !important;
  }
  .ccg-process-timeline .ccg-pt__text, .ccg-process-timeline .ccg-pt__text p {
    max-width: 100%;
}
}

@media screen and (max-width: 767px) {
  .ccg-process-timeline {
    --pt-marker: 2rem;
    --pt-item-gap: 1.25rem;
  }

  .ccg-process-timeline.no--images {
    --pt-gap: 3rem;
  }

  .ccg-process-timeline .ccg-pt__cta {
    margin-top: 2.5rem;
  }

  .ccg-process-timeline .ccg-pt__frame {
    margin: 0 !important;
  }

  .ccg-process-timeline .ccg-pt__list,
  .ccg-process-timeline.has--images .ccg-pt__main {
    padding: 0 !important;
  }

  .ccg-process-timeline .ccg-pt__marker {
    font-size: 0.875rem;
  }

  .ccg-process-timeline .ccg-pt__body {
    gap: 1.3rem;
    padding-top: 0;
    flex-direction: column-reverse;
  }

  .ccg-process-timeline .ccg-pt__text,
  .ccg-process-timeline .ccg-pt__text p {
    font-size: 0.9rem;
  }
}


@media screen and (max-width: 690px) {
  .ccg-process-timeline.has--images {
    --pt-gap: 55px;
  }
  .ccg-process-timeline .ccg-pt__frame {
    
  }
  .ccg-process-timeline .ccg-pt__main {
    padding: 0px 0px 0 !important;
  }
  .ccg-process-timeline .ccg-pt__frame {
      aspect-ratio: 1 / 1;
      margin: 0;
      max-height: 450px;
      width: 100%;
  }
  .ccg-process-timeline .ccg-pt__list {
    padding-right: 0px;
}
      .ccg-process-timeline {
        --pt-marker: 1.95rem;
    }
  .ccg-process-timeline .ccg-pt__line {
    left: 14.5px;
  }
    .ccg-process-timeline.no--images {
    --pt-gap: 40px;
  }
  .ccg-process-timeline .ccg-pt__inner {
    padding-left: 0;
    max-width: 100%;
  }
  .ccg-process-timeline .ccg-pt__step-title {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 1.55rem !important;
  }
  .ccg-process-timeline .ccg-pt__cta,
  .ccg-process-timeline .ccg-pt__cta .villa-btn {
    width: 100%;
    margin-top: 0.55rem;
  }
}



@media screen and (max-width: 479px) {
    .ccg-process-timeline .ccg-pt__frame {
        aspect-ratio: 1.15 / 1;
        margin: 0;
        max-height: 450px;
    }
}