/* ========================================
   Blog 列表页独有样式
   ======================================== */

.blog-page {
  background: #fff;
}

.blog-page .button-light {
  min-width: 150px;
  color: var(--primary);
  background: #fff;
}

.blog-page .site-nav a.is-active::after {
  bottom: -22px;
}

/* Hero */
.blog-hero {
  padding: 118px 0 48px;
}

.blog-hero-copy h1 {
  margin: 0;
  color: #000;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.01em;
}

.blog-hero-copy h1 span {
  color: transparent;
  background: linear-gradient(90deg, #3f82ff 0%, #a070ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-detail-title h1 {
  margin: 0;
  color: #000;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 0.01em;
}

.blog-detail-title h1 span {
  color: transparent;
  background: linear-gradient(90deg, #3f82ff 0%, #a070ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero-copy p {
  margin: 12px 0 0;
  color: rgba(0, 0, 0, 0.6);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
}

.blog-hero-copy .cases-hero-subtitle {
  display: block;
  min-height: 1.75em;
  margin: 12px 0 0;
}

/* Featured 大图文章 */
.blog-featured {
  margin-top: 40px;
  border-radius: 18px;
  overflow: hidden;
}

.blog-featured-card {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease;
}

.blog-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 52px rgba(18, 32, 62, 0.16);
}

.blog-featured-link {
  display: block;
}

.blog-featured-link img {
  width: 100%;
  aspect-ratio: 1280 / 480;
  object-fit: cover;
  transition: transform 0.48s ease;
}

.blog-featured-card:hover .blog-featured-link img {
  transform: scale(1.03);
}

.blog-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.12) 0%, rgba(8, 14, 28, 0.04) 36%, rgba(8, 14, 28, 0.68) 78%, rgba(8, 14, 28, 0.84) 100%);
}

.blog-featured-body {
  position: absolute;
  left: 40px;
  bottom: 36px;
  right: 40px;
  z-index: 2;
  color: #fff;
}

.blog-featured-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
   margin-bottom: 14px;
}

.blog-featured-body h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.blog-featured-title-link {
  color: #fff;
  transition: opacity 0.24s ease;
}

.blog-featured-title-link:hover,
.blog-featured-title-link:focus-visible {
  opacity: 0.82;
}

.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.blog-featured-meta time {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

/* 博客列表网格 */
.blog-list-section {
  padding: 0 0 80px;
}

.blog-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  margin-bottom: 32px;
}

.blog-list-header h2 {
  margin: 0;
  color: #080b16;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.blog-pill {
  min-width: 96px;
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #F0F2F5;
  color: rgb(0,0,0,0.7);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.24s ease,
    background-color 0.24s ease,
    color 0.24s ease,
    box-shadow 0.24s ease;
}

.blog-pill:hover,
.blog-pill:focus-visible {
  transform: translateY(-1px);
  color: #2d5fff;
}

.blog-pill.is-active {
  background: linear-gradient(90deg, #2f80ff 0%, #9668ff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(75, 109, 255, 0.22);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 14px;
}

.blog-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e8ebf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 41, 82, 0.04);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.blog-card.is-hidden {
  display: none;
}

.blog-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(18, 28, 54, 0) 0%, rgba(18, 28, 54, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(67, 125, 255, 0.24);
  box-shadow: 0 24px 46px rgba(23, 41, 82, 0.1);
}

.blog-card:hover::before,
.blog-card:focus-within::before {
  opacity: 1;
}

.blog-card .blog-image-link {
  display: block;
  overflow: hidden;
}

.blog-card img {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition:
    transform 0.42s ease,
    filter 0.42s ease;
}

.blog-card:hover img,
.blog-card:focus-within img {
  transform: scale(1.04) translateY(-4px);
  filter: saturate(1.03);
}

.blog-card-body {
  position: relative;
  z-index: 2;
  padding: 20px 22px 24px;
}

.blog-card-tag {
  display: inline-block;
  color: rgba(0, 0, 0, 0.4);
  font-size: 13px;
  font-weight: 500;
}

.blog-card-body h3 {
  margin: 12px 0 0;
  color: rgba(0, 0, 0, 0.9);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.52;
  letter-spacing: -0.01em;
}

