/*
  DDSYS — Página: Novedades
  Listado público de publicaciones, alimentado por
  js/novedades-dynamic.js desde el endpoint público del panel.
  Layout de artículo/lista simple, mismo criterio que las páginas
  legales (Privacidad/Términos): sin componentes de la landing.
*/

.novedades {
  background-color: var(--surface-page);
  padding-block: var(--space-24);
}

.novedades__inner {
  max-width: 760px;
  margin: 0 auto;
}

.novedades__title {
  font-size: var(--text-h2-mobile);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.novedades__subtitle {
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-16);
}

.novedades__empty {
  color: var(--text-secondary);
}

.novedades__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.post-item {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--surface-card-border);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item__date {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.post-item__title {
  font-size: 1.375rem;
  margin-bottom: var(--space-3);
}

.post-item__image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-card);
  margin-bottom: var(--space-4);
}

.post-item__content {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: var(--space-4);
}

.post-item__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-brand);
  font-weight: var(--weight-medium);
  font-size: 0.9375rem;
}

@media (min-width: 1024px) {
  .novedades__title {
    font-size: var(--text-h2);
  }
}

/* ---------- Carrusel (publicaciones con varias imágenes) ---------- */
.post-item__carousel {
  position: relative;
  width: 100%;
  max-height: 360px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: var(--surface-alt);
}

.post-item__carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--duration-state) var(--ease-standard);
}

.post-item__carousel-slide.is-active {
  opacity: 1;
}

.post-item__carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(14, 27, 56, 0.55);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease;
}
.post-item__carousel-nav:hover { background: rgba(14, 27, 56, 0.8); }
.post-item__carousel-nav--prev { left: var(--space-3); }
.post-item__carousel-nav--next { right: var(--space-3); }

.post-item__carousel-counter {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  background: rgba(14, 27, 56, 0.6);
  color: #fff;
  font-size: var(--text-micro);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}