/* 新闻公告页面样式 */

/* 页面允许滚动 */
html,
body {
    overflow: auto;
    scrollbar-width: auto;
    height: auto;
    min-height: 100%;
}

/* 导航栏滚动后的样式 */
.main-nav.scrolled {
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Webkit 浏览器显示滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 页面主体 */
.news-page {
    padding-top: 80px;
    background: #eef6ff;
    min-height: calc(100vh - 245px);
}

/* ========== 滚动入场动画 ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-from-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-from-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-from-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-from-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* 移动端禁用滚动动画 */
@media (max-width: 768px) {
    .animate-on-scroll,
    .animate-from-left,
    .animate-from-right,
    .animate-scale-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.news-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 100px 0 60px;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-family: 'Microsoft YaHei UI', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #0073ff;
    margin-bottom: 15px;
}

.title-icon {
    width: 484px;
    height: 21px;
    display: block;
    margin: 0 auto;
}

/* Tab 导航 */
.tab-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.tab-item {
    font-family: 'Microsoft YaHei UI', sans-serif;
    font-weight: 400;
    font-size: 22px;
    color: #333;
    text-decoration: none;
    width: 181px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.tab-item.active {
    background: linear-gradient(180deg, #D0E5FF 0%, #F3F8FF 48.08%, #D0E5FF 100%);
    color: #0073ff;
}

.tab-item:hover {
    color: #0073ff;
}

/* Tab 内容 */
.tab-content {
    animation: fadeIn 0.3s ease;
}

.tab-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 新闻动态样式 ==================== */

/* 新闻网格 - 3列布局 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* 新闻卡片 */
.news-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 新闻图片 */
.news-image {
    width: 420px;
    height: 315px;
    overflow: hidden;
}

.news-image img {
    width: 420px;
    height: 315px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

/* 新闻信息区域 */
.news-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fff;
}


/* 日期盒子 */
.news-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(0, 115, 255, 0.9) 0%, rgba(170, 96, 234, 0.9) 100%);
    color: #fff;
    flex-shrink: 0;
}

.news-day {
    font-family: Arial;
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
}

.news-divider {
    width: 12px;
    height: 1px;
    background: #FFFFFF;
    margin: 2px 0 4px;
}

.news-month {
    font-family: Arial;
    font-weight: 400;
    font-size: 14px;
    line-height: 1;
}

/* 新闻标题 */
.news-title {
    flex: 1;
    font-family: "Microsoft YaHei UI";
    font-weight: 400;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ==================== 通知公告样式 ==================== */

/* 通知列表 */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 40px;
    padding: 40px;
    background: #fff;
}

/* 通知项 */
.notice-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 25px;
    height: 160px;
    background: #fff;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: all 0.3s;
}

.notice-item:first-child {
    border-radius: 4px 4px 0 0;
}

.notice-item:last-child {
    border-radius: 0 0 4px 4px;
    border-bottom: none;
}

