/* News Section Styles */
.news-section {
  margin: 40px 0;
  padding: 20px 0;
  border-top: 2px solid var(--border-color);
}

.news-section h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 24px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.news-header .avatar {
  width: clamp(32px, 5vw, 48px);
  height: clamp(32px, 5vw, 48px);
}

.news-card {
  background: rgba(46 52 64 / 90%);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  overflow: hidden;
  min-height: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgb(0 0 0 / 30%);
}

.news-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 16px;
}

.news-card p {
  color: var(--text-color);
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.news-card .date {
  color: #88c0d0;
  font-size: 12px;
  margin-bottom: 10px;
  display: block;
}

.news-card a {
  color: #88c0d0;
  text-decoration: none;
  font-size: 12px;
  display: inline-block;
  margin-top: 10px;
}

.news-card a:hover {
  text-decoration: underline;
}

.mastodon-embed {
  width: 100%;
  min-height: 300px;
  border: none;
}

.loading-embed {
  padding: 20px;
  text-align: center;
  color: var(--text-color);
}

.view-more {
  text-align: center;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.loading, .no-news, .error {
  text-align: center;
  padding: 20px;
  color: var(--text-color);
  grid-column: 1 / -1;
}

/* For the news page */
.news-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Responsive adjustments */
@media (width <= 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    min-height: 250px;
    margin-bottom: 20px;
  }
}