/* 全局重置与基础样式 */
:root {
    --primary-red: #bd052c;
    --dark-red: #9a0424;
    --text-main: #333;
    --text-muted: #666;
    --bg-light: #f5f5f5;
    --border-color: #ddd;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-red);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ================== Hero & Header 区 ================== */
.hero-wrapper {
    position: relative;
    width: 100%;
    height: 650px;
    background-color: #e9ecef; /* 加载失败时的底色 */
}

.hero-banner {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    transition: opacity 0.5s ease-in-out;
}

.banner-image.active {
    display: block;
    animation: fadeIn 0.8s;
}

@keyframes fadeIn {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.header-floating {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    width: 1335px;
    max-width: calc(100% - 40px);
    background: linear-gradient(to right, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.88));
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 24px;
    gap: 24px;
    z-index: 10;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.header-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 64px;
    object-fit: contain;
}

.footer-logo-img {
    height: 45px;
    object-fit: contain;
    background: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-right: 30px;
}

.nav-row {
    display: flex;
    gap: 22px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    font-size: 18px;
    font-weight: 400;
    color: #333;
    position: relative;
    padding: 5px 2px;
    display: block;
    letter-spacing: 0;
    white-space: nowrap;
}

.nav-item > a:hover,
.nav-item > a.active {
    color: var(--primary-red);
}

.nav-item > a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-red);
}

/* 导航栏下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-top: 3px solid var(--primary-red);
    min-width: 160px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.nav-item:hover {
    z-index: 1001;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu.simple {
    flex-direction: column;
    gap: 0;
    padding: 5px 0;
}

.dropdown-menu.simple a {
    padding: 12px 25px;
    display: block;
    font-size: 15px;
    color: #555;
    white-space: nowrap;
}

.dropdown-menu.simple a:hover {
    background: #f9f9f9;
    color: var(--primary-red);
}

.dropdown-group {
    padding: 15px 25px;
    min-width: 180px;
}

.dropdown-group h4 {
    font-size: 15px;
    color: var(--primary-red);
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    white-space: nowrap;
}

.dropdown-group a {
    display: block;
    font-size: 14px;
    color: #666;
    padding: 8px 0;
    white-space: nowrap;
}

.dropdown-group a:hover {
    color: var(--primary-red);
}

.search-area {
    font-size: 13px;
    font-weight: 400;
    color: var(--primary-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: 1;
    margin-right: -10px;
}

.search-icon-custom {
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary-red);
    border-radius: 50%;
    position: relative;
    display: inline-block;
    box-sizing: border-box;
}

.search-icon-custom::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background: var(--primary-red);
    right: -5px;
    bottom: -1px;
    transform: rotate(45deg);
    transform-origin: center;
}

.search-text {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--primary-red);
    border-radius: 50%;
}

/* ================== 快捷入口 区 ================== */
.quick-links-section {
    background-color: var(--bg-light);
    padding: 50px 0;
}

.quick-links-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 15px;
}

.ql-card {
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px 25px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border-radius: 4px;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ql-card:hover {
    box-shadow: 0 15px 40px rgba(189, 5, 44, 0.35);
    transform: scale(1.15);
}

.ql-icon {
    font-size: 46px;
    color: var(--primary-red);
    position: relative;
}

.ql-card span {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-main);
    flex: 1;
    letter-spacing: 1px;
}

/* ================== 通知公告 区 (红底) ================== */
.announcements-section {
    background-color: var(--primary-red);
    /* 模拟原图建筑屋顶背景纹理，使用渐变和透明度 */
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
    padding: 50px 0;
    color: var(--white);
    margin-top: 20px;
}

.ann-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.ann-title {
    font-size: 26px;
    font-weight: normal;
    letter-spacing: 2px;
}

