/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
}

/* 导航栏 */
nav {
    padding: 1rem 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 80px;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.contact-number-container {
    display: flex;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 5px;
    padding: 0 20px;
    max-width: 200px;
    box-sizing: border-box;
    height: 60px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-number {
    color: #ff8c00;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    padding: 8px 16px;
    background: #f8f8f8;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* 修正滚动定位偏移 */
html {
    scroll-padding-top: 112px; /* 导航栏总高度 = padding-top + padding-bottom + content height */
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

.logo {
    margin-right: 20px;
    margin-left: 20px;
}

.contact-info-top {
    position: relative;
    height: 80px;
}

.logo img {
    height: 80px;
    width: auto;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    position: absolute;
    right: 20px;
    bottom: 20px;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    background-color: #ff8c00;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #e67e22;
}

/* 页面内容 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    background: url('images/product-banner01.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    background-color: white;
    transform: scale(0.89);
    transform-origin: center center;
}

.hero > div {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    background: transparent;
    box-shadow: none;
}

/* 图片尺寸建议 */
.banner-specs {
    display: none; /* 仅用于展示规格要求 */
    content: "推荐图片尺寸：1920x1080px (16:9)，最小宽度1200px，文件格式：JPG/PNG，文件大小：<500KB，确保重要内容在安全区域内（距离边缘至少10%）";
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
}

/* 加载动画 */
body:not(.loaded) {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

/* 导航栏激活状态 */
nav a.active {
    background-color: #e67e22;
    border-radius: 4px;
}

/* 产品部分 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    padding-left: 20px;
}

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

.product-card img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
    padding-top: 20px;
}

.product-card h3 {
    color: #333;
    padding: 1rem 1rem 0;
    margin: 0;
}

.product-card p {
    color: #666;
    padding: 0 1rem;
    margin: 0.5rem 0;
}

.product-card ul {
    padding: 1rem;
    margin: 0;
    list-style: none;
}

.product-card li {
    padding: 0.25rem 0;
    color: #444;
}

.product-card li::before {
    content: "•";
    color: #ff8c00;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.spec-table {
    width: calc(100% - 40px);
    margin: 20px 20px 40px 20px;
    border-collapse: collapse;
    box-sizing: border-box;
}

.spec-table th,
.spec-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.spec-table td:nth-child(3) {
    width: auto;
    max-width: 150px;
}

.spec-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}

.spec-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.spec-table tr:hover {
    background-color: #f5f5f5;
}

/* 解决方案部分 */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.solution-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.solution-card h3 {
    color: #333;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff8c00;
}

.solution-card ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.solution-card li {
    padding: 0.5rem 0;
    color: #444;
}

.solution-card li::before {
    content: "✓";
    color: #ff8c00;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

.solution-image {
    height: 280px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
    overflow: hidden;
}

.solution-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 768px) {
    .solution-image {
        height: 210px;
    }
}

/* 关于我们部分 */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text h3 {
    color: #333;
    margin: 1.5rem 0 1rem;
}

.about-text ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.about-text li {
    padding: 0.5rem 0;
    color: #444;
}

.about-text li::before {
    content: "✓";
    color: #ff8c00;
    display: inline-block;
    width: 1.5em;
    margin-left: 0;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #ff8c00;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
}

/* 实验测试部分 */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.test-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.test-card h3 {
    color: #333;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff8c00;
}

.test-card ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.test-card li {
    padding: 0.5rem 0;
    color: #444;
}

.test-card li::before {
    content: "✓";
    color: #ff8c00;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

/* 项目案例部分 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.case-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
}

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

.case-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.case-card h3 {
    color: #333;
    padding: 0 0 0.5rem 0;
    margin: 0 0 1rem 0;
    border-bottom: 2px solid #ff8c00;
    width: 100%;
}

.case-card ul {
    padding: 1rem;
    margin: 0;
    list-style: none;
}

.case-card li {
    padding: 0.25rem 0;
    color: #444;
}

.case-card li::before {
    content: "•";
    color: #ff8c00;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 联系我们部分 */
#contact {
    position: relative;
    z-index: 1;
    padding-top: 20px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-top: 0.25rem;
}

.contact-info {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 8px;
}

.contact-info h3 {
    color: #333;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin: 1rem 0;
    color: #444;
}

.social-links {
    margin-top: 2rem;
}

.social-link {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: #ff8c00;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: #e67e22;
}

.contact-form {
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: #ff8c00;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #e67e22;
}

/* 产品图片样式 */
.product-image {
    width: 60% !important;
    height: auto !important;
    margin: 20px 0;
    border-radius: 8px;
    overflow: visible;
    display: block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* 表单验证样式 */
.form-group.error input,
.form-group.error textarea {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}
