 /* Основные стили для страницы списка новостей */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  margin-top: 100px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.news-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.news-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-image-container {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-item:hover .news-image {
  transform: scale(1.05);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 16px;
}

.news-content {
  padding: 20px;
}

.news-date {
  display: block;
  color: #817373;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.news-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.4;
}

.news-preview {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0;
}

.loading {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #d32f2f;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #721c24;
  margin: 20px 0;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  font-size: 32px;
}

.news-count {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .container {
    padding: 15px;
  }
  
  h1 {
    font-size: 24px;
  }
}
  