#machines-section {
  --machines-accent: #0084b1;
  --machines-accent-soft: rgba(0, 132, 177, 0.18);
  --machines-ink: #002b44;
  --machines-ink-muted: #5a6f7c;
  --machines-card-bg: #ffffff;
  --machines-section-bg: #ffffff;

  background-color: var(--machines-section-bg) !important;
  overflow: hidden;
  padding: 72px 0 64px;
}

#machines-section > .container {
  max-width: min(1720px, calc(100vw - 48px)) !important;
  width: 100%;
}

@media (min-width: 1600px) {
  #machines-section > .container {
    max-width: min(1720px, calc(100vw - 80px)) !important;
  }
}

#machines-section .material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

.machines-section-header {
  margin-bottom: 28px;
  text-align: center;
}

.machines-section-intro {
  max-width: 36rem;
  margin: 0.75rem auto 0;
  color: #002b44;
  font-size: 1.05rem;
  line-height: 1.45;
}

#machines-section .machines-section-title,
#machines-section h2.machines-section-title {
  color: #0084b1 !important;
  font-weight: 900 !important;
  font-style: normal !important;
  font-synthesis: none;
  letter-spacing: 0 !important;
  text-align: center !important;
  margin: 0 auto !important;
  max-width: none !important;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: calc(100vw * 64 / 1440) !important;
  line-height: calc(100vw * 124 / 1440) !important;
}

@media (min-width: 1440px) {
  #machines-section .machines-section-title,
  #machines-section h2.machines-section-title {
    font-size: 64px !important;
    line-height: 124px !important;
  }
}

@media (max-width: 1199.98px) {
  #machines-section .machines-section-title,
  #machines-section h2.machines-section-title {
    font-size: clamp(1.75rem, 5vw, 3rem) !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 767.98px) {
  #machines-section .machines-section-title,
  #machines-section h2.machines-section-title {
    white-space: normal;
    font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    line-height: 1.15 !important;
  }
}

.machines-slider-shell {
  width: 94%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  border-radius: 0 32px 32px 0;
  overflow: hidden;
}

.machineSwiper {
  padding: 0 !important;
  overflow: visible;
  margin: 0 !important;
}

.machineSwiper .swiper-wrapper {
  align-items: stretch;
}

.machineSwiper .swiper-slide {
  height: auto;
  align-self: stretch;
  width: 86%;
  max-width: 1100px;
  opacity: 0.42;
  box-sizing: border-box;
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.machineSwiper .swiper-slide .machine-card {
  min-height: 100%;
}

.machineSwiper .swiper-slide-active {
  opacity: 1 !important;
}

.machineSwiper .swiper-slide-next {
  opacity: 0.72;
}

.machine-card {
  display: block;
  height: 100%;
  min-height: 560px;
  padding: 0;
  border-radius: 32px;
  background: var(--machines-card-bg) !important;
  color: var(--machines-ink);
  border: 1px solid rgba(0, 43, 68, 0.08);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.machine-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -36px 56px -16px rgba(0, 43, 68, 0.14);
  pointer-events: none;
  z-index: 4;
}

.machine-card-main {
  position: relative;
  display: block;
  height: 100%;
  min-height: 560px;
}

.machine-card-header {
  display: block;
  position: relative;
  margin-bottom: 14px;
}

.machine-card-header .machine-card-title {
  margin-bottom: 0;
}

.machine-card-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(58%, 560px);
  min-height: 560px;
  height: 100%;
  padding: 32px 48px 160px 36px;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 68%,
    rgba(255, 255, 255, 0.92) 82%,
    rgba(255, 255, 255, 0) 100%
  );
}

.machine-card-title {
  color: #002b44 !important;
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 500 !important;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  max-width: none;
  padding-right: 0;
}

.machine-card-description {
  color: #002b44 !important;
  font-weight: 700 !important;
  font-size: clamp(0.95rem, 1.1vw, 1.0625rem);
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0 0 22px;
  max-width: 34em;
}

.machine-features {
  --machine-features-visible: 4;
  --machine-feature-gap: 12px;
  --machine-feature-row: 2.9rem;

  display: flex;
  flex-direction: column;
  gap: var(--machine-feature-gap);
  margin: 0;
  padding: 0;
  max-width: 36em;
  max-height: calc(
    (var(--machine-feature-row) * var(--machine-features-visible))
    + (var(--machine-feature-gap) * (var(--machine-features-visible) - 1))
  );
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 132, 177, 0.45) transparent;
}

.machine-features.is-scrollable {
  padding-right: 0.35rem;
}

.machine-features::-webkit-scrollbar {
  width: 4px;
}

