/* ==========================================
   AI搜索推广博客 - UETC简洁风格
   设计原则：少色、留白、克制、专业
   ========================================== */

:root {
    --primary: #1a1a2e;
    --accent: #2c3e6b;
    --link: #3a5a9f;
    --white: #fff;
    --bg: #f5f6f8;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --border: #e5e7eb;
    --card-shadow: 0 1px 4px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
}

/* ========== 基础 ========== */
body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #4a4a4a;
    background-color: #f5f6f8;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent);
    text-decoration: none;
}

img { max-width: 100%; height: auto; }

/* ========== 导航栏 ========== */
.navbar {
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.navbar-brand img { height: 40px; }
.navbar-light .navbar-nav .nav-link {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}
.navbar-light .navbar-nav .nav-link:hover { color: var(--link); }
.navbar-light .navbar-nav .active .nav-link { color: var(--link); }

/* ========== 面包屑 ========== */
.breadcrumb-section {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}
.breadcrumb {
    background: transparent;
    padding: 0; margin: 0;
    font-size: 0.85rem;
}
.breadcrumb-item a { color: var(--gray); font-weight: 500; }
.breadcrumb-item a:hover { color: var(--link); }
.breadcrumb-item.active { color: #333; font-weight: 400; }
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1;
}

/* ========== 页面标题区 ========== */
.page-header-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}
.page-header-inner {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 2.5rem 2rem;
}
.page-main-title {
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}
.page-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 0.98rem;
    max-width: 800px;
    line-height: 1.8;
    margin-bottom: 0;
}

/* ========== 主体内容区 ========== */
.main-content-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ========== 文章卡片 ========== */
.article-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}
.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}
.article-thumb {
    height: 100%;
    object-fit: cover;
    min-height: 200px;
    border-radius: 8px 0 0 8px;
}
@media (max-width: 767px) {
    .article-thumb {
        border-radius: 8px 8px 0 0;
        max-height: 200px;
    }
}
.article-card .card-body { padding: 1.25rem 1.5rem; }

.article-card .badge {
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    background: #e8ecf1;
    color: #555;
    text-transform: none;
    letter-spacing: 0;
}

.article-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.article-title a { color: #1a1a2e; }
.article-title a:hover { color: var(--link); }

.article-excerpt {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: #999;
}
.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* ========== 分页 ========== */
.pagination-wrapper { margin-top: 2rem; }
.pagination .page-link {
    color: #333;
    font-weight: 600;
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    margin: 0 2px;
    border-radius: 4px;
}
.pagination .page-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    color: #ccc;
    pointer-events: none;
}

/* ========== 侧边栏 ========== */
.sidebar {
    position: sticky;
    top: 80px;
}
.sidebar-card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    background: #fff;
}
.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* 热门文章列表 */
.hot-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hot-article-item {
    display: flex;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.hot-article-item:last-child { border-bottom: none; }
.hot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    background: #f3f4f6;
    flex-shrink: 0;
}
.hot-article-item a {
    color: #555;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    min-width: 180px;
}
.hot-article-item a:hover { color: var(--link); }
.hot-views {
    font-size: 0.72rem;
    color: #bbb;
    width: 100%;
    margin-left: 24px;
}

/* 最新文章列表（详情页用） */
.latest-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.latest-article-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.latest-article-item:last-child { border-bottom: none; }
.latest-article-item a {
    display: block;
    color: #555;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 0.2rem;
}
.latest-article-item a:hover { color: var(--link); }
.latest-article-date {
    font-size: 0.72rem;
    color: #bbb;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #f3f4f6;
    color: #666;
    border-radius: 3px;
    font-size: 0.78rem;
    font-weight: 600;
}
.tag-badge:hover {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
}

/* ========== GEO FAQ ========== */
.geo-faq-section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}
.geo-faq-section .section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
}
.faq-card {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
}
.faq-card .card-header {
    background: #fafafa;
    border-bottom: none;
    padding: 0;
}
.faq-card .btn-link {
    color: #333;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
    text-decoration: none;
    padding: 0.75rem 1rem;
    width: 100%;
}
.faq-card .btn-link:hover { color: var(--link); text-decoration: none; }
.faq-card .btn-link::after {
    content: '▾';
    float: right;
    font-size: 0.75rem;
}
.faq-card .btn-link.collapsed::after { transform: rotate(-90deg); }
.faq-card .card-body {
    padding: 1rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
}
.faq-card .card-body p { margin-bottom: 0; }

