/* ======================================================
   Novedades (Discord News Feed)
   ====================================================== */

.novedades-section {
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.novedades-subtitle {
  color: var(--muted-foreground);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.novedades-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Card --- */
.novedades-card {
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color .3s, box-shadow .3s;
}

.novedades-card:hover {
  border-color: rgba(201,168,76,.2);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 32px rgba(0,0,0,.4), 0 0 48px rgba(201,168,76,.04);
}

/* --- Card Header --- */
.novedades-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.novedades-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}

.novedades-author-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}

.novedades-author {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novedades-time {
  font-size: .72rem;
  color: var(--muted-foreground);
}

/* --- Content --- */
.novedades-content {
  font-size: .9rem;
  line-height: 1.75;
  color: var(--foreground);
  word-break: break-word;
}

.novedades-content strong {
  font-weight: 700;
  color: #fff;
}

.novedades-content em {
  font-style: italic;
}

.novedades-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .2s;
}

.novedades-content a:hover {
  opacity: .8;
}

/* --- Attachments --- */
.novedades-attachments {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}

.novedades-attachment-img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  cursor: pointer;
  transition: border-color .2s;
}

.novedades-attachment-img:hover {
  border-color: rgba(201,168,76,.25);
}

/* --- Markdown block elements --- */
.novedades-h1,
.novedades-h2,
.novedades-h3 {
  display: block;
  font-weight: 700;
  color: #fff;
  margin-top: .75rem;
  margin-bottom: .25rem;
  line-height: 1.3;
}

.novedades-h1 { font-size: 1.3rem; }
.novedades-h2 { font-size: 1.1rem; }
.novedades-h3 { font-size: .95rem; color: rgba(255,255,255,.85); }

.novedades-content .novedades-h1:first-child,
.novedades-content .novedades-h2:first-child,
.novedades-content .novedades-h3:first-child {
  margin-top: 0;
}

.novedades-spacer {
  display: block;
  height: .5rem;
}

.novedades-line {
  display: block;
}

.novedades-separator {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.25), transparent);
  margin: .75rem 0;
}

.novedades-bullet {
  display: block;
  padding-left: 1rem;
  position: relative;
}

.novedades-bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* --- Loading --- */
.novedades-loading {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}

.novedades-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(201,168,76,.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: novedades-spin 0.8s linear infinite;
}

@keyframes novedades-spin {
  to { transform: rotate(360deg); }
}

/* --- Empty / Error --- */
.novedades-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-foreground);
  font-size: .9rem;
}

/* --- Load More --- */
.novedades-more {
  margin-top: 2rem;
  width: 100%;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .novedades-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .novedades-card {
    padding: 1.25rem;
  }

  .novedades-attachment-img {
    max-height: 280px;
  }
}

/* --- Inframundo overrides --- */
.infra-corrupted .novedades-card {
  border-color: rgba(34, 139, 34, .08) !important;
}

.infra-corrupted .novedades-card:hover {
  border-color: rgba(34, 139, 34, .2) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 32px rgba(0,0,0,.4), 0 0 48px rgba(34, 139, 34, .06) !important;
}

.infra-corrupted .novedades-author {
  color: #3bef3b !important;
}

.infra-corrupted .novedades-content a {
  color: #3bef3b !important;
}

.infra-corrupted .novedades-attachment-img:hover {
  border-color: rgba(34, 139, 34, .25) !important;
}

.infra-corrupted .novedades-spinner {
  border-color: rgba(34, 139, 34, .15) !important;
  border-top-color: #3bef3b !important;
}

.infra-corrupted .novedades-separator {
  background: linear-gradient(90deg, transparent, rgba(34, 139, 34, .25), transparent) !important;
}

.infra-corrupted .novedades-bullet::before {
  color: #3bef3b !important;
}
