/* =========================================
   轻舟CMS - 默认主题全局样式 (site.css)
========================================= */
:root {
    --primary: #0a7cff;
    --primary-dark: #0066d6;
    --text: #0f172a;
    --text-2: #475569;
    --muted: #64748b;
    --muted-light: #94a3b8;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
code {
    background: #f1f5f9; padding: 1px 6px; border-radius: 5px; font-size: .9em;
    color: #334155; font-family: ui-monospace, Menlo, Consolas, monospace;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.2px; line-height: 1.3; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

@media (max-width: 640px) {
    .container { padding: 0 16px; }
}

/* ==================== 顶部导航区 ==================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 24px;
}

.site-logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: .2px;
}
.site-logo:hover { color: var(--primary); text-decoration: none; }

.site-logo .logo-mark {
    width: 28px; height: 28px; border-radius: 8px; flex: 0 0 28px;
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #0a7cff, #6d5efc);
    box-shadow: 0 4px 12px rgba(10, 124, 255, .35);
}
.site-logo .logo-mark::before {
    content: ""; position: absolute; left: 6px; right: 6px; top: 16px;
    height: 6px; border-radius: 0 0 6px 6px; background: rgba(255, 255, 255, .92);
    clip-path: polygon(0 0, 100% 0, 72% 100%, 28% 100%);
}
.site-logo .logo-mark::after {
    content: ""; position: absolute; left: 8px; right: 8px; top: 9px;
    height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .8);
}

/* --- 导航基础 --- */
.site-nav { display: flex; align-items: center; gap: 6px; height: 100%; }
.site-nav a {
    text-decoration: none; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; transition: all 0.2s;
}
.site-nav .nav-search {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
    color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px;
    margin-left: 10px;
}
.site-nav .nav-search:hover { border-color: #bfdbfe; color: var(--primary); background: #fff; text-decoration: none; }

/* --- 二级下拉菜单 --- */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; height: 100%; }
.nav-drop-menu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: #fff; min-width: 160px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px; padding: 8px 0; z-index: 1000; border: 1px solid var(--border);
    margin-top: 0;
}
.nav-drop-menu::before { content: ""; position: absolute; top: -10px; left: 0; width: 100%; height: 10px; }
.nav-dropdown:hover .nav-drop-menu { display: block; }
.nav-drop-menu a {
    display: block; padding: 10px 20px; color: var(--text); font-size: 14px;
    white-space: nowrap; width: 100%;
}
.nav-drop-menu a:hover { background: var(--bg-soft); color: var(--primary); }

/* --- 样式一：极简底边线（默认） --- */
.nav-style-1 > a, .nav-style-1 .nav-drop-toggle { padding: 8px 14px; border-radius: 8px; color: var(--text-2); }
.nav-style-1 > a:hover, .nav-style-1 .nav-drop-toggle:hover { background: var(--bg-soft); color: var(--text); }
.nav-style-1 > a.active, .nav-style-1 .nav-drop-toggle.active { background: #eff6ff; color: var(--primary); }

/* --- 样式二：居中胶囊悬浮 --- */
.nav-style-2 > a, .nav-style-2 .nav-drop-toggle { padding: 8px 18px; border-radius: 30px; background: transparent; color: var(--text-2); }
.nav-style-2 > a:hover, .nav-style-2 .nav-drop-toggle:hover { background: var(--bg-soft); color: var(--primary); }
.nav-style-2 > a.active, .nav-style-2 .nav-drop-toggle.active { background: #eff6ff; color: var(--primary); font-weight: bold; }

/* --- 样式三：左侧粗线引导 --- */
.nav-style-3 > a, .nav-style-3 .nav-drop-toggle { padding: 6px 16px; border-left: 3px solid transparent; border-radius: 0; color: var(--text-2); }
.nav-style-3 > a:hover, .nav-style-3 .nav-drop-toggle:hover { border-left-color: var(--primary); background: #f8fafc; color: var(--primary); }
.nav-style-3 > a.active, .nav-style-3 .nav-drop-toggle.active { border-left-color: var(--primary); background: #f8fafc; color: var(--primary); font-weight: bold; }


/* ==================== 英雄区 ==================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #172554 100%);
    color: #fff;
    text-align: center;
    overflow: hidden;
    padding: 80px 0 90px;
}

.hero-glow {
    position: absolute; inset: 0;
    background: radial-gradient(600px 300px at 50% -10%, rgba(10, 124, 255, .25) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container { position: relative; max-width: 820px; z-index: 1; }
.hero-title { font-size: 48px; font-weight: 800; letter-spacing: -1px; margin-bottom: 20px; line-height: 1.15; }
.hero-desc { font-size: 17px; color: rgba(255, 255, 255, .75); max-width: 680px; margin: 0 auto 36px; line-height: 1.8; }

.hero-actions { display: flex; justify-content: center; }
.hero-btn {
    display: inline-block; padding: 12px 32px; background: #fff; color: var(--primary);
    font-weight: 700; border-radius: 99px; text-decoration: none; font-size: 15px;
    transition: 0.3s; box-shadow: 0 4px 14px rgba(255,255,255,0.2);
}
.hero-btn:hover { background: #f1f5f9; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.3); text-decoration: none; }

@media (max-width: 640px) {
    .hero { padding: 60px 0; }
    .hero-title { font-size: 32px; }
    .hero-desc { font-size: 15px; margin-bottom: 24px; }
}


/* ==================== 主体布局 ==================== */
.main-wrap { padding: 60px 0 80px; background: var(--bg-soft); min-height: 60vh; }
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }

@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ==================== 区块标题美化 ==================== */
.section-head { 
    display: flex; 
    align-items: flex-end; 
    justify-content: space-between; 
    margin-bottom: 20px; 
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.section-title { 
    font-size: 22px; 
    font-weight: 800; 
    position: relative;
    padding-left: 14px;
    line-height: 1.2;
}

/* 标题左侧的渐变高亮条 */
.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary), #6d5efc);
    border-radius: 4px;
}

.section-sub { 
    color: var(--muted); 
    font-size: 13px; 
    margin-top: 8px; 
}

/* “查看全部”胶囊按钮 */
.section-more { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
    font-size: 13px; 
    color: var(--muted); 
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.section-more:hover { 
    color: var(--primary); 
    border-color: #bfdbfe;
    background: #eff6ff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 124, 255, 0.08);
}


/* ==================== 文章卡片样式 ==================== */
.article-grid { display: grid; gap: 20px; }

.article-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: .2s; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #dbe6f2; }

.article-cover {
    aspect-ratio: 16/9; background: linear-gradient(135deg, #dbeafe, #ede9fe);
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 40px; overflow: hidden;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.article-card:hover .article-cover img { transform: scale(1.03); }

.article-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.article-title { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--primary); }

.article-excerpt {
    color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 14px; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted-light); }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-tags a {
    display: inline-block; padding: 2px 10px; background: #eff6ff; color: var(--primary);
    border-radius: 999px; font-size: 11.5px; font-weight: 500;
}
.article-tags a:hover { background: #dbeafe; text-decoration: none; }

/* --- 首页专属：左图右文悬浮卡片 (3行简介版) --- */
.home-horizontal-list { grid-template-columns: 1fr !important; gap: 20px; }
.home-card-item { 
    flex-direction: row !important; 
    align-items: stretch; 
    height: 220px; /* 高度增加到 220px 以容纳3行摘要 */
    overflow: hidden; 
    padding: 14px;
    gap: 20px; 
}
.home-card-item .home-card-thumb { 
    flex: 0 0 280px; 
    height: 100%; 
    border-radius: 10px; 
    margin: 0; 
    aspect-ratio: auto; 
    overflow: hidden;
}
.home-card-item .home-card-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.4s ease; 
}
.home-card-item:hover .home-card-thumb img {
    transform: scale(1.08);
}
.home-card-item .home-card-body { 
    padding: 4px 8px 4px 0; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    height: 100%; 
    min-width: 0; 
}
.home-card-item .article-title { 
    font-size: 18px; 
    font-weight: 700;
    margin-bottom: 8px; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}
/* 强制显示3行简介 */
.home-card-item .article-excerpt { 
    font-size: 14px; 
    color: var(--muted);
    margin-bottom: 12px; 
    line-height: 1.6;
    display: -webkit-box; 
    -webkit-line-clamp: 3; /* 限制3行 */
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    flex: 1; 
}

@media (max-width: 640px) {
    .home-card-item { flex-direction: column !important; height: auto; padding: 10px; gap: 12px; }
    .home-card-item .home-card-thumb { flex: none; width: 100%; height: 200px; }
    .home-card-item .home-card-body { padding: 0 4px 4px 4px; }
}


/* ==================== 侧边栏 ==================== */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 84px; }
.widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.widget-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.widget-list { list-style: none; padding: 0; margin: 0; }
.widget-list li { padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; line-height: 1.5; }
.widget-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget-list li a { color: var(--text-2); display: block; }
.widget-list li a:hover { color: var(--primary); text-decoration: none; }
.widget-list .meta { color: var(--muted-light); font-size: 11.5px; margin-top: 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    display: inline-block; padding: 5px 12px; background: #f1f5f9; color: var(--text-2);
    border-radius: 999px; font-size: 12.5px; transition: .15s;
}
.tag-cloud a:hover { background: #eff6ff; color: var(--primary); text-decoration: none; }


/* ==================== 文章详情页 ==================== */
.article-detail {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 44px 48px;
}

@media (max-width: 640px) {
    .article-detail { padding: 24px 20px; }
}

.article-breadcrumb {
    display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
    margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px dashed var(--border);
}
.article-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.article-breadcrumb a:hover { color: var(--primary); }
.article-breadcrumb .sep { color: #cbd5e1; font-size: 12px; }
.article-breadcrumb .current { color: var(--text-2); font-weight: 500; }

.article-detail h1 { font-size: 32px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; letter-spacing: -.5px; }
@media (max-width: 640px) { .article-detail h1 { font-size: 24px; } }

.detail-meta {
    color: var(--muted); font-size: 13.5px; margin-bottom: 20px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border); display: flex; gap: 14px; flex-wrap: wrap;
}
.detail-meta .tag-list a {
    display: inline-block; padding: 2px 10px; background: #eff6ff; color: var(--primary);
    border-radius: 999px; font-size: 12px; margin-left: 8px;
}
.detail-cover { margin-bottom: 26px; border-radius: 10px; overflow: hidden; }

.detail-content { font-size: 16px; line-height: 1.85; color: var(--text-2); }
.detail-content p { margin: 0 0 18px; }
.detail-content h2 { font-size: 22px; margin: 32px 0 14px; color: var(--text); }
.detail-content h3 { font-size: 18px; margin: 26px 0 12px; color: var(--text); }
.detail-content img { border-radius: 10px; margin: 18px 0; }
.detail-content pre { background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.detail-content blockquote {
    border-left: 4px solid var(--primary); padding: 4px 18px; margin: 18px 0;
    color: var(--muted); background: #f8fafc; border-radius: 0 8px 8px 0;
}
.detail-content a { border-bottom: 1px solid rgba(10, 124, 255, .3); }
.detail-content ul, .detail-content ol { padding-left: 22px; margin: 14px 0; }


/* ==================== 通用分页器 ==================== */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 36px; font-size: 14px; }
.pager a, .pager span {
    padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; color: var(--text-2); font-weight: 500;
}
.pager a:hover { border-color: #bfdbfe; color: var(--primary); text-decoration: none; background: #eff6ff; }
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; }


/* ==================== 空状态提示 ==================== */
.empty {
    background: #fff; border: 1px dashed var(--border); border-radius: var(--radius);
    padding: 70px 20px; text-align: center; color: var(--muted-light);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: .6; }
.empty .desc { font-size: 14px; }


/* ==================== 页脚 ==================== */
.site-footer { background: #0f172a; color: #94a3b8; padding: 56px 0 32px; font-size: 13.5px; }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .08); }

@media (max-width: 720px) {
    .footer-main { grid-template-columns: 1fr; gap: 24px; padding-bottom: 24px; }
}

.footer-brand { display: flex; align-items: center; gap: 10px; color: #f1f5f9; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.footer-desc { font-size: 13px; line-height: 1.7; color: #94a3b8; max-width: 320px; }
.footer-title { font-size: 13px; font-weight: 700; color: #f1f5f9; margin-bottom: 14px; letter-spacing: .5px; text-transform: uppercase; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #94a3b8; font-size: 13px; }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; font-size: 12.5px; color: #64748b; flex-wrap: wrap; gap: 8px; }

/* ==================== 通用面包屑导航 ==================== */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    padding: 12px 0;
}
.breadcrumb-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: 0.2s;
}
.breadcrumb-nav a:hover {
    color: var(--primary);
}
.breadcrumb-nav .sep {
    color: #cbd5e1;
    font-size: 12px;
}
.breadcrumb-nav .current {
    color: var(--text-2);
    font-weight: 500;
}