/*
Theme Name: CN Gold Trade 国内正规黄金交易平台主题
Theme URI: https://www.example.com/cn-gold-trade
Author: Lingfeng Studio
Author URI: https://www.example.com
Description: 围绕核心关键词"国内正规黄金交易平台"布局的黄金交易合规科普企业站主题。采用 Bootstrap 5 栅格 + 深色导航风格，首页八大板块完整复刻，内置 TDK / Open Graph / Twitter Card / JSON-LD 结构化数据 / llms.txt / robots.txt 等 SEO 与 AI 友好能力，支持一键导入演示内容（8 个分类、14 个页面、24 篇围绕核心关键词的原创文章）。
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cn-gold-trade
Tags: business, blog, right-sidebar, custom-menu, custom-logo, featured-images, translation-ready, sticky-post, threaded-comments
*/

/* ==========================================================================
   0. 设计变量（主色 #1e73be）
   ========================================================================== */
:root {
    --cgold-primary: #1e73be;
    --cgold-primary-dark: #175a95;
    --cgold-primary-light: #e9f2fa;
    --cgold-primary-border: #cfe2f2;
    --cgold-dark: #111111;
    --cgold-darkest: #0a0a0a;
    --cgold-line: #e5e7eb;
    --cgold-muted: #6b7280;
    --cgold-radius: 8px;
}

/* ==========================================================================
   1. 基础版式（复刻参考站）
   ========================================================================== */
body {
    font-family: "Segoe UI", "Microsoft YaHei", Arial;
    background: #fff;
    color: #222;
    line-height: 1.6;
}
a { color: var(--cgold-primary); text-decoration: none; }
a:hover { color: var(--cgold-primary-dark); }
img { max-width: 100%; height: auto; }

/* Bootstrap 主按钮换成本站主色 */
.btn-primary {
    background-color: var(--cgold-primary);
    border-color: var(--cgold-primary);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--cgold-primary-dark);
    border-color: var(--cgold-primary-dark);
}
.btn-check:focus + .btn-primary,
.btn-primary:focus {
    box-shadow: 0 0 0 .25rem rgba(30, 115, 190, .35);
}

/* ==========================================================================
   2. 顶部导航（深色 · 复刻参考站结构）
   ========================================================================== */
.navbar {
    background: var(--cgold-dark);
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.navbar-brand {
    color: var(--cgold-primary) !important;
    font-weight: bold;
    font-size: 22px;
}
.navbar-nav .nav-link {
    color: #ccc;
    font-weight: 500;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .current-menu-item > .nav-link,
.navbar-nav .current_page_item > .nav-link,
.navbar-nav .current-menu-parent > .nav-link,
.navbar-nav .current-menu-ancestor > .nav-link,
.navbar-nav .current_page_parent > .nav-link,
.navbar-nav .active > .nav-link {
    color: #fff;
}
/* 二级菜单样式 */
.dropdown-menu {
    background-color: #222;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
    margin-top: 0;
}
.dropdown-item {
    color: #ccc;
    padding: 10px 20px;
    border-bottom: 1px solid #333;
    white-space: normal;
}
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-menu .current-menu-item > .dropdown-item {
    background-color: var(--cgold-primary);
    color: #fff;
}
.dropdown-toggle::after {
    margin-left: 0.5em;
}
.navbar-toggler {
    border-color: rgba(255, 255, 255, .25);
}
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .15); }

/* ==========================================================================
   3. 首屏 Hero（深色 · 复刻参考站）
   ========================================================================== */