.ann-more-link {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.ann-more-link:hover {
    color: var(--white);
}

.ann-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.ann-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ann-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.ann-item-title {
    display: block;
    color: var(--white);
    font-size: 15px;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ann-item-title:hover {
    color: rgba(255,255,255,0.8);
}

.ann-item-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* ================== 新闻中心 区 ================== */
.news-section {
    background-color: var(--white);
    padding: 50px 0;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-header h2 {
    font-size: 24px;
    font-weight: normal;
    border-left: 4px solid var(--primary-red);
    padding-left: 15px;
    color: var(--text-main);
}

.more-link {
    font-size: 14px;
    color: var(--text-muted);
}

.news-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-img-card {
    position: relative;
    height: 180px;
    overflow: hidden;
    display: block;
}

.news-img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-img-card:hover img {
    transform: scale(1.05);
}

.news-img-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    padding: 10px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-texts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 40px;
}

.news-text-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.news-text-title {
    font-size: 15px;
    color: var(--text-main);
    flex: 1;
    padding-right: 20px;
    /* 多行省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.news-text-date {
    color: var(--primary-red);
    font-size: 14px;
    white-space: nowrap;
}

/* 右侧新闻列表 */
.news-right-list {
    flex: 1;
    min-width: 0;
}

/* ================== Footer 区 ================== */
.footer {
    background-color: #2b2b2b;
    color: #a0a0a0;
    padding: 50px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    flex: 1;
}

.footer-left h3 {
    color: var(--white);
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 20px;
}

.footer-left p {
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-right {
    flex: 1;
    text-align: right;
}

.footer-logo {
    font-family: "Noto Serif SC", "SimSun", "STSong", serif;
    font-size: 24px;
    color: var(--white);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.footer-right p {
    font-size: 13px;
    color: #777;
}

/* ================== 全局动画与交互动效 ================== */
/* Header 初始入场动画 */
@keyframes headerDrop {
    0% { opacity: 0; transform: translate(-50%, -40px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}
.header-floating {
    animation: headerDrop 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 滚动出现的动画基础类 */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* 动画激活状态 */
.animate-visible {
    opacity: 1 !important;
    transform: translate(0) !important;
}

/* 组件悬停 (Hover) 微动效增强 */
.ann-item {
    transition: transform 0.3s ease;
}
.ann-item:hover {
    transform: translateX(10px);
}
.news-text-item {
    transition: transform 0.3s ease;
}
.news-text-item:hover {
    transform: translateX(10px);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .quick-links-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .header-floating {
        width: 95%;
        top: 20px;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .header-content {
        flex-direction: column;
        width: 100%;
    }
    .main-nav {
        width: 100%;
    }
    .nav-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ann-grid, .news-texts {
        grid-template-columns: 1fr;
    }
    .news-images {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================== 搜索弹窗 区 ================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 80%;
    max-width: 800px;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-close:hover {
    transform: rotate(90deg);
    color: var(--primary-red);
}

.search-form {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    padding-bottom: 10px;
    transition: border-color 0.3s;
}

.search-form:focus-within {
    border-bottom-color: var(--white);
}

.search-form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--white);
    font-size: 24px;
    font-family: inherit;
    letter-spacing: 1px;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
}

.search-form button {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 32px;
    cursor: pointer;
    padding-left: 20px;
    transition: color 0.3s, transform 0.3s;
}

.search-form button:hover {
    color: var(--primary-red);
    transform: scale(1.1);
}

/* ================== 新闻列表页专用样式 ================== */
.list-hero-wrapper {
    height: 400px; /* 列表页缩短Banner高度 */
}

.list-page-container {
    margin-top: 50px;
    margin-bottom: 80px;
}

.list-layout {
    display: flex;
    gap: 40px;
}

/* 左侧边栏 */
.sidebar {
    flex: 0 0 250px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar-header {
    background: var(--dark-red);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 2px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fbfbfb;
}

.sidebar-menu > li {
    border-bottom: 1px solid #eaeaea;
}

.sidebar-menu > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    color: #444;
    font-size: 16px;
    text-align: left;
    transition: all 0.3s ease;
}

.sidebar-menu > li > a:hover,
.sidebar-menu > li > a.active {
    color: var(--primary-red);
    background: #fdfdfd;
}

/* 多级侧边栏菜单样式 */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
}

.sidebar-submenu li {
    border-bottom: 1px solid #f9f9f9;
}

.sidebar-submenu li a {
    display: block;
    padding: 14px 20px 14px 40px; /* 左侧内边距增加体现层级 */
    color: #666;
    font-size: 15px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-submenu li a:hover,
.sidebar-submenu li a.active {
    color: var(--primary-red);
    background: var(--white);
    border-left: 3px solid var(--primary-red);
    font-weight: bold;
}

/* 右侧内容区 */
.main-content {
    flex: 1;
    min-width: 0; /* 防止内容撑破flex容器 */
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.content-title {
    font-size: 22px;
    color: var(--primary-red);
    font-weight: bold;
    margin: 0;
}

.breadcrumb {
    font-size: 13px;
    color: #888;
}

.breadcrumb a {
    color: #888;
    margin: 0 5px;
}

.breadcrumb a:hover {
    color: var(--primary-red);
}

.breadcrumb span {
    color: #555;
    margin: 0 5px;
}

/* 文章列表项 */
.article-list {
    display: flex;
    flex-direction: column;
}

.article-item {
    display: flex;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px dashed #ddd;
    transition: transform 0.3s;
}

.article-item:hover {
    transform: translateX(10px);
}

.article-date {
    flex: 0 0 80px;
    text-align: center;
}

.article-date .day {
    font-size: 42px;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 8px;
}

.article-date .year-month {
    font-size: 13px;
    color: #666;
    border-top: 1px dashed #ccc;
    padding-top: 8px;
    font-weight: bold;
}

.article-info {
    flex: 1;
}

.article-title {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
    line-height: 1.4;
}

.article-title:hover {
    color: var(--primary-red);
}

.article-excerpt {
    font-size: 14px;
    color: #777;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* 文章详情页样式 */
.article-detail {
    background: #fff;
    padding: 40px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.article-detail-title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: bold;
}

.article-meta {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.article-meta span {
    margin: 0 15px;
}

.article-content {
    font-size: 15px;
    line-height: 2;
    color: #444;
}

.article-content p {
    margin-bottom: 15px;
    text-indent: 2em;
}

.article-content p strong {
    color: #333;
    font-weight: bold;
}

.article-content p:first-child,
.article-content p strong + br + * {
    text-indent: 0;
}

/* 领导卡片介绍样式 */
.leader-card {
    display: flex;
    background: #fbfbfb;
    border: 1px solid #eee;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.leader-img {
    width: 220px;
    height: 280px;
    flex-shrink: 0;
}

.leader-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.leader-info {
    padding: 30px;
    flex: 1;
    background: #fff;
}

.leader-info h3 {
    font-size: 22px;
    color: var(--primary-red);
    margin-bottom: 20px;
    font-weight: bold;
}

.leader-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, 
.pagination span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    color: #555;
    background: var(--white);
    font-size: 14px;
    border-radius: 2px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f5f5f5;
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.pagination a.active {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.pagination a.disable {
    color: #ccc;
    background: #fafafa;
    cursor: not-allowed;
    border-color: #eee;
}

/* 复杂分页器 */
.pagination-complex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    font-size: 13px;
    color: #666;
}

.pagination-complex a, 
.pagination-complex button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #ddd;
    color: #555;
    background: #fafafa;
    border-radius: 2px;
    transition: all 0.3s;
    cursor: pointer;
}

.pagination-complex a:hover, 
.pagination-complex button:hover {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.pagination-complex a.active {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.pagination-complex a.disable {
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}
.pagination-complex a.disable:hover {
    color: #ccc;
    border-color: #eee;
}

.pagination-complex input {
    width: 36px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 2px;
    color: #555;
    outline: none;
}
.pagination-complex input:focus {
    border-color: var(--primary-red);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .list-layout {
        flex-direction: column;
    }
    .sidebar {
        flex: none;
        width: 100%;
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .article-item {
        flex-direction: column;
        gap: 15px;
    }
    .article-date {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 15px;
    }
    .article-date .year-month {
        border-top: none;
        border-left: 1px solid #ccc;
        padding-top: 0;
        padding-left: 15px;
    }
}