.machine-features::-webkit-scrollbar-thumb {
  background: rgba(0, 132, 177, 0.4);
  border-radius: 999px;
}

.machine-feature {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 10px;
  align-items: start;
}

.machine-feature-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--machines-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 1px;
}

.machine-feature-text {
  color: #5a6f7c;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 400 !important;
}

.machine-feature-text strong,
.machine-feature-text b {
  color: #3a5566;
  font-weight: 600 !important;
}

.machine-card-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.machine-card-media .btn-see-more-custom--desktop {
  pointer-events: auto;
}

.machine-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.machine-card-image-frame {
  position: relative;
  height: 100%;
  width: auto;
  max-width: none;
  max-height: none;
  line-height: 0;
  flex-shrink: 0;
}


.machine-card-image-frame > img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  margin: 0;
  padding: 0;
  mix-blend-mode: normal;
  filter: none;
}

.btn-see-more-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  background-color: var(--machines-accent) !important;
  color: #fff !important;
  border: 2px solid var(--machines-accent) !important;
  font-size: 15px;
  font-weight: 600 !important;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.btn-see-more-custom--desktop {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
}

.btn-see-more-custom--mobile {
  display: none;
}

.machine-card:not(.machine-card--has-media) .btn-see-more-custom--mobile {
  display: inline-flex;
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 5;
}

.btn-see-more-custom:hover {
  background-color: #fff !important;
  color: var(--machines-accent) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 132, 177, 0.18);
}

.machine-card-footer {
  margin-top: auto;
  padding-top: 24px;
  flex: 0 0 auto;
  width: 100%;
}

.machine-card-bullet {
  position: absolute;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: rgba(0, 132, 177, 0.92);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.machine-card-progress {
  position: relative;
  height: 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.swiper-slide-active:not(.is-last-slide) .machine-card-progress {
  visibility: visible;
  opacity: 1;
}

.machine-card-progress-track {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: rgba(0, 132, 177, 0.22);
}

.machine-card-progress-thumb {
  position: absolute;
  left: 0%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--machines-accent);
  box-shadow: 0 0 0 4px rgba(0, 132, 177, 0.15);
  transform: translate(-50%, -50%);
  will-change: left;
  pointer-events: none;
  transition: none;
}

.machine-card-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin: 0;
  padding: 0;
}

.machine-card-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.machine-card-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 43, 68, 0.18);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--machines-ink);
}

.machine-card-icon-circle .material-icons {
  font-size: 22px;
  color: var(--machines-ink);
}

.machine-card-icon-label {
  font-size: 0.875rem;
  font-weight: 400 !important;
  color: #879ea1;
  line-height: 1.2;
}

