/* Стили для страницы статьи блога */

/* Хлебные крошки */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .separator {
  color: var(--line);
}

.breadcrumbs .current {
  color: var(--text);
  font-weight: 600;
}

.breadcrumbs .category {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumbs .category:hover {
  color: var(--accent);
}

/* Основная статья */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
}

/* Заголовок статьи */
.post-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.post-category {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.post-date {
  color: var(--muted);
  font-size: 14px;
}

.read-time {
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-title {
  font-size: 42px;
  line-height: 1.2;
  margin: 0 0 20px 0;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-excerpt {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.post-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 300px;
  margin: 0 auto;
}

.author-avatar img {
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.author-info {
  text-align: left;
}

.author-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.author-title {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* Обложка статьи */
.post-cover {
  margin-bottom: 40px;
  text-align: center;
}

.cover-image {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px var(--shadow);
  transition: transform 0.3s ease;
}

.cover-image:hover {
  transform: scale(1.02);
}

/* Содержание статьи */
.post-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.content-intro {
  background: var(--card);
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  margin-bottom: 32px;
  border-radius: 0 16px 16px 0;
}

.content-intro p {
  margin: 0;
  font-size: 18px;
  font-style: italic;
  color: var(--text);
}

.post-content h2 {
  font-size: 28px;
  margin: 40px 0 16px 0;
  color: var(--accent);
  position: relative;
}

.post-content h2::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--accent);
  border-radius: 2px;
}

.post-content h3 {
  font-size: 24px;
  margin: 32px 0 16px 0;
  color: var(--accent2);
}

.post-content h4 {
  font-size: 20px;
  margin: 24px 0 12px 0;
  color: var(--text);
}

.post-content p {
  margin: 0 0 16px 0;
}

.post-content strong {
  color: var(--accent);
  font-weight: 600;
}

.post-content ul, .post-content ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.post-content li {
  margin: 0 0 8px 0;
}

/* Блоки с решениями */
.solution-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
}

.solution-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.solution-box h4 {
  margin: 0 0 16px 0;
  color: var(--accent);
  font-size: 18px;
}

.solution-box ul {
  margin: 0;
  padding-left: 20px;
}

.solution-box li {
  margin: 0 0 8px 0;
  color: var(--text);
}

/* Заключение */
.content-conclusion {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.content-conclusion h3 {
  font-size: 28px;
  margin: 0 0 16px 0;
  color: var(--accent);
}

.content-conclusion p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 24px 0;
  color: var(--muted);
}

.cta-section {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 16px;
  padding: 24px;
  margin-top: 24px;
}

.cta-section h4 {
  color: white;
  margin: 0 0 12px 0;
  font-size: 20px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 20px 0;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  background: white;
  color: var(--accent);
  border: none;
  font-weight: 600;
}

.cta-buttons .btn:hover {
  background: var(--card);
  transform: translateY(-2px);
}

.cta-buttons .btn--ghost {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.cta-buttons .btn--ghost:hover {
  background: white;
  color: var(--accent);
}

/* Футер статьи */
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 20px;
}

.post-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-label {
  color: var(--muted);
  font-size: 14px;
}

.tag {
  background: rgba(73, 119, 254, 0.1);
  border: 1px solid rgba(73, 119, 254, 0.3);
  color: var(--accent2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--accent2);
  color: white;
  transform: translateY(-2px);
}

.post-share {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-label {
  color: var(--muted);
  font-size: 14px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
}

.share-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: scale(1.1);
}

/* Похожие статьи */
.related-posts {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.related-posts h3 {
  font-size: 28px;
  margin: 0 0 24px 0;
  color: var(--text);
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.related-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  display: block;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
}

.related-image {
  margin-bottom: 16px;
  text-align: center;
}

.related-image img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
}

.related-content h4 {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: var(--text);
  line-height: 1.3;
}

.related-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.related-category {
  background: rgba(255, 128, 69, 0.1);
  border: 1px solid rgba(255, 128, 69, 0.3);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

/* Адаптивность */
@media (max-width: 768px) {
  .post-title {
    font-size: 32px;
  }
  
  .post-excerpt {
    font-size: 16px;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 12px;
  }
  
  .post-author {
    flex-direction: column;
    text-align: center;
  }
  
  .post-content h2 {
    font-size: 24px;
  }
  
  .post-content h2::before {
    display: none;
  }
  
  .post-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 28px;
  }
  
  .post-excerpt {
    font-size: 15px;
  }
  
  .content-intro {
    padding: 16px 20px;
  }
  
  .solution-box {
    padding: 16px 20px;
  }
  
  .content-conclusion {
    padding: 24px 20px;
  }
  
  .cta-section {
    padding: 20px;
  }
}

/* Анимации */
.post-header {
  animation: fadeInUp 0.6s ease-out;
}

.post-cover {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.post-content {
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.post-footer {
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

.related-posts {
  animation: fadeInUp 0.6s ease-out 0.8s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Улучшения для темной темы */
[data-theme="dark"] .solution-box {
  background: rgba(26, 26, 26, 0.8);
}

[data-theme="light"] .solution-box {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .content-conclusion {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .related-card {
  background: rgba(255, 255, 255, 0.9);
}

/* Улучшения для печати */
@media print {
  .post-header,
  .post-footer,
  .related-posts,
  .breadcrumbs {
    display: none;
  }
  
  .post-content {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .solution-box {
    border: 1px solid #ccc;
    background: white;
  }
}
