/* Keep every service case slide inside the mobile viewport. */
.ying-template-service .carousel-track.ying-case-track {
  width: 100%;
}

.ying-template-service .carousel-track.ying-case-track > .ying-case-slide {
  box-sizing: border-box;
  flex: 0 0 100%;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

@media (max-width: 768px) {
  .ying-template-service .carousel-wrap[data-ying-carousel] {
    contain: layout paint;
    margin-top: 32px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .ying-template-service .carousel-track.ying-case-track {
    align-items: flex-start;
    max-width: 100%;
    min-width: 0;
    will-change: transform;
  }

  .ying-template-service .ying-case-slide,
  .ying-template-service .ying-case-slide > .case-card,
  .ying-template-service .ying-case-slide > .case-card > * {
    max-width: 100%;
    min-width: 0;
  }

  .ying-template-service .ying-case-slide > .case-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
    padding: 28px 20px;
    width: 100%;
  }

  .ying-template-service .case-title,
  .ying-template-service .case-body,
  .ying-template-service .case-quote,
  .ying-template-service .case-attr {
    overflow-wrap: anywhere;
  }

  .ying-template-service .case-title {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .ying-template-service .case-stats {
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 24px;
  }

  .ying-template-service .case-stat {
    min-width: 0;
    padding: 12px 4px 0;
  }

  .ying-template-service .case-stat-num {
    font-size: 26px;
  }

  .ying-template-service .case-stat-label {
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .ying-template-service .case-img {
    aspect-ratio: 16 / 10;
    max-width: 100%;
    width: 100%;
  }

  .ying-template-service .case-img img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .ying-template-service .carousel-controls {
    gap: 16px;
    margin-top: 16px;
    width: 100%;
  }

  .ying-template-service .carousel-dots {
    flex: 1 1 auto;
    flex-wrap: wrap;
  }

  .ying-template-service .carousel-arrows {
    flex: 0 0 auto;
  }
}

@media (max-width: 380px) {
  .ying-template-service .ying-case-slide > .case-card {
    padding-inline: 16px;
  }

  .ying-template-service .case-stats {
    gap: 6px;
  }

  .ying-template-service .case-stat-num {
    font-size: 23px;
  }
}
