@import "/public/layui/css/layui.css";

/* --- 全局基础样式 --- */
body {
    margin: 0;
    padding: 0;
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航固定导致的 Body 偏移 */
body {
    padding-top: 60px;
    /* 假设导航栏高度约为 60px */
}
.logo{ margin-right: 1rem;}
.logo img{ max-height: 30px;}
.main {
    /* 如果使用 layui-container，这个类主要作为内部填充或旧兼容，建议直接在 HTML 用 layui-container */
    padding: 15px 0;
}

/* --- 顶部导航样式 (假设 nav.htm 中使用了 .header-nav) --- */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 60px;
    /* 明确高度 */
    display: flex;
    align-items: center;
}

.header-nav .layui-container {
    /* 确保导航内容居中 */
    display: flex;
    align-items: center;
}

.header-nav .nav-inline {
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
}

.header-nav .nav-inline li a {
    display: block;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.header-nav .nav-inline li a:hover {
    color: #007bff;
}

/* --- 列表页样式 (.excerpt) --- */
.excerpt {
    position: relative;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: self-start;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.excerpt:hover {
    border-color: #ddd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 列表缩略图 */
.excerpt .focus {
    display: block;
    width: 200px;
    height: 140px;
    margin-right: 20px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.excerpt-small .focus {
    width: 100px;
    height: 50px;
}

.excerpt .focus img.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.excerpt:hover .focus img.thumb {
    transform: scale(1.1);
}

/* 列表内容区 */
.excerpt-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.excerpt header h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.excerpt header h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.excerpt header h2 a:hover {
    color: #007bff;
}

.excerpt .note {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* 限制显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.excerpt .meta {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- 详情页样式 (.main-content) --- */
.main-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 4px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
    /* 与底部或侧边栏间距 */
}

.main-content h1 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
}

.main-content .info {
    color: #999;
    font-size: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.main-content .body {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* 防止详情页图片溢出 */
.main-content .body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}



/* --- 侧边栏样式 (.sidebar-box) --- */

/* 1. 确保 Layui 的行容器高度能被子元素撑开，这是 sticky 生效的前提 */
.layui-row {
    display: flex;
    flex-wrap: wrap;
    /* 关键：确保行容器高度由最高的子元素决定 */
    align-items: stretch;
}

/* 2. 侧边栏本体 (实现吸附) */
.sidebar-box {
    /* 核心：粘性定位 */
    position: -webkit-sticky;
    position: sticky;
    top: 76px;
    /* 距离窗口顶部 80px 时开始吸附（考虑到导航栏高度） */

    /* 视觉样式 */
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
    margin-bottom: 20px;

    /* 防止侧边栏内容过长超出屏幕 */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 16px;
    border-left: 4px solid #007bff;
    padding-left: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

/* 最新发布列表样式 - 参照常见新闻列表风格 */
.latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.latest-list li {
    position: relative;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    line-height: 1.8;
}

.latest-list li:last-child {
    border-bottom: none;
}

.latest-list li a {
    text-decoration: none;
    color: #555;
    display: block;
    font-size: 14px;
    transition: color 0.3s;
}

.latest-list li a:hover {
    color: #1E9FFF;
    /* 悬停颜色，与标题边框一致 */
}

.latest-list li .date {
    font-size: 12px;
    color: #999;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: #999;
    padding: 10px 0;
}

/* --- 分页样式 --- */
.pager-wrapper {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
}

.pager-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pager-wrapper li {
    display: inline-block;
}

.pager-wrapper a,
.pager-wrapper span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pager-wrapper a:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #007bff;
}

/* 当前页样式 */
.pager-wrapper .thisclass,
.pager-wrapper span.active,
.pager-wrapper li.active span {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    cursor: default;
}

/* --- 移动端适配 --- */
@media screen and (max-width: 572px) {
    .excerpt-small .focus {
        width: 60px;
    }

    /* 列表卡片变为垂直布局 */
    /*     .excerpt {
        display: block;
        padding: 15px;
    }

    .excerpt .focus {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .excerpt .focus img.thumb {
        width: 100%;
        height: auto;
    }

    .excerpt-content {
        min-height: auto;
    } */

    .excerpt header h2 {
        font-size: 16px;
    }

    .excerpt .note {
        font-size: 13px;
        -webkit-line-clamp: 3;
        /* 手机端多显示一行 */
    }

    /* 侧边栏在移动端取消吸附，正常流式布局 */
    .sidebar-box {
        position: static;
        margin-top: 20px;
    }

    /* 分页按钮变小 */
    .pager-wrapper a,
    .pager-wrapper span {
        padding: 6px 10px;
        font-size: 12px;
    }

    /* 导航栏适配 */
    .header-nav .nav-inline {
        gap: 10px;
        font-size: 14px;
    }
}

.footer {
    padding: 20px 0;
    line-height: 2;
    text-align: center;
    font-size: 12px;
    background-color: #111;
    color: #ffffff77;
}

.footer a {
    color: #ffffff77;
}


/* 行业分类容器样式 */
.category-nav {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid #1E9FFF;
    /* 使用 Layui 主题蓝 */
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* 标签之间的间距 */
}

.category-item {
    display: inline-block;
    padding: 6px 15px;
    background-color: #f8f8f8;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    /* 圆角胶囊形状 */
    font-size: 14px;
    border: 1px solid #eee;
}

.category-item.active {
    background-color: #1E9FFF;
    /* 悬停背景色 */
    color: #fff;
    /* 悬停文字颜色 */
    border-color: #1E9FFF;
}



.category-item:hover {
    box-shadow: 0 2px 5px rgba(30, 159, 255, 0.3);

}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .category-item {
        padding: 4px 10px;
        font-size: 13px;
    }
}


/* 页面整体背景微调 */
body {
    background-color: #f8f9fa;
    color: #333;
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", sans-serif;
}

/* 主内容区域容器优化 */
.main-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* 顶部广告优化 */
.banner img {
    border-radius: 6px;
    margin-bottom: 20px;
    display: block;
    width: 100%;
    object-fit: cover;
}

/* 标题样式 */
.main-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
}

/* 联系信息卡片 - 核心美化部分 */
.contact-card {
    background: #f0f7ff;
    border: 1px solid #d6eaff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.contact-item {
    flex: 1;
    min-width: 200px;
    margin: 10px 0;
    display: flex;
    font-size: 14px;
    color: #555;
}


.contact-item span.label {
    font-weight: bold;
    margin-right: 5px;
    color: #333;
}

.contact-item span.value {
    font-weight: 500;
}

.tel_style {
    font-size: 16px;
    font-weight: bold;
}

/* 公司主营 */
.company-decription {
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    border-left: 4px solid #1890ff;
}

.company-decription span {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

/* 正文内容优化 */
.body {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.body p {
    margin-bottom: 15px;
}

/* 侧边栏优化 */
.sidebar-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* PC端侧边栏粘性定位 */
@media (min-width: 992px) {
    .sidebar-container {
        position: sticky;
        top: 20px;
    }
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #1890ff;
    color: #333;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .contact-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-item {
        width: 100%;
    }

    .main-content h1 {
        font-size: 20px;
    }
}