/* =========================================================
   法律知识分享 · 个人站样式（参考 lawbyte.cn 的版式与配色）
   纯手写，无任何外部 CDN / 字体 / 图标库
   ========================================================= */

:root {
    --primary: #f03c02;
    --primary-hover: #fd5c28;
    --primary-bg: #fff5f2;
    --primary-subtle: rgba(240, 60, 2, 0.08);

    --dark: #2b2320;
    --text: #333333;
    --text-light: #718096;
    --text-muted: #8b95a5;

    --bg-light: #f8f9fc;
    --border: #e8ecf1;

    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-sm: 6px;

    --header-h: 68px;
    --transition: all 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: #fff;
    padding-top: var(--header-h);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4 { color: var(--dark); font-weight: 700; line-height: 1.4; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.5px;
}
.site-logo:hover { color: var(--dark); }

.site-logo .dot {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: linear-gradient(135deg, #f03c02, #fd490f);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: none;
}

.site-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
}

.site-nav a {
    display: block;
    position: relative;
    padding: 8px 14px;
    font-size: 15px;
    color: #555;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 2px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active { color: var(--primary); }
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
    line-height: 1;
    padding: 6px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 72px 0 64px;
    background: linear-gradient(160deg, #fff8f5 0%, #f8f9fc 55%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 420px; height: 420px;
    right: -120px; top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 60, 2, 0.10), rgba(240, 60, 2, 0));
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero .eyebrow {
    display: inline-block;
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 40px;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.hero .lead {
    font-size: 16px;
    color: var(--text-light);
    max-width: 620px;
}

.hero .hero-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, #f03c02, #fd490f);
    color: #fff;
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(240, 60, 2, 0.28);
}

.btn-ghost {
    border-color: var(--border);
    color: var(--text);
    background: #fff;
}
.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero .latest {
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-light);
}
.hero .latest a {
    color: var(--primary);
    font-weight: 600;
}
.hero .latest a:hover { color: var(--primary-hover); }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-light); }

.section-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-head h2 {
    font-size: 24px;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.section-head h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
    transform: translateX(-50%);
}

.section-head p {
    margin-top: 12px;
    color: var(--text-light);
    font-size: 14px;
}

/* ---------- 卡片网格 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    color: inherit;
}

.card:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 8px 28px rgba(240, 60, 2, 0.16);
    transform: translateY(-5px);
    color: inherit;
}

.card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card:hover h3 { color: var(--primary); }

.card p {
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.65;
}

.card .tag {
    display: inline-block;
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: 4px;
    padding: 1px 7px;
    margin-left: auto;
    font-weight: 500;
    flex: none;
}

.card .num {
    flex: none;
    width: 22px; height: 22px;
    border-radius: 5px;
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card .arrow {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.card:hover .arrow { color: var(--primary); }

/* ---------- 简介区 ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 32px;
    align-items: start;
}

.about-text p {
    color: #4a4a4a;
    margin-bottom: 14px;
    font-size: 14.5px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-facts {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.fact {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}
.fact:last-child { border-bottom: 0; padding-bottom: 0; }
.fact:first-child { padding-top: 0; }

.fact .k {
    flex: none;
    width: 72px;
    font-size: 13px;
    color: var(--text-muted);
}

.fact .v { font-size: 14px; color: var(--dark); }

/* ---------- 联系方式 ---------- */
.contact-box {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 28px;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--border);
}
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row:first-child { padding-top: 0; }

.contact-row .label {
    flex: none;
    width: 76px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.contact-row .value { font-size: 14.5px; color: var(--dark); }

/* ---------- 提示条 ---------- */
.notice {
    margin-top: 22px;
    background: var(--primary-bg);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: #7a5a4d;
}

/* ---------- 页脚 ---------- */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 30px 0 26px;
    font-size: 13.5px;
    text-align: center;
}

.site-footer p { margin-bottom: 8px; }
.site-footer p:last-child { margin-bottom: 0; }

.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: #fff; }

.site-footer .beian {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
    font-size: 13px;
}

/* ---------- 首页：执业信息条 ---------- */
.hero .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin-top: 22px;
    font-size: 14px;
    color: var(--text-light);
}
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
}

