* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header {
    background-color: #840808;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .layui-container {
    background-image: url("../imgs/banner.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right center;
}

.logo-title {
    height: 80px;
    padding: 20px 0 20px 30px;
}

.logo,
.title {
    float: left;
}

.logo {
    width: 200px;
}

.logo img {
    max-width: 100%;
    height: auto;
}

.title {
    font-size: 30px;
    color: #fff;
    margin-left: 40px;
    line-height: 60px;
}

/* 导航栏样式开始 */

/* 汉堡按钮样式 */
.mobile-menu-btn {
    display: none;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    z-index: 1000;
}

.show {
    display: block;
}

/* 修正系统样式 */
.wp_nav {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: 20px;
}

.nav-item {
    padding: 6px 10px;
    cursor: pointer;
}

.nav-item:hover {
    background-color: #A61C1C;
}

.nav-item:hover > a {
    color: #fff!important;
}

.nav-item:hover .sub-nav {
    background-color: #A61C1C!important;
}

.nav-item:hover .sub-nav a:hover {
    background-color: #840808!important;
}

.nav-item a {
    color: #fff;
    font-size: 16px;
}

@media screen and (max-width: 768px) {

    .wp_nav {
        flex-direction: column;
        text-align: center;
        padding: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #840808;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .wp_nav.mobile-hidden {
        display: none;
    }

    .nav-item:hover {
        background-color: #A61C1C!important;
    }

    .sub-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #A61C1C!important;
    }

}

/* 导航栏样式结束 */

/* 轮播图样式开始 */
.swiper {
    width: 100%;
    height: calc(100vh - var(--header-height, 80px));
    min-height: 400px;
    position: relative;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 轮播图导航按钮样式调整 */
.swiper-button-next,
.swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next {
    right: 20px;
}

.swiper-button-prev {
    left: 20px;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* 分页器样式 */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
}

/* 轮播图样式结束 */

/* 新闻区域开始 */
.news .layui-col-lg12,
.multiple .layui-col-lg12 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.news-title {
    color: #840808;
    text-align: center;
    font-size: 24px;
    margin: 20px 0;
}

.section-title {
    color: #840808;
    text-align: center;
    font-size: 24px;
    margin: 20px 0;
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 红线动画效果 */
.section-title::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: calc(100% - 40px);
    height: 2px;
    background-color: #a34848;
    transition: all 0.3s ease;
    transform: scaleX(0);
    transform-origin: center;
}

.section-title:last-child::before {
    width: 100%;
}

.section-title:not(:last-of-type)::after {
    content: "/";
    display: inline-block;
    margin: 0 20px;
    position: relative;
    z-index: 1;
}

.section-title:hover {
    color: #a34848;
    transform: scale(1.05);
}

.section-title:hover::before {
    transform: scaleX(1);
}

.section-title.active {
    color: #a34848;
    font-weight: bold;
}

.section-title.active::before {
    transform: scaleX(1);
}

.more {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid #840808;
    padding: 1px 5px;
    border-radius: 10px;
}

.more a {
    color: #840808;
    text-decoration: none;
}

/* 新闻卡片 */
.news-card {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.news-card-img {
    height: 400px;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-title {
    font-size: 18px;
    margin-top: 10px;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-desc {
    font-size: 14px;
    line-height: 1.5;
    height: calc(1.5em * 2);
    color: #666;
    margin-top: 10px;
    text-indent: 2em;
    /* 限制显示的行数 */
    line-clamp: 2;    
}

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.news-item {
    background-color: #f5f5f5;
    margin-bottom: 30px;
    display: flex;
}

.news-item:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.news-item:hover .news-item-title>a {
    font-weight: 600;
    color: #1d2807;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-item-date {
    flex: 1;
    text-align: center;
    padding-left: 10px;
}

.day {
    font-size: 24px;
    font-weight: bold;
}

.month {
    font-size: 14px;
    color: #888;
}

.news-item-title {
    flex: 5;
    margin-left: 30px;
    font-size: 20px;
    line-height: 60px;
    min-width: 0;
    /* 允许flex项目缩小到内容宽度以下 */
}

.news-item-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: #333;
    /* 默认链接颜色 */
    text-decoration: none;
    /* 移除下划线 */
}

/* 综合区域 */
.multiple {
    margin-top: 40px;
    background-image: url("../imgs/notice-background.png");
}

.multiple .multiple-titile-container::after {
    content: "";
    position: absolute;
    display: block;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 45%;
    height: 2px;
    background-color: #888;
}

#notice,
#party,
#teach,
#league {
    margin: 0 10px;
    display: none;
    transition: all 0.5s ease;
    min-height: 495px;
}

#notice {
    display: block;
}

@keyframes bgColorChange {
    0% {
        background-color: transparent;
    }

    100% {
        background-color: #f5f5f5;
    }
}

/* 确保图片容器在中等屏幕及以上正常显示 */
@media screen and (min-width: 769px) {

    .notice-left,
    .party-left {
        display: block !important;
    }
}

/* 标题样式 */
.multiple-section-more {
    margin: 20px auto 40px;
    width: 120px;
    border-radius: 5px;
    border: 1px solid #840808;
}

.multiple-section-more a {
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    text-align: center;
    display: block;
}

#notice.active,
#party.active,
#teach.active,
#league.active {
    display: block;
}

