/* ==========================================
   China FAQ Page — Custom CSS
   Hugo + Bulma + Pure CSS
   ========================================== */

/* ==========================================
   1. Global Settings
   ========================================== */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #faf8f5;
  color: #1a1a1a;
  font-weight: 400;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* 自定义辅助字号：14px (比 is-size-6 小，比 is-size-7 大，完美适配卡片和描述文字) */
.is-size-sm {
  font-size: 0.875rem !important;
}
/* ==========================================
   2. Navigation
   ========================================== */
.navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.has-shadow {
  background-color: rgba(250, 248, 245, 0.97) !important;
  backdrop-filter: blur(10px);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e73829;
  letter-spacing: -0.02em;
  padding-right: 2rem;
}

.navbar-start .navbar-item {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* 导航栏激活状态 (Active) 与悬停优化 */
.navbar-start .navbar-item.is-active {
  color: #8b1a1a !important; 
  font-weight: 600;          
  background-color: transparent !important; 
}

.navbar-start .navbar-item:hover {
  color: #8b1a1a !important; 
  background-color: transparent !important; 
}

.nav-search .input {
  border-radius: 4px 0 0 4px;
  border-color: #dbdbdb;
  font-size: 0.875rem;
}

.nav-search .input:focus {
  border-color: #8b1a1a;
  box-shadow: 0 0 0 2px rgba(139, 26, 26, 0.1);
}

.nav-search .button {
  border-radius: 0 4px 4px 0;
}

/* ==========================================
   3. Hero Section
   ========================================== */
.ccg-hero {
  background: linear-gradient(180deg, #e8e0d1 0%, #faf8f5 100%);
  padding-top: 0;
  padding-bottom: 3.5rem;
  position: relative;
}

.hero-deco {
  position: absolute;
  pointer-events: none;
}

.hero-wave {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  opacity: 0.8;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.ccg-hero .hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  letter-spacing: -0.03em;
}

.ccg-hero .hero-subtitle {
  font-size: 1.125rem;
  color: #4a4a4a;
  max-width: 560px;
  margin: 1rem auto 2rem;
  font-weight: 400;
}

/* Hero 正文说明中的链接（如 Directory 页顶部） */
.ccg-hero .content a {
  color: #8b1a1a;
  text-decoration: none;
  text-underline-offset: 2px;
}

.ccg-hero .content a:hover {
  color: #6d1515;
}

.hero-search {
  max-width: 540px;
  margin: 0 auto;
}

.hero-search .input {
  border-color: #dbdbdb;
  font-size: 1rem;
}

.hero-search .input:focus {
  border-color: #1a1a1a;
  box-shadow: none;
}

.hero-search .button {
  background-color: #1a1a1a;
  color: #faf8f5;
  border-color: #1a1a1a;
}

.hero-search .button:hover {
  background-color: #424242;
}

/* ==========================================
   4. Component Blocks
   ========================================== */
/* Quick Nav */
.hero-quick-nav {
  margin-top: 2.5rem;
}

.quick-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.quick-nav-link {
  display: inline-block;
  padding: 0.375rem 1rem;
  border: 1px solid #dbdbdb;
  border-radius: 100px;
  color: #4a4a4a;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-nav-link:hover {
  border-color: #8b1a1a;
  color: #8b1a1a;
  background-color: rgba(139, 26, 26, 0.04);
}

/* Announcement */
.announcement-bar {
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
}

.announcement-bar a {
  color: #8b1a1a;
  text-decoration: underline;
}

.announcement-bar a:hover {
  color: #6d1515;
}

/* Section Layouts */
.triple-column-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* 栏目标签：消除隐形下沉空间，修复错位 */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7a7a7a;
  margin-bottom: 1.5rem !important; 
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #1a1a1a;
  display: block !important; 
  width: max-content !important; 
}

/* 强制清除栏目标签下方紧跟元素的自带外边距 */
.deep-dive-card,
.topic-mini-nav,
.featured-card {
  margin-top: 0 !important;
}

/* Topic Mini Nav */
.topic-mini-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.topic-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid #e0d8ce;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #4a4a4a;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.topic-mini-link:hover {
  border-color: #8b1a1a;
  color: #8b1a1a;
  background-color: rgba(139, 26, 26, 0.04);
}

