/* 博客文章详情页特定样式 */

.blog-post-container {
  max-width: 1200px;
  margin: 120px auto 3rem;
  padding: 0 1rem;
  display: flex;
  gap: 2rem;
}

.blog-post {
  flex: 3;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.post-header {
  padding: 2rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-transparent);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
}

.post-date, .post-read-time {
  font-size: 0.875rem;
  color: #999;
  display: flex;
  align-items: center;
}

.post-date::before, .post-read-time::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #ccc;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.post-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.3;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--text-dark);
}

.author-title {
  font-size: 0.875rem;
  color: #999;
}

.post-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  padding: 2rem;
  line-height: 1.8;
  color: var(--text-dark);
  white-space: normal;
  word-wrap: break-word;
}

.post-content h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  color: var(--text-dark);
}

.post-content h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-dark);
}

.post-content p {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-light);
  line-height: 1.8;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  line-height: 1.8;
}

.post-content a {
  color: var(--primary);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--section-bg);
  font-style: italic;
  color: var(--text-light);
}

.post-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 1.5rem 0;
}

.post-content pre {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-content code {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9rem;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
}

.post-content br {
  display: block;
  margin: 0.5rem 0;
}

.post-footer {
  padding: 0 2rem 2rem;
  border-top: 1px solid #eee;
  margin-top: 1rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 0;
}

.tag {
  padding: 0.25rem 0.75rem;
  background-color: var(--section-bg);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.post-share {
  padding-top: 1.5rem;
}

.post-share h4 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.social-share {
  display: flex;
  gap: 1rem;
}

.share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--section-bg);
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s ease;
}

.share-link:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* 侧边栏 */
.blog-sidebar {
  flex: 1;
}

.sidebar-widget {
  background: var(--white);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.sidebar-widget h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  color: var(--text-dark);
  font-size: 1.25rem;
}

.popular-posts {
  list-style: none;
  padding: 0;
}

.popular-posts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.popular-posts li:last-child {
  border-bottom: none;
}

.popular-posts a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
  font-size: 1.5rem;
}

.popular-posts a:hover {
  color: var(--primary);
}

.popular-posts span {
  font-size: 0.8rem;
  color: #999;
}

.categories-list {
  list-style: none;
  padding: 0;
}

.categories-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.categories-list li:last-child {
  border-bottom: none;
}

.categories-list a {
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  transition: color 0.3s ease;
}

.categories-list a:hover {
  color: var(--primary);
}

.categories-list span {
  color: #999;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subscribe-form input {
  padding: 0.75rem 1rem;
  border: 1px solid #eee;
  border-radius: 5px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 121, 198, 0.1);
}

.subscribe-btn {
  padding: 0.75rem 1rem;
  background-color: var(--primary);
  color: var(--white);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  cursor: pointer;
}

.subscribe-btn:hover {
  background-color: transparent;
  color: var(--primary);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .blog-post-container {
    flex-direction: column;
  }
  
  .post-header {
    padding: 1.5rem;
  }
  
  .post-title {
    font-size: 1.75rem;
  }
  
  .post-image {
    height: 300px;
  }
  
  .post-content {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .blog-post-container {
    margin-top: 100px;
    padding: 0 15px;
  }
  
  .post-meta {
    flex-wrap: wrap;
  }
  
  .post-title {
    font-size: 1.5rem;
  }
  
  .post-image {
    height: 250px;
  }
  
  .post-content {
    padding: 1.5rem;
  }
  
  .post-content h2 {
    font-size: 1.5rem;
  }
  
  .post-content h3 {
    font-size: 1.25rem;
  }
  
  .post-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .blog-post-container {
    margin-top: 80px;
    padding: 0 10px;
  }
  
  .post-header {
    padding: 1rem;
  }
  
  .post-title {
    font-size: 1.3rem;
  }
  
  .post-image {
    height: 200px;
  }
  
  .post-content {
    padding: 1rem;
  }
  
  .post-content h2 {
    font-size: 1.3rem;
  }
  
  .post-content h3 {
    font-size: 1.1rem;
  }
  
  .post-footer {
    padding: 0 1rem 1rem;
  }
}