#notice img,
#party img,
#teach img,
#league img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* 通知公告样式 */
.notice-container {
    height: 400px;
}

.notice-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
    height: 100%;
}

.notice-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notice-item-title {
    flex: 1;
    min-width: 0;
}

.notice-item-title a {
    font-size: 16px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-day {
    font-size: 16px;
    font-weight: bolder;
}

.notice-year {
    font-size: 12px;
    color: #888;
    text-align: center;
}

.notice-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.notice-item::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg t="1753957735198" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5345" width="200" height="200"><path d="M923.917 399.85h-38.189L586.289 211.725c-1.39-40.519-34.764-73.06-75.617-73.06-39.287 0-71.668 30.092-75.329 68.436L128.544 399.85h-28.461c-18.929 0-34.416 15.487-34.416 34.416v416.652c0 18.929 15.487 34.417 34.416 34.417h823.834c18.929 0 34.416-15.487 34.416-34.417V434.266c0-18.929-15.487-34.416-34.416-34.416zM750.925 574.658c0 19.007-15.409 34.417-34.416 34.417H304.493c-19.008 0-34.416-15.409-34.416-34.417 0-19.008 15.409-34.416 34.416-34.416h412.016c19.007 0 34.416 15.408 34.416 34.416zM457.891 268.517c13.645 13.299 32.267 21.515 52.781 21.515 19.115 0 36.584-7.138 49.92-18.869L765.423 399.85H248.849l209.042-131.333z m265.53 468.49H304.493c-19.007 0-34.416-15.409-34.416-34.416 0-19.007 15.409-34.417 34.416-34.417h418.929c19.007 0 34.416 15.409 34.416 34.417 0 19.007-15.409 34.416-34.417 34.416z" p-id="5346" fill="%23d81e06"></path></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* 党建工作样式 */
.party-list {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 20px;
    height: 100%;
}

.party-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-left: 3px;
    line-height: 3em;
    font-size: 16px;
    padding-bottom: 5px;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.5);
}

.party-item-title {
    flex: 1;
    min-width: 0;
}

.party-item-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.party-item-date {
    white-space: nowrap;
    color: 666;
}

.party-item:hover {
    background-color: #f56c6c30;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    animation: all 0.3s ease;
}



.party-left,
.party-right {
    height: 400px;
}

.party-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* 教学科研样式 */
.teach-container {
    height: 400px;
}

.teach-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    height: 100%;
    justify-content: space-between;
}

.teach-item {
    flex: 1;
    min-width: 200px;
    max-width: calc(25% - 15px);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.teach-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.teach-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.teach-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teach-item-image:hover img {
    transform: scale(1.1);
}

.teach-item-title {
    padding: 15px;
    flex: 1;
    display: flex;
    align-items: center;
}

.teach-item-title a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    /* 设置行数限制,实现多浏览器兼容 */
    -webkit-line-clamp: 2; /* Safari */
    line-clamp: 2; /* 标准属性 */
    -moz-line-clamp: 2; /* Firefox */
    -ms-line-clamp: 2; /* IE/Edge */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.teach-item-title a:hover {
    color: #840808;
}

/* 学团工作样式 */
.league-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.league-container {
    height: 400px;
}

.league-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin: 8px 8px 20px;
    width: calc(50% - 16px);
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 4px;
}

.league-item:hover .league-item-title a {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 18px;
}

.league-item-image {
    width: 120px;
    height: 80px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 4px;
}

.league-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.league-item-image:hover img {
    transform: scale(1.2);
}

.league-item-title {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.4;
    padding-top: 2px;
}

