/*
Theme Name: Google Ads CN
Theme URI: https://www.google-ads-cn.com/
Author: GoogleAds
Description: 谷歌广告指南 - Google Ads投放方式、开户推广与优化技巧
Version: 2.0
Text Domain: googleads
*/

/* Base container override */
.container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Navigation shadow on scroll */
.nav-shadow {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Hero gradient overlay */
.hero-gradient-bg {
  background: radial-gradient(circle at top right, rgba(37,99,235,0.18), transparent 34%);
}

/* Pain point card hover */
.pain-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.pain-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Step card number */
.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Chart mockup bars animation */
@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
.chart-bar {
  transform-origin: bottom;
  animation: growBar 0.8s ease-out forwards;
}

/* Accordion effect */
.accordion-item .accordion-body {
  max-height: 0;
  transition: max-height 0.3s ease;
}
.accordion-item.open .accordion-body {
  max-height: 120px;
}
.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-item button:hover .accordion-chevron {
  color: #2563eb;
}

/* Service card hover shine */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s;
  pointer-events: none;
}
.service-card:hover::before {
  left: 100%;
}

/* Blog card hover */
.blog-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* Archive page styles */
.archive-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Single article TOC */
.toc-link {
  transition: color 0.2s, border-color 0.2s;
}
.toc-link.active {
  color: #2563eb;
  border-left-color: #2563eb;
}

/* Article content styles */
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #0f172a;
}
.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1e293b;
}
.article-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #475569;
}
.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  color: #475569;
}
.article-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}
.article-content a {
  color: #2563eb;
  text-decoration: underline;
}
.article-content blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #64748b;
  font-style: italic;
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-menu.open {
  max-height: 500px;
}

/* Pagination */
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  margin: 0 4px;
  font-weight: 500;
  transition: all 0.2s;
}
.pagination a:hover {
  background: #eff6ff;
  color: #2563eb;
}
.pagination .current {
  background: #2563eb;
  color: white;
}

/* ===== 文章内容增强排版 v3.0 ===== */

/* 表格样式 */
.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.article-content thead {
  background: linear-gradient(135deg, #1e40af, #2563eb);
}
.article-content thead th {
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1rem;
  text-align: left;
  border: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.article-content tbody tr {
  transition: background 0.15s;
}
.article-content tbody tr:nth-child(even) {
  background: #f8fafc;
}
.article-content tbody tr:hover {
  background: #eff6ff;
}
.article-content tbody td {
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  vertical-align: top;
}
.article-content tbody td:first-child {
  font-weight: 600;
  color: #0f172a;
}

/* H2 标题增强 */
.article-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-top: 2.8rem;
  margin-bottom: 1rem;
  color: #0f172a;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid #2563eb;
  position: relative;
  letter-spacing: -0.01em;
}

/* H3 标题增强 */
.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: #1e293b;
  padding-left: 0.85rem;
  border-left: 4px solid #3b82f6;
}

/* H4 标题 */
.article-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #334155;
}

/* 段落增强 */
.article-content p {
  margin-bottom: 1.15rem;
  line-height: 1.85;
  color: #374151;
  font-size: 1rem;
}

/* 列表增强 */
.article-content ul {
  margin: 0.8rem 0 1.5rem;
  padding-left: 0;
  list-style: none;
}
.article-content ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  line-height: 1.75;
  color: #374151;
}
.article-content ul li::before {
  content: ;
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
}
.article-content ol {
  margin: 0.8rem 0 1.5rem;
  padding-left: 1.6rem;
  counter-reset: ol-counter;
  list-style: none;
}
.article-content ol li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 0.65rem;
  line-height: 1.75;
  color: #374151;
  counter-increment: ol-counter;
}
.article-content ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: -1.6rem;
  top: 0.15em;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* strong 加粗增强 */
.article-content strong {
  color: #0f172a;
  font-weight: 700;
}

/* 引用块增强 */
.article-content blockquote {
  border-left: 4px solid #2563eb;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: #f0f7ff;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #334155;
  font-style: normal;
}
.article-content blockquote p {
  margin-bottom: 0.5rem;
  color: #334155;
}

/* 链接增强 */
.article-content a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.article-content a:hover {
  color: #1d4ed8;
  border-bottom-color: #2563eb;
}

/* 代码块 */
.article-content code {
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-size: 0.88em;
  color: #e11d48;
  font-family: Menlo, Monaco, monospace;
}

/* 图片增强 */
.article-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  max-width: 100%;
  height: auto;
}

/* 截图占位提示美化 */
.article-content p:has(> em:only-child),
.article-content p:only-child {
  /* 截图占位符样式由内容决定 */
}

/* 提示框 / CTA 卡片 */
.article-content .bg-blue-50,
.article-content div[class*="bg-blue"] {
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.article-content .bg-neutral-900,
.article-content div[class*="bg-neutral-900"] {
  border-radius: 0.75rem;
  margin: 2rem 0;
}

/* 首段突出显示 */
.article-content > p:first-child {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #334155;
}

/* 分隔效果 — H2 前留白 */
.article-content h2:not(:first-child) {
  margin-top: 3rem;
}

/* 嵌套列表缩进 */
.article-content ul ul,
.article-content ol ul,
.article-content ul ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
}

/* 表格响应式 */
@media (max-width: 768px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.82rem;
  }
  .article-content thead th,
  .article-content tbody td {
    padding: 0.6rem 0.75rem;
    min-width: 100px;
  }
  .article-content h2 {
    font-size: 1.35rem;
  }
  .article-content h3 {
    font-size: 1.1rem;
  }
}

/* ===== 文章内容排版结束 ===== */
