/* css/services.css */
.services-sticky {
  position: relative;
  background-color: transparent;
}

.services-sticky__container {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.services-sticky__inner {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.services-sticky__left {
  flex: 0 0 45%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 4rem;
}

.services-sticky__right {
  flex: 0 0 55%;
  height: 100%;
  padding: 4rem 0;
  display: flex;
  align-items: center;
}

/* Content Stack */
.service-details-stack {
  position: relative;
  height: 350px;
  margin: 3rem 0;
}

.service-detail {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  display: flex;
  flex-direction: column;
}

.service-detail.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.service-index {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
}

.service-detail h3 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.service-detail p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
}

/* Embedded Mobile Image - Hidden on Desktop */
.service-mobile-img {
  display: none;
}

/* Visual Stage */
.service-visual-stage {
  width: 100%;
  height: 80vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(15,23,42,0.1);
}

.service-visual {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-visual.active {
  opacity: 1;
  transform: scale(1);
}

.service-visual__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.2), transparent);
}

/* Desktop CTA Button */
.services-sticky__cta {
  margin-top: 2rem;
}

.services-sticky__cta .btn--primary {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #f97316 100%);
  border: none;
  border-radius: 50px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.services-sticky__cta .btn--primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 35px rgba(234, 88, 12, 0.45);
}

.services-sticky__cta .btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.services-sticky__cta .btn--primary:hover::after {
  left: 100%;
}

@media (max-width: 968px) {
  .services-sticky {
    height: auto;
  }
  .services-sticky__container {
    position: relative;
    height: auto;
  }
  .services-sticky__inner {
    flex-direction: column;
    padding: 2.5rem 1.5rem 1.75rem 1.5rem; /* Tighter vertical rhythm */
  }
  .services-sticky__left, .services-sticky__right {
    flex: 0 0 100%;
    width: 100%;
    padding: 0;
  }
  .service-details-stack {
    height: auto;
    position: relative;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .service-detail {
    position: relative;
    opacity: 0;
    visibility: visible;
    margin-bottom: 0;
    
    /* Native Mobile Card Layout */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04);
  }

  .service-detail:nth-child(5) {
    grid-column: 1 / -1;
  }

  .service-index {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0;
    background: #fff;
    color: var(--accent-primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  }
  .service-mobile-img {
    display: block;
    width: calc(100% + 1.5rem);
    margin-left: -0.75rem;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  .service-detail h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
  }
  .service-detail p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin: 0;
  }
  .services-sticky__cta {
    margin-top: 0.75rem; /* Further reduced margin */
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .services-sticky__cta .btn--primary {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--accent-primary), #f97316);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.3);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  /* Creative Tech Glow Effect */
  .services-sticky__cta .btn--primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .services-sticky__cta .btn--primary:active {
    transform: scale(0.96);
    box-shadow: 0 5px 15px rgba(234, 88, 12, 0.2);
  }

  .services-sticky__cta .btn--primary:active::before {
    opacity: 1;
    animation: buttonRipple 0.6s ease-out;
  }

  @keyframes buttonRipple {
    0% { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
  }

  .service-visual-stage {
    display: none; /* TRULY Hide the broken desktop right-stage on mobile */
  }
}
