/* ============================================================
   CARDS — sistema profesional unificado
   Preparado para que .card sea <a> o <article> (clicable).
   ============================================================ */

/* ===== Contenedor genérico de tarjetas ===== */
.cards-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  justify-items: center;
}

@media (max-width: 640px) {
  .cards-grid { gap: 20px; }
}

/* ============================================================
   CARD BASE
   ============================================================ */
.card {
  width: 100%;
  max-width: 340px;

  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  overflow: hidden;

  text-align: center;

  transition: transform .28s ease, box-shadow .28s ease;
  cursor: pointer;

  /* Si la card es <a>, esto evita estilos por defecto */
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* Focus accesible (cuando sea <a>) */
.card:focus-visible {
  outline: 3px solid var(--primary-400);
  outline-offset: 3px;
}

/* Imagen */
.card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Título */
.card__title {
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 12px 18px;
  color: var(--grey-900);
}

/* ============================================================
   CARD WIDE (hero de técnicas / bloque destacado)
   ============================================================ */
.card--wide {
  grid-column: 1 / -1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  max-width: none;

  /* Si es <a> */
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.card--wide:focus-visible {
  outline: 3px solid var(--primary-400);
  outline-offset: 3px;
}

.card--wide img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  filter: brightness(.7);
  transition: transform .35s ease, filter .35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card--wide:hover img {
    transform: scale(1.06);
    filter: brightness(.55);
  }
}

/* Overlay */
.card--wide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55));
  z-index: 1;
}

.card--wide__content {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 0 20px;
}

.card--wide__title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.card--wide__text {
  font-size: 1rem;
  max-width: 700px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

@media (max-width: 900px) {
  .card--wide img { height: 260px; }
  .card--wide__title { font-size: 1.65rem; }
  .card--wide__text { font-size: 0.95rem; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .card,
  .card--wide img {
    transition: none !important;
  }
  .card:hover {
    transform: none;
  }
}
.services-card {
  position: relative;
  border-top: 3px solid var(--primary-300);
}
.services-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}
.services-card .card__title {
  font-weight: 500;
}
/* =========================================
   Services cards — texto largo (avanzada)
   ========================================= */

.services-card--text {
  padding: 20px 22px;
}

.services-card--text .card__title {
  font-weight: 500;
  margin-bottom: 10px;
}

.services-card--text p {
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
}