@media (max-width: 991.98px) {
  #machines-section {
    padding: 40px 0 32px;
  }

  #machines-section > .container {
    max-width: 100% !important;
    padding-left: 16px;
    padding-right: 16px;
  }

  .machines-section-header {
    margin-bottom: 20px;
  }

  .machines-slider-shell {
    width: 100%;
    max-width: none;
    border-radius: 0;
    overflow: visible;
  }

  .machineSwiper {
    overflow: hidden;
  }

  .machineSwiper .swiper-wrapper {
    align-items: flex-start;
  }

  .machineSwiper .swiper-slide {
    width: 100%;
    opacity: 1;
    display: flex;
    height: auto;
  }

  .machineSwiper .swiper-slide .machine-card {
    flex: 0 1 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .machineSwiper .swiper-slide-next {
    opacity: 1;
  }

  .machine-card {
    min-height: 0;
    border-radius: 24px;
    border-color: rgba(0, 43, 68, 0.1);
  }

  .machine-card::after {
    box-shadow: inset 0 -20px 36px -18px rgba(0, 43, 68, 0.1);
  }

  .machine-card-main {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 0;
    height: auto;
    padding: 20px 18px 18px;
    gap: 0;
  }

  .machine-card-copy {
    width: 100% !important;
    min-height: 0;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    order: 1;
    flex: 0 0 auto !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
  }

  /* image-left uses stronger desktop selectors — force the same stacked mobile layout */
  .machine-card--image-left .machine-card-copy {
    width: 100% !important;
    min-height: 0;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  .machine-card--image-left .machine-card-media {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
  }

  .machine-card--image-left .machine-card-footer {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    padding: 0 !important;
    margin-top: 12px !important;
  }

  .machine-card--image-left .btn-see-more-custom--desktop {
    display: none !important;
    left: auto !important;
    right: auto !important;
  }

  .machine-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .machine-card-header .machine-card-title {
    flex: 1;
    min-width: 0;
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: 600 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.5rem * 1.15 * 2);
  }

  .machine-card-header .btn-see-more-custom--mobile {
    display: inline-flex;
    position: static;
    top: auto;
    right: auto;
    left: auto;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 8px 16px;
    font-size: 13px;
  }

  .btn-see-more-custom--desktop {
    display: none !important;
  }

  /* Fixed slot so peaking slides keep image tops aligned (no JS min-height) */
  .machine-card-description {
    margin-bottom: 14px;
    font-size: 0.9375rem;
    line-height: 1.45;
    max-width: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: calc(0.9375rem * 1.45 * 3);
  }

  .machine-features {
    --machine-feature-row: 2.55rem;
    --machine-feature-gap: 10px;
    --machine-features-slot: calc(
      (var(--machine-feature-row) * var(--machine-features-visible))
      + (var(--machine-feature-gap) * (var(--machine-features-visible) - 1))
    );
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    height: var(--machine-features-slot) !important;
    max-height: var(--machine-features-slot) !important;
    min-height: var(--machine-features-slot) !important;
    gap: var(--machine-feature-gap);
    max-width: none;
    margin: 0;
    overflow-y: auto;
  }

  .machine-feature {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .machine-feature-text {
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #5a6f7c !important;
  }

  .machine-card-media {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    height: auto !important;
    margin: 10px 0 0;
    pointer-events: auto;
    order: 2;
  }

  .machine-card-image {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 43, 68, 0.08);
    background: #f7fafc;
    aspect-ratio: auto;
    max-height: none;
  }

  .machine-card-image-frame {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    line-height: 0;
  }

  .machine-card-image-frame > img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: min(72vw, 420px);
    object-fit: contain;
    object-position: center center;
  }

  .machine-card-bullet {
    width: 26px;
    min-width: 26px;
    height: 26px;
    min-height: 26px;
    font-size: 11px;
  }

  .machine-card-footer {
    order: 3;
    margin-top: 12px !important;
    padding-top: 0;
    flex: 0 0 auto !important;
    width: 100%;
  }

  .machine-card-progress {
    margin-bottom: 16px;
  }

  .swiper-slide-active:not(.is-last-slide) .machine-card-progress {
    visibility: visible;
    opacity: 1;
  }

  .machine-card-icons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
  }

  .machine-card-icon {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid rgba(0, 43, 68, 0.14);
    border-radius: 18px;
    background: #fff;
    text-align: center;
  }

  .machine-card-icon-circle {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
  }

  .machine-card-icon-circle .material-icons {
    font-size: 24px;
    color: var(--machines-ink);
  }

  .machine-card-icon-label {
    font-size: 0.6875rem;
    line-height: 1.25;
    color: #6b7f88;
    max-width: 100%;
  }

  .machines-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.15rem;
  }

  .machines-slider-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #002b44;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  }

  .machines-slider-nav__btn svg {
    display: block;
  }

  .machines-slider-nav__btn:hover:not(:disabled) {
    background: #01405f;
    transform: translateY(-1px);
  }

  .machines-slider-nav__btn:disabled {
    background: #879ea1;
    opacity: 1;
    cursor: default;
    transform: none;
  }
}

@media (max-width: 575.98px) {
  #machines-section {
    padding: 32px 0 28px;
  }

  .machine-card-main {
    padding: 18px 16px 16px;
  }

  .machine-card-header .machine-card-title {
    font-size: 1.375rem;
  }

  .machine-card-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .machine-card-icon {
    min-height: 68px;
    padding: 8px 6px;
    border-radius: 16px;
  }

  .machine-card-icon-label {
    font-size: 0.625rem;
  }
}

@media (min-width: 992px) {
  .machines-slider-nav {
    display: none;
  }

  .machine-card-main {
    position: relative;
    display: block;
  }

  .machine-card--image-left .machine-card-media {
    right: auto;
    left: 0;
  }

  .machine-card--image-left .machine-card-copy {
    margin-left: auto;
    padding: 32px 36px 160px 48px;
    background: linear-gradient(
      270deg,
      #ffffff 0%,
      #ffffff 68%,
      rgba(255, 255, 255, 0.92) 82%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .machine-card--image-left .btn-see-more-custom--desktop {
    right: auto;
    left: 24px;
  }

  .machine-card-footer {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 3;
    width: min(58%, 560px);
    padding: 0 48px 24px 36px;
    box-sizing: border-box;
    margin-top: 0;
  }

  .machine-card--image-left .machine-card-footer {
    left: auto;
    right: 0;
    margin-left: 0;
    padding: 0 36px 24px 48px;
  }
}
