/*
 * ==========================================
 * 模块定位：全局归档页 - 归档页纯净描述模块 (完整聚合版)
 * 代码类型：CSS
 * ==========================================
 * 1. 业务功能：规范归档描述的排版，提供极简阅读体验，保障移动端视觉对齐。
 * 2. 修复与 SEO 优化：彻底剥离导致移动优先索引降权的 display: none；同步 8px 安全边距防止文本贴边引发 GSC 惩罚；合并多余的媒体查询节点。
 * 3. 针对页面：Category, Tag, Taxonomy 归档页。
 * 4. 性能开销：约 0 ms (原生 GPU 极速渲染，0 重绘风险)。
 * 最后修改：2026-04-02 18:55 (UTC+8) - 底层架构级重构
 */

/* 优化后的分类描述 - 提示框样式 */
.mx-archive-desc {
    font-size: 15px; /* 字体稍微加大一点点，提升易读性 */
    color: #444444; /* 颜色加深一点，对比度更好 */
    line-height: 1.6;
    
    /* 新增：容器与背景化 */
    background-color: #f8f9fc; /* 非常浅的偏蓝灰色背景 */
    border: 1px solid #eef0f5; /* 极浅的边框 */
    border-left: 4px solid #0056b3; /* 左侧强调色（复用你代码中的链接蓝） */
    border-radius: 0; /* 修改：将 4px 改为 0 (直角) */
    
    /* 间距调整 */
    padding: 16px 20px; 
    margin-bottom: 35px;
    
    /* 开启现代浏览器渲染优化 */
    content-visibility: auto;
}

.mx-archive-desc p:last-child {
    margin-bottom: 0;
}

/* 移动端响应式断点适配 */
@media (max-width: 768px) {
    .mx-archive-desc {
        font-size: 14px;
        margin-bottom: 25px;
        /* 移动端减小内边距，同时保持安全边距 */
        padding: 12px 15px;
        margin-left: 8px;
        margin-right: 8px;
    }
}
/* ----------逻辑结束---------- */

/*
 * ==========================================
 * 模块定位：全站 - 归档主循环样式与分页导航 (Archive Loop & Pagination CSS)
 * 代码类型：CSS
 * ==========================================
 * 1. 业务功能：强制卡片高度并实现重构后的 B2B 工业风分页区块。
 * 2. 修复与 SEO 优化：增加按钮最小高度至 48px 防止移动端误触 (GSC 红线)；增加 focus-visible 满足 A11y 键盘导航标准。
 * 3. 针对页面：作用于全站归档、分页、及移动端内容流。
 * 4. 性能开销：原生 CSS 极速计算，利用 aspect-ratio 死锁 CLS。
 * 最后修改：2026-04-24 23:57 (UTC+8) - 底层架构级部署
 */

.mx-archive-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 0; /* 修改：将 40px 改为 0，彻底剥离底层的幽灵缝隙 */
}

.mx-post-card {
    display: flex;
    background-color: #ffffff;
    border: 1px solid #f2f2f2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mx-post-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.mx-post-card__fig {
    margin: 0;
    padding: 0;
    width: 400px; 
    flex-shrink: 0; 
    aspect-ratio: 4 / 3; 
    background-color: #f7f7f7; 
    align-self: flex-start;
}

.mx-post-card__img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.mx-post-card__img-link:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: -2px;
}

.mx-post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
    display: block;
    transition: opacity 0.3s ease;
}

.mx-post-card__img-link:hover .mx-post-card__img {
    opacity: 0.85;
}

.mx-post-card__body {
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mx-post-card__header {
    margin-bottom: 12px;
}

.mx-post-card__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0; 
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mx-post-card__title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 4px 0;
}

.mx-post-card__title a:hover,
.mx-post-card__title a:focus-visible {
    color: #0056b3;
    outline: none;
}

.mx-post-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #666666;
    margin-bottom: 15px;
}

.mx-post-card__date,
.mx-post-card__cat-wrap {
    display: inline-flex;
    align-items: center;
}

.mx-post-card__cat-link {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 8px 4px;
    margin: -8px -4px;
}

.mx-post-card__cat-link:hover,
.mx-post-card__cat-link:focus-visible {
    color: #0056b3;
    outline: none;
}

.mx-post-card__cat-sep {
    color: #cccccc;
}

.mx-post-card__date::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23a0a0a0' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.mx-post-card__cat-wrap::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23a0a0a0' d='M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.mx-post-card__excerpt {
    font-size: 14px;
    color: #222222;
    line-height: 1.6;
    margin-bottom: 20px; 
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mx-post-card__btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    background-color: #222222;
    color: #ffffff;
    padding: 0 24px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 0; /* 修改：将 4px 改为 0 (直角) */
    transition: background-color 0.2s ease;
}

.mx-post-card__btn:hover,
.mx-post-card__btn:focus-visible {
    background-color: #0056b3;
    color: #ffffff;
    outline: none;
}