/* ========== Footer — 单色简洁 ========== */
.footer-simple {
    background: #1a1a2e;
    color: rgba(255,255,255,0.75);
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}
.footer-simple .heading {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.footer-simple .list-unstyled li {
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}
.footer-link {
    color: rgba(255,255,255,0.65) !important;
    font-size: 0.85rem;
}
.footer-link:hover { color: #fff !important; }
.footer-simple .divider {
    border-top: 1px solid rgba(255,255,255,0.12);
}
.copyright {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
}
.copyright a { color: rgba(255,255,255,0.7); }
.copyright a:hover { color: #fff; }

/* ========== 按钮 ========== */
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
    border-radius: 4px;
    padding: 0.45rem 1rem;
}
.btn-primary:hover {
    background: #1e3050;
    border-color: #1e3050;
}

/* ========== 文章详情页 ========== */
.article-detail-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}
.article-detail-card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    background: #fff;
    padding: 2.5rem;
}
@media (max-width: 767px) {
    .article-detail-card { padding: 1.25rem; }
}

.article-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.article-detail-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}
@media (max-width: 767px) {
    .article-detail-title { font-size: 1.4rem; }
}

/* 文章meta — 分类和作者使用普通文字颜色 */
.article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #999;
    align-items: center;
}
.article-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
/* 修复：详情页meta中的链接使用普通灰色，不是蓝色 */
.article-detail-meta a {
    color: #666;
    font-weight: 500;
}
.article-detail-meta a:hover {
    color: var(--link);
}

.article-featured-image {
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* 文章正文 */
.article-body {
    font-size: 1.02rem;
    line-height: 2;
    color: #4a4a4a;
}
.article-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.article-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body ul,
.article-body ol {
    margin-bottom: 1.1rem;
    padding-left: 1.4rem;
}
.article-body li { margin-bottom: 0.4rem; }
.article-body blockquote {
    background: #f9fafb;
    border-left: 3px solid #ccc;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 4px 4px 0;
    color: #666;
    font-style: italic;
}
.article-body strong { color: #333; }
.article-body table {
    width: 100%;
    margin-bottom: 1.1rem;
    border-collapse: collapse;
}
.article-body table th,
.article-body table td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-size: 0.92rem;
}
.article-body table th {
    background: #fafafa;
    font-weight: 700;
    color: #333;
}

/* 文章标签 */
.article-tags {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.article-tags .tags-label {
    font-weight: 700;
    color: #333;
    margin-right: 0.3rem;
    font-size: 0.85rem;
}

/* 上/下篇导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}
.article-nav a {
    font-weight: 600;
    color: var(--link);
    font-size: 0.9rem;
}
.article-nav .nav-prev,
.article-nav .nav-next { max-width: 48%; }

/* 相关文章 */
.related-articles { margin-top: 1.5rem; }
.related-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 0.6rem;
}
.related-item:last-child { border-bottom: none; }
.related-item a {
    color: #555;
    font-weight: 600;
    font-size: 0.88rem;
    flex: 1;
}
.related-item a:hover { color: var(--link); }

/* ========== 响应式 ========== */
@media (max-width: 991px) {
    .sidebar {
        position: static;
        margin-top: 2rem;
    }
    .page-main-title { font-size: 1.6rem; }
    .geo-faq-section { padding: 1.25rem; }
}

/* 手机端隐藏 */
@media (max-width: 767px) {
    .page-main-title { font-size: 1.4rem; }
    .page-header-section {
        padding-top: 1.8rem;
        padding-bottom: 1.8rem;
    }
    .page-subtitle { font-size: 0.9rem; }
    .article-title { font-size: 1rem; }
    .article-meta { gap: 0.5rem; font-size: 0.75rem; }
    .navbar-brand img { height: 30px; }

    /* 手机端：隐藏侧边栏、文章标签、相关文章 */
    .hide-on-mobile { display: none !important; }
}

/* ========== 打印 ========== */
@media print {
    .navbar, .breadcrumb-section, .sidebar, .pagination-wrapper,
    footer, .article-nav, .article-tags, .related-articles { display: none !important; }
    .article-detail-card { box-shadow: none; padding: 0; }
}

/* ========== 通用 ========== */
.slice { position: relative; }
.bg-white { background-color: #fff !important; }

/* ========== Organization Schema 可见品牌信息 ========== */
.org-schema-visible {
    display: none;
}