/* ---------- 专业方向 ---------- */
.directions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.direction {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}
.direction:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(240, 60, 2, 0.14);
    transform: translateY(-4px);
}
.direction h3 {
    font-size: 17px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.direction h3::before {
    content: "";
    width: 20px; height: 3px;
    border-radius: 2px;
    background: var(--primary);
    flex: none;
}
.direction p { font-size: 13.5px; color: var(--text-light); }
.direction .tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.direction .tags span {
    font-size: 12px;
    color: #7a5a4d;
    background: var(--primary-bg);
    border-radius: 4px;
    padding: 2px 8px;
}

/* ---------- 文章卡片 ---------- */
.post {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 22px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    color: inherit;
}
.post:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(240, 60, 2, 0.14);
    transform: translateY(-5px);
    color: inherit;
}
.post .post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.post .post-meta .cat {
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: 4px;
    padding: 1px 8px;
}
.post h3 { font-size: 16px; line-height: 1.55; margin-bottom: 9px; }
.post:hover h3 { color: var(--primary); }
.post p { font-size: 13.5px; color: var(--text-light); flex: 1; }
.post .read {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.post:hover .read { color: var(--primary); }

.more {
    text-align: center;
    margin-top: 26px;
}
.more a {
    display: inline-block;
    font-size: 13.5px;
    color: var(--text-light);
    border-bottom: 1px dashed var(--border);
    padding-bottom: 2px;
}
.more a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 内页头部 / 面包屑 ---------- */
.page-head {
    padding: 44px 0 32px;
    background: linear-gradient(160deg, #fff8f5 0%, #f8f9fc 100%);
    border-bottom: 1px solid var(--border);
}
.page-head h1 { font-size: 28px; margin-bottom: 10px; }
.page-head p { color: var(--text-light); font-size: 14.5px; max-width: 720px; }

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ---------- 列表页 ---------- */
.list-wrap { max-width: 860px; margin: 0 auto; }
.list-item {
    display: block;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    color: inherit;
}
.list-item:hover { color: inherit; }
.list-item .post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.list-item .post-meta .cat {
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: 4px;
    padding: 1px 8px;
}
.list-item h2 {
    font-size: 19px;
    line-height: 1.5;
    margin-bottom: 8px;
    transition: var(--transition);
}
.list-item:hover h2 { color: var(--primary); }
.list-item p { font-size: 14px; color: var(--text-light); }

/* ---------- 文章正文 ---------- */
.article { max-width: 780px; margin: 0 auto; }
.article-head { padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.article-head h1 { font-size: 29px; line-height: 1.45; margin-bottom: 14px; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.article-body { font-size: 15.5px; line-height: 1.9; color: #383838; }
.article-body p { margin-bottom: 18px; }
.article-body h2 {
    font-size: 20px;
    margin: 36px 0 16px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    line-height: 1.5;
}
.article-body h3 { font-size: 16.5px; margin: 24px 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 9px; }
.article-body strong { color: var(--dark); }
.article-body blockquote {
    margin: 0 0 20px;
    padding: 14px 18px;
    background: var(--bg-light);
    border-left: 3px solid var(--border);
    color: #555;
    font-size: 14.5px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body .law {
    background: var(--primary-bg);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 20px;
    font-size: 14.5px;
}

.article-foot {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ---------- 文末相关链接 ---------- */
.related {
    margin-top: 36px;
    padding: 20px 22px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}
.related h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
}
.related ul { margin: 0; padding: 0; list-style: none; }
.related li { margin-bottom: 8px; font-size: 14px; }
.related li:last-child { margin-bottom: 0; }
.related a { color: var(--dark); border-bottom: 1px solid var(--border); }
.related a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- 空状态 ---------- */
.empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-light);
    font-size: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-light);
}
.empty strong { display: block; color: var(--dark); font-size: 15px; margin-bottom: 8px; }

/* ---------- 法条条目 ---------- */
.law-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}
.law-item:hover { border-color: var(--primary); box-shadow: 0 6px 22px rgba(240, 60, 2, 0.1); }
.law-item h3 { font-size: 15.5px; margin-bottom: 6px; }
.law-item .cite {
    font-size: 12.5px;
    color: var(--primary);
    margin-bottom: 10px;
}
.law-item p { font-size: 13.5px; color: var(--text-light); }

/* ---------- 回到顶部 ---------- */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--primary);
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 900;
    box-shadow: 0 4px 14px rgba(240, 60, 2, 0.3);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-hover); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
}

@media (max-width: 720px) {
    .nav-toggle { display: block; }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
    }
    .site-nav.open { max-height: 320px; }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 16px 14px;
        gap: 0;
    }
    .site-nav a { padding: 12px 6px; border-bottom: 1px solid var(--border); }
    .site-nav li:last-child a { border-bottom: 0; }
    .site-nav a::after { display: none; }

    .hero { padding: 52px 0 44px; }
    .hero h1 { font-size: 28px; }
    .section { padding: 42px 0; }
    .section-head h2 { font-size: 21px; }
    .grid { gap: 14px; }
}
