/* ═══════════════════════════════════════════════
   SPACE NEWS CARDS — Rediseño completo
   Reemplaza la sección /* sp-news */ en space.css
═══════════════════════════════════════════════ */

/* ── Grid contenedor ───────────────────────── */
.sp-news-section {
  padding: 64px 0 80px;
}

.sp-news-section .section-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 36px;
  color: #eceef5;
}

#sp-nc-body,
.sp-nc-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ── Tarjeta base ───────────────────────────── */
.sp-news-card {
  background: transparent;
  border: 1px solid var(--sp-border, rgba(200,209,219,.18));
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition:
    transform .28s cubic-bezier(.22,1,.36,1),
    border-color .28s,
    box-shadow .28s;
  cursor: pointer;
}

.sp-news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200,209,219,.30);
  box-shadow: 0 20px 48px rgba(0,0,0,.50);
}

/* ── Imagen ─────────────────────────────────── */
.sp-nc-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #13131f;
  flex-shrink: 0;
}

.sp-nc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .3s;
}

.sp-news-card:hover .sp-nc-img {
  transform: scale(1.06);
}

/* Gradient overlay sobre imagen */
.sp-nc-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(13,13,26,.65) 100%
  );
  pointer-events: none;
}

/* Badge de categoría */
.sp-nc-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  background: rgba(13,13,26,.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  color: #c8cad4;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Sin imagen: placeholder */
.sp-nc-img-wrap--no-img {
  background: linear-gradient(135deg, #0e0e20 0%, #1a1a30 100%);
}

.sp-nc-img-wrap--no-img::before {
  content: '✦';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,.08);
}

/* ── Cuerpo de la tarjeta ───────────────────── */
.sp-nc-body-card {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sp-nc-title {
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.45;
  color: #eceef5;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer de la tarjeta */
.sp-nc-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-nc-fecha {
  font-size: .78rem;
  color: #6e7080;
}

.sp-nc-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: #8889a8;
  font-weight: 600;
  letter-spacing: .02em;
  transition: gap .2s, color .2s;
}

.sp-news-card:hover .sp-nc-arrow {
  gap: 10px;
  color: #c8cad4;
}

/* ═══════════════════════════════════════════════
   SKELETON CARDS (estado de carga)
═══════════════════════════════════════════════ */

@keyframes sp-skel-pulse {
  0%, 100% { opacity: .25; }
  50%       { opacity: .50; }
}

.sp-news-card.is-skeleton {
  pointer-events: none;
  border-color: rgba(255,255,255,.05);
}

.sp-news-card.is-skeleton .sp-nc-img-wrap {
  background: #13131f;
  animation: sp-skel-pulse 1.5s ease-in-out infinite;
}

.sp-skel-line {
  height: 14px;
  border-radius: 6px;
  background: #1c1c2e;
  animation: sp-skel-pulse 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}

.sp-skel-line--title {
  height: 18px;
  width: 90%;
  animation-delay: .1s;
}

.sp-skel-line--mid {
  width: 75%;
  animation-delay: .2s;
}

.sp-skel-line--short {
  width: 50%;
  animation-delay: .3s;
}

.sp-skel-line--date {
  width: 40%;
  height: 11px;
  margin-top: 16px;
  animation-delay: .35s;
}

/* ═══════════════════════════════════════════════
   ANIMACIÓN DE ENTRADA (stagger)
═══════════════════════════════════════════════ */

@keyframes sp-card-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.sp-news-card:not(.is-skeleton) {
  animation: sp-card-in .45s cubic-bezier(.22,1,.36,1) both;
}

.sp-news-card:nth-child(1) { animation-delay: .05s; }
.sp-news-card:nth-child(2) { animation-delay: .12s; }
.sp-news-card:nth-child(3) { animation-delay: .19s; }
.sp-news-card:nth-child(4) { animation-delay: .26s; }
.sp-news-card:nth-child(5) { animation-delay: .33s; }
.sp-news-card:nth-child(6) { animation-delay: .40s; }
.sp-news-card:nth-child(7) { animation-delay: .47s; }
.sp-news-card:nth-child(8) { animation-delay: .54s; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  #sp-nc-body,
  .sp-nc-body {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sp-nc-img-wrap {
    aspect-ratio: 16 / 9;
  }
}
