/* =========================================================
   "¿Qué quieres fortalecer hoy?" — tarjetas de normas.
   La tarjeta activa (hover / foco) se ensancha y su imagen
   sube desde detrás de la tarjeta, como una hoja saliendo de un sobre.
   ========================================================= */
.ncards {
  display: flex; align-items: flex-end; gap: 16px;
  padding-top: 200px;            /* espacio para que suba la imagen */
}
.ncard {
  position: relative; flex: 1 1 0; min-width: 0; height: 380px;
  transition: flex-grow .6s var(--ease);
}
.ncard.is-active { flex-grow: 1.9; }

/* Imagen que sube desde atrás */
.ncard__img {
  position: absolute; left: 14px; right: 14px; top: 24px; height: 260px; z-index: 0;
  border-radius: 24px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 16%, var(--paper));
  box-shadow: 0 20px 40px -24px rgba(13,18,20,.45);
  transform: translateY(0) scale(.94); opacity: 0;
  transition: transform .7s var(--spring), opacity .35s;
}
.ncard__img svg { width: 100%; height: 100%; }
.ncard.is-active .ncard__img { transform: translateY(-212px) scale(1); opacity: 1; transition-delay: .08s; }
.ncard.is-active .gear { animation-duration: 3s; }
.ncard.is-active .gear--rev { animation-duration: 2s; }

/* Cara de la tarjeta (va por delante de la imagen) */
.ncard__face {
  position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%;
  padding: 24px; border-radius: 28px; background: var(--white);
  box-shadow: 0 1px 2px rgba(13,18,20,.05), 0 14px 34px -18px rgba(13,18,20,.25);
  transition: box-shadow .4s;
}
.ncard.is-active .ncard__face { box-shadow: 0 1px 2px rgba(13,18,20,.06), 0 24px 50px -20px rgba(13,18,20,.35); }
.ncard__tag {
  align-self: flex-start; padding: 7px 14px; border-radius: 999px;
  background: var(--paper); color: var(--muted); font-size: .82rem; font-weight: 700;
}
.ncard__title {
  margin-top: 36px; font-family: var(--sans); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 2.2vw, 2.05rem); line-height: 1.12;
}
.ncard__title span { display: block; color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
/* Título-pregunta: "certificación" es más larga que los nombres de norma; con tope menor cabe en la tarjeta cerrada */
.ncard__title--q { font-size: clamp(1.5rem, 2.2vw, 1.8rem); }
.ncard__desc {
  margin: 14px 0 0; max-width: 380px; color: var(--muted); font-size: .94rem; line-height: 1.55;
  max-height: 0; overflow: hidden; opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .4s var(--ease), max-height .5s var(--ease);
}
.ncard.is-active .ncard__desc { max-height: 9em; opacity: 1; transform: none; transition-delay: .15s; }
.ncard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.ncard__meta { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.ncard__ico { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; }
.ncard__ico svg { width: 12px; height: 12px; }
.ncard__cta {
  flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.ncard__cta svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.ncard__cta:hover svg { transform: translateX(4px); }
/* En la tarjeta cerrada el enlace queda fuera del flujo (sigue accesible con teclado) */
.ncard:not(.is-active) .ncard__cta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ncard.is-active .ncard__cta { animation: ctaIn .35s var(--ease) .2s backwards; }
@keyframes ctaIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Tablet y móvil: sin hover, todo visible ---------- */
@media (max-width: 1100px) {
  .ncards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 0; }
  .ncard { height: auto; display: flex; flex-direction: column; }
  .ncard__img { position: relative; left: auto; right: auto; top: auto; height: 190px; margin: 0 14px -40px; opacity: 1; transform: none; }
  .ncard.is-active .ncard__img { transform: none; }
  .ncard__face { flex: 1; }
  .ncard__title { margin-top: 20px; }
  .ncard__desc { max-height: none; opacity: 1; transform: none; }
  .ncard:not(.is-active) .ncard__cta { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .ncard__foot { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .ncards { grid-template-columns: 1fr; }
  .ncard__img { height: 170px; }
}
