/* ============================================================================
   MÓDULO DE NOVEDADES - VISTA FICHAS / POST-IT MASONRY (novedades.css)
   ============================================================================ */

/* Contenedor de Cuadrícula Dinámica Inteligente (Shortest-Column Flex Masonry sin Filas Bloqueantes) */
.novedades-cards-masonry {
  width: 100%;
}

.nov-masonry-col {
  flex: 1 1 0px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Tarjeta / Posit Individual */
.nov-posit-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

/* Tarjetas Medias (Ocupan 2 Columnas) */
.nov-posit-card.nov-card-large {
  grid-column: span 2;
}

/* Tarjetas Extra Grandes (Ocupan Ancho Completo / 4 Columnas) */
.nov-posit-card.nov-card-xlarge {
  grid-column: span 4;
}

@media (max-width: 1200px) {
  .nov-posit-card.nov-card-xlarge {
    grid-column: span 3;
  }
}

@media (max-width: 800px) {
  .nov-posit-card.nov-card-large,
  .nov-posit-card.nov-card-xlarge {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .nov-posit-card.nov-card-large,
  .nov-posit-card.nov-card-xlarge {
    grid-column: span 1;
  }
}

@media (max-width: 1200px) {
  .nov-posit-card.nov-card-xlarge {
    grid-column: span 3;
  }
}

@media (max-width: 800px) {
  .nov-posit-card.nov-card-large,
  .nov-posit-card.nov-card-xlarge {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .nov-posit-card.nov-card-large,
  .nov-posit-card.nov-card-xlarge {
    grid-column: span 1;
  }
}

.nov-posit-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(13, 110, 253, 0.35);
  z-index: 5;
}

/* Estilos Temáticos según Prioridad / Estado (Estilo Post-it) */
.nov-posit-card.nov-urgente {
  border-left: 5px solid #dc3545 !important;
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
}

.nov-posit-card.nov-status-pendiente {
  border-left: 5px solid #f59e0b !important;
  background: linear-gradient(180deg, #fffdf2 0%, #ffffff 100%);
}

.nov-posit-card.nov-status-proceso {
  border-left: 5px solid #0284c7 !important;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.nov-posit-card.nov-status-terminada {
  border-left: 5px solid #10b981 !important;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  opacity: 0.9;
}

/* Cabecera del Posit */
.nov-posit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem 0.4rem 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nov-posit-pin {
  font-size: 0.8rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nov-posit-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nov-posit-author {
  font-weight: 700;
  font-size: 0.76rem;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.nov-posit-date {
  font-size: 0.72rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.nov-posit-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* Titular de la Noticia */
.nov-posit-body {
  padding: 0.65rem 0.75rem;
}

.nov-posit-headline {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  word-break: break-word;
}

/* Bloque Orgánico de Seguimiento / Comentarios */
.nov-posit-seguimiento {
  background: rgba(255, 255, 255, 0.9);
  border-left: 3px solid #0284c7;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.nov-posit-seguimiento-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 100%);
  pointer-events: none;
}

.nov-posit-seguimiento-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #0369a1;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Pie del Posit */
.nov-posit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem 0.5rem 0.75rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.5);
}

.nov-posit-status-select {
  max-width: 135px;
  font-size: 0.75rem;
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

.nov-posit-expand-btn {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0284c7;
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: color 0.15s ease;
}

.nov-posit-expand-btn:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* MODAL DE DETALLE AMPLIADO DE NOVEDAD */
#modalDetalleNovedad .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}

#modalDetalleNovedad .modal-header {
  background: #f8fafc;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 1rem 1.25rem;
}

#modalDetalleNovedad .modal-body {
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

#modalDetalleNovedad .modal-headline-full {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 1rem;
  word-break: break-word;
}

#modalDetalleNovedad .modal-seguimiento-box {
  background: #f8fafc;
  border-left: 4px solid #0284c7;
  border-radius: 10px;
  padding: 1.1rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}
