/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding-top: 10px;
    padding-bottom: 10px;
}

.title-line {
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.title-line .section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 0;
    padding-bottom: 8px;
    display: inline-block;
    background: #fff;
    border-bottom: 3px solid #1a73e8;
}

/* ========== 顶部导航 ========== */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    top: 0;
    z-index: 1000;
}

/* 移动端下拉遮罩（桌面隐藏） */
.nav-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 998;
}

.nav-mask.open {
    display: block;
}

.header-inner {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 52px;
    font-size: 1.05em;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    flex: 1;
    justify-content: space-around;
}

/* 移动端汉堡按钮（桌面隐藏） */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-item {
    text-decoration: none;
    color: #333;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
    line-height: 1;
}

.nav-item:hover {
    color: #1a73e8;
}

.nav-item.active {
    color: #1a73e8;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #1a73e8;
}

/* ========== Banner 区域 ========== */
.banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f4fd 0%, #b8d8f8 50%, #87ceeb 100%);
}

.banner-bg {
    width: 100%;
}

.banner-bg img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.banner-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 80px;
}

/* ========== 公司介绍 + 新闻动态 ========== */
.intro-section {
    background: #fff;
}

.intro-row {
    display: flex;
    gap: 40px;
}

.intro-col {
    flex: 1;
}

.news-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 新闻主体：填满标题下方剩余高度，作为滚动区的定位参照 */
.news-body {
    flex: 1;
    min-height: 0;
    position: relative;
}

/* 新闻滚动区：绝对定位脱离文档流，不会撑高所在行，溢出时内部滚动 */
.news-scroll {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;                       /* Firefox */
    scrollbar-color: #c7d2e0 transparent;        /* Firefox: 滑块色 轨道色 */
}

/* 滚动条整体（Chrome/Safari/新 Edge），固定显示 */
.news-scroll::-webkit-scrollbar {
    width: 8px;
}

/* 轨道 */
.news-scroll::-webkit-scrollbar-track {
    background: #f0f3f7;
    border-radius: 8px;
}

/* 滑块 */
.news-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c7d2e0, #aab8cc);
    border-radius: 8px;
    border: 2px solid #f0f3f7;                   /* 内缩留白，滑块更纤细 */
    background-clip: padding-box;
}

.news-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a9af5, #1a73e8);
    background-clip: padding-box;
}

.intro-text p {
    font-size: 1em;
    color: #333;
    line-height: 1.8;
    text-indent: 2em;
    text-align: justify;
}

.intro-text p.no-gap {
    margin-bottom: 0;
}

/* 资质展示 */
.cert-grid .cert-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* 新闻列表 */
.news-list {
    list-style: none;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px 8px;
    border-bottom: 1px dashed #e0e0e0;
    transition: background 0.2s;
}

/* hover 箭头：高度对齐行高，顶部对齐 -> 多行时只在第一行 */
.news-item::before {
    content: '›';
    flex-shrink: 0;
    width: 0;
    margin-right: 0;
    overflow: hidden;
    color: #1a73e8;
    font-weight: bold;
    line-height: 1.5;
    opacity: 0;
    transition: width 0.2s, margin-right 0.2s, opacity 0.2s;
}

.news-item:hover {
    background: #f5f7fa;
}

.news-item:hover::before {
    width: 12px;
    margin-right: 4px;
    opacity: 1;
}

.news-item:last-child {
    border-bottom: none;
}

.news-text {
    flex: 1;
    font-size: 1em;
    color: #333;
    line-height: 1.5;
    margin-right: 15px;
}

.news-date {
    font-size: 1em;
    color: #999;
    white-space: nowrap;
}

/* ========== 工业软件研发 + 咨询设计服务 ========== */
.services-section {
    background: #fff;
}

.services-row {
    display: flex;
    gap: 40px;
}

.service-col {
    flex: 1;
}

/* 服务模块：左右两栏，每栏「上图下文」 */
.service-pair {
    display: flex;
    gap: 24px;
}

.service-cell {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.service-cell:hover {
    background: #f5f9ff;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
}

.cell-img {
    height: 220px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cell-pic {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    transition: transform 0.3s ease;
}

.service-cell:hover .cell-pic {
    transform: scale(1.05);
}

/* 软件列表 */
.software-list {
    flex: 1;
}

.software-list h4 {
    font-size: 1.05em;
    color: #333;
    margin-bottom: 5px;
    padding-top: 10px;
    border-top: 1px solid #eeeeee;
}

.software-list ul {
    list-style: none;
}

.software-list li {
    font-size: 1em;
    color: #333;
    padding: 4px 0;
    padding-left: 15px;
    position: relative;
}

.software-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #4a9af5;
}

/* ========== 主要客户 ========== */
.clients-section {
    background: #fff;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.client-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* ========== 页脚 ========== */
.footer {
    background: #1a2332;
    color: #aaa;
    padding: 4px 0;
    text-align: center;
}

.footer p {
    font-size: 10px;
}

.footer p a {
    font-size: 10px;
    color: #4a9af5;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {

    .header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        height: auto;
        padding: 5px 20px;
    }

    /* 显示汉堡按钮 */
    .nav-toggle {
        display: flex;
    }

    /* 导航默认折叠，点击汉堡后浮于页面之上（不挤压下方内容） */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 0;
        background: #fff;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
        z-index: 1001;
    }

    .nav.open {
        display: flex;
    }

    .nav-item {
        font-size: 15px;
        white-space: nowrap;
        padding: 12px 4px;
        text-align: center;
        border-top: 1px solid #eee;
    }

    .nav-item.active {
        font-size: 15px;
    }

    /* Banner 高度随图片自适应，避免下方空白 */
    .banner {
        height: auto;
    }

    .banner-bg img {
        height: auto;
    }

    .banner-content {
        padding-left: 20px;
    }

    .intro-row,
    .services-row {
        flex-direction: column;
    }

    /* 新闻动态：堆叠布局下取消绝对定位/flex 撑高，恢复正常文档流，避免内容塌陷不可见 */
    .news-col {
        min-height: auto;
    }

    .news-body {
        flex: none;
        min-height: auto;
        height: auto;
        position: static;
    }

    .news-scroll {
        position: static;
        max-height: 360px;
        padding-right: 6px;
    }

    .service-pair {
        flex-direction: column;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 主要客户：小屏一排一张，共六排 */
    .clients-grid {
        grid-template-columns: 1fr;
    }
}
