/* style.css - 河南省人力资源和社会保障厅政策文件页面优化 */

/* =========== 基础重置与全局样式 =========== */
:root {
    --primary-color: #c80000;
    --secondary-color: #b20000;
    --accent-color: #F79600;
    --text-color: #000;
    --light-gray: #f5f5f5;
    --border-color: #d9d9d9;
    --table-header-bg: #CEEAFF;
    --link-color: #000;
    --link-hover-color: #c80000;
    --font-family-base: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    --font-family-title: 'SimHei', '黑体', var(--font-family-base);
    --selected-bg: #fff5f5;
    --selected-color: #c80000;
    --selected-border: #ff0000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    min-width: 1000px;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* =========== 布局容器 =========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========== 头部区域优化 =========== */
.head {
    position: relative;
    background: #bb0000;
    min-height: 251px;
}


/* =========== 面包屑导航 =========== */
.rst_dqwz {
    width: 100%;
    max-width: 1000px;
    margin: 10px auto 0;
    padding: 10px 0;
    font-size: 14px;
}

.rst_dqwz td {
    padding: 5px 0;
    font-size: 14px;
    color: #666;
}

.rst_dqwz a {
    color: #666;
}

.rst_dqwz a:hover {
    color: var(--primary-color);
}

/* =========== 主要内容区域 =========== */
.main-content {
    display: flex;
    max-width: 1000px;
    margin: 20px auto 40px;
    gap: 20px;
}

/* 左侧菜单 */
.styleCon {
    display: flex;
    flex-direction: row;
    width: 1000px;
    margin: 0 auto;
    margin-bottom: 32px !important;
}

.menu-left {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--border-color);
}
.navigation {
    background: #F1F1F1;
    color: #333;
    padding: 5px 0;
    font-size: 16px;
    font-weight: normal;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 88%;
    margin: 10px auto;
}

.menu-left ul {
    /* border: 1px solid var(--border-color); */
    border-top: none;
    background: white;
    list-style: none;
}

/* .menu-left li {
    list-style: none;
    border-bottom: 1px solid var(--border-color);
} */

.menu-left li:last-child {
    border-bottom: none;
}

.menu-left li a {
    display: block;
    padding: 4px 15px;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.menu-left li.all a:hover {
    background-color: #B3B3B3;
    color: #fff;
}
.menu-left li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}
.num{
    color:#B3B3B3;
}
.all .num{
    color:#fff;
}
.menu-left li.all {
    background-color: #B3B3B3;
    border-left: none;
    /* margin-bottom: 10px; */
}

.menu-left li.all a {
    color: #fff;
    font-weight: normal;
}

/* 右侧内容区域 */
.menu-right {
    margin-left: 10px;
    flex: 1;
    min-width: 0;
}

/* 表格优化 */
#mes {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 14px;
}

#mes th {
    background: var(--table-header-bg);
    padding: 20px 8px;
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    border: 2px solid #fff;
    font-size: 16px;
    height: 36px;
}

#mes td {
    padding: 12px 2px;
    border: 2px solid #fff;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}

#mes tbody tr {
    transition: background-color 0.2s ease;
}

#mes tbody tr:hover {
    background-color: #f9f9f9;
}

/* 隔行变色 - 浅蓝色背景 */
#mes tbody tr:nth-child(odd) {
    background-color: var(--table-header-bg);
}
#mes tbody tr:nth-child(even) {
    background-color: #F3F3F3;
}
/* 选中行样式 - 红色边框包裹 */
#mes tbody tr.selected,
#mes tbody tr.active {
    background-color: var(--selected-bg) !important;
    border: 2px solid var(--selected-border) !important;
    position: relative;
}

#mes tbody tr.selected td,
#mes tbody tr.active td {
    border-top: 2px solid var(--selected-border);
    border-bottom: 2px solid var(--selected-border);
    background-color: var(--selected-bg);
}

#mes tbody tr.selected td:first-child,
#mes tbody tr.active td:first-child {
    border-left: 2px solid var(--selected-border);
}

#mes tbody tr.selected td:last-child,
#mes tbody tr.active td:last-child {
    border-right: 2px solid var(--selected-border);
}

/* 列宽设置 */
#mes th:nth-child(2) { width: 38%; }   
#mes th:nth-child(1){
    width: 8%;
}

#mes th:nth-child(3),#mes th:nth-child(4),#mes th:nth-child(5){
    width: 16%;
}


/* 标题列左对齐，其他居中 */
#mes td:nth-child(2) {
    text-align: left;
}

#mes td:nth-child(2) a {
    color: var(--link-color);
    text-decoration: none;
}

/* =========== 分页样式优化 =========== */
.page {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
    list-style: none;
    gap: 5px;
}

.page li {
    display: inline-block;
}

.page a, .page span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: #666;
    background: white;
    transition: all 0.3s ease;
}

.page a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

.menu-left li.active {
    background-color: var(--selected-bg);
    border-left: 3px solid var(--selected-border);
}

.menu-left li.active a {
    color: var(--selected-color);
}

.page .active span {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
}
br[clear="all"] {
    display: none;
}
/* =========== 页脚区域 =========== */
.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

/* =========== 清浮动辅助类 =========== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* =========== 适老模式增强 =========== */
.oldModel .menu-left li a {
    padding: 6px 10px;
}

.oldModel #mes th,
.oldModel #mes td {
    padding: 16px 2px;
}

.oldModel .page a, 
.oldModel .page span {
    font-size: 16px;
    min-width: 40px;
    height: 40px;
}
.oldModel #mes th:nth-child(2) { width: 34%; }   
.oldModel #mes th:nth-child(1){
    width: 8%;
}

.oldModel #mes th:nth-child(3),.oldModel #mes th:nth-child(4),.oldModel #mes th:nth-child(5){
    width: 18%;
}
/* =========== 动画效果 =========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content {
    animation: fadeIn 0.5s ease-out;
}

/* =========== 高对比度模式支持 =========== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #b30000;
        --text-color: #000;
        --border-color: #000;
    }
    
    #mes th {
        background: #000;
        color: #fff;
    }
    
    #mes tbody tr:hover {
        background-color: #eee;
        outline: 2px solid #000;
    }
}

/* =========== 减少运动偏好 =========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}