.blog-list-title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.24s ease;
}

.blog-list-title-link:hover,
.blog-list-title-link:focus-visible {
  color: #3f82ff;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #b0b4bd;
  font-size: 13px;
}

.blog-card-meta time {
  color: #8d929e;
}

.blog-list-actions {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-pagination-link,
.blog-pagination-ellipsis {
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.72);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.blog-pagination-link {
  border: 1px solid #e4e9f2;
  background: #fff;
  text-decoration: none;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    color 0.24s ease,
    box-shadow 0.24s ease,
    background-color 0.24s ease;
}

.blog-pagination-link:hover,
.blog-pagination-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(63, 130, 255, 0.28);
  color: #2f80ff;
  box-shadow: 0 14px 28px rgba(23, 41, 82, 0.08);
}

.blog-pagination-link.is-current {
  border-color: transparent;
  background: linear-gradient(90deg, #2f80ff 0%, #9668ff 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(75, 109, 255, 0.22);
}

.blog-pagination-link.is-disabled {
  pointer-events: none;
  border-color: #edf1f6;
  background: #f7f9fc;
  color: rgba(0, 0, 0, 0.28);
  box-shadow: none;
}

.blog-pagination-link.is-arrow {
  min-width: 88px;
}

.blog-pagination-ellipsis {
  min-width: auto;
  padding: 0 4px;
  color: rgba(0, 0, 0, 0.34);
}

.blog-load-more.is-hidden {
  display: none;
}

/* 响应式 */
@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-featured-body h2 {
    font-size: 26px;
  }
}

