/* =========================================================
   TD Timeline (sec-services-TD) — CLEAN / CONSOLIDATED
   Section classes: td-timeline td-timeline--crop-r
   Wrap:  .pwr-services.td-timeline__wrap
   Card:  .pwr-services-item.swiper-slide.td-timeline__card   (card == slide)
   ========================================================= */

/* -----------------------------
   0) Design tokens
------------------------------ */
.td-timeline{
  /* Desktop card width per Figma */
  --td-card-w: 392px;
  --td-card-radius: 8px;

  /* Space below cards for track + dots */
  --td-gutter: 56px;

  /* Track line */
  --td-track-color: #D5D7DA;
  --td-track-thickness: 0px;
  --td-track-bottom: 28px;

  /* Dot + connector */
  --td-dot-size: 12px;
  --td-dot-bottom: -32px;
  --td-dot-color: #2f6fff;
  --td-dot-halo: #fff;
  --td-connector-height: 18px;

  /* Lift amount */
  --td-active-lift: 10px;

  /* Icon slot sizing (alignment without forcing logo tall) */
  --td-icon-slot-h: 90px; /* keeps titles aligned even when logo is shorter */
  --td-icon-max-h: 64px;  /* cap icon/logo height (logo can be shorter naturally) */
}

/* -----------------------------
   1) Scrollbar control + safe overflow
   Goal:
   - allow lifted cards (needs visible overflow inside swiper)
   - prevent page-level horizontal scrollbar (clip at section)
------------------------------ */
.td-timeline--crop-r{
  overflow-x: clip;
  overflow-y: visible;
}
@supports not (overflow: clip){
  .td-timeline--crop-r{ overflow-x: hidden; }
}

/* Swiper internals must NOT clip the lifted card */
.td-timeline .pwr-services.td-timeline__wrap,
.td-timeline .pwr-services.td-timeline__wrap .swiper,
.td-timeline .pwr-services.td-timeline__wrap .swiper-wrapper{
  overflow: visible;
}

/* IMPORTANT:
   Do NOT force overflow:visible !important on the section itself
   (that reintroduces the page scrollbar). */

/* -----------------------------
   2) Track line
------------------------------ */
.td-timeline .pwr-services.td-timeline__wrap{
  position: relative;
  padding-bottom: var(--td-gutter);
}

.td-timeline .pwr-services.td-timeline__wrap::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--td-track-thickness);
  background: var(--td-track-color);
  bottom: var(--td-track-bottom);
  z-index: 0; /* behind dots + cards */
  pointer-events: none;
}

/* -----------------------------
   3) Swiper sizing + equal heights
------------------------------ */
.td-timeline .pwr-services.td-timeline__wrap .swiper-wrapper{
  align-items: stretch; /* equal height slides */
}

.td-timeline .pwr-services.td-timeline__wrap .swiper-slide{
  height: auto;
  display: flex; /* allows card to fill height */
}

@media (min-width: 992px){
  .td-timeline .pwr-services.td-timeline__wrap .swiper-slide{
    width: var(--td-card-w) !important;
    max-width: var(--td-card-w) !important;
    flex: 0 0 var(--td-card-w) !important;
  }
}

/* -----------------------------
   4) Card layout (card == slide)
------------------------------ */
.td-timeline .td-timeline__card{
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--td-card-radius);
  background: var(--td-card-bg, transparent);
  padding: 40px !important;
  text-decoration: none;

  /* ensure above track */
  z-index: 1;

  transition: transform 220ms ease, box-shadow 220ms ease;
}

/* Background graphic layer clipped to radius */
.td-timeline .td-timeline__bg{
  position: absolute;
  inset: 0;
  border-radius: var(--td-card-radius);
  overflow: hidden;
  background-image: var(--td-card-graphic);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: auto;
  pointer-events: none;
  z-index: 0;
}

/* Keep card content above bg */
.td-timeline .td-timeline__card > *:not(.td-timeline__bg):not(.td-timeline__dot){
  position: relative;
  z-index: 2;
}

/* Power match-height can inject inline heights; neutralise inside timeline */
.td-timeline .td-timeline__card [data-pwr-mh]{
  height: auto !important;
}

/* Title styling (your override) */
.td-timeline .td-timeline__card .pwr-services-item__title{
  font-size: 30px;
  font-style: normal;
  font-weight: 400;
  line-height: 38px;
}

/* Description area flexible so feature image can sit low */
.td-timeline .td-timeline__card .pwr-services-item__desc{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* If an image is the last element in the rich text, push it to the bottom */
.td-timeline .td-timeline__card .pwr-services-item__desc img{
  margin-top: auto;
  display: block;
}

/* -----------------------------
   5) Icon slot alignment + override image sizing
------------------------------ */
.td-timeline .td-timeline__card .pwr-services-item__icon{
  height: var(--td-icon-slot-h);
  display: flex;
  align-items: center; /* vertically centers logo/icon within the slot */
}

/* Your override image class:
   - DO NOT force height:64 (too big for metapic)
   - cap with max-height instead so logo can be shorter */
.td-timeline .td-timeline__card .pwr-services-item__img.td-icon-override{
  width: auto !important;     /* overrides width attr */
  height: auto !important;
  max-height: var(--td-icon-max-h);
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* -----------------------------
   6) Dot + connector
------------------------------ */
.td-timeline .td-timeline__dot{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--td-dot-bottom);
  width: var(--td-dot-size);
  height: var(--td-dot-size);
  border-radius: 999px;
  background: var(--td-dot-color);
  box-shadow: 0 0 0 6px var(--td-dot-halo);
  z-index: 3;
  pointer-events: none;
}

.td-timeline .td-timeline__dot::before{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(-1 * var(--td-connector-height));
  width: var(--td-track-thickness);
  height: var(--td-connector-height);
  background: var(--td-track-color);
  z-index: -1;
}

/* -----------------------------
   7) Lift / emphasis
   FIXED: card IS the slide, so target combined classes.
   Using swiper-slide-next gives you the “center” card emphasis
   in a 3-up/4-up visible layout.
------------------------------ */
.td-timeline .td-timeline__card{
  transform: translateY(0);
  box-shadow: none;
}

/* Center-visible card emphasis (recommended for your layout) */
.td-timeline .swiper-slide-next.td-timeline__card{
  transform: translateY(calc(-1 * var(--td-active-lift)));
  box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}

/* =========================================================
   TD Timeline — stacking context fix
   ========================================================= */

/* Ensure the entire timeline section sits above decorative backgrounds */
.td-timeline{
  position: relative;
  z-index: 10;
}

/* Explicitly lift the slider/cards layer */
.td-timeline .pwr-services.td-timeline__wrap{
  position: relative;
  z-index: 2;
}

/* Cards themselves stay above everything inside the section */
.td-timeline .td-timeline__card{
  position: relative;
  z-index: 3;
}
