/* ==================== 全局样式 ==================== */
* { /* 通用选择器，应用于所有元素 */
    margin: 0; /* 清除所有元素的外边距 */
    padding: 0; /* 清除所有元素的内边距 */
    box-sizing: border-box; /* 设置盒模型为border-box，包含padding和border在宽度内 */
}

html { /* HTML根元素 */
    scroll-behavior: smooth; /* 设置页面滚动为平滑滚动效果 */
}

body {
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container { /* 内容容器类 */
    max-width: 1200px; /* 设置最大宽度为1200像素 */
    margin: 0 auto; /* 设置左右外边距为自动，实现水平居中 */
    padding: 0 20px; /* 设置左右内边距为20像素 */
}

/* ==================== 链接样式 ==================== */
a { /* 链接元素样式 */
    text-decoration: none; /* 去除下划线 */
    color: inherit; /* 继承父元素的文字颜色 */
    transition: color 0.3s ease; /* 设置颜色过渡效果，持续0.3秒 */
}

a:hover { /* 链接悬停状态 */
    color: #007bff; /* 悬停时文字颜色变为蓝色 */
}

/* ==================== 头部样式 ==================== */
.header { /* 头部容器 */
    background-color: #fff; /* 设置背景颜色为白色 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 添加阴影效果，增加层次感 */
    position: fixed; /* 设置为固定定位，始终显示在页面顶部 */
    top: 0; /* 距离顶部0像素 */
    left: 0; /* 距离左侧0像素 */
    right: 0; /* 距离右侧0像素 */
    z-index: 1000; /* 设置堆叠顺序，确保在其他元素之上 */
    height: 70px; /* 设置头部高度为70像素 */
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中对齐 */
}

.header .container { /* 头部内的容器 */
    display: flex; /* 使用flex布局 */
    justify-content: space-between; /* 水平两端对齐，元素之间均匀分布 */
    align-items: center; /* 垂直居中对齐 */
}

/* ==================== Logo样式 ==================== */
.logo { /* Logo容器 */
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中对齐 */
}

.logo-img { /* Logo图片 */
    max-height: 50px; /* 设置最大高度为50像素 */
    width: auto; /* 宽度自动调整 */
    object-fit: contain; /* 保持图片比例，不裁剪 */
}

/* ==================== 导航样式 ==================== */
.nav-list { /* 导航列表 */
    display: flex; /* 使用flex布局 */
    list-style: none; /* 去除列表样式 */
    gap: 30px; /* 设置列表项之间的间距为30像素 */
}

.nav-link { /* 导航链接 */
    font-size: 16px; /* 设置字体大小为16像素 */
    font-weight: 500; /* 设置字体粗细为中等 */
    color: #333; /* 设置文字颜色为深灰色 */
    padding: 10px 0; /* 设置上下内边距为10像素 */
    position: relative; /* 设置相对定位，用于伪元素定位 */
}

.nav-link::after { /* 导航链接伪元素，用于下划线效果 */
    content: ''; /* 伪元素内容为空 */
    position: absolute; /* 设置绝对定位 */
    bottom: 0; /* 距离底部0像素 */
    left: 0; /* 距离左侧0像素 */
    width: 0; /* 初始宽度为0 */
    height: 2px; /* 设置高度为2像素 */
    background-color: #007bff; /* 设置背景颜色为蓝色 */
    transition: width 0.3s ease; /* 设置宽度过渡效果 */
}

.nav-link:hover::after { /* 导航链接悬停状态 */
    width: 100%; /* 悬停时宽度变为100%，显示下划线 */
}

/* ==================== 横幅样式 ==================== */
.hero { /* 首页横幅区域 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 设置渐变背景色 */
    color: #fff; /* 设置文字颜色为白色 */
    padding: 150px 0 100px; /* 设置内边距，上150px，下100px，左右0 */
    margin-top: 70px; /* 设置上外边距为70像素，避免被固定头部遮挡 */
    text-align: center; /* 文字居中对齐 */
}

.hero-title { /* 横幅主标题 */
    font-size: 48px; /* 设置字体大小为48像素 */
    font-weight: 700; /* 设置字体粗细为粗体 */
    margin-bottom: 20px; /* 设置下外边距为20像素 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* 添加文字阴影效果 */
}

.hero-subtitle { /* 横幅副标题 */
    font-size: 20px; /* 设置字体大小为20像素 */
    font-weight: 300; /* 设置字体粗细为细体 */
    opacity: 0.9; /* 设置透明度为0.9 */
}

/* ==================== 通用区域样式 ==================== */
section { /* 区域通用样式 */
    padding: 80px 0; /* 设置上下内边距为80像素 */
}

.section-title { /* 区域标题 */
    font-size: 36px; /* 设置字体大小为36像素 */
    font-weight: 700; /* 设置字体粗细为粗体 */
    text-align: center; /* 文字居中对齐 */
    margin-bottom: 60px; /* 设置下外边距为60像素 */
    color: #333; /* 设置文字颜色为深灰色 */
    position: relative; /* 设置相对定位 */
}

.section-title::after { /* 区域标题伪元素，用于装饰线 */
    content: ''; /* 伪元素内容为空 */
    position: absolute; /* 设置绝对定位 */
    bottom: -15px; /* 距离底部-15像素 */
    left: 50%; /* 距离左侧50% */
    transform: translateX(-50%); /* 水平居中 */
    width: 60px; /* 设置宽度为60像素 */
    height: 3px; /* 设置高度为3像素 */
    background-color: #007bff; /* 设置背景颜色为蓝色 */
}

/* ==================== 公司简介样式 ==================== */
.about {
    background-color: #fff;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
}

.about-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

/* ==================== 企业愿景样式 ==================== */
.vision {
    background-color: #fff;
}

.vision-content {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.vision-text {
    flex: 0 0 60%;
}

.vision-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

.vision-formula {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
}

.formula-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    max-width: 400px;
}

.formula-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.formula-expression {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.formula-line {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 8px 0;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.formula-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.formula-numerator {
    font-size: 13px;
    color: #333;
    text-align: center;
    padding: 5px 10px;
    border-bottom: 2px solid #667eea;
}

.formula-denominator {
    font-size: 13px;
    color: #666;
    text-align: center;
    padding: 5px 10px;
}

.formula-operator {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin: 0 10px;
}

.formula-explanation {
    font-size: 13px;
    color: #fff;
    text-align: center;
    line-height: 1.6;
    font-style: italic;
}

/* ==================== 经营范围样式 ==================== */
.services { /* 经营范围区域 */
    background-color: #f9f9f9; /* 设置背景颜色为浅灰色 */
}

.services-grid { /* 服务网格布局 */
    display: grid; /* 使用grid网格布局 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 设置网格列数，自动适应，最小宽度300px */
    gap: 30px; /* 设置网格间距为30像素 */
}

.service-card { /* 服务卡片 */
    background-color: #fff; /* 设置背景颜色为白色 */
    border-radius: 10px; /* 设置圆角为10像素 */
    padding: 40px 30px; /* 设置内边距，上下40px，左右30px */
    text-align: center; /* 文字居中对齐 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 设置变换和阴影过渡效果 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* 添加轻微阴影 */
}

.service-card:hover { /* 服务卡片悬停状态 */
    transform: translateY(-5px); /* 悬停时向上移动5像素 */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); /* 悬停时增强阴影效果 */
}

.service-icon { /* 服务图标 */
    font-size: 48px; /* 设置字体大小为48像素 */
    margin-bottom: 20px; /* 设置下外边距为20像素 */
}

.service-title { /* 服务标题 */
    font-size: 22px; /* 设置字体大小为22像素 */
    font-weight: 600; /* 设置字体粗细为半粗体 */
    margin-bottom: 15px; /* 设置下外边距为15像素 */
    color: #333; /* 设置文字颜色为深灰色 */
}

.service-description { /* 服务描述 */
    font-size: 14px; /* 设置字体大小为14像素 */
    line-height: 1.6; /* 设置行高为1.6倍 */
    color: #666; /* 设置文字颜色为灰色 */
}

/* ==================== 联系我们样式 ==================== */
.contact { /* 联系我们区域 */
    background-color: #fff; /* 设置背景颜色为白色 */
}

.contact-content { /* 联系内容 */
    max-width: 800px; /* 设置最大宽度为800像素 */
    margin: 0 auto; /* 水平居中 */
}

.contact-info { /* 联系信息 */
    display: grid; /* 使用grid网格布局 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 设置网格列数，自动适应，最小宽度300px */
    gap: 30px; /* 设置网格间距为30像素 */
}

.contact-item { /* 联系项 */
    display: flex; /* 使用flex布局 */
    align-items: flex-start; /* 顶部对齐 */
    gap: 15px; /* 设置间距为15像素 */
    padding: 20px; /* 设置内边距为20像素 */
    background-color: #f9f9f9; /* 设置背景颜色为浅灰色 */
    border-radius: 8px; /* 设置圆角为8像素 */
    transition: background-color 0.3s ease; /* 设置背景颜色过渡效果 */
}

.contact-item:hover { /* 联系项悬停状态 */
    background-color: #f0f0f0; /* 悬停时背景颜色变为稍深的灰色 */
}

.contact-icon { /* 联系图标 */
    font-size: 24px; /* 设置字体大小为24像素 */
    flex-shrink: 0; /* 防止图标被压缩 */
}

.contact-text { /* 联系文本 */
    flex: 1; /* 占据剩余空间 */
}

.contact-label { /* 联系标签 */
    font-size: 14px; /* 设置字体大小为14像素 */
    font-weight: 600; /* 设置字体粗细为半粗体 */
    color: #999; /* 设置文字颜色为浅灰色 */
    margin-bottom: 5px; /* 设置下外边距为5像素 */
    text-transform: uppercase; /* 转换为大写字母 */
}

.contact-value { /* 联系值 */
    font-size: 16px; /* 设置字体大小为16像素 */
    color: #333; /* 设置文字颜色为深灰色 */
    line-height: 1.5; /* 设置行高为1.5倍 */
}

/* ==================== 页脚样式 ==================== */
.footer { /* 页脚区域 */
    background-color: #333; /* 设置背景颜色为深灰色 */
    color: #fff; /* 设置文字颜色为白色 */
    padding: 30px 0; /* 设置上下内边距为30像素 */
    text-align: center; /* 文字居中对齐 */
}

.footer-content { /* 页脚内容 */
    display: flex; /* 使用flex布局 */
    flex-direction: column; /* 垂直排列 */
    align-items: center; /* 水平居中 */
    gap: 10px; /* 设置间距为10像素 */
}

.footer-text { /* 页脚文本 */
    font-size: 14px; /* 设置字体大小为14像素 */
    color: #ccc; /* 设置文字颜色为浅灰色 */
}

.icp-info { /* ICP备案信息 */
    margin-top: 5px; /* 设置上外边距为5像素 */
}

.icp-link { /* ICP备案链接 */
    color: #007bff; /* 设置文字颜色为蓝色 */
    text-decoration: none; /* 去除下划线 */
}

.icp-link:hover { /* ICP备案链接悬停状态 */
    text-decoration: underline; /* 悬停时显示下划线 */
    color: #0056b3; /* 悬停时颜色变为深蓝色 */
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .header {
        height: auto;
        padding: 15px 0;
    }

    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-list {
        gap: 15px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .vision-content {
        flex-direction: column;
        gap: 30px;
    }

    .vision-text {
        flex: 1;
    }

    .vision-formula {
        flex: 1;
    }

    .formula-box {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 24px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .section-title {
        font-size: 24px;
    }

    .formula-title {
        font-size: 18px;
    }

    .formula-line {
        flex-direction: column;
        gap: 20px;
    }

    .formula-fraction {
        width: 100%;
    }

    .formula-numerator {
        font-size: 11px;
    }

    .formula-denominator {
        font-size: 11px;
    }

    .formula-operator {
        font-size: 20px;
        transform: rotate(90deg);
    }
}
