/* Основные стили для секции новостей */
.news-section {
    padding: 3rem 0;
    background-color: #f8f9fa;
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  /* Заголовок секции */
  .section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: #333;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
  }
  
  .section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #0066cc;
    margin: 0.8rem auto 0;
  }
  
  /* Контейнер новостей */
  .news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  /* Стили для карточки новости */
  .news-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  }
  
  .news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  .news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .news-title {
    margin: 0 0 0.8rem 0;
    font-size: 1.25rem;
    color: #333;
    line-height: 1.4;
  }
  
  .news-excerpt {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
  }
  
  .news-date {
    color: #888;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.8rem;
    font-style: italic;
  }
  
  .news-link {
    display: inline-block;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    margin-top: auto;
    padding: 0.5rem 0;
  }
  
  .news-link:hover {
    color: #004499;
    text-decoration: underline;
  }
  
  /* Стили для шаблонов */
  template {
    display: none;
  }
  
  /* Стили для состояния загрузки */
  .loading {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    padding: 2.5rem 0;
    grid-column: 1 / -1;
    position: relative;
  }
  
  .loading:after {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Стили для сообщений об ошибках и отсутствии новостей */
  .error-message,
  .no-news {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    padding: 3rem 0;
    grid-column: 1 / -1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  .error-message p {
    color: #dc3545;
  }
  
  /* Контейнер для пагинации */
  .pagination-container {
    margin-top: 2rem;
    text-align: center;
  }
  
  /* Стили для пагинации */
  .pagination {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .pagination-item {
    margin: 0;
  }
  
  .pagination-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.8rem;
    border-right: 1px solid #eee;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
  }
  
  .pagination-item:last-child .pagination-link {
    border-right: none;
  }
  
  .pagination-link:hover:not(.disabled) {
    background-color: #f0f9ff;
    color: #0066cc;
  }
  
  .pagination-link.active {
    background-color: #0066cc;
    color: #fff;
    font-weight: 600;
  }
  
  .pagination-link.disabled {
    color: #ccc;
    pointer-events: none;
    cursor: default;
  }
  
  /* Анимация появления новостей */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .news-item {
    animation: fadeIn 0.5s ease forwards;
  }
  
  /* Разное время появления для карточек */
  .news-item:nth-child(2n) {
    animation-delay: 0.1s;
  }
  
  .news-item:nth-child(3n) {
    animation-delay: 0.2s;
  }
  
  /* Эффект "загрузки" для изображений */
  .news-image {
    background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
  }
  
  @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  /* Стили для страницы детальной новости */

/* Основной контейнер новости */
.news-detail-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1rem;
  }
  
  /* Статья с новостью */
  .news-detail {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 2rem;
  }
  
  /* Заголовок новости */
  .news-detail-title {
    font-size: 2.2rem;
    line-height: 1.3;
    color: #222;
    margin: 0 0 1rem 0;
    font-weight: 700;
  }
  
  /* Дата публикации */
  .news-detail-date {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1.5rem;
    display: block;
    font-style: italic;
  }
  
  /* Контейнер содержимого новости */
  .news-detail-content {
    margin-bottom: 2rem;
  }
  
  /* Контейнер для изображения */
  .news-detail-image-container {
    margin-bottom: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Изображение новости */
  .news-detail-image {
    width: 100%;
    height: auto;
    display: block;
  }
  
  /* Текст новости */
  .news-detail-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
  }
  
  .news-detail-text p {
    margin: 0 0 1.2rem 0;
  }
  
  .news-detail-text p:last-child {
    margin-bottom: 0;
  }
  
  /* Блок с кнопками действий */
  .news-detail-actions {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
  }
  
  /* Кнопка "Вернуться к списку новостей" */
  .back-to-news {
    display: inline-block;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    background-color: #f0f8ff;
  }
  
  .back-to-news:hover {
    background-color: #e0f0ff;
    color: #0055aa;
  }
  
  /* Стили для состояния загрузки */
  .loading {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    padding: 3rem 0;
    position: relative;
  }
  
  .loading:after {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Стили для сообщения об ошибке */
  .error-message {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }
  
  .error-message p {
    color: #dc3545;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
  }
  
  /* Анимация появления контента */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .news-detail {
    animation: fadeIn 0.6s ease forwards;
  }