/* ==========================================
   5. Cards (Deep Dive, Featured, Resources)
   ========================================== */
/* 图片统一比例锁定 */
.deep-dive-card .card-image img,
.featured-card .card-image img {
  width: 100%;
  aspect-ratio: 3 / 2; 
  object-fit: cover;   
  border-radius: 4px;
  display: block;
}

.deep-dive-card {
  border: none;
  box-shadow: none;
  background: transparent;
}

.deep-dive-card .card-image {
  border-radius: 4px;
  overflow: hidden;
}

.deep-dive-card .card-image img {
  transition: transform 0.4s ease;
}

.deep-dive-card .card-image:hover img {
  transform: scale(1.03);
}

.deep-dive-card .card-content {
  padding: 1.25rem 0;
}

.deep-dive-card .section-tag {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.deep-dive-card .title a,
.featured-card .title a {
  color: #1a1a1a;
  text-decoration: none;
}

.deep-dive-card .title a:hover,
.featured-card .title a:hover {
  color: #8b1a1a;
}

.deep-dive-card .content-meta {
  font-size: 0.8125rem;
  color: #7a7a7a;
}

.deep-dive-card .summary {
  font-size: 0.9375rem;
  color: #4a4a4a;
  line-height: 1.6;
  margin: 0.75rem 0;
}

.deep-dive-card .read-more {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.deep-dive-card .read-more:hover {
  border-bottom-color: #8b1a1a;
  color: #8b1a1a;
}

.featured-card {
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
}

.featured-card .card-image figure {
  margin: 0;
}

.featured-card .card-image img {
  border-radius: 4px 4px 0 0;
}

.featured-card .card-content {
  padding: 1rem;
}

.featured-card .title {
  font-size: 1.1rem;
  line-height: 1.3;
}

/* Resources Section */
.resources-section {
  background: linear-gradient(180deg, #f5f0e8 0%, #faf8f5 100%);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.resources-section .column {
  display: flex;
}

.resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%; 
  padding: 1rem .15rem;
  text-decoration: none;
  color: #1a1a1a;
  border-radius: 8px;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent; 
}

.resource-card:hover {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06); 
  transform: translateY(-4px); 
  border-color: #ebe7e0; 
}

.resource-card .resource-icon {
  font-size: 1.1rem; 
  line-height: 1;
  margin-bottom: 0.65rem; 
  transition: transform 0.3s ease;
}

.resource-card:hover .resource-icon {
  transform: scale(1.1);
}

.resource-card h4 {
  color: #1a1a1a;
  font-weight: 600; 
}

.resource-card p {
  color: #7a7a7a;
  margin-top: -0.75rem;
  line-height: 1.4;
  max-width: 96%; 
}

/* Nav Cards (Directory Link Cards) */
.nav-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #ebe7e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.nav-card .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-card .content {
  flex-grow: 1;
}

.nav-card .button {
  margin-top: auto;
  align-self: flex-start;
}

.nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Category Grid Cards */
.guide-card .card-image img {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: 4px 4px 0 0;
}

.guide-card .title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.guide-card .title a:hover {
  color: #8b1a1a; 
}

.category-item-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #ebe7e0; 
  box-shadow: none; 
}

.category-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: transparent;
}

.category-item-card .card-content {
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.category-item-card .title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}

.category-item-card .title a:hover {
  color: #8b1a1a;
}

.category-item-card .content {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem !important; 
}

.category-item-card .card-content > a {
  margin-top: auto; 
  color: #8b1a1a;
  display: inline-block;
  align-self: flex-start;
  transition: all 0.2s ease;
}

.category-item-card .card-content > a:hover {
  color: #6d1515;
  transform: translateX(4px);
}

/* ==========================================
   6. Lists & Articles Layout
   ========================================== */
/* Trending List */
.trending-list .trending-item {
  padding: 0.875rem 0;
  border-bottom: 1px solid #eee;
}

.trending-list .trending-item:last-of-type {
  border-bottom: none;
}

.trending-list .trending-item .media-left {
  margin-right: 0.875rem;
}

.trending-list .trending-item .media-left img {
  object-fit: cover;
  border-radius: 4px;
}