.hero-section {
    background: var(--cgold-darkest);
    color: #fff;
    padding: 100px 0;
}
.hero-section h1 { color: #fff; }
.hero-section .lead { color: #cfd6dd; }

/* ==========================================================================
   4. 板块标题与卡片（复刻参考站）
   ========================================================================== */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
    font-weight: bold;
    font-size: 26px;
}
.btn-outline-primary {
    border-color: var(--cgold-dark);
    color: var(--cgold-dark);
    font-weight: bold;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--cgold-dark);
    color: #fff;
    border-color: var(--cgold-dark);
}
.product-card,
.feature-card {
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .05);
    margin-bottom: 30px;
    padding: 20px;
    border-radius: var(--cgold-radius);
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease;
}
.product-card:hover,
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(30, 115, 190, .15);
}
.product-card h4,
.feature-card h5 { color: #111; }
.feature-card p,
.product-card p { color: #4b5563; }
.accordion-button:focus {
    box-shadow: none;
}
.accordion-button:not(.collapsed) {
    color: var(--cgold-primary-dark);
    background-color: var(--cgold-primary-light);
}

/* 图标容器（替代 Bootstrap Icons 字体，零外部依赖） */
.cgold-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--cgold-primary-light);
    color: var(--cgold-primary);
    line-height: 1;
}
.cgold-ico svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cgold-ico-sm { width: 44px; height: 44px; border-radius: 12px; }
.cgold-ico-sm svg { width: 22px; height: 22px; }

/* ==========================================================================
   5. 页脚（复刻参考站）
   ========================================================================== */
