* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #fff;
    color: #333;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1658px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* 响应式布局 */
@media (max-width: 1700px) {
    .container {
        max-width: 1400px !important;
    }
}

@media (max-width: 1440px) {
    .container {
        max-width: 1200px !important;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 992px !important;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 768px !important;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* 顶部 */
.math-header {
    position: relative;
    overflow: hidden;
}

.math-logo {
    max-width: 100%;
    height: auto;
}

.math-banner {
    padding: 20px 0;
    display: flex;
    align-items: center;
    background-image: url("../imgs/header-bg.jpg");
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: right center;

}

.math-banner .row {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
}

.math-banner .col-md-7 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.header-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.header-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-link-item i {
    font-size: 28px;
    margin-bottom: 8px;
    color: #0052a3;
    transition: all 0.3s ease;
}

.header-link-item span {
    font-size: 14px;
    color: #666;
}

.header-link-item:hover {
    transform: translateY(-3px);
}

.header-link-item:hover i {
    color: #003366;
    transform: scale(1.1);
}

.header-link-item:hover span {
    color: #0052a3;
}

/* 导航 */
.navbar-custom {
    background-color: #0052a3;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
}

.navbar-custom .wp_nav {
    display: flex;
    justify-content: space-around;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-custom .nav-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.navbar-custom .nav-item a {
    color: #fff;
    font-size: 16px;
    padding: 16px 22px;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s;
    background-color: #0052a3;
}

.navbar-custom .nav-item a:hover {
    background-color: #004080;
    color: #fff;
}

/* 子菜单样式 */
.navbar-custom .sub-nav {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 120px;
width: 100%!important;
    background-color: #0052a3;
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    z-index: 1000;
}

.navbar-custom .nav-item:hover .sub-nav {
    display: block;
}

.wp_nav > li.nav-item:hover > a .item-name {
    color: #fff;
}

.navbar-custom .sub-nav .nav-item {
    text-align: left;
    flex: none;
}

.navbar-custom .sub-nav .nav-item a {
    padding: 12px 20px;
    font-size: 15px;
color: #fff;
text-align: center;
}

.navbar-custom .sub-nav .sub-nav {
    left: 100%;
    top: 0;
}


/* 汉堡导航样式 */
.navbar-custom .navbar-toggle {
    border-color: #fff;
}

.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
    background-color: #004080;
}

.navbar-custom .navbar-toggle .icon-bar {
    background-color: #fff;
}

@media (min-width: 768px) {
    .navbar-nav {
        float: none !important;
    }
}

/* 轮播 */
.banner-carousel {
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    padding-bottom: 23.96%;
    height: 0;
    overflow: hidden;
}

.swiper-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-prev,
.swiper-button-next {
    opacity: 0.7;
    top: 50%;
    transform: translateY(-50%);
}

/* 通用标题 */
.section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    position: relative;
}

.section-title .more-link {
    position: absolute;
    right: 0;
}

.section-title h3 {
    font-size: 36px;
    font-weight: 600;
    color: #0052a3;
    margin: 0;
}

.more-link {
    color: #666;
    font-size: 15px;
}

.more-link:hover {
    color: #0052a3;
}

/* 双栏标题 */
.section-title-side {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 3px solid #0052a3;
    padding-bottom: 10px;
    min-height: 40px;
}

.section-title-side h3 {
    flex: 1;
    font-size: 24px;
    font-weight: 600;
    color: #0052a3;
    margin: 0;
}

.more-dot {
    flex-shrink: 0;
    color: #0052a3;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.more-dot:hover {
    transform: scale(1.3);
    color: #003366;
}

/* 学院新闻 */
.news-section {
    margin-bottom: 50px;
    position: relative;
}

.news-section .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.news-img-col,
.news-list-col {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.news-img-box {
    height: 420px;
    overflow: hidden;
    position: relative;
}

.news-list {
    height: 100%;
    list-style: none;
    padding: 0;
}

.news-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-img-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 54px;
    box-sizing: border-box;
    border-radius: 4px;
}

.news-list li {
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-list li .notice-date {
    flex-shrink: 0;
    margin-right: 25px;
}

.news-list li a {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.news-list li:hover {
    background: #e9f0f7;
    color: #0052a3;
    transform: translateX(10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 通知公告 */
.notice-section {
    margin-bottom: 8px;
}

.notice-card {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.notice-date {
    width: 65px;
    height: 65px;
    background: #0052a3;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.notice-date .day {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.notice-date .year {
    font-size: 12px;
    margin-top: 4px;
}

.notice-title {
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.notice-card:hover {
    transform: translateY(-5px);
    background-color: #f8f9fa;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.notice-card:hover .notice-title {
    color: #0052a3;
    font-weight: 500;
}

/* 双栏 */
.double-section {
    margin-bottom: 20px;
}

.item-box {
    padding: 0;
}

.item-list {
    list-style: none;
    padding: 0 20px 0 35px;
}

.item-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.item-list li:hover {
    padding-left: 5px;
}

.item-list li span {
    flex-shrink: 0;
    margin-left: 10px;
}

.item-list li a {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    transition: color 0.2s ease;
}

.item-list li a:hover {
    color: #0052a3;
}

/* 底部 */
.footer {
    background-color: #003366;
    color: white;
    padding: 30px 0;
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-info {
    flex: 1;
}

.footer-info p {
    margin: 5px 0;
    font-size: 14px;
    text-align: center;
}

.footer-info img {
    height: 65px;
    margin: 0 auto;
    display: block;
    margin: auto;
}

.footer-info div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding-top: 20px;
}

.footer-links {
    flex: 1;
    text-align: right;
    padding-left: 30px;
    position: relative;
}

/* 竖线分隔线（渐变渐隐效果） */
.footer-links::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;       /* 顶端留空，不让线顶到头 */
  bottom: 10%;    /* 底端留空 */
  width: 1px;     /* 线条粗细 */
  background: linear-gradient(
    to bottom,
    transparent 0%,            /* 顶端渐隐 */
    rgba(100, 100, 100, 0.5) 20%,  /* 中间实线 */
    rgba(100, 100, 100, 0.5) 80%,  /* 中间实线 */
    transparent 100%           /* 底端渐隐 */
  );
/* 关键：让线条上下“变细”的渐隐效果 */
  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}
.footer-links ul {
    list-style: none;
    padding: 20px 0 0 20px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links li {
    margin-bottom: 8px;
    padding: 5px 10px;
}

.footer-links li a {
    color: #fff;
    font-size: 15px;
    white-space: normal;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Footer 响应式布局 */
@media (max-width: 991px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-info {
        width: 100%;
        text-align: center;
    }

    .footer-info div {
        flex-direction: column;
        gap: 5px;
        padding-top: 15px;
    }

    .footer-links {
        width: 100%;
        text-align: center;
        padding-left: 0;
        margin-top: 25px;
        border-top: 1px solid rgba(100, 100, 100, 0.3);
        padding-top: 25px;
    }

    .footer-links::before {
        display: none;
    }

    .footer-links ul {
        justify-content: center;
        padding: 0;
    }

    .footer-links li {
        padding: 5px 8px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 20px 0;
    }

    .footer-info img {
        height: 50px;
        max-width: 100%;
        width: auto;
    }

    .footer-info p {
        font-size: 13px;
    }

    .footer-links li a {
        font-size: 14px;
    }

    .footer-links ul {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .footer-links ul {
        gap: 10px;
    }

    .footer-links li {
        padding: 4px 6px;
    }

    .footer-links li a {
        font-size: 13px;
    }
}

/* 响应式调整 */
@media (max-width: 991px) {
    /* 顶部链接 */
    .header-links {
        gap: 15px;
    }

    .header-link-item i {
        font-size: 22px;
    }

    .header-link-item span {
        font-size: 12px;
    }

    /* 新闻板块 */
    .news-section {
        padding: 20px 0;
        margin-bottom: 10px;
    }

    .news-section .row {
        flex-direction: column;
    }

    .news-img-col,
    .news-list-col {
        width: 100%;
        padding: 0 !important;
    }

    .news-img-box {
        height: 300px;
    }

    .news-img-box img {
        object-position: center center;
    }

    .news-list {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .news-list li {
        padding: 16px 20px;
    }

    /* 双栏栏目padding重置 */
    .double-section .left,
    .double-section .right {
        padding: 0 !important;
    }

    .item-list {
        padding-left: 0;
        padding-right: 0;
    }

    /* 移除所有.right的padding-left */
    .right {
        padding-left: 0 !important;
    }
}

@media (max-width: 768px) {
    /* 顶部 */
    .math-banner {
        padding: 15px 0;
    }

    .header-links {
        display: none;
    }

    .banner-carousel {
        display: none;
    }

    /* 导航 */
    .navbar-custom .wp_nav {
        display: flex;
        flex-direction: column;
        width: auto;
        margin: 0 -15px;
    }

    .navbar-custom .nav-item {
        flex: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .navbar-custom .nav-item a {
        padding: 12px 20px;
        text-align: center;
    }

    .navbar-custom .nav-item:last-child {
        border-bottom: none;
    }

    /* 手机端子菜单 */
    .navbar-custom .sub-nav {
        position: static;
        display: none;
        background-color: #004080;
        padding-left: 20px;
    }

    .navbar-custom .nav-item:hover .sub-nav,
    .navbar-custom .nav-item .sub-nav {
        display: none;
    }

    /* 新闻列表 */
    .news-list li {
        padding: 14px 16px;
    }
}

/* 导航栏响应式调整 */
@media (min-width: 1100px) and (max-width: 1200px) {
    .navbar-custom .nav-item a {
        padding: 16px 10px;
        font-size: 14px;
    }
}

@media (min-width: 992px) and (max-width: 1099px) {
    .navbar-custom .nav-item a {
        padding: 16px 8px;
        font-size: 13px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .navbar-custom .nav-item a {
        padding: 16px 6px;
        font-size: 12px;
    }
}

/* 左右栏目之间的距离调整，原本col-6带15px的内边距，现在再增加20px，两边距离70px */
.left {
    padding-right: 30px;
}
.right {
    padding-left: 30px;
}
.news-img-col.left {
    padding-right: 45px;
}

/* listcolumn页面样式 */
.breadcrumb {
    background-color: #fff;
    margin-bottom: 5px;
    font-size: 16px;
}
.breadcrumb>.container>div {
    padding: 8px 40px;
}

.category .wp_listcolumn {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: none;
}

.category .wp_listcolumn .wp_column {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category .wp_listcolumn .wp_column a {
    background: none;
    border: none;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.category .wp_listcolumn .wp_column a:hover {
    transform: translateY(-1px);
    font-weight: bold;
}

.category .wp_column.selected {
    background: #3b82f6;
    color: #ffffff;
    padding: 8px 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between; 
}

.category .wp_column.selected::after {
    content: "";
    border: solid #ffffff; 
    border-width: 0 2px 2px 0; 
    display: inline-block;
    padding: 3px; 
    transform: rotate(-45deg); 
    margin-left: 8px;
}

/* 自定义的文章列表， 系统列表， 系统列表项 */
.article-list { 
    background-color: #ffffff;
    padding: 0 16px;
}
.article-list .wp_article_list .list_item .Article_Index {
    /* 隐藏前方的圆点 */
    display: none; 
}

.article-list .wp_article_list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-list .wp_article_list .list_item {
    transition: all 0.3s ease;
    display: flex;
}

.article-list .wp_article_list .list_item .pr_fields {
    flex: 1;
    min-width: 0;
}

.article-list .wp_article_list .list_item .ex_fields {
    width: 100px;
    flex-shrink: 0;
}

.article-list .wp_article_list .list_item .Article_Title {
    width: 100%;
}

.article-list .wp_article_list .list_item .Article_Title:hover {
    transform: translateY(-1px);
    font-weight: bold;
}

.article-list a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
    .article-section .container {
        flex-direction: column; 
    }
    .category {
        width: 100%;
        margin-right: 0;
        margin-bottom: 16px; 
    }

    .article-list {
        width: 100%;
    }

    .article-list a {
        display: block;
    }

    /* 左侧列表在移动端宽度调整 */
    .left-container {
        width: 100%;
    }
}
/* 修正左侧列表中有三级菜单导致的样式错位问题 */
/* 一级栏目基础样式 */
.wp_listcolumn > .wp_column {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wp_listcolumn > .wp_column > a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
}

/* 二级子菜单默认收起，不占用页面高度 */
.wp_subcolumn {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    /* 覆盖插件行内定位样式 */
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    visibility: visible !important;
    height: auto !important;
}

/* 鼠标悬浮一级栏目，展开二级菜单，页面内容自动下移 */
.wp_listcolumn > .wp_column:hover .wp_subcolumn {
    max-height: 500px; /* 设置足够大的值容纳所有二级条目 */
}

/* 二级菜单内条目样式 */
.wp_subcolumn .wp_column a {
    display: block;
    padding: 10px 35px;
    text-decoration: none;
}

/* listcolumn页面样式结束 */

/* displayinfo页面样式开始 */
.article {
    padding: 5px 0;
}

.article .container {
    background-color: #ffffff;
    max-width: 1100px!important;
}

.article-title {
    font-size: 24px;
    padding: 40px 0 10px;
    font-weight: bold;
    text-align: center;
}

.article-date {
    text-align: center;
    padding-bottom: 3px;
    position: relative;
}

.article-date::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background-color: #1e3a8a;
    position: absolute;
    bottom: -10px;
    left: 50%; 
    transform: translateX(-50%); 
}

.article-content {
    padding: 20px 40px;
}

/* 修正某些页面中pre标签宽度异常 */
.article-content pre {
    max-width:100%;        /* 最大宽度不超过屏幕 */
    white-space: pre-wrap; /* 允许自动换行 */
    word-wrap: break-word; /* 长单词自动换行 */
    overflow-wrap: break-word; /* 兼容所有浏览器 */
}

/* 修正某些页面超链接宽度异常，通常是在WordPress中生成的 */
.article-content .MsoNormal {
    word-break: break-word;
}

@media (max-width: 768px) {
    .article .container img {
        width: 100%!important;
        height: auto!important;
    }
}

/* displayinfo页面样式结束 */