.scrolling-card {
  position: sticky;
  top: 0;
}

.card__inner {
  will-change: transform;
  background: white;
  border-radius: 14px;
  display: flex;
  /* overflow: hidden; */
  box-shadow: 0 25px 50px -12px hsla(265.3, 20%, 10%, 35%);
  transform-origin: center top;
}

.scrolling-cards {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: repeat(var(--cards-count), var(--card-height));
  gap: 40px 0;
}

.card__image-container {
  display: flex;
  width: 40%;
  flex-shrink: 0;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

.card__content {
  padding: 30px 30px;
  display: flex;
  flex-direction: column;
}

.card__title {
  padding: 0;
  margin: 0;
  font-size: 60px;
  font-weight: 600;
  color: #16263a;
}

.card__description {
  line-height: 1.4;
  font-size: 24px;
  color: #16263a;
}

.space {
  height: 90vh;
}

.space--small {
  height: 40vh;
}

/* Container base */
.scrolling-cards {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  max-width: 640px;
  padding: 2rem 1rem;
}

/* Each card wrapper */
.scrolling-card {
  position: sticky;
  top: 13em;
  z-index: 1;
}

/* Inner card styles */
.card__inner {
  /* transition: transform 0.3s ease, filter 0.3s ease; */
  background: #000;
  border: 1px solid #333;
  border-radius: 30px;
  box-shadow: rgba(0, 0, 0, 0.035) 0px 0.602187px 0.602187px -1.25px,
    rgba(0, 0, 0, 0.03) 0px 2.28853px 2.28853px -2.5px,
    rgba(0, 0, 0, 0.01) 0px 10px 10px -3.75px;
  border-color: rgb(254, 216, 170);
  background-color: rgb(0, 0, 0);
  opacity: 1;
}

.card__icon {
  width: 40px;
  padding: 40px 30px;
}

.card__icon img {
  width: 35px;
}

/* Image container */
.card__image-container {
  overflow: hidden;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.card__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Card content */
.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.card__description {
  font-size: 0.8rem;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 0px;
}

.scrolling-card {
  z-index: calc(var(--cards-count) - var(--index, 0));
}

.scrolling-card:not(:first-child) {
  margin-top: 2rem !important;
}

.scrolling-card.is-active {
  margin-top: 2rem !important;
  /* or any value you want for spacing */
  transition: margin 0.3s ease;
}

.card__inner1,
.card__inner2,
.card__inner3,
.card__inner4 {
  position: relative;
  border-color: var(--border-color);
}

.card__inner1 {
  --border-color: rgb(254, 216, 170);
  --bg-color: #512feb3b;
}

.card__inner2 {
  --border-color: rgb(165, 242, 251);
  --bg-color: #512feb3b;
}

.card__inner3 {
  --border-color: rgb(220, 213, 253);
  --bg-color: #512feb3b;
}

.card__inner4 {
  --border-color: rgb(244, 207, 253);
  --bg-color: #512feb3b;
}

.card__inner1::before,
.card__inner2::before,
.card__inner3::before,
.card__inner4::before {
  content: "";
  position: absolute;
  left: 17em;
  right: 0;
  width: 337px;
  height: 228px;
  background-color: var(--bg-color);
  background-size: contain;
  filter: blur(60px);
  opacity: 0.7;
  z-index: 10002;
  top: 0;
  overflow: hidden;
}

.comparison-card {
  border-radius: 16px;
  background-color: #000;
  padding: 24px;
  max-width: 80%;
  box-shadow: inset 0 0 20px 1px #512feb4d, 0 0 20px 0px rgba(142, 98, 255, 0.1);
  border: 1px solid rgb(158 153 169 / 45%);
}

.comarison-width {
  width: 70%;
}

.comparison-scroll-wrapper {
  position: relative;
  margin-bottom: 100px;
}

.comarison-width {
  position: sticky;
  top: 60px;
  z-index: 20;
  background: #000;
  padding: 16px 0;
}

.comarison-width {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.comparison-scroll-card {
  position: sticky;
  top: 200px;
  z-index: 10;
  /* transition: transform 0.3s ease, filter 0.3s ease; */
}

.comparison-scroll-card {
  transform-origin: center center;
  will-change: transform, opacity;
}

.comarison-width {
  transition: all 0.3s ease-in-out;
  z-index: 10;
}

.sticky-visible {
  position: sticky;
  top: 100px;
  background: rgba(255, 255, 255, 0.9);
  /* optional background */
}

.scroling-cards-sec .section-title p {
  color: #b7b7b7;
  padding: 0 13em;
}

@media (max-width: 600px) {
  .scroling-cards-sec .section-title p {
    color: #b7b7b7;
    padding: 0 0;
  }

  .scrolling-cards {
    padding: 2rem 0;
  }

  .card__inner {
    flex-direction: column;
  }

  .card__image-container {
    width: 100%;
  }

  .card__image {
    aspect-ratio: 16 / 9;
  }

  .card__title {
    font-size: 18px;
  }

  .card__description {
    font-size: 16px;
    line-height: 24px;
  }

  .card__content {
    padding: 30px 20px;
  }

  .card__icon img {
    width: 27px;
  }
}

.with-card {
  width: 52%;
}

.without-card {
  width: 48%;
}

.with-card::before {
  content: "";
  position: absolute;
  bottom: 0em;
  left: -1em;
  width: 785px;
  height: 184px;
  background: url("/assets/images/image1.svg") no-repeat center;
  background-size: contain;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 9999;
}

.without-card::before {
  content: "";
  position: absolute;
  bottom: 0em;
  right: -37em;
  width: 785px;
  height: 184px;
  background: url("/assets/images/red-bg.svg") no-repeat center;
  background-size: contain;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 9999;
}