.services-case-section {
  padding: 120px 0;

  /* SAME BACKGROUND AS ABOUT PAGE */
  background-image:
    linear-gradient(
      to right,
      rgba(10, 173, 94, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(10, 173, 94, 0.08) 1px,
      transparent 1px
    );

  background-size: 64px 64px;
  background-color: #edf5f1;
}
.services-header {
  max-width: 820px;
  margin: 0 auto 80px;
}

.services-header .section-label {
  color: #10b981;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.services-header .section-heading {
  font-size: 2.8rem;
  color: #1e293b;
  margin-bottom: 20px;
}

.services-header .section-heading span {
  color: #10b981;
}

.services-header .section-text {
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* STACK */
.services-stack {
  position: relative;
  min-height: 100vh;
  /*margin-bottom: 140px;*/
}

/* CARD - 180px overlap */
.service-card {
  position: sticky;
  top: 120px;
  margin-bottom: -180px;

  background: rgba(255, 255, 255, 0.82); /* transparency */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-radius: 20px;
  padding: 60px;

  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);

  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  opacity: 0.95;
  transform: scale(0.96);
}

/* Active card - 80px overlap, green border */
.service-card.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
  border-color: #10b981;
  border-width: 2px;
  box-shadow: 
    0 20px 40px rgba(16, 185, 129, 0.1),
    0 10px 25px rgba(0, 0, 0, 0.08);
  margin-bottom: -80px; /* Reduced to 80px */
  background: rgba(236, 249, 227, 0.689);
}

/* Previous card */
.service-card.is-prev {
  opacity: 0.95;
  transform: scale(0.98) translateY(15px);
  z-index: 5;
  border-color: rgba(16, 185, 129, 0.3);
  margin-bottom: -130px;
}

/* Upcoming card */
.service-card.is-below {
  opacity: 0.85;
  transform: scale(0.94) translateY(30px);
  z-index: 1;
  margin-bottom: -180px;
}

/* Ensure stacking */
.service-card:not(:last-child) {
  margin-bottom: -180px;
}

.service-card.is-active + .service-card {
  margin-top: 60px;
}

/* Smooth cubic-bezier transitions */
.service-card.become-active {
  animation: cardActivate 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.service-card.become-prev {
  animation: cardDeactivate 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardActivate {
  0% {
    opacity: 0.9;
    transform: scale(0.96);
    z-index: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
  }
}

@keyframes cardDeactivate {
  0% {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
  }
  100% {
    opacity: 0.95;
    transform: scale(0.98) translateY(15px);
    z-index: 5;
  }
}

/* Hover effect */
.service-card.is-active:hover {
  transform: scale(1.01);
  border-color: #34d399;
  box-shadow: 
    0 25px 50px rgba(52, 211, 153, 0.12),
    0 15px 35px rgba(0, 0, 0, 0.1);
}

/* CONTENT - Proper z-index for readability */
.service-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1e293b;
  position: relative;
  z-index: 2;
}

.service-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 30px;
  color: #475569;
  position: relative;
  z-index: 2;
}

/* Two-column lists */
.service-points {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 30px;
  position: relative;
  z-index: 2;
}

.service-points li {
  position: relative;
  padding-left: 28px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.5;
}

.service-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Visual indicator of overlap */
.service-card::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 20px;
  right: 20px;
  height: 5px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.03), transparent);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

/* MOBILE - No overlap, stacks normally */
@media (max-width: 768px) {
  .services-section {
    padding: 60px 0;
  }
  
  .service-card {
    position: relative !important;
    top: auto !important;
    margin-bottom: 40px !important;
    transform: none !important;
    opacity: 1 !important;
    z-index: 1 !important;
    padding: 40px 30px !important;
  }
  
  .service-card.is-active,
  .service-card.is-prev,
  .service-card.is-below {
    margin-bottom: 40px !important;
    opacity: 1 !important;
    transform: none !important;
    margin-top: 0 !important;
  }
  
  .service-points {
    grid-template-columns: 1fr;
  }
  
  .service-card::before {
    display: none;
  }
  
  .services-header {
    margin-bottom: 50px;
  }
  
  .services-header .section-heading {
    font-size: 2.2rem;
  }
}
/* Extra space after last card so footer doesn't stick */
.services-stack::after {
  content: "";
  display: block;
  height: px; /* adjust if needed */
}
/* ================= CTA SECTION ================= */

.services-cta {
  margin-top: 160px; /* GAP AFTER CARDS */
  padding: 100px 0;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.08),
    rgba(16, 185, 129, 0.02)
  );
  border-top: 1px solid rgba(16, 185, 129, 0.15);
}

.cta-label {
  display: inline-block;
  color: #10b981;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  font-size: 2.9rem;
}

.cta-heading {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 22px;
  line-height: 1.25;
}

.cta-heading span {
  color: #10b981;
}

.cta-text {
  max-width: 760px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Buttons */
.cta-btn {
  background: #10b981;
  border-color: #10b981;
  padding: 14px 34px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

.cta-btn:hover {
  background: #059669;
  border-color: #059669;
}

.cta-btn-outline {
  padding: 14px 34px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid #10b981;
  color: #10b981;
}

.cta-btn-outline:hover {
  background: #10b981;
  color: #ffffff;
}

/* MOBILE */
@media (max-width: 768px) {
  .services-cta {
    padding: 70px 20px;
    margin-top: 100px;
  }

  .cta-label {
    font-size: 2rem;
    font-weight: 600;
  }


  .cta-heading {
    font-size: 1.2rem;
    text-align: center;
  }

  .cta-text {
    font-size: 0.95rem;
  }
}
