/* =========================================================
   PAYROLL — reglas propias de payroll.html
   (header, nav y footer viven en css/common.css)
   ========================================================= */

/* ── SERVICIOS CARDS ── */
.servicios-cards {
  background: #fff;
  padding: 4rem 4%;
}

.sc-fila {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.sc-fila-top,
.sc-fila-bottom {
  justify-content: center;
}

.sc-card {
  border: 2px solid #27124D;
  border-radius: 20px;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
}

.sc-fila-top .sc-card,
.sc-fila-bottom .sc-card {
  width: 28%;
  min-width: 260px;
  flex: 1 1 260px;
  min-height: 0;
}

.sc-card img {
  width: clamp(48px, 15vh, 90px);
  height: clamp(48px, 15vh, 90px);
  object-fit: contain;
}

.sc-card p {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.45rem);
  color: #1a1a2e;
  line-height: 1.6;
}

.sc-card p strong {
  font-weight: 700;
}

/* ── NUESTROS SERVICIOS ── */
.nuestros-servicios {
  background: #27124D;
  padding: 1em 4% 0;
}

.ns-titulo {
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 3.5rem);
  font-weight: 400;
  color: #fff;
}

.ns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: -180px;
  transform: translateY(45%);
}

.ns-card {
  background: #fff;
  border: 2px solid #746490;
  border-radius: 24px;
  padding: 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  min-height: 0;
}

.ns-fondo-blanco {
  background: #fff;
  height: 30vh;
}

.ns-card img {
  width: clamp(44px, 8vw, 90px);
  height: clamp(44px, 8vw, 90px);
  object-fit: contain;
}

.ns-card h3 {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.7rem);
  font-weight: 700;
  color: #27124D;
  line-height: 1.25;
}

.ns-card p {
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.3rem);
  color: #333;
  line-height: 1.6;
  flex: 1;
}

.ns-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2dbf9b;
  margin-top: 0.5rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .servicios-cards {
    padding: 3rem 6%;
  }

  .sc-fila {
    flex-direction: column;
  }

  .sc-fila-top .sc-card,
  .sc-fila-bottom .sc-card {
    width: 100%;
    min-width: 0;
  }

  .ns-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    /* On smaller screens the overlap trick gets fragile —
       switch to a simple, safe stacked layout instead. */
    margin-top: 2rem;
    transform: none;
  }

  .nuestros-servicios {
    padding: 2.5rem 6% 2.5rem;
  }

  .ns-fondo-blanco {
    display: none;
  }
}

@media (max-width: 560px) {
  .servicios-cards {
    padding: 2.5rem 5.5%;
  }

  .sc-card {
    padding: 1.8rem 1.5rem;
  }

  .nuestros-servicios {
    padding: 2.2rem 5.5% 2.2rem;
  }

  .ns-card {
    padding: 1.6rem 1.2rem;
  }
}
