/* 全局基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 公共容器 */
.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 导航栏样式 */
header {
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    height: 70px;
    max-width: 100% !important; /* 确保占满全屏宽度 */
    padding: 0 40px;            /* 左右留出一点安全的边距，不至于贴死在屏幕边缘 */
}

.logo h1 {
    font-size: 22px;
    color: #1a365d;
}

/* --- 导航栏左侧 Logo 及文字组合样式 --- */
.logo img {
    height: 38px;       /* 控制 Logo 图片的高度 */
    width: auto;        /* 保持图片比例不变形 */
    margin-right: 12px; /* Logo 图片与右侧文字之间的间距 */
}

/* --- 让导航菜单自动靠右，把 Logo 挤到最左边 --- */
nav {
    margin-left: auto;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3182ce;
}

/* 首页大图横幅 */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(26, 54, 93, 0.8), rgba(26, 54, 93, 0.8)), url('../images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    text-align: center;
    color: #ffffff;
    margin-top: 70px;
}

.hero-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #e2e8f0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #3182ce;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn:hover {
    background: #2b6cb0;
}

/* 通用区块样式 */
.section {
    padding: 80px 0;
    text-align: center;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #1a365d;
}

.section-desc {
    max-width: 700px;
    margin: 0 auto;
    color: #718096;
    font-size: 16px;
}

.bg-light {
    background-color: #f7fafc;
}

/* --- 6个产品系列的网格布局美化 --- */

.product-grid {
    display: grid;
    /* 自动排版：每列最小300像素，一行尽可能多排，自动变成两行 */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px; /* 卡片与卡片之间的间距 */
    margin-top: 40px;
    text-align: left;
}

/* 产品卡片整体美化 */
.product-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;      /* 隐藏溢出部分，保证圆角和图片动画正常 */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid #3182ce;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 鼠标悬停卡片整体微微上浮特效 */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

/* 产品图片的外框容器 */
.product-img {
    width: 100%;
    height: 180px;         /* 统一每个卡片图片的高度 */
    overflow: hidden;
}

/* 图片本身的适应规则 */
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* 防止图片变形 */
    transition: transform 0.3s ease;
}

/* 鼠标悬停时图片局部放大 */
.product-card:hover .product-img img {
    transform: scale(1.05);
}

/* 产品文字区域 */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2d3748;
}

.product-info p {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}

/* 页脚样式 */
footer {
    background: #1a365d;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

footer p {
    font-size: 14px;
    color: #a0aec0;
}

/* --- 子页面大图网格相册样式 --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 每张图最小250像素，自动排成多列大网格 */
    gap: 25px;
    margin-top: 40px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px); /* 鼠标悬停整体上浮 */
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover; /* 保证图片不变形铺满 */
}

.gallery-item p {
    padding: 12px;
    font-size: 14px;
    color: #4a5568;
    text-align: center;
    background: #f7fafc;
}

/* --- 让子页面顶部的 Logo 和两行文字垂直居中对齐 --- */
.about-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 消除卡片链接的默认样式 */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
/* --- 保留原大图背景：左侧文字 + 右侧拼图 --- */
.hero-collage-section {
    background-color: #4a607a; /* 继承你原本的蓝灰色大图背景风格，也可以换成 background-image */
    padding: 100px 0;
    min-height: 550px;
    display: flex;
    align-items: center;
}

.hero-collage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右各占一半 */
    gap: 50px;
    align-items: center;
}

/* 左侧文字区域：强制居左对齐 */
.hero-text {
    text-align: left; /* 文字靠左 */
}

.hero-text h1 {
    font-size: 42px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 18px;
    color: #e2e8f0;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 右侧拼图网格区 */
.hero-image-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 130px);
    gap: 12px;
}

.hero-image-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.hero-image-collage img:hover {
    transform: scale(1.05);
}

/* 第一张主图跨2列2行 */
.collage-img-1 {
    grid-column: span 2;
    grid-row: span 2;
}
/* --- 网站顶部 Logo 两行式样式 --- */
.logo {
    display: flex;
    flex-direction: column; /* 上下纵向排列 */
    line-height: 1.2;
    text-decoration: none;
}

/* 第一行：英文大写 */
.logo-en {
    font-size: 16px;       /* 英文大写字体大小，可根据喜好微调 */
    font-weight: bold;
    color: #2d3748;        /* 保持深色 */
    letter-spacing: 0.5px; /* 字母间距，让英文更大气 */
}