.league-item-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* 底部区域 */
.footer {
    margin-top: 20px;
    background-color: #840808;
    color: #fff;
    height: 120px;
}

.bottom-logo {
    overflow: hidden;
    margin-top: 30px;
}

.bottom-logo .title h1 {
    font-size: 30px;
}

.address {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 120px;
}

.links {
    margin-top: 10px;
}

.links h1 {
    font-size: 16px;
    margin-bottom: 10px;
}

.links ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 四列平均分配 */
}

.links li {
    margin: 0 5px;
}

.links a {
    color: #fff;
}

/* 小屏幕下的导航样式 */
/* 手机版适配 */
@media screen and (max-width: 768px) {

    /* 已有的导航栏适配代码保持不变 */
    .mobile-menu-btn {
        display: block;
    }

    .nav {
        flex-direction: column;
        text-align: center;
        padding: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #840808;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .nav-item:hover {
        background-color: #a34848;
    }

    .header .layui-col-lg6 {
        text-align: center;
    }

    .logo {
        width: 160px;
        margin-top: 6px;
    }

    .title {
        font-size: 24px;
    }

    /* 新增的适配代码 */
    /* 轮播图适配 */
    .swiper {
        height: 40vh;
        /* 减小轮播图高度 */
    }

    /* 新闻区域适配 */
    .news .layui-col-lg12 {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        margin: 15px 0;
    }

    .more {
        position: static;
        transform: none;
        margin-top: 5px;
        margin-bottom: 15px;
    }

    /* 新闻卡片适配 */
    .news-card {
        margin-bottom: 20px;
    }

    /* 综合区域适配 */
    .section-title {
        font-size: 16px;
    }

    /* 页脚适配 */
    .footer {
        height: auto;
        padding: 20px 0;
    }

    .bottom-logo {
        text-align: center;
        margin-top: 10px;
    }

    .bottom-logo .logo,
    .bottom-logo .title {
        float: none;
        display: inline-block;
    }

    .bottom-logo .title h1 {
        font-size: 20px;
    }

    .address {
        text-align: center;
        margin: 15px 0;
        height: auto;
    }

    .address p {
        margin: 5px 0;
    }

    .links {
        text-align: center;
    }

    .links ul {
        grid-template-columns: repeat(1, 1fr);
        /* 手机版一列显示 */
    }

    .links li {
        margin: 5px 0;
    }
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .notice-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .notice-container {
        height: auto !important;
    }
    
    .notice-list {
        height: auto !important;
    }
}

@media (max-width: 991px) {
    .notice-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .notice-container,
    .teach-container {
        height: auto !important;
    }
    
    .notice-list,
    .teach-list {
        height: auto !important;
    }
}

@media (max-width: 768px) {
    .notice-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .notice-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .notice-item {
        padding: 12px;
    }
    
    /* 通知公告文本换行处理 */
    .notice-item-title a {
        white-space: normal !important;
        line-height: 1.4;
        word-break: break-all;
        overflow: visible;
        text-overflow: unset;
    }
    
    /* 超小屏幕下标题适配 */
    .multiple-title-container {
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .section-title {
        font-size: 12px !important;
        margin: 8px 2px !important;
        display: inline-block;
        white-space: nowrap;
    }
    
    .section-title:not(:last-of-type)::after {
        margin: 0 8px;
        font-size: 10px;
    }
    
    .section-title::before {
        width: calc(100% - 20px);
    }
}

/* 小屏幕下取消高度限制 */
@media (max-width: 768px) {
    .notice-container,
    .teach-container,
    .party-left,
    .party-right,
    .league-container {
        height: auto !important;
    }
    
    .notice-list,
    .teach-list {
        height: auto !important;
    }
    
    #notice,
    #party,
    #teach,
    #league {
        min-height: auto !important;
    }
    
    /* 教学科研小屏幕适配 */
    .teach-list {
        flex-direction: column;
        gap: 15px;
    }
    
    .teach-item {
        max-width: 100%;
        min-width: auto;
        flex-direction: column;
        height: auto;
    }
    
    .teach-item-image {
        width: 100%;
        height: 150px;
    }
    
    .teach-item-title {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* 学团工作小屏幕适配 */
    .league-item {
        width: 100%;
        margin: 8px 0 15px;
        padding: 8px;
    }
    
    .league-item-image {
        width: 100px;
        height: 70px;
    }
    
    .league-item-title {
        font-size: 14px;
    }
}

