/* ============  新增：新闻资讯左侧侧边栏（和检测服务同样式） ============ */

.news-content-area .clear::after {
    content: "";
    display: block;
    clear: both;
}
.news-content-area .w1200 {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.news-content-area .ny_news_bg {
    padding: 40px 0 60px;
    background: #fff;
}
/* 左侧侧边栏 */
.news-content-area .ny_cp_fl {
    width: 240px;
    float: left;
    border: 1px solid #e5e5e5;
    background: transparent;
}
/* 右侧内容区 */
.news-content-area .ny_cp_lb {
    width: 924px;
    float: right;
}
/* 侧边栏标题（可点击）+ 下划线（仅左侧240px宽，不伸到右侧） */
.news-content-area .ny_cp_fl .sidebar-cat-title {
    padding: 16px 20px 14px;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 0;
}
.news-content-area .ny_cp_fl .sidebar-cat-title a {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #666666;
    text-decoration: none;
    transition: color 0.3s;
}
.news-content-area .ny_cp_fl .sidebar-cat-title a:hover {
    color: #3385ff;
}
.news-content-area .ny_cp_fl .nav-close { display: none; }
.news-content-area .ny_cp_fl ul {
    list-style: none; padding: 0; margin: 0;
}
.news-content-area .ny_cp_fl ul li {
    border-bottom: 1px solid #e5e5e5;
}
.news-content-area .ny_cp_fl ul li p { margin: 0; }
.news-content-area .ny_cp_fl ul li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #666666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}
.news-content-area .ny_cp_fl ul li a span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-content-area .ny_cp_fl ul li a i {
    font-size: 12px;
    color: #666666;
    margin-left: auto;
    flex-shrink: 0;
}
.news-content-area .ny_cp_fl ul li a:hover {
    background: #f8f9fa;
    color: #3385ff;
}
.news-content-area .ny_cp_fl ul li a.active {
    background: #dbe8fa;
    color: #3385ff;
    font-weight: 600;
    border-left: 4px solid #0066cc;
    padding-left: 16px;
    box-shadow: 0 2px 4px rgba(0,102,204,0.15);
}
.news-content-area .ny_cp_fl ul li a:hover i,
.news-content-area .ny_cp_fl ul li a.active i {
    color: #3385ff;
}
.news-content-area .ny_cp_fl ul li a.active i {
    transform: translateX(3px);
    transition: transform 0.3s;
}
.news-content-area .ny_cp_fl .cnb1 { height: 20px; }
/* PC端隐藏移动端抽屉顶栏 */
.news-content-area .ny_cp_fl .mobile-sidebar-header { display: none; }

/* 右侧 展开分类按钮（仅移动端显示） */
.news-content-area .ny_cp_lb .ny_cp_bt_mobile {
    display: none;
    margin-bottom: 20px;
}
.news-content-area .ny_cp_lb .ny_cp_bt_mobile .ml2 {
    display: inline-flex;
    cursor: pointer;
    align-items: center;
    color: #666666;
    font-size: 14px;
    border: 1px solid #e5e5e5;
    padding: 6px 12px;
    border-radius: 4px;
}
.news-content-area .ny_cp_lb .ny_cp_bt_mobile .ml2 i {
    margin-right: 5px;
    font-size: 18px;
}

/* 响应式：≤1240px */
@media screen and (max-width: 1240px) {
    .news-content-area .w1200 { width: 95%; }
    .news-content-area .ny_cp_lb { width: calc(100% - 270px); }
}

/* 响应式：≤992px 侧边栏变抽屉 */
@media screen and (max-width: 992px) {
    .news-content-area .ny_news_bg { padding: 20px 0 40px; }
    .news-content-area .ny_cp_fl {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100%;
        z-index: 10001;
        background: #fff;
        float: none;
        border: none;
        transition: left 0.3s ease;
        display: block;
        padding-top: 0;
    }
    /* 移动端抽屉蓝色顶栏（真实DOM元素，由PHP输出分类名） */
    .news-content-area .ny_cp_fl .mobile-sidebar-header {
        display: block !important;
        position: sticky;
        top: 0;
        height: 60px;
        line-height: 60px;
        background: #0066cc;
        color: #ffffff;
        font-size: 18px;
        padding: 0 68px 0 20px;
        font-weight: bold;
        border: 1px solid rgba(255,255,255,0.8);
        box-shadow: 0 2px 4px rgba(0,102,204,0.2);
        z-index: 10;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .news-content-area .ny_cp_fl .sidebar-cat-title {
        display: none; /* 移动端不再重复显示桌面端标题 */
    }
    .news-content-area.nav-open .ny_cp_fl { left: 0; }
    .news-content-area .nav-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 26px;
        border-radius: 50%;
        background: rgba(255,255,255,0.9);
        color: #666666;
        box-shadow: 0 2px 4px rgba(31,38,135,0.1);
        transition: all 0.3s;
        position: absolute;
        top: 8px; right: 20px;
        z-index: 11;
        cursor: pointer;
    }
    .news-content-area .nav-close:hover {
        background: #fff;
        box-shadow: 0 4px 8px rgba(31,38,135,0.15);
    }
    .news-content-area .nav-overlay-mask {
        display: none;
        position: fixed;
        left: 0; top: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 10000;
    }
    .news-content-area.nav-open .nav-overlay-mask { display: block; }

    .news-content-area .ny_cp_lb {
        width: 100%;
        float: none;
    }
    .news-content-area .ny_cp_lb .ny_cp_bt_mobile { display: block; }
    .news-content-area .ny_cp_lb .ny_cp_bt_mobile .ml2 {
        display: inline-flex; align-items: center;
    }
}

/* 新闻资讯样式 */
.news-content-area {
    padding:  0;
    background-color: #ffffff;
}

.news-posts {
    display: flex;
    flex-direction: column;
   
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 15px 0;
    border-bottom: 1px solid #e5e5e5; /* Slightly darker color for better visibility on high-density displays */
    transition: all 0.3s ease;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.news-item:hover {
    background-color: #f8f9fa;
}

/* 日期显示 */
.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 112px;
    background: linear-gradient(145deg, #0066cc, #0052a3);
    color: #ffffff;
    flex-shrink: 0;
    margin-right: 20px;
    border-top-right-radius: 30px;
    border-bottom-left-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,102,204,0.2); /* Reduced shadow to prevent interference with border */
    position: relative;
    z-index: 2; /* Ensure date element is above the border */
}

/* 新闻内容 */
.news-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-width: 0;
}

