/* Основные стили страницы */
.main-content {
  padding: 40px 0;
  background-color: #f8f9fa;
  flex: 1;
}

.breadcrumb {
  margin-bottom: 30px;
  font-size: 14px;
  color: #666;
}

.breadcrumb a {
  color: #007bff;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.separator {
  margin: 0 10px;
  color: #ccc;
}

.current {
  color: #333;
}

/* Заголовок страницы */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.page-description {
  font-size: 18px;
  color: #666;
  margin: 0;
}

/* Фильтры и поиск */
.articles-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-tabs {
  display: flex;
  gap: 10px;
}

.filter-tab {
  padding: 12px 24px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #666;
}

.filter-tab:hover {
  border-color: #007bff;
  color: #007bff;
}

.filter-tab.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box input {
  padding: 12px 20px;
  border: none;
  outline: none;
  font-size: 16px;
  width: 300px;
}

.search-box button {
  padding: 12px 20px;
  background: #007bff;
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: #0056b3;
}

/* Сетка статей */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.article-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  background: #f0f0f0;
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

.article-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.article-info {
  padding: 20px;
}

.article-category {
  display: inline-block;
  padding: 8px 15px;
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.article-category.category-article {
  background-color: #e3f2fd;
  color: #1976d2;
}

.article-category.category-event {
  background-color: #fff3e0;
  color: #f57c00;
}

.article-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.article-type.article {
  background: #e3f2fd;
  color: #1976d2;
}

.article-type.event {
  background: #fff3e0;
  color: #f57c00;
}

.article-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.article-preview {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

.article-content {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.article-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-stars {
  color: #ffc107;
  font-size: 14px;
}

.rating-text {
  color: #666;
  font-size: 11px;
}

/* Стили для информации о событии */
.article-event-info {
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #e9ecef;
}

.article-event-info .event-date,
.article-event-info .event-location {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  font-size: 13px;
  color: #555;
}

.article-event-info .event-date:last-child,
.article-event-info .event-location:last-child {
  margin-bottom: 0;
}

.article-event-info i {
  margin-right: 8px;
  color: #007bff;
  width: 16px;
}

/* Стили для информации о комментариях */
.article-comments-info {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.article-comments-info i {
  color: #007bff;
}

/* Загрузка */
.loading-indicator {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-indicator i {
  font-size: 24px;
  margin-bottom: 15px;
  color: #007bff;
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination button {
  padding: 10px 15px;
  border: 1px solid #ddd;
  background: white;
  color: #666;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .current-page {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 900px;
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
  border-radius: 15px 15px 0 0;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  height: auto;
  min-height: 200px;
}

.article-content {
  line-height: 1.8;
  color: #333;
  margin-bottom: 30px;
  width: 100%;
  overflow: visible;
  white-space: pre-wrap;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0;
  display: block;
}

.article-content p {
  margin-bottom: 15px;
  word-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin-top: 25px;
  margin-bottom: 15px;
  color: #333;
}

.article-full-content {
  margin-bottom: 30px;
  width: 100%;
  overflow: visible;
  white-space: pre-wrap;
}

.article-meta-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  border-left: 4px solid #007bff;
}

.article-meta-info p {
  margin-bottom: 10px;
  color: #555;
}

.article-meta-info p:last-child {
  margin-bottom: 0;
}

.article-meta-info strong {
  color: #333;
  font-weight: 600;
}

.article-text {
  color: #333;
  line-height: 1.8;
  font-size: 16px;
  width: 100%;
  overflow: visible;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.article-text p {
  margin-bottom: 15px;
  width: 100%;
  white-space: pre-wrap;
}

.article-text ul,
.article-text ol {
  margin-bottom: 15px;
  padding-left: 30px;
  width: 100%;
}

.article-text li {
  margin-bottom: 8px;
}

.article-text blockquote {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  width: 100%;
}

.article-text div,
.article-text span {
  width: 100%;
  overflow: visible;
  white-space: pre-wrap;
}

/* Обеспечиваем отображение всего контента */
#modalContent {
  width: 100%;
  overflow: visible;
  white-space: pre-wrap;
}

#modalContent * {
  max-width: 100%;
  word-wrap: break-word;
}

/* Рейтинг */
.rating-section {
  border-top: 1px solid #eee;
  padding-top: 30px;
  margin-bottom: 30px;
  text-align: center;
}

.rating-section h3 {
  margin-bottom: 20px;
  color: #333;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 15px;
}

.star {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s ease;
}

.star:hover,
.star.active {
  color: #ffc107;
}

.rating-info {
  font-size: 14px;
  color: #666;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Комментарии */
.comments-section {
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.comments-section h3 {
  margin-bottom: 20px;
  color: #333;
}

.comment-form {
  margin-bottom: 30px;
}

.comment-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 15px;
  min-height: 120px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.btn-submit-comment {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-submit-comment:hover {
  background: #0056b3;
}

.btn-submit-comment:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Список комментариев */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #007bff;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 600;
  color: #333;
}

.comment-date {
  font-size: 12px;
  color: #666;
}

.comment-text {
  color: #555;
  line-height: 1.6;
}

.no-comments {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px 20px;
}

/* Специальные стили для полного отображения контента статей */
.modal-body .article-content,
.modal-body .article-full-content,
.modal-body .article-text {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
}

/* Убираем любые ограничения высоты для текстового контента */
.modal-body p,
.modal-body div,
.modal-body span,
.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body h5,
.modal-body h6 {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
  -webkit-line-clamp: unset !important;
}

/* Обеспечиваем правильное отображение контента в модальном окне */
.modal-body {
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Исправляем потенциальные проблемы с flex-контейнерами */
.modal-body > * {
  flex-shrink: 0;
}

/* Убираем ellipsis и line-clamp, если они есть */
.modal .article-content,
.modal .article-text,
.modal .article-full-content {
  text-overflow: unset !important;
  white-space: pre-wrap !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  display: block !important;
}

/* Адаптивность */
@media (max-width: 768px) {
  .main-content {
    padding: 20px 0;
  }
  
  .page-header h1 {
    font-size: 28px;
  }
  
  .articles-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-tabs {
    justify-content: center;
  }
  
  .search-box {
    max-width: 100%;
  }
  
  .search-box input {
    width: 250px;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .modal-content {
    width: 95%;
    margin: 1% auto;
    max-height: 98vh;
  }
  
  .modal-header,
  .modal-body {
    padding: 20px;
  }
  
  .star-rating .star {
    font-size: 24px;
  }
  
  .rating-info {
    flex-direction: column;
    gap: 5px;
  }
  
  .article-text {
    font-size: 15px;
  }
  
  .comment-form textarea {
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .filter-tabs {
    flex-wrap: wrap;
  }
  
  .search-box input {
    width: 200px;
  }
  
  .modal-header h2 {
    font-size: 20px;
  }
  
  .modal-header,
  .modal-body {
    padding: 15px;
  }
  
  .article-text {
    font-size: 14px;
  }
} 