.trending-list .trending-item .title a {
  color: #1a1a1a;
  text-decoration: none;
}

.trending-list .trending-item .title a:hover {
  color: #8b1a1a;
}

.trending-list .trending-item .content-meta {
  color: #7a7a7a;
}

.trending-list .media + .media {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* Quick Take Box */
.quick-take-box {
  background-color: #fdfbf7 !important; 
  border: 1px solid #eaddd3; 
  border-left: 4px solid #8b1a1a; 
  border-radius: 4px; 
  padding: 1.5rem;
  color: #3a352e;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02); 
}

.quick-take-box .title {
  color: #8b1a1a;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.quick-take-list {
  list-style: none; 
  margin: 0 !important;
  padding: 0 !important;
}

.quick-take-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.quick-take-list li:last-child {
  margin-bottom: 0;
}

.quick-take-list li::before {
  content: "•";
  color: #c8bba8; 
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -4px; 
}

/* Article Body */
.article-body a,
.article-content a {
  color: #8b1a1a; 
  text-decoration: none;
  text-underline-offset: 3px; 
  text-decoration-thickness: 1px;
  transition: all 0.2s ease;
}

.article-body a:hover,
.article-content a:hover {
  color: #6d1515;
  text-decoration: underline;
  background-color: rgba(139, 26, 26, 0.05); 
}

.article-body h2 {
  margin-top: 2.5rem !important; 
  margin-bottom: 1.25rem !important;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

.article-body h3 {
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2a2520;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

.article-body th {
  background-color: #f5f0e8; 
  border-bottom: 2px solid #c8bba8;
  padding: 0.875rem 1rem;
  text-align: left;
  color: #2a2520;
  font-weight: 600;
}

.article-body td {
  border-bottom: 1px solid #ebe7e0;
  padding: 0.875rem 1rem;
  color: #4a4a4a;
}

.article-body tbody tr:hover {
  background-color: #faf8f5; 
}

/* Article Featured Image & Tags */
.article-hero-image {
  position: relative; 
  overflow: hidden;
  border-radius: 6px; 
}

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

.article-image-tags {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  z-index: 10;
  padding-right: 1.5rem; 
}

.custom-overlay-tag {
  background-color: rgba(255, 255, 255, 0.85) !important;
  color: #2a2520 !important;
  font-weight: 500;
  backdrop-filter: blur(4px); 
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
  transition: all 0.2s ease;
  margin-bottom: 0.5rem !important; 
}

.custom-overlay-tag:hover {
  background-color: #8b1a1a !important;
  color: #ffffff !important;
  border-color: #8b1a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 26, 26, 0.2);
}

/* Sidebars & Menus */
.toc-sidebar {
  padding-left: 0;
}

.toc-sidebar ul {
  list-style: none;
  padding-left: 0;
}

.toc-sidebar ul li::before {
  content: "›";
  color: #999;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.toc-sidebar ul li {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.toc-sidebar a {
  color: #666;
  text-decoration: none;
}

.toc-sidebar a:hover {
  color: #111;
  text-decoration: underline;
}

aside.column.is-4-desktop,
aside.column.is-3-widescreen {
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  overflow-y: auto;
}

.more-in-section-list {
  list-style: none;
  padding-left: 0;
}

.more-in-section-list li {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.more-in-section-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.more-in-section-list a,
.more-in-section-list a:hover,
.more-in-section-list a:focus {
  color: #444;
  text-decoration: none !important;
}

.more-in-section-list a:hover {
  color: #2563eb;
}

/* Directory Menu (Nav page) */
.directory-menu {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.directory-menu li {
  margin-bottom: 0.5rem;
}

.directory-menu a {
  display: block;
  color: #4a4a4a;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 2px solid transparent; 
  padding-left: 0.75rem;
  transition: all 0.2s ease;
}

.directory-menu a:hover {
  color: #8b1a1a;
  background-color: rgba(139, 26, 26, 0.03);
  border-left-color: #8b1a1a;
}

/* Breadcrumbs */
.breadcrumb a {
  color: #7a7a7a; 
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #8b1a1a; 
}

.breadcrumb li.is-active a {
  color: #1a1a1a; 
  font-weight: 500;
}

.breadcrumb li + li::before {
  color: #b5b5b5; 
}

/* Misc Layouts */
.category-divider {
  margin: 2.5rem 0;
  background-color: #f0f0f0;
  height: 1px;
}

.featured-article-row a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.featured-article-row a:hover {
  color: #8b1a1a;
}

.featured-article-row figure img {
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.featured-article-row:hover figure img {
  transform: scale(1.02);
}

.level-left .title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.level-left .title a:hover {
  color: #8b1a1a;
}

/* ==========================================
   7. High Contrast Light Footer
   ========================================== */
footer.ccg-footer,
.footer.ccg-footer {
  background-color: #f2ece5 !important;
  border-top: 1px solid #e5dac7;
  color: #3a352e;
  padding: 4rem 1.5rem 2rem;
  position: relative;
  overflow: hidden; 
}

.ccg-footer .container {
  position: relative;
  z-index: 1;
}

.footer-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.footer-pattern path {
  stroke: #d5c8b5 !important; 
  opacity: 0.3 !important;
}

.ccg-footer .title {
  color: #1a1a1a !important;
  font-size: 1.125rem;
}

.ccg-footer p,
.ccg-footer .tagline,
.ccg-footer .opacity-80 {
  color: #4a4a4a !important;
  opacity: 1 !important;
}

.ccg-footer .tagline {
  font-style: italic;
  font-weight: 500;
}

.ccg-footer a {
  color: #3a352e !important;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.ccg-footer a:hover {
  color: #8b1a1a !important;
}

.ccg-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ccg-footer .footer-links li {
  margin-bottom: 0.5rem;
}

.ccg-footer .footer-subscribe .input {
  background-color: rgba(255, 255, 255, 0.85);
  border-color: #a89880;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.ccg-footer .footer-subscribe .input:focus {
  background-color: #ffffff;
  border-color: #1a1a1a;
  box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

.ccg-footer .footer-subscribe .input::placeholder {
  color: #7a6e5f;
}

.ccg-footer .footer-subscribe .button {
  background-color: #2a2520;
  color: #faf8f5;
  border-color: #2a2520;
  font-weight: 600;
  transition: all 0.2s ease;
}

.ccg-footer .footer-subscribe .button:hover {
  background-color: #8b1a1a;
  border-color: #8b1a1a;
}

.ccg-footer .footer-divider {
  border-color: #e0d5c1 !important;
  margin: 2rem 0 1.5rem;
}

/* ==========================================
   8. Back to Top Button
   ========================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: #1a1a1a;
  color: #faf8f5 !important;
  border: 2px solid #faf8f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #8b1a1a;
  border-color: #faf8f5;
  transform: translateY(-2px);
}

/* ==========================================
   9. Responsive Adjustments
   ========================================== */
@media (max-width: 768px) {
  .ccg-hero {
    padding-top: 5rem;
    padding-bottom: 2.5rem;
  }

  .ccg-hero .hero-title {
    font-size: 2rem;
  }

  .quick-nav-list {
    gap: 0.375rem;
  }

  .quick-nav-link {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
  }

  .triple-column-section .column + .column {
    margin-top: 2rem;
  }
}
/* ==========================================
   10. Pre-Footer CTA (压轴引导区)
   ========================================== */

.pre-footer-cta {
  /* 修复晃眼：将条纹宽度从 10px 放大到 40px，并极大降低了两个颜色的对比度 */
  background-image: repeating-linear-gradient(
    45deg,
    #fdfbf7,
    #fdfbf7 40px,
    #faf6ee 40px,
    #faf6ee 80px
  );
  box-shadow: 0 4px 20px rgba(0,0,0,0.02); 
}

/* 引导按钮悬停效果 */
.pre-footer-cta .button.is-dark:hover {
  background-color: #8b1a1a !important; 
}

.pre-footer-cta .button.is-white:hover {
  border-color: #8b1a1a !important;
  color: #8b1a1a !important;
  background-color: #ffffff !important;
}

/* 下方微型文本卡片悬停效果 */
.pre-footer-wrapper .box {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pre-footer-wrapper .box:hover {
  transform: translateY(-2px);
  border-color: #8b1a1a !important;
}