/* 第二行：中文名称 */
.logo-cn {
    font-size: 12px;       /* 中文字体稍微小一点，更有层次感 */
    color: #4a5568;        /* 稍浅一点的灰色，主次分明 */
    margin-top: 2px;
}
/* --- 顶部导航栏整体布局：Logo 在左，菜单在右 --- */
header, .nav-container, .navbar {
    display: flex;
    justify-content: space-between; /* 关键：让左侧 Logo 和右侧菜单各贴两端 */
    align-items: center;            /* 上下垂直居中对齐 */
    width: 100%;
}

/* 确保右侧的导航链接横向排列 */
header nav ul, .nav-links {
    display: flex;
    list-style: none;
    gap: 30px;                      /* 菜单项之间的间距 */
    margin: 0;
    padding: 0;
    align-items: center;
}

/* 导航链接文字样式 */
header nav ul li a, .nav-links a {
    text-decoration: none;
    color: #2d3748;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

header nav ul li a:hover, .nav-links a:hover {
    color: #3182ce;                 /* 鼠标悬停变色 */
}
/* --- 关于我们页面美化样式 --- */
.about-section {
    padding: 60px 0;
    background-color: #f4f7f6; 
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* 白色精致卡片容器 */
.about-card {
    background: #ffffff;
    max-width: 850px;
    margin: 0 auto;
    padding: 50px 60px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); 
    text-align: center;
}

/* --- 标题区：强制让英文和蓝线在中文的正下方 --- */
.about-header {
    display: flex;
    flex-direction: column;    /* 关键：强制纵向排列，上下堆叠 */
    align-items: center;       /* 居中对齐 */
    text-align: center;
    margin-bottom: 30px;
}

.about-header h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 8px;        /* 中文和英文之间的间距 */
    font-weight: bold;
}

.about-subtitle {
    display: inline-block;
    font-size: 14px;
    color: #718096;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid #3182ce; /* 蓝色的下划线 */
    padding-bottom: 4px;
}

/* 正文文案区 */
.about-body {
    text-align: left; /* 文字左对齐阅读体验更好 */
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 40px;
}

.about-lead {
    font-size: 18px;
    color: #1a202c;
    margin-bottom: 15px;
}

.about-text {
    font-size: 16px;
}

/* 底部按钮区 */
.about-footer {
    text-align: center;
}
/* --- 调整产品中心网格的总宽度，使其与上方大卡片对齐 --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 保持一行三个 */
    gap: 20px;                             /* 卡片之间的间距，可适当调小（比如从 30px 改为 20px） */
    max-width: 980px;                     /* 【核心】这里控制总宽度，与上方关于我们的卡片宽度保持一致 */
    margin: 30px auto 0 auto;              /* 居中显示 */
    padding: 0;                            /* 清除内边距 */
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* 【关键】让卡片高度填满网格行，且内部元素上下撑开 */
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 让文字区域自动填满剩余空间，保证底部对齐 */
.product-info {
    padding: 20px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 统一图片高度，防止变形 */
.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* 如果屏幕较窄（如手机端），自动变成一列显示 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;                             
    margin-top: 30px;
}
/* 开启网页整体平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* --- 确保网格布局一行三个，且适配大卡片宽度 --- */
.about-card .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    align-items: stretch; /* 【新增这一行：让同一行的所有产品卡片自动拉伸为相同高度】 */
}

.about-card {
    background: #ffffff;                  /* 白色大卡片背景 */
    border-radius: 12px;                  /* 圆角 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* 柔和阴影 */
    overflow: hidden;
}
/* --- 清除顶部导航栏所有链接的下划线 --- */
nav a, .nav-link, header a {
    text-decoration: none !important; /* 强制去掉下划线 */
}

/* 如果鼠标放上去或者选中时也不要下划线，可以加上这行 */
nav a:hover, nav a:focus {
    text-decoration: none !important;
}

.about-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
/* --- 优化产品卡片内的“包含产品”文字排版 --- */
.product-card p, 
.product-card .product-desc,
.product-card span {
    text-align: left !important;      /* 1. 将文字改为左对齐，告别中间挤在一起的凌乱感 */
    padding: 0 15px;                  /* 2. 左右留出安全边距，不贴边 */
    font-size: 13px;                  /* 3. 稍微调小一点字号，显得精致 */
    color: #666666;                   /* 4. 颜色稍微变淡，主次更分明 */
    line-height: 1.5;                 /* 5. 增加行高，文字不拥挤 */
}
