/* ── Servicios ── */
.servicios {
  padding: clamp(60px, 10vh, 120px) 0;
  background: var(--bg-1);
}

/* ── Encabezado ── */
.seccion-encabezado {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.seccion-encabezado h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 16px;
  color: var(--color-texto-principal);
  line-height: 1.2;
}

.seccion-encabezado p {
  color: var(--color-texto-secundario);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}



/* La 5ta tarjeta sola se centra */
.servicios .row > .col-md-4:last-child:nth-child(3n - 2) {
  grid-column: 2;
}

/* ── Tarjeta ── */
.tarjeta-servicio {
  background: var(--color-fondo);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 40px);
  height: 100%;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-servicio:hover {
  transform: translateY(-8px);
  border-color: var(--color-primario);
  box-shadow: 0 20px 40px rgba(0, 68, 255, 0.1);
}

/* ── Ícono ── */
.icono-servicio {
  width: 64px;
  height: 64px;
  background: rgba(0, 81, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 28px;
  color: var(--color-primario);
  flex-shrink: 0;
}

/* ── Texto de tarjeta ── */
.tarjeta-servicio h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  margin-bottom: 12px;
  color: var(--color-texto-principal);
  line-height: 1.3;
}

.tarjeta-servicio p {
  color: var(--color-texto-secundario);
  line-height: 1.6;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
}

/* ── Tablet (≤ 900px): 2 columnas ── */
@media (max-width: 900px) {
  .servicios .row {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* ── Mobile (≤ 560px): 1 columna ── */
@media (max-width: 560px) {
  .servicios .row {
    grid-template-columns: 1fr;
  }

  .servicios .row > .col-md-4:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: 100%;
    margin-inline: 0;
  }

  .tarjeta-servicio {
    border-radius: 12px;
  }
}

/* ── Accesibilidad ── */
@media (prefers-reduced-motion: reduce) {
  .tarjeta-servicio {
    transition: none;
  }
  .tarjeta-servicio:hover {
    transform: none;
  }
}