/*
Theme Name: 校园风尚主题
Theme URI: https://example.com
Author: kabuda
Author URI: https://example.com
Description: 简洁优雅的学校校园展示主题
Version: 1.4.7
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: campus-theme
*/

/* ==================== 字体导入 ==================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

/* 与 .header-container 高度一致，用于竖向布局参考 */
:root {
    --site-header-height: 72px;
    /* 首页轮播区与下方资讯块同一最大宽度，避免上下错位、中间一条很窄 */
    --home-hero-max: min(100vw, 1270px);
    /* 与 .header-container 一致：文章页 / 分类归档主栏与彩色导航条同宽对齐 */
    --site-align-max: 1270px;
    --site-align-pad-x: clamp(12px, 2.5vw, 36px);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: #334155;
    /* 全屏背景图：固定 1920×1080 尺寸，浏览器缩放时仅裁剪不缩放；
       垂直居中、水平居中，超出部分隐藏；内容层叠于其上 */
    background-image: url('20210408190206.jpg');
    background-size: 1920px 1080px;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-color: #f4f7fb;
    font-size: 16px;
    letter-spacing: 0.02em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== 顶部横幅（PC端固定 1002×71，手机端独立上传图可填充） ==================== */
.top-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    line-height: 0;
    margin-bottom: 0;
}

.top-banner__inner {
    width: 100%;
    max-width: 1002px;
    position: relative;
}

/* PC端横幅：固定宽高 */
.top-banner__inner > a,
.top-banner__inner > img {
    width: 1002px;
    height: 71px;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
}

/* 手机端横幅专用容器 */
.top-banner__mobile {
    display: none;
    width: 100%;
}

/* 移动端横幅样式 */
@media (max-width: 900px) {
    .top-banner__inner {
        max-width: 100%;
    }

    .top-banner__inner > a,
    .top-banner__inner > img {
        width: 100%;
        height: var(--mobile-banner-height, 60px);
    }

    /* 有手机端专属图片时 */
    .top-banner__mobile {
        display: block;
    }

    .top-banner__mobile img {
        width: 100%;
        height: var(--mobile-banner-height, 60px);
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .top-banner__mobile a,
    .top-banner__mobile a img {
        display: block;
        width: 100%;
        height: var(--mobile-banner-height, 60px);
    }

    /* 隐藏 PC 端横幅在移动端的显示 */
    .top-banner__pc-link,
    .top-banner__pc-img {
        display: none !important;
    }

    /* 隐藏横幅（手机端不显示） */
    .top-banner.hide-on-mobile {
        display: none;
    }
}

/* ==================== 变量定义 ==================== */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #059669;
    --accent: #dc2626;
    --gold: #d97706;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-accent: #eff6ff;
    --border: #e8ecf1;
    --shadow-sm: 0 2px 8px rgba(30, 64, 175, 0.06);
    --shadow-md: 0 8px 24px rgba(30, 41, 59, 0.06);
    --radius: 14px;
    --radius-lg: 20px;
}

/* ==================== 标题字体 ==================== */
h1, h2, h3, h4, h5, h6,
.site-logo,
.section-title,
.post-title {
    font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
}

/* ==================== 导航栏（取消固定，改为静态流式定位） ==================== */
.site-header {
    /* 不再 fixed，随页面滚动自然流动 */
    /* relative + z-index：整头区域（含下拉）叠在 .site-main-wrap 之上，避免被轮播遮挡；
       backdrop-filter 会创建独立层叠上下文，仅给子菜单加 z-index 无法越过下方主内容区 */
    position: relative;
    z-index: 200;
    /* 完全透明，透出 body 全屏背景图 */
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: none;
    flex-shrink: 0;
    /* 与上方（顶部横幅或页面顶）保留 5px 间距 */
    margin: 5px 0 0;
    padding: 0;
}