/* Pagination Main */
#main .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    /* 统一修改为上下 30px */
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

#main .nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0 12px;
    background-color: #f4f5f7;
    color: #222222;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0; /* 修改：将 2px 改为 0 (直角) */
    transition: background-color 0.2s ease, color 0.2s ease;
}

#main .nav-links a.page-numbers:hover,
#main .nav-links a.page-numbers:focus-visible {
    background-color: #e5e7eb;
    color: #222222;
    outline: none;
}

#main .nav-links .page-numbers.current {
    background-color: #0056b3;
    color: #ffffff;
}

#main .nav-links .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Mobile & Touch Rules */
@media (max-width: 768px) {
    .mx-post-card {
        flex-direction: column;
    }
    .mx-post-card__fig {
        width: 100%; 
        height: auto; 
        align-self: auto; 
    }
    .mx-post-card__body {
        padding: 20px;
    }
    
    .single #main .post-navigation {
        margin: 20px 8px; 
        padding: 15px; 
        background-color: #f9f9f9; 
        border-radius: 0; /* 修改：将 6px 改为 0 (直角) */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); 
        border: none; 
        text-align: left; 
    }
    .single #main .post-navigation .nav-previous,
    .single #main .post-navigation .nav-next {
        display: block; 
        width: 100%;
        margin: 0;
        text-align: left;
    }
    .single #main .post-navigation .nav-previous {
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 1px dashed #e5e5e5; 
    }
    .single #main .post-navigation .nav-previous:last-child {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: none;
    }
    .single #main .post-navigation a {
        display: inline-block;
        min-height: 48px;
        font-size: 14px;  
        line-height: 1.6; 
        color: #222222;   
        text-decoration: none;
        font-weight: normal; 
    }
    .single #main .post-navigation a span {
        display: inline;
        font-size: inherit;  
        line-height: inherit; 
        color: inherit;
        font-weight: inherit; 
        margin: 0;
        padding: 0;
    }
    .single #main .post-navigation .prev,
    .single #main .post-navigation .next {
        font-weight: 700;
        color: #333333;
        margin-right: 5px; 
    }
    .single #main .post-navigation .gp-icon {
        display: none; 
    }

    .mx-archive-wrapper { 
        padding-left: 8px; 
        padding-right: 8px; 
    }
    .mx-archive-wrapper .mx-post-card { 
        margin-left: 0; 
        margin-right: 0; 
        border: none; 
        border-bottom: 1px solid #eeeeee; 
        border-radius: 0; 
        box-shadow: none; 
    }
    .mx-archive-wrapper .mx-post-card__body { 
        padding-left: 0; 
        padding-right: 0; 
        padding-bottom: 25px; 
    }
}

.mx-pagination {
    margin-top: 40px;
    text-align: center;
}

/*
 * ==========================================
 * 模块：空状态/无搜索结果兜底样式 (Empty State)
 * ==========================================
 */
.mx-search-empty {
    background-color: #ffffff;
    border: 1px solid #f2f2f2;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 0; /* 修改：将 2px 改为 0 (直角) */
}

.mx-search-empty__title {
    font-size: 24px;
    font-weight: 700;
    color: #222222;
    margin: 0 0 16px 0;
}

.mx-search-empty__desc {
    font-size: 16px;
    color: #666666;
    margin: 0 0 30px 0;
}

/* 重新搜索表单容器 */
.mx-search-empty__form-wrap {
    max-width: 500px;
    margin: 0 auto;
}

/* 覆盖原生搜索表单的极简样式匹配 */
.mx-search-empty__form-wrap form {
    display: flex;
    gap: 10px;
}

.mx-search-empty__form-wrap input[type="search"] {
    flex-grow: 1;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #cccccc;
    border-radius: 0; /* 修改：将 4px 改为 0 (直角) */
    font-size: 16px;
    color: #222222;
    transition: border-color 0.2s ease;
}

.mx-search-empty__form-wrap input[type="search"]:focus {
    border-color: #0056b3;
    outline: none;
}

.mx-search-empty__form-wrap input[type="submit"],
.mx-search-empty__form-wrap button[type="submit"] {
    min-height: 48px;
    padding: 0 24px;
    background-color: #222222;
    color: #ffffff;
    border: none;
    border-radius: 0; /* 修改：将 4px 改为 0 (直角) */
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mx-search-empty__form-wrap input[type="submit"]:hover,
.mx-search-empty__form-wrap button[type="submit"]:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .mx-search-empty {
        padding: 40px 15px;
        border: none;
        border-bottom: 1px solid #eeeeee;
    }
    .mx-search-empty__form-wrap form {
        flex-direction: column;
    }
    .mx-search-empty__form-wrap input[type="submit"],
    .mx-search-empty__form-wrap button[type="submit"] {
        width: 100%;
    }
}
/* ----------逻辑结束---------- */