.news-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#international-news,
#national-news {
  max-width: 1600px;
  margin: 0 auto;
}

.news-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  padding: 0 10px;
  min-height: 800px;
}

.news-item {
  background: #333;
  padding: 20px;
  border-radius: 8px;
  font-size: 14px;
  width: calc(50% - 8px);
  min-height: 250px;
  box-sizing: border-box;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid #444;
  opacity: 0;
  transform: translateY(10px);
}
.news-item.loaded {
  opacity: 1;
  transform: translateY(0);
}

.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.05), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.news-item h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  line-height: 1.4;
}

.news-item h3 a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  display: block;
}

.news-item h3 a:hover {
  text-decoration: underline;
}

.news-item .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: #ccc;
  border-bottom: 1px solid #444;
  padding-bottom: 6px;
  margin-bottom: 10px;
  min-width: 0;
}

.news-item .source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-item .time {
  white-space: nowrap;
  font-size: 0.7rem;
  color: #999;
  opacity: 0.8;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.source-logo {
  height: 24px;
  width: 24px;
  object-fit: contain;
  vertical-align: middle;
  opacity: 0.6;
  margin-right: 6px;
  flex-shrink: 0;
}

.news-item p {
  font-size: 13px;
  color: #ccc;
  line-height: 1.6;
  white-space: pre-wrap;
  padding-left: 20px;
  position: relative;
  min-height: 3.5em; /* Reserve space to reduce layout shift */
}

@media (max-width: 768px) {
  .news-item {
    width: 100%;
  }

  .news-list {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}

.news-item.loading {
  background: #2a2a2a;
  color: #aaa;
  font-style: italic;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  animation: pulse 1.2s ease-in-out infinite;
}

/* Pulsing animation for loading placeholder */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}