.commitment-grid {
  display: grid;
  gap: 16px;
}
.commitments-showcase {
  background-color: #f5fbfd;
  background-image:
    linear-gradient(rgba(245, 251, 253, 0.9), rgba(235, 248, 252, 0.88)),
    url("../../../img/fondo-bn.jpg");
  background-position: center, center;
  background-size:
    100% 100%,
    auto 104%;
  background-repeat: no-repeat;
  box-shadow: inset 0 -2px 0 var(--soft);
}
.commitment-card {
  position: relative;
  overflow: hidden;
  min-height: 285px;
  border: 1px solid rgba(4, 156, 212, 0.16);
  border-radius: 20px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff 0%, #f3fbfe 100%);
  box-shadow: 0 12px 28px rgba(7, 120, 162, 0.1);
}
.commitment-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 88px;
  border-radius: 0 0 0 100%;
  background: rgba(4, 156, 212, 0.07);
  content: "";
}
.commitment-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 285px;
  padding: 22px;
  flex-direction: column;
}
.commitment-card-top {
  display: flex;
  margin-bottom: 18px;
  align-items: flex-start;
  justify-content: space-between;
}
.commitment-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 21px;
  background: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(7, 120, 162, 0.16);
}
.commitment-icon img {
  display: block;
  width: 58px;
  height: 58px;
}
.commitment-number {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(4, 156, 212, 0.2);
  border-radius: 11px;
  color: var(--brand-dark);
  background: var(--brand-pale);
  font-size: 0.72rem;
  font-weight: 900;
}
.commitment-label {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.commitment-card h3 {
  margin: 0;
  color: var(--brand-deep);
  font-size: 1.3rem;
  line-height: 1.12;
}
.commitment-card h3 + p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
}

/* ==========================================================================
   Compromisos en carrusel automático (dos filas en sentidos opuestos)
   ========================================================================== */
.commitment-marquee {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
  /* Difuminado en los bordes para que las tarjetas entren y salgan suave. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.commitment-row {
  overflow: hidden;
}
.commitment-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: commitment-scroll 55s linear infinite;
}
/* La fila "rtl" corre en sentido inverso (de izquierda a derecha visualmente). */
.commitment-row--rtl .commitment-track {
  animation-direction: reverse;
}
/* Pausa al pasar el cursor para poder leer una tarjeta. */
.commitment-row:hover .commitment-track {
  animation-play-state: paused;
}
/* En el marquee cada tarjeta tiene ancho fijo; el margen entra en el cálculo
   del bucle (se desplaza justo la mitad del track: un grupo completo). */
.commitment-marquee .commitment-card {
  flex: 0 0 auto;
  width: 300px;
  margin-right: 16px;
  min-height: 260px;
}
.commitment-marquee .commitment-card-content {
  min-height: 260px;
}

@keyframes commitment-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Quien prefiere menos movimiento ve las filas quietas y puede desplazarlas
   a mano; nada de animación automática. */
@media (prefers-reduced-motion: reduce) {
  .commitment-track {
    animation: none;
  }
  .commitment-row {
    overflow-x: auto;
  }
}