.news-content-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    
}

.news-content-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.news-day {
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    padding:0 0 10px;
}

.news-month-year {
    font-size: 14px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 10px;
    width: 80%;
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.news-title a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.news-title a:hover {
    color: #3385ff;
}

.news-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-content-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.news-read-more {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid #0066cc;
    border-radius: 20px;
    color: #3385ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.news-read-more:hover {
    background-color: #0066cc;
    color: #ffffff;
}

/* 移动端结构：archive风格 */
.mobile-archive-layout {
    display: none; /* 默认隐藏移动端结构 */
}

h3{margin: 0 0 10px;}

/* 移动端：使用类似archive.php的完整结构样式 */
@media (max-width: 768px) {
    /* 隐藏桌面端结构 */
    .news-date,
    .news-content {
        display: none;
    }
    
    /* 显示移动端结构 */
    .mobile-archive-layout {
        display: flex !important;
        text-decoration: none;
        color: inherit;
        background-color: #fff;
        margin: 0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        transition: transform 0.3s, box-shadow 0.3s;
        position: relative;
        width: 100%;
    }
    
    .mobile-archive-layout:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .mobile-archive-layout .post-thumbnail {
        flex: 0 0 120px;
        height: 100px;
        overflow: hidden;
        border-radius: 8px;
        margin: 8px;
    }

    .mobile-archive-layout .post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .mobile-archive-layout:hover .post-thumbnail img {
        transform: scale(1.05);
    }

    .mobile-archive-layout .post-content {
        flex: 1;
        padding: 10px;
        display: flex;
        flex-direction: column;
        margin-left: 0; /* 移除固定的margin-left */
    }

    .mobile-archive-layout .post-title {
        font-size: 16px;
        margin: 0 0 8px;
        color: #666666;
        transition: color 0.3s;
    }

    .mobile-archive-layout:hover .post-title {
        color: var(--primary-color);
    }

    .mobile-archive-layout .post-excerpt {
        font-size: 13px;
        color: #666666;
        margin-bottom: 10px;
        line-height: 1.5;
        flex-grow: 1;
    }

    .mobile-archive-layout .post-meta {
        display: flex;
        font-size: 11px;
        color: #666666;
        align-items: center;
    }

    .mobile-archive-layout .post-date,
    .mobile-archive-layout .post-category {
        margin-right: 10px;
        display: flex;
        align-items: center;
    }

    .mobile-archive-layout .post-meta i {
        margin-right: 3px;
    }

    .mobile-archive-layout .post-more {
        display: none; /* 移动端隐藏更多信息按钮 */
    }
}

@media (max-width: 576px) {
    .mobile-archive-layout {
        flex-direction: column; /* 图片在上，内容在下 */
        margin: 10px 0;
    }
    
    .mobile-archive-layout .post-thumbnail {
        flex: 0 0 150px;
        width: 100%;
        height: 150px;
        margin: 0 0 8px 0;
    }
    
    .mobile-archive-layout .post-content {
        margin-left: 0;
        padding: 8px;
    }
    
    .mobile-archive-layout .post-title {
        font-size: 15px;
    }
    
    .mobile-archive-layout .post-excerpt {
        font-size: 12px;
    }
    
    .mobile-archive-layout .post-meta {
        font-size: 10px;
        /* 保持flex-direction: row，确保时间和分类在同一行 */
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .mobile-archive-layout .post-date,
    .mobile-archive-layout .post-category {
        margin-right: 10px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
    }
    
    .mobile-archive-layout .post-more {
        display: none; /* 移动端隐藏更多信息按钮 */
    }
}