body {
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    padding-top: 40px;  /* 添加顶部padding，防止内容被导航栏遮挡 */
}

header {
    background: #000;  /* 改为纯黑色 */
    color: #fff;
    padding: 5px 20px;  /* 减少上下padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;  /* 调整为40px */
    position: fixed;  /* 添加固定定位 */
    top: 0;  /* 固定在顶部 */
    left: 0;
    right: 0;
    z-index: 1000;  /* 确保导航栏在最上层 */
}

header .logo {
    text-align: left;
}

header .logo h1 {
    margin: 0;
    font-size: 1.2em;  /* 从1.4em调整为1.2em */
    color: #fff;
}

header .logo p {
    margin: 0;
    font-size: 1.2em;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0 -10px;  /* 添加左边距-10px，整体向左移动 */
    display: flex;
    justify-content: flex-end;
}

nav ul li {
    display: inline;
    margin: 0 12px;  /* 减少导航项间距 */
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;  /* 进一步缩小导航字体 */
    font-weight: normal;
    padding: 4px 8px;  /* 减少内边距 */
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);  /* 添加悬停效果 */
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero .slogan {
    position: absolute;
    top: calc(50% - 55px);  /* 从calc(50% - 40px)调整为calc(50% - 55px) */
    left: calc(50% - 15px);
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    background: none;
    padding: 20px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero .slogan h2 {
    font-size: 2.5em;
    margin: 0;
}

.hero .slogan p {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
    font-family: 'Arial Black', sans-serif;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(128, 128, 128, 0.7);
    letter-spacing: 4px;
    line-height: 1.2;
    padding: 20px;
    white-space: nowrap;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;  /* 从2s调整为1s */
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.slideshow img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow img:first-child {
    opacity: 1;
}

.slideshow img:nth-child(3) {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    transition: opacity 1s ease-in-out;
    filter: blur(5px) brightness(1.2);  /* 添加模糊和亮度效果 */
}

section {
    padding: 50px 20px;
    text-align: center;
}

section h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.product-list {
    display: flex;
    justify-content: space-between;  /* 改为space-between */
    flex-wrap: nowrap;  /* 取消换行 */
    max-width: 1200px;  /* 增加最大宽度 */
    margin: 0 auto;  /* 居中 */
}

.product {
    background-color: #fff;
    padding: 20px;
    margin: 0 10px;  /* 调整左右margin */
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 30%;  /* 保持30%宽度 */
    min-width: 250px;
    flex: 1;  /* 使每个项目均匀分布 */
}

.product h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.product p {
    line-height: 1.6;
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.contact label {
    display: block;
    margin: 10px 0 5px;
}

.contact input, .contact textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact button {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 15px;  /* 从20px调整为15px */
    margin-top: 50px;
}

#about {
    margin-top: -40px;  /* 从-30px调整为-40px */
    padding: 50px 20px;
    text-align: center;
}

#products {
    margin-top: -10px;  /* 添加负margin */
    padding: 50px 20px;
    text-align: center;
}

#products h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

#contact {
    background-color: #f8f8f8;
    padding: 50px 20px;
}

.contact-info {
    display: flex;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.qr-code {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
}

.contact-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.fa-envelope {
    font-size: 40px;
    color: #333;
    margin-bottom: 10px;
}

.contact-details p {
    margin: 0;
    font-size: 1.1em;
    color: #666;
}

.menu-toggle {
    display: none;  /* 默认隐藏 */
}

/* 添加媒体查询，针对移动端优化 */
@media (max-width: 768px) {
    body {
        padding-top: 50px;  /* 增加顶部padding */
    }

    header {
        height: 50px;  /* 增加高度 */
        padding: 5px 10px;  /* 减少左右padding */
    }

    header .logo h1 {
        font-size: 1em;  /* 进一步缩小公司名字 */
    }

    nav {
        position: fixed;
        top: 50px;  /* 与header高度一致 */
        right: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.9);
        padding: 10px;
        border-radius: 0 0 0 8px;
        display: none;  /* 默认隐藏 */
    }

    nav.active {
        display: block;  /* 显示导航 */
    }

    nav ul {
        flex-direction: column;
        align-items: flex-end;
        margin: 0;
        padding: 0;
    }

    nav ul li {
        margin: 5px 0;
    }

    .menu-toggle {
        display: block;  /* 仅在移动端显示 */
    }

    .hero .slogan {
        width: 95%;
        padding: 10px;
        top: calc(50% - 65px);  /* 从calc(50% - 70px)调整为calc(50% - 65px) */
        transform: translate(-50%, -50%);
    }

    .hero .slogan p {
        font-size: 1.5em;
        letter-spacing: 1px;
        line-height: 1.3;
        white-space: normal;
        word-break: keep-all;
        opacity: 0;  /* 初始透明度为0 */
        transform: translateY(5px);  /* 初始位置下移5px */
        animation: fadeInUp 1s ease-in-out forwards;  /* 添加淡入动画 */
    }

    @keyframes fadeInUp {
        0% {
            opacity: 0;
            transform: translateY(10px);  /* 初始位置下移10px */
        }
        100% {
            opacity: 1;
            transform: translateY(5px);  /* 最终位置下移5px */
        }
    }

    .product-list {
        flex-direction: column;  /* 改为垂直排列 */
        align-items: center;  /* 居中 */
    }

    .product {
        width: 80%;  /* 增加宽度 */
        margin: 10px 0;  /* 调整上下margin */
    }

    section {
        padding: 20px 10px;
        margin-bottom: 0;  /* 移除底部margin */
    }

    section h2 {
        font-size: 1.5em;  /* 缩小标题字体 */
    }

    .contact form {
        padding: 0 10px;  /* 增加左右padding */
    }

    footer {
        padding: 5px;
        margin-top: 20px;  /* 从50px调整为20px */
    }

    #contact {
        padding: 20px 10px;  /* 从50px 20px调整为20px 10px */
    }

    .contact-card {
        width: 100%;
        max-width: 300px;
        padding: 20px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    .fa-envelope {
        font-size: 35px;
    }

    #about {
        margin-bottom: 0;
        padding-bottom: 15px;  /* 增加底部padding */
        border-bottom: 1px solid #eee;  /* 添加分割线 */
    }

    #products {
        margin-top: 0;
        padding-top: 15px;  /* 增加顶部padding */
    }

    #products h2 {
        font-size: 1.5em;  /* 确保与公司介绍标题字号一致 */
    }
} 