.elementor-widget-montoport_child_pages_slider {
  width: 100%;
}

/* Elementor containers often use overflow:hidden — breaks GSAP pin */
.elementor-element:has(.montoport-child-pages-slider),
.elementor-element:has(.montoport-child-pages-slider) .e-con-inner,
.elementor-element.solutions,
.elementor-element.solutions .e-con-inner,
.elementor-widget-montoport_child_pages_slider,
.elementor-widget-montoport_child_pages_slider .elementor-widget-container {
  overflow: visible !important;
}

.elementor-element:has(.montoport-child-pages-slider).elementor-motion-effects-element,
.elementor-element:has(.montoport-child-pages-slider) .elementor-motion-effects-element {
  transform: translate3d(0, 0, 0) !important;
}

/* Solutions section — natural height; GSAP pins this whole block */
.elementor-element.solutions,
.elementor-element.solutions > .e-con-inner {
  min-height: 0;
  height: auto;
}

.elementor-element.solutions.montoport-child-pages-slider--pin-host {
  width: 100%;
  box-sizing: border-box;
}

.elementor-element.solutions > .e-con-inner {
  gap: 0;
}

.elementor-element.solutions .elementor-element-86d78a6,
.elementor-element:has(.montoport-child-pages-slider) {
  flex: 0 0 auto;
  margin-top: 0 !important;
}

.elementor-element.solutions .elementor-element-c328b5f > .elementor-widget-container {
  margin-bottom: 1.5rem !important;
}

/*
 * Scroll track — height managed by GSAP pinSpacing.
 */
.montoport-child-pages-slider {
  --cps-gap: 20px;
  --cps-slides: 3;
  width: 100%;
  position: relative;
}

/* Inner wrapper — layout only, pinning handled on .solutions */
.montoport-child-pages-slider__pin {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

/* Centered window — never moves, only clips the rail */
.montoport-child-pages-slider__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

.montoport-child-pages-slider__track {
  display: block;
  width: 100%;
}

.montoport-child-pages-slider__viewport {
  overflow: hidden;
  width: 100%;
}

/* Desktop layout — must work before JS adds --desktop (needed for GSAP measure) */
@media (min-width: 1025px) {
  .montoport-child-pages-slider:not(.montoport-child-pages-slider--touch) .montoport-child-pages-slider__rail {
    display: flex;
    align-items: flex-start;
    gap: var(--cps-gap);
    width: max-content;
    will-change: transform;
  }

  .montoport-child-pages-slider:not(.montoport-child-pages-slider--touch) .montoport-child-pages-slider__slide {
    flex: 0 0 auto;
  }
}

/* Desktop: GSAP scroll pin — horizontal rail */
.montoport-child-pages-slider--desktop .montoport-child-pages-slider__rail,
.montoport-child-pages-slider--active .montoport-child-pages-slider__rail {
  display: flex;
  align-items: flex-start;
  gap: var(--cps-gap);
  width: max-content;
  will-change: transform;
}

.montoport-child-pages-slider__prev,
.montoport-child-pages-slider__next {
  display: none !important;
}

/* Touch: Swiper slider with arrows */
.montoport-child-pages-slider--touch .montoport-child-pages-slider__track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.montoport-child-pages-slider--touch .montoport-child-pages-slider__viewport {
  flex: 1 1 auto;
  min-width: 0;
}

.montoport-child-pages-slider--touch .montoport-child-pages-slider__prev,
.montoport-child-pages-slider--touch .montoport-child-pages-slider__next {
  display: flex !important;
  position: static;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f0f0;
  color: #1a1a1a;
  cursor: pointer;
}

.montoport-child-pages-slider--touch .montoport-child-pages-slider__prev::after,
.montoport-child-pages-slider--touch .montoport-child-pages-slider__next::after {
  font-size: 10px;
  font-weight: 700;
}

.montoport-child-pages-slider--touch .montoport-child-pages-slider__slide {
  height: auto;
}

.montoport-child-pages-slider__rail {
  align-items: flex-start;
}

.montoport-child-pages-slider__slide {
  flex: 0 0 auto;
  text-align: left;
  box-sizing: border-box;
}

.montoport-child-pages-slider__media {
  display: block;
  margin: 0 0 0.75rem;
  overflow: hidden;
}

.montoport-child-pages-slider__media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.montoport-child-pages-slider__media:hover img {
  transform: scale(1.03);
}

.montoport-child-pages-slider__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
}

.montoport-child-pages-slider__title a {
  color: inherit;
  text-decoration: none;
}

.montoport-child-pages-slider__title a:hover {
  color: #00617f;
}

.montoport-child-pages-slider__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #555;
}

.montoport-child-pages-slider--edit {
  height: auto !important;
}

.montoport-child-pages-slider--edit .montoport-child-pages-slider__pin {
  position: static;
  height: auto;
  display: block;
}

.montoport-child-pages-slider--edit .montoport-child-pages-slider__viewport {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.montoport-child-pages-slider--edit .montoport-child-pages-slider__rail {
  transform: none !important;
}

@media (max-width: 1024px) {
  .elementor-element:has(.montoport-child-pages-slider--touch).solutions,
  .elementor-element:has(.montoport-child-pages-slider--touch).solutions > .e-con-inner {
    min-height: 0;
    height: auto;
  }
}

@media (max-width: 640px) {
  .montoport-child-pages-slider__inner {
    padding: 0 0.5rem;
  }

  .montoport-child-pages-slider--touch .montoport-child-pages-slider__prev,
  .montoport-child-pages-slider--touch .montoport-child-pages-slider__next {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }
}