@media (max-width: 960px) {
  .blog-hero {
    padding-top: 108px;
  }

  .blog-hero-copy h1 {
    font-size: 32px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-featured-link img {
    aspect-ratio: 4 / 3;
  }

  .blog-featured-body {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .blog-featured-body h2 {
    font-size: 22px;
  }

  .blog-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 40px;
  }
}

@media (max-width: 560px) {
  .blog-hero {
    padding-top: 96px;
    padding-bottom: 40px;
  }

  .blog-hero-copy h1 {
    font-size: 28px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-featured-link img {
    aspect-ratio: 1 / 1;
  }

  .blog-featured-body h2 {
    font-size: 20px;
  }

  .blog-featured-body {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .blog-pagination {
    gap: 8px;
  }

  .blog-pagination-link,
  .blog-pagination-ellipsis {
    height: 40px;
    min-width: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .blog-pagination-link.is-arrow {
    min-width: 78px;
  }
}

/* ========================================
   Blog 详情页样式
   ======================================== */

.blog-detail-shell {
  padding-bottom: 24px;
  margin-top: 112px;
}

.blog-detail-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 80px;
  align-items: start;
  justify-content: center;
}

.blog-detail-layout.is-single-column {
  grid-template-columns: minmax(0, 1fr);
}

.blog-detail-body {
  width: min(100%, 800px);
}

.blog-detail-layout.is-single-column .blog-detail-body {
  margin: 0 auto;
}

.blog-detail-sidebar {
  position: sticky;
  top: 108px;
  align-self: start;
}

.blog-detail-sidebar-inner {
  position: relative;
  max-height: calc(100vh - 132px);
  overflow: auto;
  padding: 22px 20px;
  border: 1px solid #edf0f6;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 42px rgba(23, 41, 82, 0.06);
}

.blog-detail-sidebar-title {
  margin: 0 0 18px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.blog-detail-nav {
  display: grid;
  gap: 10px;
}

.blog-detail-nav a {
  position: relative;
  display: block;
  border: 1px solid #edf0f6;
  padding: 13px 16px;
  border-radius: 10px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  transition:
    color 0.24s ease,
    background-color 0.24s ease,
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.blog-detail-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f80ff 0%, #a070ff 100%);
  transform: translateY(-50%);
  transition: height 0.24s ease;
}

.blog-detail-nav a:hover,
.blog-detail-nav a:focus-visible {
  color: #1A75FF;
  background: rgba(63, 130, 255, 0.08);
  transform: translateX(3px);
}

.blog-detail-nav a.is-active {
  color: #1A75FF;
  font-size: 16px;
  background: rgba(63, 130, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(63, 130, 255, 0.08);
}

.blog-detail-nav a.is-active::before {
  height: 24px;
}

.blog-detail-breadcrumb {
  margin-bottom: 22px !important;
  color: #8c91a0 !important;
  font-size: 16px !important;
}

.blog-detail-breadcrumb a {
  color: #3c83ff;
}

.blog-detail-hero {
  width: 100%;
  padding: 0 0 40px;
}

.blog-detail-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  color: rgba(0, 0, 0, 0.45);
  font-size: 15px;
  line-height: 1.7;
}

.blog-detail-meta time {
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
}

.blog-detail-meta span {
  color: rgba(0, 0, 0, 0.4);
}

.blog-detail-cover {
  display: inline-block;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 34px;
  box-shadow: 0 24px 52px rgba(32, 56, 112, 0.12);
}

.blog-detail-cover img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.blog-detail-content {
  width: 100%;
  max-width: none;
}

.blog-detail-content h2 {
  margin: 0 0 14px;
  color: rgba(0, 0, 0, 0.9);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  scroll-margin-top: 118px;
}

.blog-detail-content h3 {
  margin: 28px 0 12px;
  color: rgba(0, 0, 0, 0.85);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  scroll-margin-top: 118px;
}

.blog-detail-content p {
  margin: 0 0 10px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  line-height: 1.95;
  font-weight: 350;
}

.blog-detail-content blockquote {
  margin: 18px 0;
  padding: 16px 22px;
  border-left: 4px solid #3f82ff;
  background: rgba(63, 130, 255, 0.05);
  border-radius: 0 12px 12px 0;
  color: rgba(0, 0, 0, 0.55);
  font-size: 16px;
  line-height: 1.9;
  font-weight: 350;
}

.blog-detail-content strong {
  color: rgba(0, 0, 0, 0.75);
  font-weight: 700;
}

.blog-detail-content hr {
  border: 0;
  height: 1px;
  background: #edf0f6;
  margin: 30px 0;
}

.blog-detail-content em {
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
}

.blog-detail-list {
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.blog-detail-list li {
  position: relative;
  padding-left: 22px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  font-weight: 350;
  line-height: 1.9;
}

.blog-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f80ff 0%, #a070ff 100%);
}

.blog-detail-section {
  padding-top: 2px;
  scroll-margin-top: 118px;
}

.blog-detail-section + .blog-detail-section {
  margin-top: 8px;
}

.blog-detail-highlight {
  font-weight: 800;
  color: transparent;
  background: linear-gradient(90deg, #2f80ff 0%, #a070ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 48px;
}

/* TL;DR 摘要 */
.blog-detail-tldr {
  margin-top: 40px;
  padding: 22px 28px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.blog-detail-tldr-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.blog-detail-tldr ol {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  color: #475569;
  line-height: 1.75;
}

.blog-detail-tldr ol li {
  margin-bottom: 8px;
}

.blog-detail-tldr ol li:last-child {
  margin-bottom: 0;
}

/* Blog 详情响应式 */
@media (max-width: 1100px) {
  .blog-detail-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 960px) {
  .blog-detail-shell {
    margin-top: 92px;
  }

  .blog-detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-detail-sidebar {
    position: static;
    order: 1;
  }

  .blog-detail-sidebar-inner {
    max-height: none;
    overflow: visible;
  }

  .blog-detail-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .blog-detail-nav a {
    padding: 10px 14px;
    font-size: 13px;
  }

  .blog-detail-nav a::before {
    display: none;
  }

  .blog-detail-body {
    width: 100%;
    order: 0;
  }

  .blog-detail-content h2 {
    font-size: 22px;
  }

  .blog-detail-content h3 {
    font-size: 19px;
  }
}

@media (max-width: 560px) {
  .blog-detail-shell {
    margin-top: 80px;
  }

  .blog-detail-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
  }

  .blog-detail-content h2 {
    font-size: 20px;
  }

  .blog-detail-content h3 {
    font-size: 17px;
  }

  .blog-detail-content p {
    font-size: 15px;
  }
}