.header-container {
    max-width: var(--site-align-max);
    margin: 0 auto;
    padding: 0 var(--site-align-pad-x);
    display: flex;
    align-items: center;
    min-height: 52px;
    height: auto;
    gap: 0;
}

/* 隐藏 Logo 区域（已不需要） */
.site-logo-wrap {
    display: none !important;
}

/* 移动端：菜单按钮靠左，导航菜单水平居中 */
.menu-toggle {
    flex-shrink: 0;
    margin-right: 16px;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 导航项居中排列，每个 165px 宽，无缝拼接 */
.main-nav ul,
.main-nav ol {
    display: flex;
    justify-content: center;
    gap: 0;
    list-style: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.main-nav li {
    position: relative;
    list-style: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.main-nav li::before,
.main-nav li::marker {
    content: none;
    display: none;
}

.main-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    border-radius: 0;
    transition: filter 0.2s ease;
    position: relative;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* PC：六项均分 .header-container 内宽，与 --home-hero-max 轮播+公告栏同宽对齐（勿用固定 251×6 撑破容器） */
@media (min-width: 901px) {
    .main-nav li {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* 每个导航项颜色（与站点设计稿一致：橙 / 黄绿 / 中绿 / 蓝渐变 / 玫红 / 浅黄绿） */
.main-nav li:nth-child(1) a { background: #ff8c00; }
.main-nav li:nth-child(2) a { background: #cddc39; }
.main-nav li:nth-child(3) a { background: #43a047; }
.main-nav li:nth-child(4) a {
    background: linear-gradient(90deg, #42a5f5 0%, #1e88e5 100%);
}
.main-nav li:nth-child(5) a { background: #c2185b; }
.main-nav li:nth-child(6) a { background: #aed581; }

.main-nav li:nth-child(1) a:hover { filter: brightness(1.08); }
.main-nav li:nth-child(2) a:hover { filter: brightness(0.95); }
.main-nav li:nth-child(3) a:hover { filter: brightness(1.1); }
.main-nav li:nth-child(4) a:hover { filter: brightness(1.08); }
.main-nav li:nth-child(5) a:hover { filter: brightness(1.1); }
.main-nav li:nth-child(6) a:hover { filter: brightness(0.95); }

.main-nav .current-menu-item > a,
.main-nav a.current-menu-item {
    filter: brightness(1.12);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

/* ==================== 二级下拉菜单 ==================== */
.main-nav li:hover > .sub-menu,
.main-nav li:hover > ul {
    display: block;
}

/* 子菜单容器 */
.main-nav .sub-menu,
.main-nav ul ul {
    display: none;
    position: absolute;
    /* 与父级 li 底边略重叠，避免中间空隙导致鼠标离开 li、:hover 断掉 */
    top: calc(100% - 2px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.14);
    z-index: 201;
    padding: 6px 0;
    list-style: none;
    margin: 0;
    border-radius: 0;
}

/* 子菜单每一项 */
.main-nav .sub-menu li,
.main-nav ul ul li {
    position: relative;
    width: 100%;
}

/* 子菜单链接 */
.main-nav .sub-menu a,
.main-nav ul ul a {
    width: 100%;
    height: auto;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: transparent;
    border-radius: 0;
    justify-content: flex-start;
    text-align: left;
    filter: none;
    transform: none;
}

.main-nav .sub-menu a:hover,
.main-nav ul ul a:hover {
    background: #eff6ff;
    color: #1d4ed8;
    filter: none;
    transform: none;
}

/* 三级菜单（如果需要更深层级） */
.main-nav .sub-menu ul {
    top: 0;
    left: 100%;
}

/* ==================== 轮播图（直角、加高） ==================== */
/* PC端：包裹在 hero-with-notice 内部，由父容器决定宽度 */
.hero-slider {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 620px;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0f172a;
    display: flex;
    align-items: stretch;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.slide.active {
    opacity: 1;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.slide-img--cover    { object-fit: cover; }
.slide-img--contain  { object-fit: contain; }
.slide-img--stretch  { object-fit: fill; }

/* 无图片时的占位背景（几乎不显示，用深色底替代） */
.slide-bg--empty {
    display: none;
}

.slide-content {
    display: none;
}

.slide-content h2 {
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 2px;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.85),
        0 0 24px rgba(0, 0, 0, 0.45);
    line-height: 1.45;
}

.slide-content p {
    font-size: 16px;
    opacity: 0.95;
    letter-spacing: 1px;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.slider-dots {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

/* ==================== 轮播图左右箭头（iOS极简风格） ==================== */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.25s ease, opacity 0.25s ease;
}

.slider-arrow svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.slider-arrow--prev {
    left: 16px;
}

.slider-arrow--next {
    right: 16px;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
}

.slider-arrow:active {
    background: rgba(255, 255, 255, 0.35);
}

/* 移动端箭头稍小 */
@media (max-width: 600px) {
    .slider-arrow {
        width: 36px;
        height: 36px;
    }

    .slider-arrow svg {
        width: 16px;
        height: 16px;
    }

    .slider-arrow--prev {
        left: 10px;
    }

    .slider-arrow--next {
        right: 10px;
    }
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--bg-white);
    transform: scale(1.3);
}

/* ==================== 页面主区域 ==================== */
.main-content {
    max-width: 1270px;
    /* 顶栏在文档流内，上边距收紧；底边仍保留与页脚的间距感 */
    margin: 12px auto 48px;
    padding: 0 30px;
}

.main-content--tight {
    margin-top: 7px;
    margin-bottom: 56px;
    max-width: min(96vw, 1270px);
    margin-left: auto;
    margin-right: auto;
}

/* 首页资讯区：透明底以透出 body 全屏背景图；内容区水平居中 */
.home-news-section {
    background: transparent;
    padding-bottom: 8px;
}

/* 内容区居中、宽一些、左右对称留白 */
.home-news-section .main-content.main-content--tight {
    display: block;
    width: 100%;
    max-width: var(--home-hero-max);
    margin-left: auto;
    margin-right: auto;
    margin-top: 7px;
    margin-bottom: 56px;
    padding-left: clamp(12px, 2.5vw, 36px);
    padding-right: clamp(12px, 2.5vw, 36px);
    box-sizing: border-box;
}

/* ==================== 首页资讯块（Apple 风：大字号、圆角、柔阴影） ==================== */
/* 移动优先单列；PC 用 flex 均分，避免仍按「四栏」网格导致仅 3 个栏目时右侧留空 */
.home-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 901px) {
    .home-columns {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        align-items: stretch;
    }

    .home-columns .news-block {
        flex: 1 1 0;
        min-width: 0;
    }
}

.news-block {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 0;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 12px 40px rgba(0, 0, 0, 0.06);
    padding: 18px 16px 16px;
    min-height: 0;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.news-block:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 20px 48px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.news-block__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.news-block__title-wrap {
    flex: 1;
    min-width: 0;
}

.news-block__title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    line-height: 1.25;
}

.news-block__underline {
    position: relative;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0;
    border-radius: 999px;
    overflow: hidden;
}

.news-block__underline span {
    position: absolute;
    left: 0;
    top: 0;
    width: 3.2em;
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #42a1ff);
    border-radius: 999px;
}

.news-block__more {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: #0071e3;
    padding: 8px 16px;
    border: none;
    background: rgba(0, 113, 227, 0.08);
    line-height: 1.3;
    margin-top: 2px;
    border-radius: 980px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.news-block__more:hover {
    color: #0077ed;
    background: rgba(0, 113, 227, 0.14);
    transform: scale(1.02);
}

.news-block__featured {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 10px;
    padding: 14px 4px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 8px;
    padding-right: 8px;
    transition: background 0.25s ease;
}

.news-block__featured:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* 四栏等宽时缩略图按比例收缩，四块视觉规格一致 */
.news-block__thumb {
    flex: 0 0 min(200px, 42%);
    width: min(200px, 42%);
    max-width: 100%;
    aspect-ratio: 5 / 3;
    height: auto;
    min-height: 88px;
    overflow: hidden;
    background: #e8e8ed;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.news-block__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-block__thumb-placeholder {
    font-size: 13px;
    color: #86868b;
    padding: 8px;
    text-align: center;
    line-height: 1.35;
}

.news-block__feat-divider {
    flex: 0 0 1px;
    width: 1px;
    margin: 0 20px;
    align-self: stretch;
    min-height: 72px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 0, 0, 0.08) 15%,
        rgba(0, 0, 0, 0.08) 85%,
        transparent
    );
}

.news-block__feat-text {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.47;
    letter-spacing: -0.015em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-block__featured:hover .news-block__feat-text {
    color: #0071e3;
}

.news-block__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.news-block__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 10px;
    border-bottom: none;
    text-decoration: none;
    color: inherit;
    font-size: 15px;
    line-height: 1.4;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.news-block__row:hover {
    background: rgba(0, 0, 0, 0.04);
}

.news-block__row:last-child {
    border-bottom: none;
}

.news-block__bullet {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent #0071e3;
    opacity: 0.85;
}

.news-block__row-title {
    flex: 1;
    min-width: 0;
    color: #1d1d1f;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-block__row:hover .news-block__row-title {
    color: #0071e3;
}

.news-block__row-date {
    flex-shrink: 0;
    font-size: 13px;
    color: #86868b;
    margin-left: auto;
}

.news-block__empty {
    font-size: 14px;
    color: #86868b;
    line-height: 1.55;
    padding: 16px 8px 12px;
    margin: 0;
}

.news-block__empty code {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
}

/* 主内容区：在 body 弹性布局中伸展，把页脚顶到视口底部（与 header.php / footer.php 中 .site-main-wrap 对应） */
.site-main-wrap {
    flex: 1 0 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ==================== 底部（直角 + 粘性页脚） ==================== */
.site-footer-group {
    flex-shrink: 0;
    width: 100%;
    padding-top: 16px;
    /* 透明以透出 body 全屏背景；深色页脚仍单独铺底 */
    background: transparent;
}

.site-footer {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    color: var(--bg-white);
    padding: 12px 28px 10px;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
}

.footer-container {
    max-width: 1270px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 10px 24px;
    padding: 14px 0 8px;
}

.footer-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    color: #f1f5f9;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, #93c5fd, #60a5fa);
    border-radius: 0;
}

.footer-section p,
.footer-section li {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    position: relative;
    padding-left: 0;
}

.footer-section ul li::before {
    content: none;
}

.footer-logo {
    font-size: 15px;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 5px;
    font-family: 'Noto Serif SC', serif;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* 底部菜单：无圆点 */
.site-footer .footer-section ul.menu,
.site-footer .footer-section .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .footer-section .menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .footer-section .menu a {
    color: #cbd5e1 !important;
    transition: color 0.2s ease;
}

.site-footer .footer-section .menu a:hover {
    color: #e2e8f0 !important;
}

/* 备用菜单、无 .menu 类名的 ul 内链接（与上同色） */
.site-footer .footer-section ul a {
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .footer-section ul a:hover {
    color: #e2e8f0 !important;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1270px;
    margin: 10px auto 0;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* ==================== 移动端菜单按钮 ==================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ==================== PC端：轮播图 + 公告栏水平并排容器 ==================== */
@media (min-width: 901px) {
    .hero-with-notice {
        width: 100%;
        max-width: var(--home-hero-max);
        margin-left: auto;
        margin-right: auto;
        /* 紧贴导航栏，与轮播之间不留空隙 */
        padding: 0 clamp(12px, 2.5vw, 36px) 0;
        box-sizing: border-box;
    }

    .hero-with-notice__inner {
        display: flex;
        align-items: stretch;
        /* 轮播与公告栏之间极小间距 */
        gap: 4px;
        width: 100%;
        min-width: 0;
    }

    .hero-slider {
        flex: 1 1 0;
        min-width: 0;
        height: 480px;
    }

    /* 独立公告栏：宽度与下方四栏等宽（1/4 容器宽减 gap），放在轮播图右侧 */
    .notice-standalone {
        flex: 0 0 360px;
        background: #fff;
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
    }

    .notice-standalone__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 18px 14px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        flex-shrink: 0;
    }

    .notice-standalone__title {
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', sans-serif;
        font-size: 17px;
        font-weight: 600;
        color: #1d1d1f;
        letter-spacing: -0.01em;
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .notice-icon {
        width: 20px;
        height: 20px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .notice-standalone__featured {
        width: 100%;
        overflow: hidden;
        flex-shrink: 0;
    }

    .notice-standalone__featured img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

    .notice-standalone__more {
        font-size: 12px;
        font-weight: 500;
        color: #0071e3;
        padding: 4px 12px;
        background: rgba(0, 113, 227, 0.08);
        border-radius: 980px;
        text-decoration: none;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .notice-standalone__more:hover {
        background: rgba(0, 113, 227, 0.14);
        color: #0077ed;
    }

    .notice-standalone__list {
        list-style: none;
        margin: 0;
        padding: 0;
        flex: 1 1 0;
        overflow-y: auto;
    }

    .notice-standalone__list li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .notice-standalone__list li:last-child {
        border-bottom: none;
    }

    .notice-standalone__item {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
        text-decoration: none;
        color: inherit;
        transition: background 0.2s ease;
        border-radius: 0;
    }

    .notice-standalone__item:hover {
        background: rgba(0, 113, 227, 0.04);
    }

    .notice-standalone__bullet {
        flex-shrink: 0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 0 5px 7px;
        border-color: transparent transparent transparent #dc2626;
        margin-top: 6px;
        opacity: 0.9;
    }

    .notice-standalone__text {
        flex: 1;
        min-width: 0;
        font-size: 14px;
        color: #1d1d1f;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .notice-standalone__item:hover .notice-standalone__text {
        color: #0071e3;
    }

    .notice-standalone__date {
        flex-shrink: 0;
        font-size: 12px;
        color: #86868b;
        margin-top: 2px;
    }

    .notice-standalone__empty {
        font-size: 13px;
        color: #86868b;
        padding: 20px 16px;
        line-height: 1.5;
    }
}

/* ==================== 移动端：保持原有独立样式，不受并排容器影响 ==================== */
@media (max-width: 900px) {
    /* 移动端：导航栏顶部间距改为 5px */
    .site-header {
        margin: 5px 0 0;
    }

    .hero-with-notice {
        margin-top: 0;
    }

    .hero-with-notice__inner {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .hero-slider {
        margin-top: 0;
        position: relative;
        width: calc(100% - 2 * clamp(12px, 2.5vw, 36px));
        height: 460px;
        margin-left: auto;
        margin-right: auto;
        flex: none;
    }

    .notice-standalone {
        /* 移动端：与轮播、下方资讯区同一水平留白（clamp 与 .main-content--tight 一致） */
        flex: none;
        width: calc(100% - 2 * clamp(12px, 2.5vw, 36px));
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-top: 4px;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.65);
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.04),
            0 12px 40px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    .notice-standalone__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px 14px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        flex-shrink: 0;
    }

    .notice-standalone__title {
        font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', sans-serif;
        font-size: 17px;
        font-weight: 600;
        color: #1d1d1f;
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .notice-icon {
        width: 20px;
        height: 20px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .notice-standalone__featured {
        width: 100%;
        overflow: hidden;
        flex-shrink: 0;
    }

    .notice-standalone__featured img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

    .notice-standalone__more {
        font-size: 12px;
        font-weight: 500;
        color: #0071e3;
        padding: 4px 12px;
        background: rgba(0, 113, 227, 0.08);
        border-radius: 980px;
        text-decoration: none;
    }

    .notice-standalone__list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .notice-standalone__list li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .notice-standalone__list li:last-child {
        border-bottom: none;
    }

    .notice-standalone__item {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
        text-decoration: none;
        color: inherit;
        transition: background 0.2s ease;
    }

    .notice-standalone__bullet {
        flex-shrink: 0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 5px 0 5px 7px;
        border-color: transparent transparent transparent #dc2626;
        margin-top: 6px;
        opacity: 0.9;
    }

    .notice-standalone__text {
        flex: 1;
        min-width: 0;
        font-size: 14px;
        color: #1d1d1f;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .notice-standalone__date {
        flex-shrink: 0;
        font-size: 12px;
        color: #86868b;
        margin-top: 2px;
    }

    .notice-standalone__empty {
        font-size: 13px;
        color: #86868b;
        padding: 20px 16px;
        line-height: 1.5;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: var(--site-header-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow-md);
        padding: 20px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 5px;
    }

    .main-nav li {
        width: 100%;
        flex: none;
    }

    .main-nav a {
        width: 100%;
        padding: 12px 20px;
    }

    .menu-toggle {
        display: block;
    }

    /* 首页资讯：手机端单列竖排（与基础样式一致） */
    .home-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .news-block {
        padding: 20px 18px 16px;
    }

    .news-block__title {
        font-size: 17px;
    }

    .news-block__thumb {
        flex: 0 0 min(168px, 45%);
        width: min(168px, 45%);
        max-width: 100%;
        aspect-ratio: 5 / 3;
        height: auto;
        min-height: 80px;
    }

    .news-block__featured {
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 12px;
    }

    .news-block__feat-divider {
        display: none;
    }

    .news-block__feat-text {
        flex: 1;
        min-width: 0;
        padding-top: 0;
        font-size: 16px;
    }

    .news-block__row {
        font-size: 15px;
    }

    .slide-content h2 {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .sidebar {
        position: static;
    }

    body.single .main-content {
        margin-top: 10px;
        margin-bottom: 36px;
        padding-left: var(--site-align-pad-x);
        padding-right: var(--site-align-pad-x);
    }

    .archive-content {
        padding-top: 10px;
    }

    .main-content {
        margin-top: 10px;
        margin-bottom: 36px;
    }

    .article-title {
        font-size: 24px;
    }

    .article-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .archive-title {
        font-size: 28px;
    }
}

/* ==================== 图片懒加载 ==================== */
/* 初始 opacity:0 让图片渐显更平滑；但若 JS 未执行，保持 opacity:1 确保图片可见 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* JS 立即添加 loaded 类，确保图片显示（作为备份，防止 JS 加载失败时图片不可见） */
img[loading="lazy"].loaded,
img.lazy-loaded,
img[loading="lazy"] {
    opacity: 1 !important;
}

img[loading="lazy"] + .lazy-placeholder,
.lazy-placeholder {
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 200% 100%;
    animation: lazy-shimmer 1.5s infinite;
}

@keyframes lazy-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== 移动端二级菜单（展开/收起） ==================== */
@media (max-width: 900px) {
    .main-nav .sub-menu,
    .main-nav ul ul {
        display: none;
        padding-left: 16px;
    }

    .main-nav .sub-menu.open,
    .main-nav ul ul.open {
        display: block;
    }

    .main-nav li > a.expanded::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: 6px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid currentColor;
        vertical-align: middle;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 20px;
    }

    .hero-slider {
        height: 360px;
    }

    .slide-content h2 {
        font-size: 22px;
    }

    .slide-content p {
        font-size: 14px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ==================== 文章详情页（仅单篇文章页，勿影响首页 .main-content） ==================== */
/* 文章页内容极长，背景图改为 fixed 固定不动，避免下方大片留白 */
body.single {
    background-attachment: fixed;
}

/* 移动优先：默认单列；宽屏两列且正文列最小宽度，避免无正文时整栏被挤成窄条 */
body.single .main-content {
    width: 100%;
    max-width: var(--site-align-max);
    /* 头部已在文档流中占位，勿再叠加「固定导航高度」式上边距，否则与导航之间会出现双倍空白 */
    margin: 12px auto 48px;
    padding: 0 var(--site-align-pad-x);
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

.content-wrapper {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 901px) {
    body.single .main-content {
        grid-template-columns: minmax(480px, 1fr) 300px;
    }
}

/* 文章主体（min-width:0 避免网格子项被超长内容撑破侧栏）
   移动优先：默认紧内边距；宽屏再加大，避免后面的桌面规则盖掉 max-width 媒体查询 */
.article-single {
    background: #fff;
    padding: 14px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 901px) {
    .article-single {
        padding: 36px 40px;
    }
}

/* 文章头部 */
.article-header {
    margin-bottom: 32px;
}

.article-category {
    margin-bottom: 12px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    margin-right: 8px;
    text-decoration: none;
    border-radius: 2px;
}

.category-tag:hover {
    background: #dbeafe;
}

.article-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: #888;
    font-size: 13px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-meta svg {
    opacity: 0.6;
}

/* 特色图片 */
.article-featured-img {
    margin-bottom: 32px;
}

.article-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* 文章正文：无空格长串（如连续数字）也要在栏宽内换行，不溢出盖住侧栏 */
.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
}

.article-content p {
    margin-bottom: 1.5em;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.article-content pre,
.article-content code {
    max-width: 100%;
}

.article-content pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.article-content .wp-block-table {
    overflow-x: auto;
    max-width: 100%;
}

.article-content table {
    max-width: 100%;
}

.article-content iframe,
.article-content video {
    max-width: 100%;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Noto Serif SC', serif;
    margin: 2em 0 1em;
    color: #1a1a1a;
}

.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 20px; }
.article-content h4 { font-size: 18px; }

.article-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    color: #4a5568;
}

.article-content ul,
.article-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
}

/* 分页样式 */
.article-pagination {
    margin: 2em 0;
    padding: 12px 16px;
    background: #f8fafc;
    font-size: 14px;
}

.article-pagination .page-numbers {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 2px;
    background: #e2e8f0;
    color: #4a5568;
}

/* 标签 */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.article-tags svg {
    color: #888;
}

.tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
}

.tag-item:hover {
    background: #e2e8f0;
    color: #334155;
}

/* 上下篇导航（轻边框、弱阴影，偏苹果风）
 * minmax(0,1fr) + .nav-post min-width:0：避免 nowrap 标题撑破网格，两列等宽不溢出 */
.article-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 40px;
    min-width: 0;
}

.nav-post {
    display: block;
    min-width: 0;
    padding: 14px 16px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow-wrap: anywhere;
    word-break: break-word;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-post:hover {
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.09);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-prev { text-align: left; }
.nav-next { text-align: right; }

.nav-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.nav-title {
    display: block;
    min-width: 0;
    font-size: 14px;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 相关文章 */
.related-posts {
    margin-bottom: 40px;
}

.related-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.title-bar {
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #3b82f6;
    margin-right: 10px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.related-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    text-decoration: none;
    color: inherit;
}

.related-thumb {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #f1f5f9;
    margin-bottom: 10px;
    border-radius: 10px;
    flex-shrink: 0;
}

.related-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-thumb .no-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12px;
}

.related-info h4 {
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-info time {
    font-size: 12px;
    color: #888;
}

.related-item:hover .related-info h4 {
    color: #2563eb;
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    min-width: 0;
}

.sidebar-widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.widget-categories {
    display: none;
}

.widget-title {
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

/* 搜索 */
.search-form {
    display: flex;
    gap: 0;
}

.search-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-right: none;
    font-size: 14px;
    outline: none;
}

.search-form input:focus {
    border-color: #3b82f6;
}

.search-form button {
    padding: 10px 14px;
    background: #3b82f6;
    border: none;
    color: #fff;
    cursor: pointer;
}

.search-form button:hover {
    background: #2563eb;
}

/* 热门文章 */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.popular-list .popular-title {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-list time {
    font-size: 12px;
    color: #888;
}

.popular-list a:hover .popular-title {
    color: #2563eb;
}

/* 分类列表 */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #4a5568;
    text-decoration: none;
}

.category-list a:hover {
    color: #2563eb;
}

/* 评论区 */
.comments-area {
    background: #fff;
    padding: 32px;
    margin-top: 32px;
}

.comments-title {
    font-size: 18px;
    margin-bottom: 24px;
    color: #1a1a1a;
}

/* ==================== 归档页面 ==================== */
.archive-content {
    max-width: var(--site-align-max);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    /* 头部非 fixed，仅需与路径条之间紧凑留白；左右内边距与 .header-container 一致 */
    padding: 12px var(--site-align-pad-x) 0;
}

/* 简洁路径导航（移动优先：与 .header-container 左右对齐） */
.archive-breadcrumb {
    padding: 8px 0 4px;
    font-size: 13px;
    color: #64748b;
    max-width: none;
    margin: 0;
    width: 100%;
    overflow: hidden;
}

.archive-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.archive-breadcrumb a:hover {
    color: #2563eb;
}

.bc-sep {
    margin: 0 6px;
    color: #cbd5e1;
}

.bc-current {
    color: #334155;
}

.archive-body {
    padding: 24px 12px;
    background: #f4f7fb;
    /* 限制内容最大宽度，防止文章卡片超出页面 */
    max-width: 100%;
    overflow: hidden;
}

@media (min-width: 901px) {
    .archive-breadcrumb {
        padding: 8px 0 4px;
    }

    .archive-body {
        padding: 40px 30px;
        max-width: 100%;
        overflow: hidden;
    }

    .archive-card--text .card-body {
        padding: 22px 24px;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .card-body {
        padding: 20px;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto 40px;
    box-sizing: border-box;
    /* 确保网格不会超出父容器 */
    overflow: hidden;
}

/* PC端：限制最大列数，避免卡片撑破页面 */
@media (min-width: 901px) {
    .archive-grid {
        /* 确保三列网格的总宽度不会超出容器 */
        max-width: 100%;
    }
}

/* 归档网格响应式须写在本块之后，否则会覆盖上方 @media(max-width:900px) 中的规则 */
@media (max-width: 900px) {
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .archive-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.archive-card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    /* 确保卡片不会超出其网格单元格 */
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* 纯文字列表卡片（无缩略图） */
.archive-card--text .card-body {
    padding: 16px 14px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.card-category--inline {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
}

.archive-card--text .card-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    /* 确保链接区域不会超出父容器 */
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.card-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f1f5f9;
    /* 确保缩略图容器不会超出卡片宽度 */
    max-width: 100%;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e1;
}

.card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    font-size: 12px;
}

.card-link:hover .card-thumb img {
    transform: scale(1.08);
}

.card-body {
    padding: 16px 14px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* 确保标题不会超出容器宽度 */
    max-width: 100%;
    min-width: 0;
}

.card-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* 确保摘要不会超出容器宽度 */
    max-width: 100%;
    min-width: 0;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.card-meta time,
.card-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-link:hover .card-title {
    color: #2563eb;
}

/* 分页 */
.pagination,
.posts-pagination,
.wp-pagenavi {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.pagination a,
.pagination span,
.page-numbers {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    color: #4a5568;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
}

.pagination a:hover,
.pagination .current,
.page-numbers.current {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* 空状态 */
.archive-empty {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.archive-empty svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.archive-empty p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-write {
    display: inline-block;
    padding: 10px 24px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

/* ==================== 回到顶部按钮 ==================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #3b82f6;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-4px);
}
