/* --- 🏛️ 基础重置与字体规范（教务/政府网风骨） --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: "SimSun", "STSong", "Songti SC", serif; /* 正文强制宋体 */
    background-color: #f4f7fa;
    color: #333;
    display: flex;
    flex-direction: column; /* 保证页脚粘在底部 */
}

/* 标题强制用黑体 */
h1, h2, h3, h4, .title-bold, .logo {
    font-family: "SimHei", "Heiti SC", "Microsoft YaHei", sans-serif !important;
    font-weight: bold;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* 窄屏版心：经典 1000px 政府网最大宽度 */
.portal-container {
    flex: 1; /* 撑满上下剩余空间，将页脚顶到最下面 */
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 🛰️ 顶部导航栏 (升级为超硬核复古质感) --- */
.header-navbar {
    background: linear-gradient(to bottom, #004080 0%, #002b55 50%, #001f3f 100%); /* 经典政务深蓝渐变 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    height: 65px;
    border-bottom: 3px solid #00152a; /* 底部深色硬切线 */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2); /* 增加顶部高光内阴影 */
    z-index: 1000;
    flex-shrink: 0;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.8); /* 经典字重投影 */
    color: #ffffff;
}

.nav-menu {
    display: flex;
    list-style: none;
    height: 100%;
    align-items: center; /* 垂直居中对齐 */
}

.nav-item {
    font-family: "SimSun", serif !important; /* 导航栏强制宋体 */
    font-weight: bold;
    color: #dae8fc;
    outline: none;
    display: flex;
    align-items: center;
    height: 40px; /* 控制标签高度，不撑满，做成类似选项卡卡肉 */
    padding: 0 24px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 3px;
}

.nav-item a {
    color: inherit;
    display: flex;
    align-items: center;
    height: 100%;
}

/* 激活态：做出 90 年代立体教务系统卡槽切片感 */
.nav-item.active {
    color: #fff;
    background: linear-gradient(to bottom, #ffaa33, #e08800); /* 亮橙色立体渐变 */
    border: 1px solid #cc7700;
    border-bottom: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 -2px 5px rgba(0,0,0,0.2);
    border-radius: 4px 4px 0 0; /* 做成类似文件夹卡片形态 */
    height: 45px; /* 故意凸出一截，咬合感！ */
    margin-top: 20px; /* 向下挤压咬死底部边框 */
}

/* --- ✨ 中间 Aero 毛玻璃 Banner 拟物组件 --- */
.aero-banner {
    background: linear-gradient(135deg, #0050b3, #002244);
    color: #fff;
    padding: 30px 40px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #003366;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2), 0 4px 8px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.aero-banner::after {
    content: '';
    position: absolute;
    top: 0; left: -50%; width: 200%; height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0));
    transform: rotate(-15deg);
}

.aero-banner h1 {
    font-size: 26px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 8px;
}

.aero-banner p {
    font-size: 14px;
    opacity: 0.9;
}

/* --- 🧩 双栏高密度内容面板区 --- */
.grid-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-layout { grid-template-columns: 1fr; }
}

.content-panel {
    background: #ffffff;
    border: 1px solid #c2d1e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 4px;
    margin-bottom: 20px;
}

.content-panel-header {
    background-color: #eef3f9;
    border-bottom: 1px solid #c2d1e5;
    padding: 10px 15px;
    font-size: 15px;
    color: #003366;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 功能魔方 Cube */
.cube-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 15px;
}

@media (max-width: 480px) {
    .cube-grid { grid-template-columns: 1fr; }
}

.cube-item {
    background: #fafafa;
    border: 1px solid #d3e0f1;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.cube-item:hover {
    background-color: #fffdf4;
    border-color: #ff9900;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.cube-icon {
    font-size: 30px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #c2d1e5;
    padding: 8px;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.cube-title {
    font-size: 15px;
    color: #003366;
    margin-bottom: 4px;
    font-weight: bold;
}

.cube-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* 新闻列表列表项 */
.news-list {
    list-style: none;
    padding: 10px 15px;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #c2d1e5;
    font-size: 14px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-link {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-link::before {
    content: "•";
    color: #003366;
    font-weight: bold;
}

.news-link:hover {
    color: #ff9900;
    text-decoration: underline;
}

.news-date {
    color: #888;
    font-size: 13px;
    flex-shrink: 0;
    font-family: Arial, Helvetica, sans-serif;
}

/* --- 📜 无缝新闻阅读器界面 --- */
.article-reader {
    padding: 30px 40px;
}

.article-title {
    font-size: 22px;
    color: #000;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-meta {
    text-align: center;
    border-bottom: 1px solid #d3e0f1;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-content p {
    font-size: 15px;
    line-height: 1.8;
    text-indent: 2em; /* 经典首行缩进 */
    margin-bottom: 15px;
    text-align: justify;
}

.back-bar {
    padding: 10px 15px;
    border-bottom: 1px solid #c2d1e5;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- 📜 底部署名页脚 --- */
.site-footer {
    position: relative;
    flex-shrink: 0; 
    width: 100%;
    min-height: 80px;
    background-color: #1E553C; /* 墨绿色 */
    color: #FFFFFF;
    font-family: "Microsoft YaHei", "PingFang SC", "Heiti SC", sans-serif;
    font-weight: bold;
    font-size: 14px;
    box-sizing: border-box;
    margin-top: 40px;
}

.site-footer .footer-content {
    max-width: 1000px; /* 强制拉伸和版心同宽 */
    min-height: 80px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer .copyright {
    margin: 0;
    color: #FFFFFF;
}

.site-footer .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.site-footer .footer-links a {
    color: #FFF200; /* 黄色高亮链接 */
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.site-footer .footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* --- 📈 大列表页专有布局（占满屏幕高度、内部滚动） --- */
.list-page-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px); /* 让面板占满视口高度（扣除页眉页脚和间距） */
    min-height: 500px; /* 保证小屏下也有最低限度 */
}

.list-page-body {
    flex: 1; /* 主动吃掉中间所有的剩余垂直空间 */
    overflow-y: auto; /* 超出 20 条后，内部出现复古滚动条 */
    padding: 10px 0;
}

.dense-list {
    padding: 0 20px !important;
}

/* --- 📟 经典教务政府网分页器页脚 --- */
.pagination-footer {
    padding: 15px 20px;
    border-top: 1px solid #c2d1e5;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #333;
    flex-shrink: 0; /* 禁止被缩减挤压 */
}

.pagination-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-btn, .page-num {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #c2d1e5;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled), .page-num:hover:not(.active) {
    background-color: #fffdf4;
    border-color: #ff9900;
    color: #003366;
}

.page-num.active {
    background: linear-gradient(to bottom, #ffaa33, #e08800);
    color: #fff;
    border-color: #cc7700;
    font-weight: bold;
    cursor: default;
}

.page-btn.disabled {
    color: #ccc;
    background-color: #f5f5f5;
    cursor: not-allowed;
    border-color: #e3e3e3;
}

.pagination-info strong {
    color: #003366;
    font-weight: bold;
}

@media (max-width: 768px) {
    .header-navbar {
        flex-direction: column;
        height: auto;
        padding: 15px 10px;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }

    .nav-item {
        padding: 0 15px;
        font-size: 14px;
        height: 35px;
    }

    .nav-item.active {
        height: 40px;
        margin-top: 10px;
    }

    .site-footer .footer-content {
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        text-align: center;
    }

    .site-footer .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}