/* ========================================
   大象导黑板报 - 全站样式
   配色：橙色系，对齐大象导品牌视觉
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --orange-primary: #FF6B00;
    --orange-light: #FFF4EB;
    --orange-dark: #E55A00;
    --text-dark: #2D2D2D;
    --text-gray: #555555;
    --text-light: #888888;
    --bg-white: #FFFFFF;
    --bg-gray: #F8F9FA;
    --border-light: #EEEEEE;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.9;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--orange-primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--orange-dark);
}

/* ======== 顶栏 Hero ======== */
.hero {
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-dark) 100%);
    color: white;
    padding: 36px 20px 40px;
    text-align: center;
}

.hero-logo-img {
    height: 48px;
    margin-bottom: 8px;
    filter: brightness(0) invert(1); /* 白色化 Logo */
}

.hero-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.hero-sub {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 6px;
}

.hero a {
    color: white;
    text-decoration: none;
}
.hero a:hover {
    opacity: 0.9;
}

/* ======== 容器 ======== */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ======== 板块标题 ======== */
.category-section {
    margin-top: 28px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0 4px;
}

.category-icon {
    font-size: 20px;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ======== 文章卡片 ======== */
.article-card {
    background: var(--bg-white);
    border-radius: 14px;
    padding: 20px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.12);
    transform: translateY(-2px);
    color: inherit;
}

.article-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 8px;
}

.article-summary {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-tag {
    display: inline-block;
    background: var(--orange-light);
    color: var(--orange-dark);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ======== 空板块 ======== */
.category-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-light);
    font-size: 14px;
    background: var(--bg-white);
    border-radius: 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* ======== 详情页 ======== */
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    padding: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-light);
}
.breadcrumb a:hover {
    color: var(--orange-primary);
}

.breadcrumb-sep {
    color: #ccc;
}

.detail-header {
    padding: 24px 0 16px;
    border-bottom: 2px solid var(--orange-light);
    margin-bottom: 24px;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 10px;
}

.detail-meta {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-category-tag {
    display: inline-block;
    background: var(--orange-light);
    color: var(--orange-dark);
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 10px;
}

/* ======== 文章正文 ======== */
.article-content {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 2;
}

.article-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange-light);
}

.article-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 24px 0 12px;
}

.article-content p {
    margin-bottom: 14px;
    text-indent: 2em;
}

.article-content p:first-child,
.article-content h2 + p,
.article-content h3 + p {
    text-indent: 0;
}

.article-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

.article-content blockquote {
    border-left: 4px solid var(--orange-primary);
    background: var(--orange-light);
    padding: 14px 18px;
    margin: 18px 0;
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    color: var(--text-dark);
}

.article-content blockquote p {
    text-indent: 0;
    margin-bottom: 6px;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content ul, .article-content ol {
    margin: 12px 0 14px 1.5em;
}

.article-content li {
    margin-bottom: 6px;
    text-indent: 0;
}

/* ======== 要点总结背景样式 ======== */
/* Pandoc 渲染: <p><strong>要点总结：</strong></p><ul>...</ul> */
/* 用 :has() 匹配包含"要点总结"的 p 后面紧跟的 ul/ol */
.article-content p:has(> strong:first-child) + ul,
.article-content p:has(> strong:first-child) + ol {
    background: var(--orange-light);
    border-left: 4px solid var(--orange-primary);
    border-radius: 0 10px 10px 0;
    padding: 14px 18px 14px 2em;
    margin: 8px 0 18px 0;
    list-style: none;
}

.article-content p:has(> strong:first-child) + ul li,
.article-content p:has(> strong:first-child) + ol li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
}

.article-content p:has(> strong:first-child) + ul li::before,
.article-content p:has(> strong:first-child) + ol li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--orange-primary);
    border-radius: 50%;
}

.article-content p:has(> strong:first-child) + ul li:last-child,
.article-content p:has(> strong:first-child) + ol li:last-child {
    margin-bottom: 0;
}

/* 要点总结标签本身也加一点样式 */
.article-content p:has(> strong:first-child):only-child {
    margin-bottom: 4px;
}

.article-content p:has(> strong:first-child):only-child strong {
    color: var(--orange-dark);
}

/* ======== 高亮区块（::: highlight）======== */
.article-content .highlight {
    background: var(--orange-light);
    border-left: 4px solid var(--orange-primary);
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin: 12px 0 18px 0;
}

.article-content .highlight ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.article-content .highlight li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    text-indent: 0;
}

.article-content .highlight li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--orange-primary);
    border-radius: 50%;
}

.article-content .highlight li:last-child {
    margin-bottom: 0;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 28px 0;
}

.article-content em {
    color: var(--text-light);
    font-style: italic;
}

/* ======== 文章底部 ======== */
.article-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--orange-light);
    text-align: center;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--orange-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 20px;
    background: var(--orange-light);
    transition: all 0.2s;
}
.back-home:hover {
    background: var(--orange-primary);
    color: white;
}

/* ======== 全站底栏 ======== */
.footer {
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-dark) 100%);
    color: white;
    padding: 28px 20px;
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

.footer p {
    margin-bottom: 4px;
    opacity: 0.9;
}

.footer .brand {
    font-weight: 700;
    font-size: 13px;
    opacity: 0.7;
    margin-top: 6px;
}

/* ======== 回到顶部 ======== */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--orange-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border: none;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:active { transform: scale(0.95); }

/* ======== 响应式 ======== */
@media (max-width: 480px) {
    .hero {
        padding: 28px 16px 32px;
    }
    .hero-logo {
        font-size: 24px;
    }
    .article-card {
        padding: 16px 14px;
    }
    .article-title {
        font-size: 16px;
    }
    .detail-title {
        font-size: 20px;
    }
    .article-content {
        font-size: 14px;
    }
}
