/* Services Section V2 - Premium Scroll Experience */

.services-section-v2 {
  position: relative;
  min-height: 360vh;
  /* Transparent background - gradient comes from extended header canvas */
  background: transparent;
  --section-padding: max(6vw, calc((100vw - 1400px) / 2 + 40px));
  /* Clip fixed children to this container */
  clip-path: inset(0);
}

/* ============================================
   GRADIENT CANVAS BACKGROUND (hidden - using extended header gradient)
   ============================================ */

.services-section-v2__gradient-bg {
  display: none;
}

/* ============================================
   TOP FADE EFFECT - fixed within section (clipped)
   Content scrolls up into this fade and disappears
   ============================================ */

.services-section-v2__fade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  /* Transparent fade - no solid background needed with extended gradient */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 40%, transparent 100%);
  pointer-events: none;
  z-index: 20;
}

/* ============================================
   STICKY BACKGROUND HEADLINE
   ============================================ */

.services-section-v2__headline-wrapper {
  position: sticky;
  top: 0;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.services-section-v2__headline {
  font-family: "Poppins", sans-serif;
  font-size: clamp(36px, 5.5vw, 85px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.03em;
  text-align: center;
  max-width: 90%;
  line-height: 1.1;
  margin: 0;
}

/* ============================================
   FOREGROUND SCROLLING CONTENT
   NO background - must be transparent so headline shows through
   ============================================ */

.services-section-v2__content {
  position: relative;
  z-index: 3;
  padding: 100vh var(--section-padding) 0;
  margin-top: -100vh;
  /* NO BACKGROUND - content is transparent, only images/cards occlude */
  /* Top padding = 100vh so first image starts below viewport, headline visible first */
  /* Bottom padding = 0, we use margin-bottom on the section for spacing after */
}

/* ============================================
   SERVICE ROW
   ============================================ */

.service-row {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 100px;
  position: relative;
}

.service-row:last-child {
  margin-bottom: 0;
}

/* Row alignment variants */
.service-row--left {
  flex-direction: row;
  justify-content: flex-start;
}

/* ============================================
   IMAGE CONTAINER WITH TEXT OVERLAY
   ============================================ */

.service-row__image-container {
  flex: 0 0 40%;
  max-width: 40%;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(50, 1, 58, 0.12);
}

.service-row__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Bottom gradient overlay - color fade from bottom (colors set via inline style) */
.service-row__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Text content - bottom aligned */
.service-row__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-row__title {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.service-row__description {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ============================================
   STAGGERED ALIGNMENT - Accenture-style uneven pattern
   Row 1: Fully left-aligned
   Row 2: Shifted right (inner edge further right than Row 1's inner)
   Row 3: Midway position between Row 1 and Row 2
   ============================================ */

/* Row 1: Image fully left-aligned */
.service-row--left-1 {
  justify-content: flex-start;
}

/* Row 2: Image shifted right */
.service-row--right {
  justify-content: flex-end;
}

.service-row--right .service-row__image-container {
  /* Pull image in from the right edge by ~15% */
  margin-right: 15%;
}

/* Row 3: Image at midway position - offset from left */
.service-row--left-3 {
  justify-content: flex-start;
}

.service-row--left-3 .service-row__image-container {
  /* Shift image right by ~25% of container (halfway between 0% and ~50%) */
  margin-left: 25%;
}

/* ============================================
   RESPONSIVE - Large Desktop
   ============================================ */

@media (min-width: 1600px) {
  .services-section-v2 {
    --section-padding: max(11vw, 250px);
  }

  .services-section-v2__headline {
    font-size: clamp(64px, 9vw, 140px);
  }

  .service-row {
    margin-bottom: 120px;
  }

  .service-row__title {
    font-size: 22px;
  }

  .service-row__description {
    font-size: 15px;
  }

  .service-row__content {
    padding: 28px;
  }
}

@media (min-width: 2000px) {
  .services-section-v2 {
    --section-padding: max(10vw, 350px);
  }
}

@media (min-width: 2400px) {
  .service-row__title {
    font-size: 24px;
  }

  .service-row__content {
    padding: 32px;
  }
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (max-width: 1200px) {
  .service-row__image-container {
    flex: 0 0 42%;
    max-width: 42%;
  }

  .service-row--right .service-row__image-container {
    margin-right: 12%;
  }

  .service-row--left-3 .service-row__image-container {
    margin-left: 20%;
  }
}

@media (max-width: 991px) {
  .services-section-v2 {
    --section-padding: 6vw;
    padding-bottom: 20vh;
  }

  .services-section-v2__headline {
    font-size: clamp(36px, 7vw, 80px);
  }

  .services-section-v2__content {
    padding-top: 120px;
    padding-bottom: 150px;
  }

  .service-row {
    margin-bottom: 80px;
  }

  .service-row__image-container {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .service-row__title {
    font-size: 18px;
  }

  .service-row__description {
    font-size: 13px;
  }

  .service-row__content {
    padding: 20px;
  }

  .service-row--right .service-row__image-container {
    margin-right: 8%;
  }

  .service-row--left-3 .service-row__image-container {
    margin-left: 15%;
  }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

.services-section-v2--mobile {
  min-height: auto;
  padding-bottom: 80px;
}

.services-section-v2--mobile .services-section-v2__headline-wrapper {
  position: relative;
  height: auto;
  padding: 80px 24px 40px;
}

.services-section-v2--mobile .services-section-v2__headline {
  font-size: clamp(28px, 8vw, 42px);
}

.services-section-v2--mobile .services-section-v2__content {
  margin-top: 0;
  padding: 0 24px;
}

.services-section-v2--mobile .services-section-v2__fade {
  display: none;
}

@media (max-width: 767px) {
  .services-section-v2 {
    min-height: auto;
  }

  .services-section-v2__headline-wrapper {
    position: relative;
    height: auto;
    padding: 80px 24px 40px;
  }

  .services-section-v2__headline {
    font-size: clamp(28px, 8vw, 42px);
  }

  .services-section-v2__content {
    margin-top: 0;
    padding: 0 24px 80px;
  }

  .services-section-v2__fade {
    display: none;
  }

  .service-row,
  .service-row--left,
  .service-row--right,
  .service-row--left-1,
  .service-row--left-3,
  .service-row--mobile {
    flex-direction: column;
    margin-bottom: 32px;
  }

  .service-row__image-container {
    flex: none;
    max-width: 100%;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .service-row__title {
    font-size: 18px;
  }

  .service-row__description {
    font-size: 14px;
  }

  .service-row__content {
    padding: 20px;
  }
}

@media (max-width: 479px) {
  .services-section-v2--mobile .services-section-v2__headline-wrapper,
  .services-section-v2__headline-wrapper {
    padding: 60px 20px 32px;
  }

  .services-section-v2--mobile .services-section-v2__headline,
  .services-section-v2__headline {
    font-size: clamp(24px, 7vw, 36px);
  }

  .services-section-v2--mobile .services-section-v2__content,
  .services-section-v2__content {
    padding: 0 20px 60px;
  }

  .service-row {
    margin-bottom: 28px;
  }

  .service-row__title {
    font-size: 16px;
  }

  .service-row__description {
    font-size: 13px;
  }

  .service-row__content {
    padding: 16px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .service-row {
    transition: none !important;
  }
}

/* ============================================
   PREVIEW PAGE STYLES (dark headline variant)
   ============================================ */

.services-preview-page {
  background: #fff8f6;
  min-height: 100vh;
}

.services-section-preview {
  background: #fff8f6 !important;
}

.services-section-v2__headline--dark {
  color: rgba(30, 30, 30, 0.9);
}

.services-section-v2__fade--dark {
  background: linear-gradient(to bottom, rgba(255, 248, 246, 0.9) 0%, rgba(255, 248, 246, 0.5) 40%, transparent 100%);
}
