/* ==========================================================================
   Services
   ========================================================================== */
.services {
  padding: 160px 0 160px;
}

/* ---- Section header -------------------------------------------------------- */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.section-title {
  margin: 20px 0 0;
  color: var(--text-strong);
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.022em;
  text-wrap: balance;
}

.section-lead {
  max-width: 560px;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.65;
  text-wrap: balance;
}

/* ---- Grid of service cards ------------------------------------------------ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 20px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
  transition: box-shadow 150ms ease;
}

.service-card:hover { box-shadow: 0 0 0 1px #CBCEDC; }

/* the icon sits on a page-coloured panel so the white objects keep contrast */
.service-card__media {
  display: grid;
  place-items: center;
  padding: 28px 0;
  border-radius: 12px;
  background: var(--bg);
}

.service-card__media img {
  width: 168px;
  height: 168px;
}

.service-card__title {
  margin: 20px 12px 0;
  color: var(--text-strong);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.service-card__text {
  margin: 6px 12px 0;
  font-size: 15px;
  line-height: 1.55;
}

/* "Ver más": plain text at rest, accent pill when the card is hovered.
   margin-top: auto keeps it on the bottom edge of every card in a row. */
.service-card__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  height: 40px;
  margin: auto 0 0;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

/* space above the button even when the text is the tallest in the row */
.service-card__text { margin-bottom: 16px; }

.service-card__cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card:hover .service-card__cta,
.service-card__cta:focus-visible {
  background: var(--accent);
  color: #fff;
}

/* ---- Smaller screens ------------------------------------------------------- */
@media (max-width: 1100px) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .services { padding: 96px 0; }
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
  .section-lead { font-size: 16px; }
}

/* one column: icon beside the text to keep cards short */
@media (max-width: 560px) {
  .services { padding: 72px 0; }
  .services__grid { grid-template-columns: 1fr; gap: 12px; margin-top: 40px; }

  .service-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 10px 12px 10px 10px;
  }

  .service-card__media { grid-row: span 3; align-self: stretch; padding: 8px 0; }
  .service-card__media img { width: 96px; height: 96px; }
  .service-card__title { margin: 6px 0 0; }
  .service-card__text { margin: 2px 0 4px; }
  .service-card__cta { height: 36px; margin: 0 0 0 -12px; }
}