/* hover样式 - 蓝色背景 */
.notice-item:hover,
.notice-item.active {
    background: linear-gradient(180deg, #BDDBFF 0%, #DDEDFF 100%);
}

/* 日期块 */
.notice-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(180deg, #D0E5FF 0%, #EDF5FF 48.08%, #D0E5FF 100%);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
}

/* 日和年之间的分割线 */
.notice-date::after {
    content: '';
    position: absolute;
    width: 11px;
    height: 1px;
    background: #0073FF;
    border-radius: 2px;
    transform: rotate(-33.33deg);
    top: 50%;
    margin-top: 4px;
}

.notice-day {
    font-family: Arial;
    font-weight: 400;
    font-size: 26px;
    color: #0073ff;
    line-height: 1;
    margin-bottom: 4px;
}

.notice-year {
    font-family: Arial;
    font-weight: 400;
    font-size: 12px;
    color: #0073ff;
    margin-top: 4px;
}

/* 激活状态的日期块 */
.notice-item:hover .notice-date,
.notice-item.active .notice-date {
    background: #0073FF;
}

.notice-item:hover .notice-date::after,
.notice-item.active .notice-date::after {
    background: #fff;
}

.notice-item:hover .notice-day,
.notice-item.active .notice-day {
    color: #fff;
}

.notice-item:hover .notice-year,
.notice-item.active .notice-year {
    color: #fff;
}

/* 通知标题 */
.notice-title {
    flex: 1;
    font-family: "Microsoft YaHei";
    font-weight: 400;
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 激活状态的标题 */
.notice-item:hover .notice-title,
.notice-item.active .notice-title {
    color: #0073FF;
}

/* 箭头图标 */
.notice-arrow {
    width: 63px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-arrow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================== 分页样式 ==================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-info {
    font-family: "Microsoft YaHei UI";
    font-size: 14px;
    color: #666;
    margin-right: 15px;
}

.page-btn {
    padding: 8px 15px;
    font-family: "Microsoft YaHei UI";
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover {
    color: #0073ff;
    border-color: #0073ff;
}

.page-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei UI";
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-num:hover {
    color: #0073ff;
    border-color: #0073ff;
}

.page-num.active {
    background: #0073ff;
    color: #fff;
    border-color: #0073ff;
}

/* ==================== 大屏幕适配 (1920px 以下) ==================== */
@media (max-width: 1920px) {
    .news-container {
        max-width: 1320px;
        padding: 100px 0 60px;
    }
}

/* ==================== 1600px 以下适配 ==================== */
@media (max-width: 1600px) {
    .news-container {
        max-width: 1200px;
        padding: 80px 0 50px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .tab-item {
        font-size: 20px;
        width: 170px;
        height: 48px;
    }

    .news-grid {
        gap: 25px;
    }

    .news-image {
        width: 380px;
        height: 285px;
    }

    .news-image img {
        width: 380px;
        height: 285px;
    }
}

/* ==================== 1440px 以下适配 ==================== */
@media (max-width: 1440px) {
    .news-container {
        max-width: 1100px;
        padding: 70px 0 45px;
    }

    .page-header h1 {
        font-size: 30px;
    }

    .title-icon {
        width: 400px;
        height: auto;
    }

    .tab-nav {
        gap: 15px;
        margin-bottom: 40px;
    }

    .tab-item {
        font-size: 18px;
        width: 160px;
        height: 46px;
    }

    .news-grid {
        gap: 20px;
    }

    .news-image {
        width: 340px;
        height: 255px;
    }

    .news-image img {
        width: 340px;
        height: 255px;
    }

    .notice-item {
        padding: 0 20px;
        height: 140px;
    }

    .notice-title {
        font-size: 16px;
    }
}

/* ==================== 1366px 以下适配 ==================== */
@media (max-width: 1366px) {
    .news-container {
        max-width: 1000px;
        padding: 60px 0 40px;
    }

    .page-header h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .title-icon {
        width: 360px;
    }

    .tab-nav {
        gap: 12px;
        margin-bottom: 35px;
    }

    .tab-item {
        font-size: 17px;
        width: 150px;
        height: 44px;
    }

    .news-image {
        width: 310px;
        height: 232px;
    }

    .news-image img {
        width: 310px;
        height: 232px;
    }

    .news-title {
        font-size: 14px;
    }

    .notice-item {
        height: 130px;
        gap: 15px;
    }

    .notice-date {
        width: 60px;
        height: 60px;
    }

    .notice-day {
        font-size: 22px;
    }

    .notice-title {
        font-size: 15px;
    }

    .notice-arrow {
        width: 50px;
        height: 22px;
    }
}

/* ==================== 1280px 以下适配 ==================== */
@media (max-width: 1280px) {
    .news-container {
        max-width: 950px;
        padding: 50px 0 35px;
    }

    .page-header {
        margin-bottom: 25px;
    }

    .page-header h1 {
        font-size: 26px;
    }

    .title-icon {
        width: 320px;
    }

    .tab-item {
        font-size: 16px;
        width: 140px;
        height: 42px;
    }

    .news-grid {
        gap: 18px;
    }

    .news-image {
        width: 290px;
        height: 217px;
    }

    .news-image img {
        width: 290px;
        height: 217px;
    }

    .news-info {
        padding: 12px;
        gap: 10px;
    }

    .notice-list {
        padding: 30px;
    }

    .notice-item {
        height: 120px;
        gap: 15px;
    }
}

/* ==================== 1024px 以下适配 (平板横屏) ==================== */
@media (max-width: 1024px) {
    .news-page {
        padding-top: 80px;
    }

    .news-container {
        max-width: 100%;
        padding: 40px 0 30px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .title-icon {
        width: 280px;
    }

    .tab-nav {
        gap: 10px;
        margin-bottom: 30px;
    }

    .tab-item {
        font-size: 15px;
        width: 130px;
        height: 40px;
    }

    /* 新闻网格改为2列 */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-image {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }

    .news-image img {
        width: 100%;
        height: 100%;
    }

    .news-info {
        padding: 12px;
    }

    .notice-list {
        padding: 20px;
    }

    .notice-item {
        height: auto;
        min-height: 100px;
        padding: 15px 20px;
    }

    .notice-title {
        font-size: 14px;
    }
}

/* ==================== 移动端适配 (768px 以下) ==================== */
@media (max-width: 768px) {

    /* 移动端 logo 切换为深色 */
    .logo img {
        content: url('../images/logo-b.png');
    }

    /* 搜索按钮深色 */
    .search-btn-nav {
        background-image: url('../images/search-dark.png');
        filter: brightness(0) saturate(100%) invert(31%) sepia(97%) saturate(1620%) hue-rotate(198deg) brightness(97%) contrast(101%);
    }

    /* 页面主体 */
    .news-page {
        padding-top: 80px;
    }

    .news-container {
        padding: 40px 15px 30px;
    }

    /* 页面标题 */
    .page-header h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .title-icon {
        width: 200px;
        height: auto;
    }

    /* Tab 导航 */
    .tab-nav {
        gap: 10px;
        margin-bottom: 30px;
    }

    .tab-item {
        font-size: 16px;
        width: 130px;
        height: 40px;
    }

    /* 新闻网格 - 移动端改为2列 */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 30px;
    }

    /* 新闻卡片 - 移动端改为相对定位，文字在图片内部 */
    .news-card {
        position: relative;
        overflow: hidden;
    }

    /* 新闻图片 - 移动端自适应 */
    .news-image {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
    }

    .news-image img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* 新闻信息区域 - 移动端绝对定位在图片底部 */
    .news-info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 5px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* 新闻标题 - 移动端白色文字 */
    .news-title {
        font-size: 14px;
        color: #fff;
        -webkit-line-clamp: 2;
        line-height: 1.3;

    }

    /* 日期盒子 - 移动端稍微缩小 */
    .news-date-box {
        width: 36px;
        height: 36px;
    }

    .news-day {
        font-size: 15px;
    }

    .news-month {
        font-size: 10px;
    }

    /* 通知列表 */
    .notice-list {
        padding: 0;
        margin-bottom: 30px;
        background: transparent;
    }

    /* 通知项 */
    .notice-item {
        padding: 15px;
        height: auto;
        gap: 12px;
        background: #fff;
        border-bottom: 1px solid #eee;
        border-radius: 0;
    }

    .notice-item:first-child {
        border-radius: 0;
    }

    .notice-item:last-child {
        border-radius: 0;
        border-bottom: 1px solid #eee;
    }

    /* 日期块 */
    .notice-date {
        width: 50px;
        height: 50px;
    }

    /* 移动端分割线调整位置 */
    .notice-date::after {
        margin-top: 2px;

    }

    .notice-day {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .notice-year {
        font-size: 10px;
        margin-top: 4px;
    }

    /* 通知标题 */
    .notice-title {
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* 箭头图标 - 移动端隐藏 */
    .notice-arrow {
        display: none;
    }

    /* 分页 */
    .pagination {
        margin-top: 20px;
    }

    .page-info {
        font-size: 12px;
        margin-right: 10px;
    }

    .page-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .page-num {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

}