.services-page {
  padding-bottom: 4.5rem;
}

.services-stack-section {
  padding-top: 0.5rem;
}

.services-stack {
  border-top: 1px solid rgba(16, 17, 12, 0.24);
  border-bottom: 1px solid rgba(16, 17, 12, 0.24);
  margin-bottom: 2.5rem;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  align-items: stretch;
  gap: 1.5rem;
  padding: 1.05rem 1.25rem;
  border-top: 1px solid rgba(16, 17, 12, 0.24);
  background: #ecece7;
  transition: background-color 260ms ease;
  position: relative;
}

.service-row:first-child {
  border-top: 0;
}

/* persistent 2-col layout: left = title+photo, right = copy+activities */
.service-col-left,
.service-col-right {
  display: flex;
  flex-direction: column;
}

.service-col-left {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 0.85rem 0.9rem;
  justify-content: flex-start;
}

.service-row-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.55vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  position: relative;
  z-index: 2;
  transition: color 260ms ease;
}

.service-row-index {
  opacity: 0.78;
  margin-right: 0.2rem;
}

.service-row-copy {
  margin: 0;
  font-size: clamp(1rem, 1.18vw, 1.42rem);
  line-height: 1.22;
  max-width: 62ch;
}

/* image layer sits behind title */
.service-row-media {
  position: absolute;
  inset: 0;
  opacity: 0;
  border-radius: inherit;
  background-color: #10110d;
  background-image: linear-gradient(0deg, rgba(8, 8, 8, 0.24), rgba(8, 8, 8, 0.24)), var(--service-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 300ms ease;
}

/* activities below copy — hidden until hover */
.service-row-activities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.35rem;
  row-gap: 0.55rem;
  align-content: start;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: max-height 420ms ease, opacity 300ms ease, margin-top 360ms ease;
}

.service-row-activities p {
  margin: 0;
  font-size: clamp(0.82rem, 0.98vw, 1.05rem);
  line-height: 1.16;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

/* hover state */
.service-row:hover,
.service-row:focus-within {
  background: #deded6;
}

.service-row:hover .service-row-media,
.service-row:focus-within .service-row-media {
  opacity: 1;
}

.service-row:hover .service-row-title,
.service-row:focus-within .service-row-title {
  color: #f3f4ef;
}

.service-row:hover .service-row-activities,
.service-row:focus-within .service-row-activities {
  max-height: 320px;
  opacity: 1;
  margin-top: 1.1rem;
}

@media (max-width: 1024px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

@media (max-width: 760px) {
  .services-page {
    padding-bottom: 3.25rem;
  }

  .service-row {
    padding: 1rem;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    scroll-margin-top: 16vh;
  }

  .service-col-left {
    padding: 0.8rem;
    min-height: 0;
  }

  .service-row-title {
    font-size: clamp(1.3rem, 7vw, 1.9rem);
  }

  .service-col-right {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
    transition: max-height 360ms ease, opacity 240ms ease, margin-top 300ms ease;
  }

  .service-row-copy {
    font-size: 1rem;
    line-height: 1.24;
  }

  .service-row-media {
    inset: 0;
    border-radius: 14px;
    opacity: 0;
  }

  .service-row-activities {
    grid-template-columns: 1fr;
    row-gap: 0.42rem;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transition: max-height 360ms ease, opacity 240ms ease, margin-top 300ms ease;
  }

  .service-row.is-open .service-col-left {
    min-height: 210px;
  }

  .service-row.is-open .service-row-media {
    opacity: 1;
  }

  .service-row.is-open .service-row-title {
    color: #f3f4ef;
  }

  .service-row.is-open .service-col-right {
    max-height: 640px;
    opacity: 1;
    margin-top: 0.55rem;
    pointer-events: auto;
  }

  .service-row.is-open .service-row-activities {
    max-height: 340px;
    opacity: 1;
    margin-top: 1rem;
  }
}