.footer {
    background: var(--cgold-dark);
    color: #ccc;
    padding: 60px 0;
}
.footer a {
    color: #ccc;
    text-decoration: none;
}
.footer a:hover { color: #fff; }
.footer h5 { color: #fff; }

/* ==========================================================================
   6. WordPress 内容区扩展（保持同一视觉语言）
   ========================================================================== */
.cgold-main { padding: 56px 0; }
.cgold-breadcrumb {
    background: #f6f8fa;
    border-bottom: 1px solid var(--cgold-line);
    padding: 12px 0;
    font-size: 14px;
    color: var(--cgold-muted);
}
.cgold-breadcrumb a { color: var(--cgold-muted); }
.cgold-breadcrumb a:hover { color: var(--cgold-primary); }
.cgold-breadcrumb .sep { margin: 0 8px; color: #bbb; }

.cgold-page-header { padding: 48px 0 8px; }
.cgold-page-header h1 {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 10px;
}
.cgold-page-header .cgold-lead { color: var(--cgold-muted); margin-bottom: 0; }

.entry-content { font-size: 16px; color: #333; }
.entry-content h2 {
    font-size: 23px;
    font-weight: bold;
    margin: 36px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--cgold-primary);
    line-height: 1.35;
}
.entry-content h3 {
    font-size: 19px;
    font-weight: bold;
    margin: 28px 0 12px;
}
.entry-content p { margin-bottom: 16px; }
.entry-content ul,
.entry-content ol { margin: 0 0 18px 22px; }
.entry-content li { margin-bottom: 8px; }
.entry-content img { border-radius: var(--cgold-radius); }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--cgold-line);
    padding: 10px 12px;
    text-align: left;
}
.entry-content th { background: var(--cgold-primary-light); color: #111; }
.entry-content blockquote {
    border-left: 4px solid var(--cgold-primary);
    background: #f6f8fa;
    padding: 14px 18px;
    margin: 20px 0;
    color: #444;
}
.entry-content a { text-decoration: underline; }

/* 文章元信息 */
.cgold-meta {
    color: var(--cgold-muted);
    font-size: 14px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cgold-line);
}
.cgold-meta span { margin-right: 16px; }
.cgold-tags a {
    display: inline-block;
    background: var(--cgold-primary-light);
    color: var(--cgold-primary-dark);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px;
    margin: 0 6px 6px 0;
}

/* 文章列表卡片 */
.cgold-post-card {
    background: #fff;
    border: 1px solid var(--cgold-line);
    border-radius: var(--cgold-radius);
    overflow: hidden;
    height: 100%;
    margin-bottom: 30px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.cgold-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(30, 115, 190, .15);
}
.cgold-post-card .cgold-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--cgold-primary-light);
    overflow: hidden;
}
.cgold-post-card .cgold-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cgold-post-card .cgold-card-body { padding: 18px 20px 22px; }
.cgold-post-card h3 {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 10px;
}
.cgold-post-card h3 a { color: #111; }
.cgold-post-card h3 a:hover { color: var(--cgold-primary); }
.cgold-post-card p { color: var(--cgold-muted); font-size: 14.5px; margin-bottom: 14px; }
.cgold-post-card .cgold-card-meta {
    font-size: 13px;
    color: #9aa3ad;
    border-top: 1px dashed var(--cgold-line);
    padding-top: 12px;
}
.cgold-cat-badge {
    display: inline-block;
    background: var(--cgold-primary);
    color: #fff !important;
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 10px;
    margin-bottom: 10px;
}

/* 列表页首行大图样式 */
.cgold-post-card.is-featured .cgold-card-body h3 { font-size: 22px; }

/* 侧栏 */
.cgold-sidebar .widget {
    background: #fff;
    border: 1px solid var(--cgold-line);
    border-radius: var(--cgold-radius);
    padding: 22px;
    margin-bottom: 26px;
}
.cgold-sidebar .widget-title {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid var(--cgold-primary);
}
.cgold-sidebar ul { list-style: none; padding: 0; margin: 0; }
.cgold-sidebar ul li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--cgold-line);
    font-size: 14.5px;
}
.cgold-sidebar ul li:last-child { border-bottom: none; }
.cgold-sidebar ul li a { color: #333; }
.cgold-sidebar ul li a:hover { color: var(--cgold-primary); }
.cgold-sidebar .tagcloud a {
    display: inline-block;
    background: #f4f6f8;
    color: #555;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px !important;
    margin: 0 6px 8px 0;
}
.cgold-search-form .form-control { border-radius: 0; }

/* 分页 */
.cgold-pagination { margin: 30px 0 10px; }
.cgold-pagination .page-numbers {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    padding: 8px 12px;
    margin: 0 4px 6px 0;
    border: 1px solid var(--cgold-line);
    border-radius: 4px;
    color: #333;
}
.cgold-pagination .page-numbers.current,
.cgold-pagination .page-numbers:hover {
    background: var(--cgold-primary);
    border-color: var(--cgold-primary);
    color: #fff;
}

/* 评论 */
.cgold-comments { margin-top: 40px; }
.cgold-comments .comment-list { list-style: none; padding: 0; }
.cgold-comments .comment-list li { margin-bottom: 20px; }
.cgold-comments .comment-body {
    background: #f8fafc;
    border: 1px solid var(--cgold-line);
    border-radius: var(--cgold-radius);
    padding: 16px 18px;
}
.cgold-comments .form-control { border-radius: 4px; }

/* 锚点滚动留出导航栏高度 */
.anchor-target,
section[id] { scroll-margin-top: 88px; }

/* 404 */
.cgold-404 { text-align: center; padding: 80px 0; }
.cgold-404 .cgold-404-code {
    font-size: 78px;
    font-weight: bold;
    color: var(--cgold-primary);
    line-height: 1;
}

/* 回到顶部 */
.cgold-top {
    position: fixed;
    right: 22px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cgold-primary);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1040;
    border: none;
    box-shadow: 0 6px 18px rgba(30, 115, 190, .35);
}
.cgold-top svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; }

/* ==========================================================================
   7. 响应式（复刻参考站 + 内容区补充）
   ========================================================================== */
@media (max-width: 991.98px) {
    .navbar-collapse { padding-top: 10px; }
    .navbar-nav .nav-link { padding: 10px 0; border-bottom: 1px solid #262626; }
    .dropdown-menu { position: static !important; transform: none !important; }
    .navbar .btn-primary { margin-top: 12px; }
}
@media (max-width: 768px) {
    .hero-section { padding: 60px 0; }
    .section-title {
        font-size: 22px;
        margin: 30px 0 20px;
    }
    /* 移动端二级菜单适配 */
    .dropdown-menu {
        box-shadow: none;
        border-bottom: 1px solid #444;
    }
    .cgold-page-header h1 { font-size: 24px; }
    .entry-content h2 { font-size: 20px; }
}
