@charset "UTF-8";
/* 贝森洞察博客样式 - 1.3.0 */

/* 博客内容样式 */
.blog-content {
  line-height: 1.8;
  color: #334155;
  position: relative; /* 为图片放大功能添加相对定位 */
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-weight: 600;
  color: #1e293b;
}

.blog-content h1 {
  font-size: 2rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.blog-content h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.3rem;
}

.blog-content h3 {
  font-size: 1.3rem;
}

.blog-content h4 {
  font-size: 1.1rem;
}

.blog-content p {
  margin-bottom: 1.5em;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  margin: 2em auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  display: block;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: zoom-in; /* 鼠标悬停在图片上时显示放大图标 */
  transition: all 0.3s ease;
}

/* 图片放大功能相关样式 */
.blog-content .img-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  /* 仅保留淡入动画，淡出时直接消失 */
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-out;
}

.blog-content .img-overlay.active {
  opacity: 1;
  visibility: visible;
}

.blog-content .img-overlay img {
  max-width: 90%;
  max-height: 90%;
  margin: 0;
  object-fit: contain;
  transform: scale(0.9);
  /* 仅保留放大动画，取消缩小动画 */
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-out;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.blog-content .img-overlay.active img {
  transform: scale(1);
}

.blog-content a {
  color: #f97316;
  text-decoration: none;
  border-bottom: 1px dashed #f97316;
  transition: all 0.2s ease;
}

.blog-content a:hover {
  color: #ea580c;
  border-bottom: 1px solid #ea580c;
}

.blog-content pre {
  background-color: #f8fafc;
  border-radius: 0.375rem;
  padding: 1em;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid #e2e8f0;
}

.blog-content code {
  background-color: #f1f5f9;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  color: #334155;
}

.blog-content pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.blog-content blockquote {
  border-left: 4px solid #f97316;
  padding: 0.8em 1em 0.8em 2em;
  background-color: #fff7ed;
  margin: 1.5em 0;
  border-radius: 0 0.3rem 0.3rem 0;
  color: #78350f;
  font-style: italic;
}

.blog-content blockquote p:last-child {
  margin-bottom: 0;
}

.blog-content ul,
.blog-content ol {
  margin: 1em 0 1.5em 1em;
  padding-left: 1.5em;
}

.blog-content ul {
  list-style-type: disc;
}

.blog-content ol {
  list-style-type: decimal;
}

.blog-content li {
  margin-bottom: 0.5em;
  padding-left: 0.5em;
}

.blog-content li > ul,
.blog-content li > ol {
  margin-top: 0.5em;
  margin-bottom: 0;
}

.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  overflow-x: auto;
  display: block;
}

.blog-content table th,
.blog-content table td {
  border: 1px solid #e2e8f0;
  padding: 0.75em;
  text-align: left;
}

.blog-content table th {
  background-color: #f8fafc;
  font-weight: 600;
}

.blog-content table tr:nth-child(even) {
  background-color: #f8fafc;
}

.blog-content hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2em 0;
}

/* 博客卡片样式 */
.blog-card {
  transition: all 0.3s ease;
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card .blog-image {
  overflow: hidden;
}

.blog-card .blog-image img {
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

/* 博客标签样式 */
.blog-tag {
  display: inline-block;
  background-color: #ffedd5;
  color: #9a3412;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.blog-tag:hover {
  background-color: #fed7aa;
}

/* 分页样式 */
.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.blog-pagination-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 0.25rem;
  border-radius: 0.375rem;
  background-color: white;
  color: #64748b;
  font-weight: 500;
  transition: all 0.2s ease;
}

.blog-pagination-item:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.blog-pagination-item.active {
  background-color: #f97316;
  color: white;
}

.blog-pagination-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .blog-content h1 {
    font-size: 1.75rem;
  }

  .blog-content h2 {
    font-size: 1.35rem;
  }

  .blog-content h3 {
    font-size: 1.2rem;
  }

  .blog-content blockquote {
    padding: 0.5em 0.8em 0.5em 1.5em;
  }
}
