/* ===== 博客系统专属样式 ===== */

/* 页面Banner */
.page-banner {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* top-bar是普通文档流(40px)，main-header是fixed(top=40px,高=80px)
     所以banner只需要偏移 header高度即可 */
  margin-top: var(--header-height);
}

.page-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.page-banner:hover .page-banner-bg {
  transform: scale(1);
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.75) 0%, rgba(30, 20, 10, 0.65) 100%);
}

.page-banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

.page-banner-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.page-banner-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.4);
}

/* ===== 博客主体布局 ===== */
.blog-main {
  padding: 60px 0 80px;
  background: #f7f5f0;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ===== 分类筛选 ===== */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #555;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Noto Sans SC', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 4px 12px rgba(196, 160, 80, 0.3);
}

/* ===== 文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.article-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.article-card-img {
  width: 260px;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

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

.article-card-img-wrap {
  overflow: hidden;
  flex-shrink: 0;
}

.article-card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.article-cat-tag {
  display: inline-block;
  padding: 3px 12px;
  background: var(--gold);
  color: #fff;
  font-size: 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.article-date {
  font-size: 0.8rem;
  color: #999;
}

.article-card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-summary {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-source {
  font-size: 0.78rem;
  color: #aaa;
}

.article-read-more {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.article-card:hover .article-read-more {
  gap: 8px;
}

/* ===== 分页 ===== */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: #555;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover,
.page-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 侧边栏 ===== */
.blog-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.widget-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  position: relative;
}

.search-box {
  display: flex;
  gap: 8px;
}

.search-input {
  width: 100%;
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: 'Noto Sans SC', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  color: #333;
}

.search-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.search-btn {
  padding: 9px 16px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-btn:hover {
  background: #b8960a;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-list a {
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-list a::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-list a:hover {
  color: var(--gold);
}

.cat-count {
  font-size: 0.78rem;
  color: #aaa;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 12px;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-list li a {
  text-decoration: none;
  color: #444;
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.recent-list li a::before {
  content: '';
  width: 3px;
  height: 3px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

.recent-list li a:hover {
  color: var(--gold);
}

.recent-date {
  font-size: 0.75rem;
  color: #bbb;
  margin-top: 3px;
}

.sidebar-cta {
  background: linear-gradient(135deg, #1a1208 0%, #2d2010 100%);
  color: #fff;
}

.sidebar-cta .widget-title {
  color: var(--gold);
  border-bottom-color: rgba(196, 160, 80, 0.3);
}

.sidebar-cta p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
  line-height: 1.6;
}

.sidebar-phone {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  margin-bottom: 12px;
}

.btn-gold-sm {
  display: inline-block;
  padding: 10px 24px;
  background: var(--gold);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.btn-gold-sm:hover {
  background: #b8960a;
  transform: translateY(-1px);
}

/* ===== 文章详情页 ===== */
.article-page {
  padding: 60px 0 80px;
  background: #f7f5f0;
  /* top-bar是普通文档流(40px)，main-header是fixed(top=40px,高=80px)
     所以只需要偏移 header高度即可 */
  margin-top: var(--header-height);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.article-body {
  background: #fff;
  border-radius: 12px;
  padding: 48px 52px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eee;
}

.article-cat-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--gold);
  color: #fff;
  font-size: 0.8rem;
  border-radius: 20px;
  margin-bottom: 14px;
  font-weight: 500;
}

.article-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #111;
  line-height: 1.5;
  margin-bottom: 16px;
}

.article-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-info-item {
  font-size: 0.85rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-cover {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 36px;
  display: block;
}

.article-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #333;
}

.article-text p {
  margin-bottom: 1.4em;
}

.article-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2em 0 0.8em;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
}

.article-text blockquote {
  background: #fdf9ee;
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  margin: 1.5em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: gap;
  gap: 16px;
}

.article-source-link {
  font-size: 0.85rem;
  color: #aaa;
}

.article-source-link a {
  color: var(--gold);
  text-decoration: none;
}

.article-source-link a:hover {
  text-decoration: underline;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #999;
}

.share-btn {
  padding: 6px 16px;
  border: 1.5px solid #ddd;
  background: #fff;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.share-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* 文章导航 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.article-nav-item {
  background: #f7f5f0;
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, transform 0.2s;
  display: block;
}

.article-nav-item:hover {
  background: #f0ebe0;
  transform: translateY(-2px);
}

.article-nav-label {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-nav-title {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-nav-item.next {
  text-align: right;
}

.article-nav-item.next .article-nav-label {
  justify-content: flex-end;
}

/* 加载动画 */
.article-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: #999;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0e8d0;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 文章侧边栏 */
.article-sidebar {
  top: 100px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {

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

  .blog-sidebar,
  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .sidebar-cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .page-banner {
    height: 220px;
  }

  .blog-main,
  .article-page {
    padding: 36px 0 60px;
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .article-card-img {
    width: 100%;
    height: 200px;
  }

  .article-card-body {
    padding: 18px 20px;
  }

  .article-body {
    padding: 28px 20px;
  }

  .article-cover {
    height: 220px;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .blog-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  .article-title {
    font-size: 1.3rem;
  }
}


/* 悬浮按钮（博客页） */
.float-btns {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary, #c9a84c);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  font-size: 11px;
  gap: 3px;
  position: relative;
}

.float-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.float-phone {
  background: #2ecc71;
}

.float-wechat {
  background: #07c160;
}

.float-consult {
  background: var(--primary, #c9a84c);
}

.float-qr-popup {
  display: none;
  position: absolute;
  right: 70px;
  bottom: 0;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  width: 164px;
}

.float-wechat:hover .float-qr-popup {
  display: block;
}

.float-qr-popup p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #666;
}