/* ============================================================
   Elementor Service Carousel — carousel.css
   Based on the user's approved working CSS.
   ONE addition: .esc-track sliding animation.
   Everything else is identical to the working version.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Manrope:wght@400;500;600&display=swap');

/* ── Wrapper ── */
.esc-carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ════════════════════════════════════════
   TRACK — NEW: sliding container
   Wraps the stage. JS translates this.
════════════════════════════════════════ */
.esc-viewport {
  width: 100%;
  overflow: hidden;
  padding: 20px 0 30px;
}

.esc-track {
  display: flex;
  align-items: flex-end;
  will-change: transform;
}
/* .esc-track.animating removed — animation is on .esc-main-card directly */

/* ── Stage: 3-column grid (sits inside each slot) ── */
.esc-stage {
  display: grid;
  grid-template-columns: 0.8fr 1.8fr 0.8fr;
  align-items: end;
  gap: 28px;
  overflow: visible;
  width: 100%;
}

/* ════════════════════════════
   SIDE CARDS — unchanged
════════════════════════════ */
.esc-side-card {
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0.52;
  will-change: transform, opacity;
  transition:
    opacity   650ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 650ms cubic-bezier(0.4, 0, 0.2, 1),
    filter    650ms cubic-bezier(0.4, 0, 0.2, 1);
}

.esc-side-card:hover {
  opacity: 0.72;
}

.esc-side-card.left {
  transform: rotate(6deg);
  transform-origin: bottom right;
  z-index: 1;
}
.esc-side-card.right {
  transform: rotate(-6deg);
  transform-origin: bottom left;
  z-index: 1;
}

.esc-side-card__img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  filter: brightness(0.5);
  transition: filter 650ms cubic-bezier(0.4, 0, 0.2, 1);
}
.esc-side-card:hover .esc-side-card__img {
  filter: brightness(0.65);
}

.esc-side-card__body {
  background: #ffffff;
  padding: 18px 20px 22px;
  transition: background 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  bottom: 0;
  width: 90%;
  margin: 5%;
  border-radius: 12px;
}

.esc-side-card__title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #2c3b5a;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  line-height: 1.3;
}
.esc-side-card__title::before {
  content: '';
  flex-shrink: 0;
  width: 3px;
  height: 17px;
  background: #f25c05;
  border-radius: 2px;
}

.esc-side-card__desc {
  font-size: 12px;
  color: #142029;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ════════════════════════════
   MAIN CARD — unchanged
════════════════════════════ */
.esc-main-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  /* No CSS animation — JS handles the slide-in transition */
}

.esc-main-card__img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  display: block;
  transition: transform 8000ms ease;
}
.esc-main-card:hover .esc-main-card__img {
  transform: scale(1.03);
}

.esc-main-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 44px 38px 42px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.90) 0%,
    rgba(0, 0, 0, 0.60) 45%,
    rgba(0, 0, 0, 0.10) 80%,
    transparent 100%
  );
}

.esc-main-card__title {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  color: #fff !important;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.esc-main-card__title::before {
  content: '';
  flex-shrink: 0;
  width: 4px;
  height: 24px;
  background: #FF6300 !important;
  border-radius: 2px;
}

.esc-main-card__desc {
  font-size: clamp(13px, 1.1vw, 15.5px);
  color: rgba(255, 255, 255, 0.83);
  line-height: 1.72;
  max-width: 500px;
}

/* ════════════════════════════
   BOTTOM BAR — unchanged
════════════════════════════ */
.esc-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.esc-nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(242, 92, 5, 0.45);
  background: transparent;
  color: #FF6300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background  300ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 300ms cubic-bezier(0.4, 0, 0.2, 1),
    transform   300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.esc-nav-btn:hover {
  background: #f25c05;
  border-color: #f25c05;
  transform: scale(1.1);
}
.esc-nav-btn:active {
  transform: scale(0.94);
}
.esc-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 0.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #FF6300;
}

.esc-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.esc-dot {
  height: 8px;
  width: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition:
    width      350ms cubic-bezier(0.4, 0, 0.2, 1),
    background 350ms ease;
}
.esc-dot.active {
  background: #f25c05;
}

/* ════════════════════════════
   RESPONSIVE — unchanged
════════════════════════════ */
@media (min-width: 1400px) {
  .esc-stage { gap: 36px; }
}
@media (max-width: 1100px) {
  .esc-stage        { gap: 22px; }
  .esc-side-card__img { height: 280px; }
  .esc-main-card__img { height: 480px; }
  .esc-side-card.left  { transform: rotate(5deg); }
  .esc-side-card.right { transform: rotate(-5deg); }
}
@media (max-width: 860px) {
  .esc-stage {
    grid-template-columns: 0.65fr 1.8fr 0.65fr;
    gap: 16px;
  }
  .esc-side-card.left  { transform: rotate(4deg); }
  .esc-side-card.right { transform: rotate(-4deg); }
  .esc-side-card__img  { height: 240px; }
  .esc-side-card__body { padding: 14px 16px 18px; }
  .esc-side-card__title { font-size: 13px; }
  .esc-side-card__desc  { display: none; }
  .esc-main-card__img   { height: 420px; }
}
@media (max-width: 600px) {
  .esc-stage { grid-template-columns: 1fr !important; }
  .esc-side-card { display: none; }
  .esc-main-card__img  { height: 380px; }
  .esc-main-card__body { padding: 28px 24px 28px; }
  .esc-nav-btn { width: 40px; height: 40px; }
  .esc-nav-btn svg { width: 16px; height: 16px; }
}