/* series.css - Стили для серий */

/* Стили для списка серий */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.series-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.series-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.series-card-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.series-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.series-card:hover .series-card-image img {
  transform: scale(1.05);
}

.series-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.series-card-title {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.4;
  font-weight: 600;
}

.series-card-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.series-card-title a:hover {
  color: var(--primary-color);
}

.series-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 20px;
}

.series-card-meta {
  margin-top: auto;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #777;
}

.series-article-count {
  display: flex;
  align-items: center;
}

.series-article-count svg {
  margin-right: 6px;
  fill: currentColor;
}

/* Layout страницы серии */
.series-layout {
  display: grid;
  grid-template-areas: "sidebar main";
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 30px;
}

.series-main-content {
  grid-area: main;
  max-width: 100%;
}

.series-sidebar {
  grid-area: sidebar;
  position: relative;
}

/* Блоки сайдбара */
.sidebar-block {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  padding: 20px;
}

.sidebar-title {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-color);
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Список других серий */
.other-series-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.other-series-item {
  display: block;
  padding: 12px 15px;
  border-radius: 6px;
  background-color: #f9f9f9;
  text-decoration: none;
  transition: all 0.2s ease;
}

.other-series-item:hover {
  background-color: var(--primary-light);
  color: white;
}

.other-series-title {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.other-series-item:hover .other-series-title {
  color: white;
}

.view-all-series {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.view-all-series:hover {
  color: var(--primary-dark);
}

.view-all-series svg {
  margin-left: 5px;
  fill: currentColor;
}

/* Заголовок страницы серии */
.series-header {
  margin-bottom: 30px;
}

.series-header .page-title {
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 15px;
}

.series-info-block {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  border-left: 4px solid var(--primary-color);
}

/* Баннер серии */
.series-banner {
  float: left;
  width: 35%;
  margin-right: 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  aspect-ratio: 3/2;
}

.series-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.series-header .page-description {
  color: #555;
  font-size: 1.1rem;
  line-height: 1.6;
}

.series-meta {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  color: #666;
  font-size: 0.95rem;
  flex-wrap: wrap;
  clear: both;
}

.series-meta span {
  display: flex;
  align-items: center;
}

.series-meta svg {
  margin-right: 6px;
  fill: currentColor;
}

/* Закрепленная статья */
.pinned-article {
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.pinned-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--primary-color);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  z-index: 2;
}

.pinned-badge svg {
  margin-right: 5px;
  fill: currentColor;
}

/* Блок серий в статье */
.article-series {
  margin: 30px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.series-title {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: var(--text-color);
}

.series-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.series-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.series-badge:hover {
  background-color: var(--primary-light);
  color: #fff;
  border-color: var(--primary-color);
}

.series-badge svg {
  margin-right: 6px;
  fill: currentColor;
}

/* Улучшения */
.journal-main .section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--text-color);
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Фильтры серий */
.category-series-filters {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eaeaea;
}

.filters-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-color);
}

.series-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.series-filter {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background-color: #f5f5f5;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid #e0e0e0;
  line-height: 1.2;
}

.series-filter:hover {
  background-color: #e9e9e9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.series-filter.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  font-weight: 500;
}

.series-filter .count {
  opacity: 0.8;
  font-size: 0.85em;
  margin-left: 2px;
}

.active-series-info {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eaeaea;
}

.active-series-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

/* Выпадающий список */
.series-filter-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-toggle svg {
  margin-left: 4px;
  fill: currentColor;
  transition: transform 0.2s;
}

.series-filter-dropdown:hover .dropdown-toggle svg {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 4px;
  padding: 8px 0;
  z-index: 10;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.5rem;
  border: 1px solid #e0e0e0;
}

.series-filter-dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-color);
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.dropdown-content a:hover {
  background-color: #f5f5f5;
}

.dropdown-content a.active {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
}

/* Кнопки-теги на главной странице */
.hero-tag-buttons {
  display: flex;
  flex-wrap: wrap;
  margin-top: 25px;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 800px;
}

.hero-tag-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: white;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 42px;
  box-sizing: border-box;
}

.hero-tag-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  filter: brightness(1.05);
  text-decoration: none;
}

.hero-tag-button:hover:not([style*="color"]) {
  color: white;
}

.hero-tag-button[style*="color"]:hover {
  color: inherit;
}

.hero-tag-button svg,
.hero-tag-button img {
  margin-right: 6px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Иерархия серий */
.child-series-filters {
  margin: -1rem 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eaeaea;
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 4px;
}

.child-series-filters .filters-title {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--text-color);
  opacity: 0.9;
}

.child-series-filter {
  background-color: #eef6ff;
  border-color: #cce2ff;
}

.child-series-filter:hover {
  background-color: #daeaff;
}

.child-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background-color: rgba(0,0,0,0.1);
  border-radius: 50%;
  margin-left: 4px;
  font-size: 0.8em;
  line-height: 1;
  font-weight: bold;
}

.series-filter.active .child-indicator {
  background-color: rgba(255,255,255,0.2);
}

.parent-series-links {
  font-size: 0.85rem;
  margin-top: 0.4rem;
  color: #666;
}

.parent-series-links a {
  color: var(--primary-color);
  text-decoration: none;
}

.parent-series-links a:hover {
  text-decoration: underline;
}