.services-page {
  color: var(--text-primary);
}

.services-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(500px, 68vh, 680px);
  overflow: hidden;
  border-radius: var(--radius-section);
  background-color: var(--text-primary);
}

.services-hero > img,
.services-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.services-hero > img {
  object-fit: cover;
  object-position: center;
}

.services-hero__shade {
  background:
    linear-gradient(
      100deg,
      rgba(28, 10, 48, 0.72) 0%,
      rgba(40, 14, 68, 0.42) 34%,
      rgba(20, 8, 36, 0.12) 64%,
      transparent 88%
    ),
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.38) 0%,
      transparent 52%
    );
}

.services-hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: var(--space-3xl) calc(var(--space-2xl) * 1.1);
  color: var(--text-light);
}

.services-hero__content > p {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  color: var(--color-blush);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.services-intro__heading > p,
.service-lines__heading > p,
.services-value__content > p,
.services-purpose > p {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  color: var(--color-blush);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.services-hero__content > p::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-lilac);
  content: "";
}

.services-intro__heading > p::before,
.service-lines__heading > p::before,
.services-value__content > p::before,
.services-purpose > p::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-lilac);
  content: "";
}

.services-hero h1 {
  max-width: 13em;
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.services-intro,
.service-lines,
.services-value,
.services-purpose {
  border-radius: var(--radius-section);
}

.services-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: var(--space-2xl);
  align-items: center;
  padding: var(--space-3xl) calc(var(--space-2xl) * 1.1);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.services-intro__heading > p,
.service-lines__heading > p,
.services-purpose > p {
  color: var(--color-primary);
}

.services-intro h2,
.service-lines h2,
.services-value h2,
.services-purpose h2 {
  max-width: 19ch;
  font-size: var(--font-size-section-title);
  font-weight: var(--font-weight-semibold);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.services-intro ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  list-style: none;
}

.services-intro li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: var(--space-md);
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  line-height: 1.65;
}

.services-intro li::before {
  width: 8px;
  height: 8px;
  margin-top: 0.58em;
  border-radius: 50%;
  background-color: var(--color-berry);
  content: "";
}

.service-lines {
  padding: var(--space-3xl) calc(var(--space-2xl) * 1.1);
  background: linear-gradient(160deg, #ebe0f4 0%, #f0e6f7 100%);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-card);
}

.service-lines__heading {
  margin-bottom: var(--space-2xl);
}

.service-lines__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.service-lines article {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-accent);
  background-color: #fff;
  box-shadow: 0 10px 28px rgba(85, 26, 146, 0.12);
  scroll-margin-top: 96px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-lines article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}

.service-lines article > img {
  width: 100%;
  height: 224px;
  object-fit: cover;
}

.service-lines article > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-xl);
}

.service-lines article > div > span {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-md);
  place-items: center;
  border-radius: 12px;
  background-color: var(--color-primary);
  color: var(--text-light);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
}

.service-lines article:nth-child(2) > div > span {
  background-color: var(--color-plum);
}

.service-lines article:nth-child(3) > div > span {
  background-color: var(--color-berry);
}

.service-lines h3 {
  color: var(--text-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
}

.service-lines__subtitle {
  margin-top: var(--space-xs);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
}

.service-lines article > div > p:not(.service-lines__subtitle) {
  margin-top: var(--space-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.service-lines article a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-lg);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.service-lines article > div > p:not(.service-lines__subtitle) {
  margin-bottom: auto;
}

.service-lines article a:hover {
  color: var(--text-hover);
}

.services-value {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  overflow: hidden;
  background: var(--gradient-dark);
  background-color: var(--color-primary);
  color: var(--text-light);
}

.services-value__visual {
  min-height: 540px;
  overflow: hidden;
  background-color: #f4f3f1;
}

.services-value__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.services-value__content {
  align-self: center;
  padding: var(--space-3xl) calc(var(--space-2xl) * 1.1);
}

.services-value__content ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  list-style: none;
}

.services-value__content li {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(213, 133, 167, 0.35);
  color: rgba(255, 255, 255, 0.95);
  font-size: var(--font-size-sm);
  line-height: 1.55;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.services-value__content li::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 0.48em;
  border-radius: 50%;
  background-color: var(--color-blush);
  content: "";
}

/* =========================================
   SECCIÓN: PROPÓSITO Y DIAGRAMA DE PROCESO IDEIB
   ========================================= */
.services-purpose {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3xl) calc(var(--space-2xl) * 1.1);
  background: linear-gradient(145deg, var(--bg-wash-lilac) 0%, var(--bg-wash-blush) 100%);
  background-color: var(--bg-wash-lilac);
  border: 1px solid var(--border-accent);
  text-align: center;
}

.services-purpose h2 {
  max-width: 24ch;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-sm);
  width: 100%;
  margin-top: var(--space-2xl);
  list-style: none;
}

.process-flow__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-lg) var(--space-sm);
  border-radius: var(--radius-card);
  background-color: var(--color-primary);
  color: var(--text-light);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.process-flow__item--start {
  background-color: var(--bg-page);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.process-flow__item--end {
  background-color: var(--bg-page);
  border: 2px solid var(--color-berry);
  color: var(--color-berry);
}

.process-flow__badge {
  display: inline-block;
  margin-bottom: var(--space-sm);
  padding: 2px 10px;
  border-radius: var(--radius-btn);
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--color-blush);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-flow__item--start .process-flow__badge {
  background-color: var(--bg-card-light);
  color: var(--color-primary);
}

.process-flow__item--end .process-flow__badge {
  background-color: var(--color-berry);
  color: var(--text-light);
}

.process-flow__icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  place-items: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-light);
}

.process-flow__item--start .process-flow__icon {
  background-color: var(--bg-card-light);
  color: var(--color-primary);
}

.process-flow__item--end .process-flow__icon {
  background-color: var(--bg-wash-blush);
  color: var(--color-berry);
}

.process-flow__icon svg {
  width: 22px;
  height: 22px;
}

.process-flow__item h3 {
  font-size: 0.8125rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 1150px) {
  .process-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .services-intro,
  .services-value {
    grid-template-columns: 1fr;
  }

  .service-lines__grid {
    grid-template-columns: 1fr;
  }

  .service-lines article {
    display: grid;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  }

  .service-lines article > img {
    height: 100%;
    min-height: 300px;
  }

  .services-value__visual {
    min-height: 380px;
    max-height: 440px;
  }
}

@media (max-width: 900px) {
  .services-hero__content,
  .services-intro,
  .service-lines,
  .services-value__content,
  .services-purpose {
    padding: var(--space-2xl) var(--space-xl);
  }

  .process-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-flow__item--end {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .services-hero {
    min-height: 520px;
  }

  .services-hero__content,
  .services-intro,
  .service-lines,
  .services-value__content,
  .services-purpose {
    padding: var(--space-xl) var(--space-lg);
  }

  .service-lines article {
    display: flex;
  }

  .service-lines article > img {
    height: 220px;
    min-height: 0;
  }

  .services-value__content ul,
  .process-flow {
    grid-template-columns: 1fr;
  }

  .process-flow__item {
    flex-direction: row;
    text-align: left;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
  }

  .process-flow__badge {
    order: 3;
    margin-bottom: 0;
    margin-left: auto;
  }

  .process-flow__icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}
