:root {
  --stack-top: 120px;
}

.stack-section {
  position: relative;
  overflow: visible;
  padding-top: 40px;
  padding-bottom: 40px;
}

.stack-section__badge {
  width: 106px;
  height: 30px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background: #31d1ff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.wcu-main-title {
  margin: 0 0 12px;
  color: #000;
  font-size: 56px;
  font-weight: 500;
  text-align: center;
}

.wcu-subtitle {
  max-width: 640px;
  margin: 0 auto 48px;
  color: #171717;
  font-size: 18px;
  text-align: center;
}

.stack-section .stack-card {
  position: sticky;
  top: calc(var(--stack-top) + var(--stack-offset, 14px));
  z-index: calc(10 + var(--i, 1));
  width: 100%;
  margin: 0 auto 120px;
  box-sizing: border-box;
}

.stack-section .card-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  height: 60vh;
  min-height: 440px;
  padding: 50px;
  overflow: hidden;
  border-radius: 25px;
  box-sizing: border-box;
  transform-origin: center top;
  will-change: transform, filter, opacity;
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1),
    filter 0.5s cubic-bezier(.22,.61,.36,1),
    opacity 0.5s cubic-bezier(.22,.61,.36,1);
}

.stack-section .card-2 .card-content {
  background: #ebffe0;
  color: #1a1a1a;
}

.stack-section .card-3 .card-content {
  background: #d8f1ff;
  color: #1a1a1a;
}

.stack-section .card-4 .card-content {
  background: #ffe5f9;
  color: #1a1a1a;
}

.stack-section .stack-card.is-behind .card-content {
  transform: scale(0.93) translateY(-20px);
  filter: blur(5px);
  opacity: 0.78;
}

.stack-section .stack-card.is-behind-2 .card-content {
  transform: scale(0.87) translateY(-38px);
  filter: blur(8px);
  opacity: 0.5;
}

.stack-section .text-section {
  flex: 1;
}

.stack-section .card-content h2 {
  margin: 0 0 15px;
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
}

.stack-section .card-content .sub-heading {
  max-width: 85%;
  margin: 0 0 30px;
  color: #0a102fcc;
  font-family: "General Sans", sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 35px;
}

.stack-section .badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 18px;
  border: 0;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.stack-section .btn-custom {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 30px;
  border: 0;
  border-radius: 50px;
  background: #1a1a1a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease;
}

.stack-section .btn-custom:hover {
  transform: translateX(5px);
  background: #2d2d2d;
  color: #fff;
}

.stack-section .btn-custom i {
  font-size: 14px;
}

.stack-section .image-section {
  display: flex;
  flex: 1.2;
  align-items: center;
  justify-content: center;
}

.stack-section .image-section img {
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1099.98px) {
  .stack-section .card-content {
    flex-direction: column;
    height: auto;
    min-height: 40vh;
    padding: 30px 24px;
  }

  .stack-section .card-content h2 {
    font-size: 30px;
  }

  .stack-section .card-content .sub-heading {
    font-size: 22px;
  }

  .stack-section .image-section img {
    max-height: 220px;
  }
}

@media (max-width: 576px) {
  .wcu-main-title {
    font-size: 28px;
  }

  .wcu-subtitle {
    font-size: 15px;
  }

  .stack-section .card-content {
    gap: 20px;
    padding: 24px 18px;
  }

  .stack-section .stack-card {
    margin-bottom: 80px;
  }

  .stack-section .card-content h2 {
    font-size: 26px;
  }

  .stack-section .card-content .sub-heading {
    max-width: 100%;
    font-size: 22px;
  }

  .stack-section .image-section img {
    max-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stack-section .card-content {
    transition: none;
  }

  .stack-section .stack-card.is-behind .card-content,
  .stack-section .stack-card.is-behind-2 .card-content {
    transform: none;
    filter: none;
    opacity: 1;
  }
}